AssumedPseudonym

Lawful Neutral
Veteran
Joined
Jul 15, 2021
Messages
71
Reaction score
80
First Language
English
Primarily Uses
RMMV
 I’m trying to apply a state at the start of the battle that lasts for only the first turn via a Turn 0 event. Setting Duration in Turns to 1 ~ 1 causes the state to persist through the first turn and only be cleared after the actors act in second.

 While I can just open up States.json and manually edit both minTurns and maxTurns to 0, it resets to 1 after saving the project. (Before anyone asks: I don’t use that specific state anywhere else, so there’s no issue with me doing so.) I know updateStateTurns() lets you reduce state duration by one turn in damage formulae, but how would I go about doing so in an event?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,873
Reaction score
8,585
First Language
German
Primarily Uses
RMMV
Unless you have a plugin that changes this, duration 1-1 means the current turn only.
So if you apply a state with a duration of 1 on (for example) turn 5, then it is removed at the end of turn 5 - it will never go to turn 6.

So the default should already be what you want, and I can think of only three reasons why a 1-turn-state applied in turn 0 could last longer than the end of turn 0:

1) you made a mistake and the state is not applied in turn 0 but in turn 1
2) a plugin changed the behaviour

but most likely
3) turn 0 is not a real turn but only a way to apply events before the first turn, and as such has no state time counter at all. And in this case your approach idea would do nothing either.


Can you explain what exactly that state is supposed to do? Because nothing usually happens in turn 0, there is no actor or enemy skill use there at all in turn 0
 

AssumedPseudonym

Lawful Neutral
Veteran
Joined
Jul 15, 2021
Messages
71
Reaction score
80
First Language
English
Primarily Uses
RMMV
 I would show screenshots if I could, but technically difficulties are currently an issue. (Specifically the prt sc key is jammed. >.< )

 In the Troops tab of the database, the relevant troop has an event for Turn 0 (Turn 0 + 0 * X):

Force Action : #1 Monster Name Here, Terrifying Roar, Last Target

 The action in question affects all enemies (so, the party in this case). That part works fine. The effects of the action are to reduce the party’s TP to zero via a single line common event (which works) and inflict a state which reduces TP Charge to zero (which also works). The state is set to clear on action end (which it does, but on Turn 2). Manually changing States.json to have the state’s minDuration and maxDuration set to zero has the state clear on Turn 1 after the actor completes its action (behavior as intended).

 (Also, apparently closing the project, changing States.json, and then reopening the project prevents the manual changes to States.json from being overwritten as long as I don’t make any modifications to any of the states with RPG Maker. So… workaround, but not proper fix.)

 The only plugin being used is WeaponSkill, which doesn’t apply to anything here.
 
Last edited:

AssumedPseudonym

Lawful Neutral
Veteran
Joined
Jul 15, 2021
Messages
71
Reaction score
80
First Language
English
Primarily Uses
RMMV
 The script call I needed was $gameActors.actor(id).updateStateTurns(). Everything works properly without any need to manually adjust States.json now.

 Apologies for the double-post, but I wanted to note that this may now be closed as resolved.
 

Latest Threads

Latest Posts

Latest Profile Posts

Enemies deserve some spotlight also
hackingCompressed.gif
I think I can make a text-based mini-game with almost zero art assets and with code only...just a lot of code as assets all by themselves. :kaojoy:
A video update on the progress I've been making on the cutscenes. :kaosalute:

I wonder if color LUTs is possible for RPG Maker. It would be game changer and can replace the not so good looking tint screen
new mechanic in battle where you can mentally erase enemies when you deplete all their MP instead HP. this gives you a special item of their "memory". it's pretty to do in battle so far.

Forum statistics

Threads
115,866
Messages
1,093,578
Members
151,092
Latest member
FlaViews
Top