SRPG Engine - Plugins for creating Turn Based Strategy game

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
759
Reaction score
460
First Language
English
Primarily Uses
RMMV
Stat based counter is not working, I placed it below DirectionMod.
Counter works as default when I disable StatBasedCounter, and DirectionMod works as well.

Is there something that I'm missing here?


Also, the Win/Lose Condition script gives me an error, TypeError, cannot read property 'push' of undefined.
$gameSystem.setSrpgWinCondition('Defeat all enemies');
Can you explain what you mean when you say counters are "not working"? Also, MapBattle should be placed below FloorDamage and above ShowPath, since it's a visual plugin not a functional one.

Unintuitively, it seems you have to call $gameSystem.clearSrpgWinCondition() before you ever call setSrpgWinCondition. It's probably not bad practice to always clear before setting anyway, but that's just a weird code gaffe, I might patch that if I do anything else with the core script or have to otherwise update it again.
 

chrisxiao

Sin
Member
Joined
Oct 27, 2014
Messages
11
Reaction score
6
First Language
English
Primarily Uses
RMMV
Can you explain what you mean when you say counters are "not working"?
Thank you for the reply.

Means it won't counter attack, no matter how much I increase the SideAttack and BackAttack CNT in the plugin, but if I disable the plugin, counter attacks are working again.

I tried the default parameters, I tried parameters more than 1 for both, and still nothing.

Is there anything else I need to set up here? :aswt2:
 

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
759
Reaction score
460
First Language
English
Primarily Uses
RMMV
Thank you for the reply.

Means it won't counter attack, no matter how much I increase the SideAttack and BackAttack CNT in the plugin, but if I disable the plugin, counter attacks are working again.

I tried the default parameters, I tried parameters more than 1 for both, and still nothing.

Is there anything else I need to set up here? :aswt2:
Stat-based counter uses the CNT (Counter Attack) property of the actor or enemy, which is 0% by default. SideAttack and BackAttack CNT are both multipliers on that value, same as the back/side accuracy and evasion bonuses in the directionMod plugin. In short: The point of the StatBasedCounter plugin is that nobody will do a counter attack unless you give them a Counter Attack bonus from something, be it a state, equipment, class, or the actor/enemy themselves.

For example:
 

chrisxiao

Sin
Member
Joined
Oct 27, 2014
Messages
11
Reaction score
6
First Language
English
Primarily Uses
RMMV
Stat-based counter uses the CNT (Counter Attack) property of the actor or enemy, which is 0% by default. SideAttack and BackAttack CNT are both multipliers on that value, same as the back/side accuracy and evasion bonuses in the directionMod plugin. In short: The point of the StatBasedCounter plugin is that nobody will do a counter attack unless you give them a Counter Attack bonus from something, be it a state, equipment, class, or the actor/enemy themselves.

For example:
Ah, I'm so dumb...:kaoswt2:
Thank you very much!
 

NeoAmon

Villager
Member
Joined
Nov 3, 2015
Messages
6
Reaction score
0
First Language
English
Currently there is no support for this, mostly because mapBattle doesn't work identically to sideview battles. I might try to set up a toggle or tag for it, but I can't give any kind of timeline, or whether I'll actually get to it- I'm currently working on a better AI system that actually knows how to use AoE and anyTarget skills, and doesn't try to use skills that can't hit anything when there's a perfectly valid target for another skill somewhere else.
Ah, that makes sense. Fair enough, Dok.

If I can ask you one more question: I've been playing around with custom sprites in the map battle system, but it seems like everything is happening lightning fast. The attack and counterattack happen nearly on top of each other, and sometimes the ending frames are getting lost.

I've tinkered with the frame speed setting in the Event Motions plugin, but if I slow things down too much, either the final frames don't appear, or sometimes the counterattack doesn't even happen at all. And none of the motions seem keen to wait on the animations, they happen simultaneously.

Is this just a consequence of your system being a "work in progress", or am I missing something to get this set up properly?
 

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
759
Reaction score
460
First Language
English
Primarily Uses
RMMV
Ah, that makes sense. Fair enough, Dok.

If I can ask you one more question: I've been playing around with custom sprites in the map battle system, but it seems like everything is happening lightning fast. The attack and counterattack happen nearly on top of each other, and sometimes the ending frames are getting lost.

I've tinkered with the frame speed setting in the Event Motions plugin, but if I slow things down too much, either the final frames don't appear, or sometimes the counterattack doesn't even happen at all. And none of the motions seem keen to wait on the animations, they happen simultaneously.

Is this just a consequence of your system being a "work in progress", or am I missing something to get this set up properly?
The simple of it is that nothing waits on motions, and everything starts happening on the same frame- but if you turn off fast AoE in the mapBattle plugin params, it will wait for the animation (not motion) to finish playing before starting the next thing.

