Yanfly Stat Allocation JP persist between Class Changes?

Jenova

Because you are...a puppet!
Veteran
Joined
Nov 29, 2017
Messages
417
Reaction score
283
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?
I want everything in stat allocation to be carried over.
 

Kaliya

// Caffeine Overload
Developer
Joined
Nov 1, 2015
Messages
506
Reaction score
566
First Language
English
Primarily Uses
RMMV
Hello,

I took a look at the plugin and have devised this for you. It "should" do what you want with some minor changes.
JavaScript:
Game_Actor.prototype.getBaseClass = function () {
  var currentClass = $dataClasses[this._classId];
  if (currentClass) {
    if (currentClass.note.match(/<Base Class:[ ](\d+)>/i)) {
      return Number(RegExp.$1);
    }
  }
  return this._classId;
};
If you add the above function to right under the beginning of the Game_Actor code, and then replace anywhere where this._classId is in any of the Game_Actor functions with this.getBaseClass() it should....probably do what you want?

To use it in the class notebox area for each job, just add:
<Base Class: x>
wherein x is replaced with the class id of the initial job that, that class starts out as. Not having the notetag would revert it back to its current functionality for that job. This way, if you have a class say

Gladiator that then turns into Paladin, if Paladin has that notetag with the x value being that of the class id of Gladiator, then Paladin would get the stat allocation values of Gladiator. If not then it would work as it does now.
 

Jenova

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

I took a look at the plugin and have devised this for you. It "should" do what you want with some minor changes.
JavaScript:
Game_Actor.prototype.getBaseClass = function () {
  var currentClass = $dataClasses[this._classId];
  if (currentClass) {
    if (currentClass.note.match(/<Base Class:[ ](\d+)>/i)) {
      return Number(RegExp.$1);
    }
  }
  return this._classId;
};
If you add the above function to right under the beginning of the Game_Actor code, and then replace anywhere where this._classId is in any of the Game_Actor functions with this.getBaseClass() it should....probably do what you want?

To use it in the class notebox area for each job, just add:
<Base Class: x>
wherein x is replaced with the class id of the initial job that, that class starts out as. Not having the notetag would revert it back to its current functionality for that job. This way, if you have a class say

Gladiator that then turns into Paladin, if Paladin has that notetag with the x value being that of the class id of Gladiator, then Paladin would get the stat allocation values of Gladiator. If not then it would work as it does now.


Even with <Base Class: x> defined

When I did replace everything, i literally just did Find and Replace all

EDIT: And that was why. I didnt keep the code provided intact when replacing everything. lol
 

Kaliya

// Caffeine Overload
Developer
Joined
Nov 1, 2015
Messages
506
Reaction score
566
First Language
English
Primarily Uses
RMMV
EDIT: And that was why. I didnt keep the code provided intact when replacing everything. lol
Has it been resolved then?
 

Jenova

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

Kupotepo

Fantasy realist/Advocatus Diaboli
Veteran
Joined
Jul 5, 2017
Messages
1,945
Reaction score
2,065
First Language
Thai
Primarily Uses
RMMV
Maybe should look into @Frogboy plugin. You would like the inherit stats. I hope the plugin is not conflict with another plugin.


 

Jenova

Because you are...a puppet!
Veteran
Joined
Nov 29, 2017
Messages
417
Reaction score
283
First Language
English
Primarily Uses
RMMV
Maybe should look into @Frogboy plugin. You would like the inherit stats. I hope the plugin is not conflict with another plugin.


Thanks for that little tidbit. I'll look into it. :)
 

Jenova

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

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

Latest Threads

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,034
Messages
1,018,446
Members
137,820
Latest member
georg09byron
Top