itachi11115

Veteran
Veteran
Joined
Jun 12, 2018
Messages
59
Reaction score
22
First Language
English
Primarily Uses
RMMV
I have an attack which requires that the user recharge afterwards. I used a.addState in the damage formula to give it to the user, and it works, but the text does not display as it should when the state persists. In the state window, I have it set to say "(user) is recharging!" but nothing comes up. Anyone know how to fix this?
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
3,672
Reaction score
2,759
First Language
EN
Primarily Uses
RMMZ

I've moved this thread to MV Support. Thank you.

(Originally posted in General Discussion.)

The "persist" message should display. If it's not showing for you, maybe share a screenshot of your state in the database?

I think the "add state" message does not display in this case because by default the engine only checks the action target for damage, states, etc, not the user. Possible solutions:
  1. Manually show battle log text via the damage formula, e.g.

    BattleManager._logWindow.addText(a.name() + " is recharging!"); a.atk * 4 - b.def * 2
  2. Manually trigger the user's "state add" message(s) via the damage formula, e.g.

    a.addState(10); BattleManager._logWindow.displayAffectedStatus(a); a.atk * 4 - b.def * 2
  3. Find a plugin that automatically checks/displays this stuff (YEP_BattleEngineCore?).
Generally the damage formula is only meant for calculating a value, not for actually applying effects. You may also run into problems if this skill can be used by any actor with an Autobattle trait, since the AI evaluates potential actions' formulae to decide which one to use. That's why plugins like YEP_SkillCore offer pre-/post-damage notetags, so you can separate on-use effects from the actual formula.
 

Latest Threads

Latest Posts

Latest Profile Posts

The main game of my trilo/saga 50%OFF on Steam..... its now or never more
I swap between Ace and MZ so I can stay fresh but - what do you mean you can use subfolders in the plugin's folder for easier organization!?
Did some new music again, praise be. To the next song!
Watch Studio Blue play Numina by starlit in our latest RPG Maker Games Critique stream starting NOW!

Forum statistics

Threads
123,137
Messages
1,154,237
Members
161,472
Latest member
lestat90
Top