"There was no effect" when applying states via Common Event in Skill

I'm trying to edit the normal Venom skill so that, in certain situations, a "Deep Poison" state is applied instead of a regular poison:
1695739074747.png


1695739115238.png


1695739132598.png


For example, currently it checks whether the target is asleep, and if they are, it applies Deep Poison. You can also be afflicted with Deep Poison if you happen to be unlucky (~25% chance).

However, before it runs this Common Event, the battler says "There was no effect on [target]," even when there is:
1695739260357.png


So, my questions are:
- Is there a way to get rid of this "There was no effect" message? Where do I control battler text like this, or is it even possible to?
- Using the common event function calls to apply states doesn't appear to give the appropriate message (e.g. it never says "%1 is poisoned!" even though that message is set up for the Poison state - see the first screenshot). Is there a way to force it to do so?

Thanks!
- Is there a way to get rid of this "There was no effect" message? Where do I control battler text like this, or is it even possible to?
It says there was no effect because your actual skill has no effect. It didn't change anything in the target's condition.

You could make it apply a dummy state that doesn't have any icon or apply message, then remove that dummy state in your common event.

- Using the common event function calls to apply states doesn't appear to give the appropriate message (e.g. it never says "%1 is poisoned!" even though that message is set up for the Poison state - see the first screenshot). Is there a way to force it to do so?
That message is not a part of the addState() function, it comes from the battle log's displayActionResults() - again, not registering because the state is not actually happening during the action, it's in the common event afterward.

You could, inside of the common event, repurpose your variable and then display the message manually:
Control Variables -> 1 -> Script: $gameActors.actor($gameVariables.value(1)).name()
Show Text -> \V[1] is poisoned!

Note that this is all a bit more complicated than it necessarily needs to be. If you install the VisuStella Battle Core plugin, you can just use the notetag:
Code:
<JS Post-Damage>
if (target.isStateAffected(10))
{
    $gameMessage.add(target.name() + " could not avoid the full force of the attack!");
    target.addState(81);
}
</JS Post-Damage>

And then, because that's being done during the skill, that should take care of both of your messaging problems at once.

I know you have some other stuff in your event where you're checking some other states that run off the side and there's a random chance of some stuff...I couldn't immediately make sense of what you're doing with those random numbers and extra variables, but it can all be easily (probably more easily) done in that notetag with code.
for the engine, common events are seperated from the skill that calls them.
that means the only way to get the first part is for the skill to have an additional effect aside from the common event.
I suggest making the regular effect that way, and have it exchanged to the other options in the common event if those apply
It says there was no effect because your actual skill has no effect. It didn't change anything in the target's condition.

You could make it apply a dummy state that doesn't have any icon or apply message, then remove that dummy state in your common event.


That message is not a part of the addState() function, it comes from the battle log's displayActionResults() - again, not registering because the state is not actually happening during the action, it's in the common event afterward.

You could, inside of the common event, repurpose your variable and then display the message manually:
Control Variables -> 1 -> Script: $gameActors.actor($gameVariables.value(1)).name()
Show Text -> \V[1] is poisoned!

Note that this is all a bit more complicated than it necessarily needs to be. If you install the VisuStella Battle Core plugin, you can just use the notetag:
Code:
<JS Post-Damage>
if (target.isStateAffected(10))
{
    $gameMessage.add(target.name() + " could not avoid the full force of the attack!");
    target.addState(81);
}
</JS Post-Damage>

And then, because that's being done during the skill, that should take care of both of your messaging problems at once.

I know you have some other stuff in your event where you're checking some other states that run off the side and there's a random chance of some stuff...I couldn't immediately make sense of what you're doing with those random numbers and extra variables, but it can all be easily (probably more easily) done in that notetag with code.


I've installed the VisuStella Core Engine and Battle Core, making sure that the Battle Core is below the Core Engine on the plugin list, but the notetag you've provided doesn't appear to do anything, even if the target is affected by state 10 (sleep). I've looked at other notetags (Pre-End Turn, etc.) and tested them just to see, but no dice. Other aspects of the plugin have taken effect, so I can tell it's been installed, but notetags in skills don't seem to have an effect in battle. is there anything else I need to do to get it working?
Are you making sure to start a new game every time you change anything to do with plugins or your database?
Are you making sure to start a new game every time you change anything to do with plugins or your database?
Oh dear, no, I didn't do that. Sorry, new to plugins lol. Will circle back after giving that a try. Thanks!
It's a good general rule to start a new game any time you change anything in your project. Not even having to do with plugins.

There are, technically, some changes that will propagate into a save game, but if you're not aware of specifically which things are which...just always start a new game.

Original thread: https://forums.rpgmakerweb.com/threads/there-was-no-effect-when-applying-states-via-common-event-in-skill.161487/