Yanfly Stat Allocation JP persist between Class Changes?

Jenova

Because you are...a puppet!
Veteran
Joined
Nov 29, 2017
Messages
328
Reaction score
166
First Language
English
Primarily Uses
RMMV
I already have a plugin that allows the gained JP, per actor, to persist between class changes, but not for JP put into stat allocations.

Would there be a way for this to be done?

Thanks. :)
 

Jenova

Because you are...a puppet!
Veteran
Joined
Nov 29, 2017
Messages
328
Reaction score
166
First Language
English
Primarily Uses
RMMV

Jenova

Because you are...a puppet!
Veteran
Joined
Nov 29, 2017
Messages
328
Reaction score
166
First Language
English
Primarily Uses
RMMV
Do I need to post my plugins? Let me know what I need so I can get this ball rolling!

:)
 

Jenova

Because you are...a puppet!
Veteran
Joined
Nov 29, 2017
Messages
328
Reaction score
166
First Language
English
Primarily Uses
RMMV

Jenova

Because you are...a puppet!
Veteran
Joined
Nov 29, 2017
Messages
328
Reaction score
166
First Language
English
Primarily Uses
RMMV

Jenova

Because you are...a puppet!
Veteran
Joined
Nov 29, 2017
Messages
328
Reaction score
166
First Language
English
Primarily Uses
RMMV

Jenova

Because you are...a puppet!
Veteran
Joined
Nov 29, 2017
Messages
328
Reaction score
166
First Language
English
Primarily Uses
RMMV

Jenova

Because you are...a puppet!
Veteran
Joined
Nov 29, 2017
Messages
328
Reaction score
166
First Language
English
Primarily Uses
RMMV
Bumping...
 

Jenova

Because you are...a puppet!
Veteran
Joined
Nov 29, 2017
Messages
328
Reaction score
166
First Language
English
Primarily Uses
RMMV

Jenova

Because you are...a puppet!
Veteran
Joined
Nov 29, 2017
Messages
328
Reaction score
166
First Language
English
Primarily Uses
RMMV
Bump (very late one too)
 

Kaliya

// Caffeine Overload
Developer
Joined
Nov 1, 2015
Messages
506
Reaction score
566
First Language
English
Primarily Uses
RMMV
You could use an array with the classId as an index to save an instance of the current allocation on class change while simultaneously setting the allocation to the saved allocation of the new class, or to nothing if no saved allocation exists. I don't know how the plugin handles storing the allocation so can't really help with anymore specifics. Good luck though.
 

Jenova

Because you are...a puppet!
Veteran
Joined
Nov 29, 2017
Messages
328
Reaction score
166
First Language
English
Primarily Uses
RMMV
You could use an array with the classId as an index to save an instance of the current allocation on class change while simultaneously setting the allocation to the saved allocation of the new class, or to nothing if no saved allocation exists. I don't know how the plugin handles storing the allocation so can't really help with anymore specifics. Good luck though.
I'm so sorry, but I have no idea what any of that means.
 

Kaliya

// Caffeine Overload
Developer
Joined
Nov 1, 2015
Messages
506
Reaction score
566
First Language
English
Primarily Uses
RMMV
After looking at the code for the plugin (I am assuming its YEP_StatAllocation) it appears this is already a thing...? It is saving the allocation based on the actors class. Maybe I misunderstood though. Are you actually saying if an actor puts a point into attack for example, that the point would be in attack for all classes?
 

Jenova

Because you are...a puppet!
Veteran
Joined
Nov 29, 2017
Messages
328
Reaction score
166
First Language
English
Primarily Uses
RMMV
After looking at the code for the plugin (I am assuming its YEP_StatAllocation) it appears this is already a thing...? It is saving the allocation based on the actors class. Maybe I misunderstood though. Are you actually saying if an actor puts a point into attack for example, that the point would be in attack for all classes?
To explain, actors can't go back to the previous class. So when they advance (not change, key word: advance) classes, I want then to keep the stats they allocated in the old class to the new class. I don't want them to have to revert all the invested points and then reinvest them in the new class or otherwise lose all the points they invested.
 

HumanNinjaToo

The Cheerful Pessimist
Veteran
Joined
Apr 18, 2013
Messages
1,113
Reaction score
517
First Language
English
Primarily Uses
RMMV
So how does the actor change class?

If you are changing class through an event, then you should be able to store the actors parameters in variables and then use those variables to reset the actor parameters once they have switched classes.

If you are using a plugin to change classes then I don't see why. If the player cannot change back to a previous class then what is the point of using a class change plugin? Why not use use an event to change the actor classes?
 

Jenova

Because you are...a puppet!
Veteran
Joined
Nov 29, 2017
Messages
328
Reaction score
166
First Language
English
Primarily Uses
RMMV
Just to address some things here:

So how does the actor change class?
Through either a quest or an item they can buy if they exchange enough gold to get Silver (ingame premium currency. Rate is: 10k Gold for 1 silver.). The quest is sorta easy, but if they don't wanna do quests, I give the choice of an item if they have enough silver.

