Need help with a Himeworks plugin

Hey

I’ve tried to add this plugin by Himeworks to my MZ project, which removes a state when an actor has taken so many actions:

It is for MV, but I’ve been able to add their MV plugins to my MZ project up until now, no problem.

My aim is basically that when an actor uses Guard, they stay in Guard until their next turn. Not have it removed as soon as they take damage.

I put this in the notetag of the Guard state: <remove by action count: 1 1>

It works when I do a battle test in the Troops tab. But when I actually play the game and try to use Guard, I get this error code:

TypeError

Cannot set property ‘2’ of undefined

Anyone have any idea how to fix this, or how to achieve the same result without this plugin?

Thanks

1 Like

Can you show the full error message in the console?

  1. Press F8. A separate window will appear.
  2. Switch to the Console tab. There should be some red text there.
  3. Copy-paste that text here.

This is what came up in red:

rmmz_managers.js:2036 TypeError: Cannot set property ‘2’ of undefined
at Game_Actor.Game_BattlerBase.resetStateActionCount (HIME_RemoveStateOnAction.js:150)
at Game_Actor.Game_BattlerBase.resetStateCounts (HIME_RemoveStateOnAction.js:139)
at Game_Actor.resetStateCounts (rmmz_objects.js:4142)
at Game_Actor.Game_Battler.addState (rmmz_objects.js:3641)
at Game_Actor.Game_Battler.addState (CGMZ_Encyclopedia.js:10457)
at Game_Action.itemEffectAddNormalState (rmmz_objects.js:2156)
at Game_Action.itemEffectAddState (rmmz_objects.js:2132)
at Game_Action.applyItemEffect (rmmz_objects.js:2064)
at Game_Action.applyItemEffect (NRP_CountTimeBattle.js:1736)
at Game_Action.applyItemEffect (EliMZ_CustomParameters.js:648)

1 Like

Hmm. It looks like the plugin doesn’t touch saved games, so that could be an expected result if you load an old saved game after enabling the plugin. Is that what you did?

1 Like

Yeah, from an autosave.

I just tested it then by starting a new game, to compare it. Working so far, so I’ll see how it goes from here.

Thanks.

2 Likes