Question concerning a couple of Yanfly's plugins.

jjoxford2007

Villager
Member
Joined
Nov 11, 2016
Messages
12
Reaction score
1
First Language
English
Primarily Uses
First off I would like to point out I have no JavaScript experience so if you mention anything pertaining to that, try to speak as if you're speaking to a 10 year old or something. I am using Yanfly's class change, auto passive state, job points, and skill learn plugins. The problem I'm having is I have my warrior class learn HP +30% which when learned keeps his current HP at what his max was and changes his max to 30% more which is good. But when I change from my warrior class to any other class, which for now all start at the same number for max HP, it cuts my current HP down. And then if I keep switching classes from warrior to whatever and back my current HP continues to drop by 1 or 2. So my question is why is it doing that, and how can I fix it? This is my first game, and although it won't be perfect, I don't really want this to be happening. Any and all help is appreciated. Thank you in advance.


Edit: I'm not sure which plugin I would go into to fix this if there is one. So I listed some of the ones I thought would be applicable.
 
Last edited by a moderator:

shockra

Slightly Crazy Programmer
Veteran
Joined
Feb 16, 2016
Messages
444
Reaction score
208
First Language
English
Primarily Uses
RMMV
I think the problem is that when you switch classes, the number keeps rounding off.  Repeated uses keep lowering the number further because it rounds the number down.  As for a fix, as long as it isn't altering your Max HP, I think you can get away with that.  You may have to keep it because fixing a problem like that could be a serious challenge.
 

jjoxford2007

Villager
Member
Joined
Nov 11, 2016
Messages
12
Reaction score
1
First Language
English
Primarily Uses
Hmm, okay. Well at least I have an idea as to why, thank you. People shouldn't be continuously swapping between classes anyways, haha. The only thing I find weird is when I swap to another class it goes from being a warrior with 450 current HP to whatever class I pick at 346 even though the max HP for all my classes at the moment is set to 450, also it stops rounding when current HP hits 442 for my warrior and 340 for my other classes. I wish there was a way to keep current HP static across all classes.


Edit: I think I might have figured it out. Although I know nothing in Java script, i took a look at the code anyways. In Yanfly's class change core there is a bit under:


Scene_Class.prototype.onItemOk = function() {


that says:


this.actor().setHp(hpAmount);


that I changed to:


this.actor().setHp(this.actor().hp);


and it keeps the current HP static I think. When I switch from warrior to something else it stays at what the current HP was and when i go back its still the same. I even tried making a class with less max HP and when I swapped to that class and back, my current HP was that of the max of that lowered classes HP which is what i wanted. So I think I may be set, but for some reason I get the feeling I may have messed something up that im not yet aware of.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,049
Messages
1,018,546
Members
137,835
Latest member
yetisteven
Top