Yanfly Subclass JP addon

Yanfly Engine Ace - JP Manager v1.06 Addon for subclass
Yanfly + Roninator2

Introduction

Added support for subclass to earn battle jp.

Features
Subclasses can earn JP to be used for the subclass to learn skills and what not.
Subclass will use their JP not the main class JP.
You can specify if you want the subclass to earn battle jp or not
You can shorten the class name if the name is too long (cuts into the jp value)

Screenshots
Spoiler: pics
upload_2019-10-11_16-52-4.png

upload_2019-10-11_16-52-52.png

upload_2019-10-11_16-54-6.png


How to Use
Must be placed below
Yanfly Class System <- required
Estriole Subclass Addon <- required
Yanfly JP Manager <- required

Yanfly Learn Skills required to make use of the JP, unless you have another way to use them.

Script
JP Manager for Subclass
Subclass JP - no skill JP addon
Credit and Thanks
- Roninator2

Author's Notes
Follow Yanfly's Terms Of Use
def gain_jp(jp, class_id = nil)
init_jp if @jp.nil?
class_id = @class_id if class_id.nil?
class_id_sub = @subclass_id if class_id.nil?
@jp[class_id] = 0 if @jp[class_id].nil?
@jp[class_id] += jp.to_i
@jp[class_id] = [[@jp[class_id], YEA::JP::MAX_JP].min, 0].max
if $game_party.in_battle && R2_subclass_battle_jp::Gain_JP
jp = (jp * R2_subclass_battle_jp::JP_factor).round if @count == 0
@jp[@subclass_id] += jp.to_i if (@subclass_id != nil || 0) && @count == 0
@count += 1
end
@battle_jp_earned = 0 if @battle_jp_earned.nil? && $game_party.in_battle
@battle_jp_earned += jp.to_i if $game_party.in_battle
end
Something within this part is making it to where I can't get any JP from the enemy with the subclass. Do note the rest of the script works though.
I can't get any JP from the enemy with the subclass
All my tests, even with your game, work fine.
*update

Script now works for maintain_level set to true or false
*update

Script now works for maintain_level set to true or false
Well, i know why that part of the script was not working for me.
Line 94: change @count += 1 to @count = 0
change @count += 1 to @count = 0
True, it must have been a part that I had tested with and worked for me.
Never gave me any issues but if you are setting it to 0 then you can just comment out the line.
Interesting enough now it works without that value anywhere. strange.

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-subclass-jp-addon.114163/