Bug with yanfly passive states

Nirwanda

Procrastimancer
Veteran
Joined
Nov 2, 2012
Messages
1,285
Reaction score
604
First Language
Spanish
Primarily Uses
RMMV
This bug is only aesthetic but it's kind of annoying. So, I'm using yanfly passive states+base param control to create a character growth system: you learn rogue skill it comes with a passive that gives + 10 agi, you learn a warrior skill and get an extra +5 to attack and so on.
The bug is that when you learn those skills the stats of the character on the status menu (and equip screen if you're not using yanfly equip core) won't update, it will still show the old stats. The thing is, this only happens if you checked your status beforehand; if you go straight to learn the skill the stats will update alright.
Anyway this can be easily fixed by entering a battle or unequiping and requiping something, but I fear it might cause some players to think the growth system is bugged, I know it did to me at first. So I was wondering if someone could help me with this.
You might be wondering why don't I go to yanfly with this problem. Turns out the only way to report bugs seems to be his ******* page and you can only post there if you are actively donating.
In any case I hope someone can help me and thanks in advance!
 

shockra

Slightly Crazy Programmer
Veteran
Joined
Feb 16, 2016
Messages
444
Reaction score
208
First Language
English
Primarily Uses
RMMV
The screen needs to be properly refreshed after learning the skill before it shows the updated stats. How exactly are the skills in question being learned? Level Up? Yanfly's Skill Learn plugin? Once I know that, I can tell how to fix this.
 

Nirwanda

Procrastimancer
Veteran
Joined
Nov 2, 2012
Messages
1,285
Reaction score
604
First Language
Spanish
Primarily Uses
RMMV
Thanks for answering!
For the record, I tried learning the skills through an event and the same thing happened. But they're being learned through this plugin. (warning! japanese ahead!) I'm afraid it's probably gonna be more complex than I thought if you have to deal with that massive moonrunes code. Sorry! I hope you can still manage but I'll understand if you can't.
EDIT: Sorry, forgot to add the link to the plugin!XD
https://github.com/futokoro/RPGMaker/blob/master/FTKR_SkillTreeSystem.js
 
Last edited:

shockra

Slightly Crazy Programmer
Veteran
Joined
Feb 16, 2016
Messages
444
Reaction score
208
First Language
English
Primarily Uses
RMMV
I'm not certain where exactly you'll need this, but this is the code you'll need:

$gameActors.actor(user.id).refresh();

That's a script that you'll want to use right after the new skill is learned. user.id should be the ID of the actor learning the skill. Depending on the exact way you're learning the skill, user.refresh() may also work.
 

Nirwanda

Procrastimancer
Veteran
Joined
Nov 2, 2012
Messages
1,285
Reaction score
604
First Language
Spanish
Primarily Uses
RMMV
Well I found where the skill is learned (line 2212)but I don't know how I would be able to tell the code to target the specific actor who learned the skill. So what I did was manually refresh all the actors and it seems to have worked. It won't cause any complications, down the line, will it?
Also, again a million thanks! :)
 

shockra

Slightly Crazy Programmer
Veteran
Joined
Feb 16, 2016
Messages
444
Reaction score
208
First Language
English
Primarily Uses
RMMV
Well I found where the skill is learned (line 2212)but I don't know how I would be able to tell the code to target the specific actor who learned the skill. So what I did was manually refresh all the actors and it seems to have worked. It won't cause any complications, down the line, will it?
Also, again a million thanks! :)
A manual refresh should be fine. Refreshing shouldn't cause any problems as long as the base code isn't significantly altered.
 

Nirwanda

Procrastimancer
Veteran
Joined
Nov 2, 2012
Messages
1,285
Reaction score
604
First Language
Spanish
Primarily Uses
RMMV
OK thanks a lot :)
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,049
Members
137,570
Latest member
fgfhdfg
Top