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

Add Smart Help Window Popup to Items and Skills | RPG Maker News #79

Is it unusual to think your own music is strange? xD I honestly don't know if I'm gonna use any of them :p
I've been keeping my cards fairly close to my chest, but Team Muxedo Task is proud to present the first offering for our contest entry: the title screen background.1624496085488.png

Forum statistics

Threads
112,516
Messages
1,068,843
Members
146,194
Latest member
collegestory
Top