I have a question about your snippets in your signature for the passive state fix. What you say to go to a line and add the code, do you mean go to that line, add another like, and then add the code, or do you mean literally make a new line that is that numbered line and adding it there?
MV Yanfly Buffs and States Core - user.gainHp(-x) not damaging.
Javascript/Plugin SupportI copied the following from the thread:
- Add a line means you go to the specified line number, place your cursor at the end of that line, then press Enter and paste the code as a new line.
It might also be a good idea to add a short comment on the same line using "//" so you know it was modified. This isn't such a huge deal since the plugin isn't going to be updated, but its good practice for when you are dealing with active plugins.
If you're dealing with an active plugin, an update would overwrite your bug fix. Unless the update addressed the bug, you'd probably want to go back and fix it. So its good to keep track of any manual changes you make, even going so far as to save copy of edited plugins in their own folder aside from your game project.
Also, if you find another bug that needs fixing, keeping track of added lines can help that as well, since after adding a line, your line counts may be off.
Ok, I've tried adding the changes in your plugin snippets, but I'm still getting NaN as the output, and the apply function still doesn't seem to be doing anything. When you said to save that bit as a plugin, I assumed it went below the Yanfly one, but when putting it below and above it still doesn't seem to work.
I'm wanting the state to be applied whenever a character goes below 5 TP, and it will start to drain their health faster and faster the longer it's applied. Is that something I can't do, or at least that would be better done in another way?
Rather than a custom apply effect, in the custom regenerate put this line at the beginning:
this._freezingCounter = this._freezingCounter || 1;
That actually worked and it now completely works! Thank you so much!
Original thread: https://forums.rpgmakerweb.com/threads/yanfly-buffs-and-states-core-user-gainhp-x-not-damaging.144141/