AssumedPseudonym

Lawful Neutral
Veteran
Joined
Jul 15, 2021
Messages
71
Reaction score
84
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,908
Reaction score
8,600
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
84
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
84
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 Profile Posts

I love how I can look up a problem I'm having with my game, find a post from like six years ago that addresses the issue, and the solution provided still works in RPG Maker.
It's times like those that my life feels really easy XD
Change costumes with equipment!
When you're forced to make a tutorial for something obvious.
246907756_284595507001402_2098549601125689312_n.jpg
one dislike. tragic really ofended me bruh
i only have one decent song and i dont even think it fits for a video game

Forum statistics

Threads
115,943
Messages
1,094,223
Members
151,195
Latest member
PsykoPony
Top