If you are using a plugin to change classes then I don't see why. If the player cannot change back to a previous class then what is the point of using a class change plugin? Why not use use an event to change the actor classes?
I'm doing both events and a plugin. I use the events to do the quest and class change and the plugin for the visual change (Yanfly Class change core. <Class x Character: filename y> and <Class x Face: filename y> is what I am using for the first four actors).

Each character has a separate class tree they can go down: Dark and Light (e.g.: Dark Knight or Light Knight). Dark has 2 class advancements (e.g.: Honor (base class), Dark Knight (1st Dark Class), Berserker (2nd Dark Class)) and so does Light (e.g.: Honor (base class), Light Knight (1st Light Class), Gladiator (2nd Light Class))

Each set of classes has their own buffs/nerfs to stats, so Stat Allocation can either make up for the nerfs a class gets or maximize their buffs they already get or go down another path by injecting points into another stat.

I don't allow backtracking yet because I haven't gotten there yet. I want to make sure this part of the game is done before I allow it because the way the Stat Allocation works rn ingame, it would make things hard and confusing.

If you are changing class through an event, then you should be able to store the actors parameters in variables and then use those variables to reset the actor parameters once they have switched classes.
How would I go about that with Stat Allocation? I know I can with regular stats, but is there a way to store invested JP into a variable from Stat Allocation and push it to the new class Stat Allocation?
 

HumanNinjaToo

The Cheerful Pessimist
Veteran
Joined
Apr 18, 2013
Messages
1,113
Reaction score
517
First Language
English
Primarily Uses
RMMV
How would I go about that with Stat Allocation? I know I can with regular stats, but is there a way to store invested JP into a variable from Stat Allocation and push it to the new class Stat Allocation?
Maybe I am misunderstanding, but: What difference does it make as to how much JP has been invested? The stat has already been increased, and the JP has already been spent. I don't understand why you want to keep track of the amount of JP that has been spent.

I don't allow backtracking yet because I haven't gotten there yet. I want to make sure this part of the game is done before I allow it because the way the Stat Allocation works rn ingame, it would make things hard and confusing.
Is it because you eventually want the player to be able to switch classes freely? Meaning they can go back to older class at some point?

Edit: @Jenova I just took a look at the stat allocation plugin and noticed the revert option. I don't know a whole about how to dissect a plugin but, maybe someone could figure out a script call or plugin command for you to use in your event that changes the actor class, so that you could revert the JP spent on stats at the time of class change. Another way might be to force the revert command screen to open so that the player must make a choice when changing classes to revert and then regain that spend JP. I'm not sure if any of that is possible or not, but I think it could be done. There are a lot of really good coders that frequent the forums, maybe one would be willing to help.
 
Last edited:

Waifus69

Veteran
Veteran
Joined
Jun 30, 2020
Messages
36
Reaction score
16
First Language
English
Primarily Uses
RMMV
So basically if a player invested 100 JP into allocating their stats when they’re one class, you want to refund them back those 100 JP when they switch to a different class?
 

Jenova

Because you are...a puppet!
Veteran
Joined
Nov 29, 2017
Messages
328
Reaction score
166
First Language
English
Primarily Uses
RMMV
Ok, so let me tell you how my game works:

You start out with 4 players, each with their own base class: Harold (Honor), Marsha (Intellect), Therese (Bravery) and Sariel (Purpose).

Once you hit level 15, you can go to Division Hall and take the Light Quest or Dark Quest. This changes ALL characters to their Light/Dark classes, respectively. The Base class ceases to exist after that. Same thing for level 35. The 1st Light/Dark class ceases to exists and you've basically mastered either the dark or light influence on your body.

Now, when changing to those Light/Dark Classes, if you invested ANY JP into Stat Allocation, you wont get it back.

What I want, is, if you invested JP into the base class Stat Allocation BEFORE changing classes, I want you to KEEP the allocation AFTER changing the class. Otherwise it feels like all the stat building was for nothing.

EDIT: What I am doing in game rn is telling people to revert or lose all their stat allocation. I dont want that. That was a patch until I could keep the allocated stats from being lost between class changes.
 

HumanNinjaToo

The Cheerful Pessimist
Veteran
Joined
Apr 18, 2013
Messages
1,113
Reaction score
517
First Language
English
Primarily Uses
RMMV
So you just want the parameter amount increased by the stat allocation to carry over, not the whole parameter value?

I.e. my atk is 10, I add +5 via stat allocation. Next class has base AtK 6, so when I change class my atk should be 11 and not 15

is this correct?
 

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

Latest Threads

Latest Posts

Latest Profile Posts



It's my birthday! :kaoluv: Also, Cupcake is done and out(ill post about it in a couple of days, busy today)
Not to be greedy, but if anyone happens to have VX Ace or MV Resource steam keys that I don't have, lying around, I'd be happy to take them off your hands.
Got accepted into the architecture degree. Now I have all the doubting questions. Have to give them an answer in the next few days.
Just realized I have a few Steam gifts floating around. Anyone need RPG Maker MV or XP (Steam only)? Send me a message and I will send them on over!

EDIT: Just an RPG Maker MV gift remaining! XP has been taken.
*when you can do the Unity tutorials, but when you actually try and convert it to your own knowledge, it fails horribly*

Forum statistics

Threads
100,577
Messages
977,412
Members
132,163
Latest member
Guhh
Top