I will probably revisit some of those settings if I can figure out a simple, logical way to handle it in the code, but a lot of it is going to depend on messing around with the timing of the animations.
 

RaddRadda

Villager
Member
Joined
Feb 13, 2014
Messages
20
Reaction score
2
First Language
English
Primarily Uses
RMMV
No it doesn't but you can create one with common events.
How would you use common events to create a "preperation" phase like in Fire Emblem? I was hoping there'd be an extension, but common events will work, too. I'd like to be able to choose which units I bring to battle from a list (that grows over the course of the game), and where the units I bring spawn (with there being a handful of set spawn points). So... just like Fire Emblem lol.
 

NeoAmon

Villager
Member
Joined
Nov 3, 2015
Messages
6
Reaction score
0
First Language
English
The simple of it is that nothing waits on motions, and everything starts happening on the same frame- but if you turn off fast AoE in the mapBattle plugin params, it will wait for the animation (not motion) to finish playing before starting the next thing.

I will probably revisit some of those settings if I can figure out a simple, logical way to handle it in the code, but a lot of it is going to depend on messing around with the timing of the animations.
TBH, I think the messier part of it is that motions don't seem to be waiting on each other to execute. You would expect it to flow like:

-> Attacker Attack motion / Animation
-> Defender Damage/Evasion motion
-> Defender Attack motion for counterattack / Animation
-> Attacker Damage/Evasion motion

But instead I get something more like:

-> Attacker attack motion / Defender Damage/Evasion motion simultaneously
-> Both attack animations flash on screen
- no motions from the counterattack happen at all.

I can at least prevent it from looking messy by disabling counterattacks, although I don't think that's an ideal solution.

Also, the Damage/Evasion motions appear to be getting snagged into a repeat loop, even when they aren't set to do that, if they happen at the end of a turn.
 

MetalKing11417

Veteran
Veteran
Joined
Jul 7, 2018
Messages
56
Reaction score
28
First Language
english
Primarily Uses
RMMV
Dr. q, I have discovered a minor error in your range control plug-in: when the default range is set to 1, <srpgRange:0> skills (i.e skills intended to target the user) will instead become set to range 1.

