Common event for a skill works in battle test but not in game

I have a common event for the guns in my game, using the weaponskill plugin, that tick up a variable, and once the variable reaches a number, the actor is given a state for 1 turn, forced to reload the gun and skipping their action. When I first tested the skill in a battle test, it worked fine, but when I went to playtest my game fully, the reload state was never triggered.
I have a common event...
1734750684004.png


the reload state was never triggered
can you confirm that the common event is being ran at all? do all the other parts besides the state being applied work?
can you confirm that the common event is being ran at all? do all the other parts besides the state being applied work?
Well, the damage happens, and like I said, it works in a battle test. If I had to guess though, it is, in fact, not running during normal gameplay and I'm not sure why
If I had to guess though, it is, in fact, not running during normal gameplay and I'm not sure why
thats why i had asked if you can confirm it. we want to not have to guess. use the console to ensure that the variable is increasing after use or put a show text command inside of the common event to be sure if it is running in the first place.

Well, the damage happens
the weaponskill plugin doesnt change anything that has to do with a skill's damage and effects being processed. all it does is change the attack id of an actor and makes a slight adjustment to target selection for pressing "attack".

make sure that this isnt the fault of the weaponskill plugin. if you used this skill the normal way from the skill menu does it still not work? do other skills with common events work? if you remove the plugin, does it work then? id wager its some other plugin, but im only going off of what i can see.
and as the first answer said inside the big picture:
we need to see what you did before we can say what you did wrong.

that said, there is a problem with using battletest, which is why it is considered unreliable:
The battletest uses shortcuts to skip the game setup, resulting in many plugins malfunctioning.

so one reason why it works might be because some of your battleplugins would redirect the battlesystem code.

and another problem might be if you playtested with an incompatible savefile. you should always test with new game option.
Okay, I've got pictures of the relevant information

The Common event:

Screenshot 2024-12-21 134840.png


The skill:
1734810663207.png


And the state, if that matters:
1734810714115.png


I'm going to do a test to check if the common event is even running, I'll edit or reply to update, depending.

Edit: I think I found the issue. If the player ends a fight with exactly 2 shots fired, the state won't be applied, and the variable isn't reset. This means the variable won't ever equal exactly 2 afterwards, it'll be added to and become 3.

This makes the fix very easy. Just change the conditional branch to "Greater than or Equal to"

Original thread: https://forums.rpgmakerweb.com/threads/common-event-for-a-skill-works-in-battle-test-but-not-in-game.174057/