Yanfly Stat Allocation JP persist between Class Changes?

Jenova

Because you are...a puppet!
Veteran
Joined
Nov 29, 2017
Messages
447
Reaction score
292
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
567
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
447
Reaction score
292
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.

xktzxx7.png


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
567
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
447
Reaction score
292
First Language
English
Primarily Uses
RMMV

Kupotepo

Fantasy realist/Advocatus Diaboli
Veteran
Joined
Jul 5, 2017
Messages
1,958
Reaction score
2,101
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
447
Reaction score
292
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
447
Reaction score
292
First Language
English
Primarily Uses
RMMV

Latest Threads

Latest Posts

Latest Profile Posts

For a long time I always consider XP soundtracks as the best one.
Just listened to some of MZ tracks from the free version.
It's... Quite mindblowing. xD
Only listened to the battles, towns, and fields.
But I'm sure the rest are equally good. :D
What do you guys want to see for the new Jump into Javascript? A continuation of the rpg_objects, or would you prefer a "lesson 0" where I go back to the absolute basics of Javascript and cover the fundamentals of the language and its construction?
Hey RPG members!!

How do you finish projects? Some new game developers start off strong but end up losing momentum. What keeps you motivated while working on new projects?
Feeling wee sleepy.. ZzzZ
So many threads to move to the right place. My post count is awesome, but 95% of it is due to moving things.

Forum statistics

Threads
112,453
Messages
1,068,390
Members
146,110
Latest member
xxsampahxx
Top