Also, when using various forms of transformations, (both the standard Change actor images found in the event tabs and http://www.yanfly.moe/wiki/Actor_Transformations_(MV_Plugin_Tips_&_Tricks), the actor will change both face and battler images, but not the char, or on map sprite. While the latter seems to be an aspect of the tips and tricks in general (as trying it in a different game shows that the no char change still applies, at least until one moves to a different map), the former appears to be an aspect of the SRPG battle as outside it, the sprite change still happens.
 
Last edited:

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
759
Reaction score
460
First Language
English
Primarily Uses
RMMV
Dr. q, I have discovered a minor error in your range control plug-in: when the default range is set to 1, <srpgRange:0> skills (i.e skills intended to target the user) will instead become set to range 1.

Also, when using various forms of transformations, (both the standard Change actor images found in the event tabs and http://www.yanfly.moe/wiki/Actor_Transformations_(MV_Plugin_Tips_&_Tricks), the actor will change both face and battler images, but not the char, or on map sprite. While the latter seems to be an aspect of the tips and tricks in general (as trying it in a different game shows that the no char change still applies, at least until one moves to a different map), the former appears to be an aspect of the SRPG battle as outside it, the sprite change still happens.
I'll look into that error, thanks for reporting it.
[EDIT]
I haven't been able to reproduce the problem in my own projects, where I use 0-range effects extensively. Do you have a default minimum range set to 1? If so, you'd have to give the self-target skill a specific minimum range of 0, because the maximum range can't go below the minimum.
[/EDIT]

As to the transformations, you are correct! That's because the actors in SRPG battle are the events you used as spawn points, which have their sprites updated to match the actor's when they're first initialized. You'll have to change the image on their associated event directly- if you're using one of my plugins, such as MapBattle or PositionEffects, you can call .event() on the battler object (user/target/a/b/whatever) to get access to the event representing them quickly.
 
Last edited:

MetalKing11417

Veteran
Veteran
Joined
Jul 7, 2018
Messages
56
Reaction score
28
First Language
english
Primarily Uses
RMMV
I'll look into that error, thanks for reporting it.
[EDIT]
I haven't been able to reproduce the problem in my own projects, where I use 0-range effects extensively. Do you have a default minimum range set to 1? If so, you'd have to give the self-target skill a specific minimum range of 0, because the maximum range can't go below the minimum.
[/EDIT]

As to the transformations, you are correct! That's because the actors in SRPG battle are the events you used as spawn points, which have their sprites updated to match the actor's when they're first initialized. You'll have to change the image on their associated event directly- if you're using one of my plugins, such as MapBattle or PositionEffects, you can call .event() on the battler object (user/target/a/b/whatever) to get access to the event representing them quickly.
"Checks again"
Well it seems that after updating some of the core RPGmaker scripts, the problem seems to have gone away. Sorry about that.

Also, could you give some sample script for a transformation skill on the map. I already have a variable relating to the actor in question, and a common event that checks whether to apply the transformation buff in question. (Note that I am using PositionEffects but not on map battle)
 
Last edited:

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
759
Reaction score
460
First Language
English
Primarily Uses
RMMV
@MetalKing11417 Lets say, in your script, that the person being transformed is referenced by "target." You'd do something like:
JavaScript:
target.event().setImage('newCharacterImageFilename', index);
Where index is between 0 and 8, as per usual with sprites.
 

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
759
Reaction score
460
First Language
English
Primarily Uses
RMMV
Updates to the MapBattle system! SRPG_MapBattle, DRQ_EventMotions, and SRPG_MapBattle_Motions
  • Motions should display better and not get cut off
  • There's a (configurable!) delay between attack animations / motions, and skill effects being applied
  • If you configure the delay to wait until animations finish, it will also wait for the user's motions to finish
 

Spideycat

Villager
Member
Joined
Aug 4, 2015
Messages
5
Reaction score
1
First Language
English
Primarily Uses
So I've encountered a minor issue, at the end of the players turn the enemies move as intended but on returning to the player turn none of the units become active and it immediately switchs to enemy combat but none of those units become active and it becomes an infinite loop of nothing lol
 

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
759
Reaction score
460
First Language
English
Primarily Uses
RMMV
So I've encountered a minor issue, at the end of the players turn the enemies move as intended but on returning to the player turn none of the units become active and it immediately switchs to enemy combat but none of those units become active and it becomes an infinite loop of nothing lol
I've never seen that issue before, so it'd help if you could say which add-ons you're using, and how your turn start/end events are set up.
 

Spideycat

Villager
Member
Joined
Aug 4, 2015
Messages
5
Reaction score
1
First Language
English
Primarily Uses
I've never seen that issue before, so it'd help if you could say which add-ons you're using, and how your turn start/end events are set up.
So it was an issue with the add-ons and their ordering, I rearranged them more so to look like how it was setup in the demo and the issue seemed to go away. Thanks for help!
 

Dopan

Veteran
Veteran
Joined
Mar 27, 2020
Messages
65
Reaction score
11
First Language
German
Primarily Uses
Other
Hi ,First of all im pretty new to rpg mv and im really happy about SRPG,.. im trying to use most of Doktor Qs Plugins as well..
The problem is, i got allready a lot of Plugins that work so far, also the most i needed from SRPG but atm i cant use a few..

I will add a few Screenshots for better information and try to explain what i know so far.
From what i could unterstand from the topic here,some plugins are incompatible with others while a few even need each other to work.
I will show my Plugin Set up and the Error-Message i get when i try to use the CooldownPatch.js.
I get the error when a attack starts..
I tryed different Positions i just took this one as example.

SRPG_MapBattle.js ,which seems to be needed for this,from what i read here, doesnt work for me atm.Perhaps i dont know the right set up..the order which other plugins are ok or not ect .

In the last part of my Plugin Manager are the "OFF"- Plugins which i dont need or dont know how to handle yet..
the most important to add to my list would be for me :
-CooldownPatch.js
(because sleep goes for ever if nobody attack/cure.. that makes it easy to trick the KI)
-SRPG_MapBattle.js
-MapBattle_Motions.js

and i edited the SPRGM Q_ X+ in order to turn down the lv up sound after fights, its extremly loud and i found no other way to handle that.. (i had to adjust all my sounds way to loud and turn all low at the pc as workaround,before i found that method.. it was pure luck im a noob at JS as well)


However Thx in advance for all the work till here ,and even if its not possible to handle this,to make it work atm,ill be watching this topic and im curious to see what comes next.


>>
-> Working Plugin Set Up Pic 1a

Plugin manager pic 1.png
-
-> Working Plugin Set Up Pic 2

set up pic 2.png
-
-> Working Plugin Set Up Pic 3

set up pic 3.png
-
-> Working Plugin Set Up Pic 4

set up pic 4.png
------------------------------------------------------
------------------------------------------------------
-> Not Working Plugin Set up Pic 1b
bug set up (pic1b).png
-
-> Error Pic (after attack starts)
-
Bug report.png
 
Last edited:

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
759
Reaction score
460
First Language
English
Primarily Uses
RMMV
@Dopan To start with, only use the versions of my plugins feature on the github- UX+, for example, is an older version that is incompatible with certain plugins.

The ideal plugin order, from my experience, is roughly like this:
  1. All of your non-SRPG plugins- Yanfly engine, etc, in the order recommended by their plugin developers
  2. SRPG_core.js (use the version from my GitHub if you're using any of the plugins I wrote, or they won't work)
  3. Patches like CooldownPatch, limited uses, menu patch, or the battle engine core compatability
  4. Functional plugins that add new mechanics, such as SRPG_AoE, directionalMod, statBasedCounter, etc.
  5. Visual plugins that just change graphics- all the UX plugins, showPath, mapBattle, mapBattle_motions, etc.

Once you clean up that, I'd suggest starting with the fewest possible plugins on your game, and only add new ones when you need the functionality they add, and are ready to build that part into your game. This can keep your project cleaner, make it easier to identify bugs and avoid conflicts, and can potentially avoid performance problems. As it stands, there's too much going on to reliably troubleshoot.

And in other news, I spent the past two days cleaning up some more stuff, and am proud to announce an update:
SRPG_MapBattle and SRPG_MapBattle_Motions now have an in-game off switch, which can be wired up to an options menu or controlled by events. You can also use the <mapBattle:true> notetag to force a particular skill to always use mapBattle, and <mapBattle:false> to make sure it always goes to the battle scene. The two battle modes won't always have identical effects, so make sure to test each skill in both versions, especially if it can be used as a counter attack.
 

Dopan

Veteran
Veteran
Joined
Mar 27, 2020
Messages
65
Reaction score
11
First Language
German
Primarily Uses
Other
@Doktor_Q

EDIT. EVERYTHING WORKS NOW THX!




about UX+ is it possible to edit the newer versions the same way i dit it with old one(changing a few numbers) in order to edit the LV UP sound?

edit: i found out it is in the UX WINDOWS
volume from 90 to 50.png



Ok i took a new demo version,put your SPRG Core in it and added all addons from SRPG . I made a minimum build with NONE of the plugins which i only used on my project.
Only the SPRGdemo and SRPG Addons. I left most SRPG Addons "OFF" and deleted old Addons which should not be used in this Example..(like the old UX ect)

And i added YEP Skillcore and YEP X Skill Cooldowns

(Pics in Spoiler)
all works.png
Part2 most addons OFF.png

The Result is,that like in my own game-Project SRPG_MapBattle works now with the right core used.
and Cooldownpatch* works, but i missed to install
YEP X Skill Cooldowns at the first try..

*(YEP Skillcore and YEP X Skill Cooldowns Required)

SRPG_MapBattle_Motions** works ,but only if u didnt
forget to install DRQ_EventMotions,, like i did^^

**(DRQ_EventMotions required)





Last Edit

The new funktion: "SRPG_MapBattle and SRPG_MapBattle_Motions now have an in-game off switch,.."

is really nice! it works if u switch outside of battle aswell as if u switch it inside of battle..
(u can have a npc or are chest for example which can be aktivated in battle very similar to the ones in the demo.)
 
Last edited:

RaddRadda

Villager
Member
Joined
Feb 13, 2014
Messages
20
Reaction score
2
First Language
English
Primarily Uses
RMMV
I'm having an issue with one of my maps. When I complete the map, an error pops up (pictured below). It only happens with this one map, so I'm assuming the issue must be something in the map, but I've tried getting rid of other events, getting rid of the effects of other plugins, and nothing seems to be working to stop the error. The battle on my test map works fine, but this one doesn't.

TypeError.png

I don't know what image is undefined or what it's trying to read.

EDIT: I just figured out the problem. Apparently I messed up my post-battle event, but because of how I had things ordered it appeared like the issue was during the end of the battle. I completely missed the issue. I had it attempt to move the event that was the player in battle as opposed to the actual player character, and that seems to have caused the issue. Super simple error once I figured it out. I'm a dumb dumb sometimes lol

Never mind, it's still having issues. It's not even the end event. The scene I play before the battle starts is also causing issues. I don't even know what. I'm just gonna start deleting bits of that scene until whatever is causing issues is gone so I can figure out what's causing this.
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 3)

Latest Posts

Latest Profile Posts

Anyone have advice for recruiting friends to bugtest with you? I had some buddies volunteer without me asking, and we agreed on dates and times... and they all just flaked...
A mousefolk sprite I made, I think I did good.
Discovering math. functions for damage formulas was one of the greatest things for me.
It's very useful for balancing skills to work in a variety of possible circumstances.
For example if you have a skill that is supposed to work for both mages and warriors:
Code:
Math.max(a.atk * 2 - b.def, a.mat * 2 - b.mdf)
SpaceX: First-ever successful (manned) commercial spaceflight!! In these terrible and self-sabotaging times for the world, that's a ray of excitement and hope I needed badly.

Forum statistics

Threads
98,018
Messages
948,576
Members
129,276
Latest member
abhikhurana
Top