JP Skill Engine Problem with Subclass

I had that issue a little bit myself and just adjusted the dy value.
But why your main class does not show up I do not know.
View attachment 124968View attachment 124969
Where would i change the dy? Can't ind that in the Subclass JP Display you gave. NVM, i got it, how do i get the primary to show the name though?
how do i get the primary to show the name
I don't know, you must have something else configured to block it. The default is the picture I showed you. Works fine.
Been busy today. Will continue to try and work out the subclass gain jp issue.
I don't know, you must have something else configured to block it. The default is the picture I showed you. Works fine.
Been busy today. Will continue to try and work out the subclass gain jp issue.
Ok, thanks for the help, i will look into the primary name problem, and see what i can find. I fixed the primary Class name Showing up.
This is what it looks like right now W/ Subclass chosen:

How do I space them out a bit from each other?
Ok, lets try this. Remove all the extra script patches I wrote before and use this.
Spoiler: Yanfly - JP Manager Addon - Subclass Gain JP
Code:
#==============================================================================
# 
# ▼ Yanfly Engine Ace - JP Manager v1.00 Addon for subclass
# -- Last Updated: 2012.01.07
# -- Level: Normal, Hard
# -- Requires: n/a
# addon: Roninator2
#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2019.10.05 - Started Script
# 2019.10.06 - Added support for yanfly menu and subclass earn battle jp
#            - Added name size cuting for long class names. Display issue
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Allow Subclass to gain JP 
#==============================================================================

module R2_subclass_battle_jp
  Gain_JP = true        # if you want subclasses to gain JP from battles
  JP_factor = 0.50      # JP earned to subclass (value * factor) 10 * 0.5 = 5
  Cut_text = true       # cut the class name if it is too long. Fixes display
  Name_length = 7       # first number of characters in the actors class name
end

class Game_Actor < Game_Battler
 
  #--------------------------------------------------------------------------
  # new method: init_jp
  #--------------------------------------------------------------------------
  def init_jp
    @jp = {}
    @jp[@class_id] = 0
    @jp[@subclass_id] = 0
  end
 
  alias r2_game_actor_level_up_jp level_up
  def level_up
    last_level = class_level(@subclass_id).to_i
    r2_game_actor_level_up_jp
    lose_jp(YEA::JP::LEVEL_UP) unless !SceneManager.scene_is?(Scene_Class)
    return if !@subclass_id
    return if @subclass_id == 0
    return if YEA::CLASS_SYSTEM::MAINTAIN_LEVELS
    @exp[@subclass_id] = exp_for_level(last_level + 1)
    @jp[@subclass_id] += YEA::JP::LEVEL_UP if last_level < class_level(@subclass_id).to_i
  end
 
  alias r2_gain_jp_9239jjns gain_jp
  def gain_jp(jp, class_id = nil)
    r2_gain_jp_9239jjns(jp, class_id = nil)
    if $game_party.in_battle && R2_subclass_battle_jp::Gain_JP
      jp = (jp * R2_subclass_battle_jp::JP_factor).round
      @jp[@subclass_id] += jp.to_i if @subclass_id != nil || 0
    end
  end

  alias r2_subclass_add_ecp_82v7b4  subclass_add_exp
  def subclass_add_exp(class_id,value)
    last_level = class_level(class_id).to_i
    r2_subclass_add_ecp_82v7b4(class_id,value)
    return if !@subclass_id
    return if @subclass_id == 0
    return if YEA::CLASS_SYSTEM::MAINTAIN_LEVELS
    @jp[class_id] += YEA::JP::LEVEL_UP if last_level < class_level(class_id).to_i
  end
 
end # Game_Actor

class Window_Base < Window
 
  if $imported["YEA-AceMenuEngine"]
    def draw_actor_simple_status(actor, dx, dy)
      dy -= line_height / 2
      draw_actor_name(actor, dx, dy)
      draw_actor_level(actor, dx, dy + line_height * 1)
      draw_actor_icons(actor, dx, dy + line_height * 2)
      dx = dx + 25
      dw = contents.width - dx - 124
      draw_actor_class(actor, dx + 120, dy, dw)
      draw_actor_hp(actor, dx + 120, dy + line_height * 1, dw)
      if YEA::MENU::DRAW_TP_GAUGE && actor.draw_tp? && !actor.draw_mp?
        draw_actor_tp(actor, dx + 120, dy + line_height * 2, dw)
      elsif YEA::MENU::DRAW_TP_GAUGE && actor.draw_tp? && actor.draw_mp?
        if $imported["YEA-BattleEngine"]
          draw_actor_tp(actor, dx + 120, dy + line_height * 2, dw/2 - 1)
          draw_actor_mp(actor, dx + 120 + dw/2, dy + (line_height * 2), dw/2 + 1)
        else
          draw_actor_mp(actor, dx + 120, dy + line_height * 2, dw/2 - 1)
          draw_actor_tp(actor, dx + 120 + dw/2, dy + line_height * 2, dw/2 + 1)
        end
      elsif YEA::MENU::DRAW_TP_GAUGE && actor.draw_mp?
        draw_actor_mp(actor, dx + 120, dy + line_height * 2, dw)
      end
    end
  end

  alias r2_draw_actor_class_924v  draw_actor_simple_status
  def draw_actor_simple_status(actor, dx, dy)
    r2_draw_actor_class_924v(actor, dx, dy)
    @class_id = actor.class_id
    @sublass_id = actor.subclass.nil? ? nil : actor.subclass.id
    dy = dy - 10
    draw_actor_jp_class(actor, @class_id, dx, dy + line_height * 2)
    if !actor.subclass.nil?
    draw_actor_jp_subclass(actor, @subclass_id, dx, dy + line_height * 3) 
    end
  end

  def draw_actor_jp_class(actor, class_id, dx, dy, dw = 112)
    draw_icon(Icon.jp, dx + dw - 24, dy) if Icon.jp > 0
    dw -= 24 if Icon.jp > 0
    change_color(system_color)
    dw = dw - 10
    if R2_subclass_battle_jp::Cut_text
      text = actor.class.name
      text = text[0..(R2_subclass_battle_jp::Name_length - 1)]
      draw_text(dx, dy, dw, line_height, text, 3)
    else
      draw_text(dx, dy, dw, line_height, actor.class.name, 3)
    end
    dw = dw + 20
    dx = dx + 20 if $imported["YEA-AceMenuEngine"]
    draw_text(dx, dy, dw, line_height, Vocab::jp, 2)
    dw -= text_size(Vocab::jp).width
    change_color(normal_color)
    draw_text(dx, dy, dw, line_height, actor.jp(class_id).group, 2)
  end

  def draw_actor_jp_subclass(actor, subclass_id, dx, dy, dw = 112)
    draw_icon(Icon.jp, dx + dw - 24, dy) if Icon.jp > 0
    dw -= 24 if Icon.jp > 0
    change_color(system_color)
    dw = dw - 10
    if R2_subclass_battle_jp::Cut_text
      text = actor.subclass.name
      text = text[0..(R2_subclass_battle_jp::Name_length - 1)]
      draw_text(dx, dy, dw, line_height, text, 3)
    else
      draw_text(dx, dy, dw, line_height, actor.subclass.name, 3)
    end
    dw = dw + 20
    dx = dx + 20 if $imported["YEA-AceMenuEngine"]
    draw_text(dx, dy, dw, line_height, Vocab::jp, 2)
    dw -= text_size(Vocab::jp).width
    change_color(normal_color)
    draw_text(dx, dy, dw, line_height, actor.jp(actor.subclass.id).group, 2)
  end

end # Window_Base
Requires
Yanfly Class System
ESTRIOLE YEA - SUBCLASS ADD ON
Yanfly JP Manager
This patch -< me
Yanfly Learn Skills

*EDIT added support for yanfly menu engine
In that order worked for me.

*EDIT - added support for subclass to earn battle jp
Ok, lets try this. Remove all the extra script patches I wrote before and use this.
Spoiler: Yanfly - JP Manager Addon - Subclass Gain JP
Code:
#==============================================================================
#
# ▼ Yanfly Engine Ace - JP Manager v1.00 Addon for subclass
# -- Last Updated: 2012.01.07
# -- Level: Normal, Hard
# -- Requires: n/a
# addon: Roninator2
#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2019.10.05 - Started Script
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Allow Subclass to gain JP
#==============================================================================

class Game_Actor < Game_Battler
 
  #--------------------------------------------------------------------------
  # new method: init_jp
  #--------------------------------------------------------------------------
  def init_jp
    @jp = {}
    @jp[@class_id] = 0
    @jp[@subclass_id] = 0
  end
 
  alias r2_subclass_add_ecp_82v7b4  subclass_add_exp
  def subclass_add_exp(class_id,value)
    last_level = class_level(class_id).to_i
    r2_subclass_add_ecp_82v7b4(class_id,value)
    return if !@subclass_id
    return if @subclass_id == 0
    return if YEA::CLASS_SYSTEM::MAINTAIN_LEVELS
    gain_jp(YEA::JP::LEVEL_UP, @subclass_id) if last_level != class_level(class_id).to_i
  end
 
  alias r2_game_actor_level_up_jp level_up
  def level_up
    r2_game_actor_level_up_jp
    lose_jp(YEA::JP::LEVEL_UP) unless !SceneManager.scene_is?(Scene_Class)
  end

end # Game_Actor

class Window_Base < Window
 
  #--------------------------------------------------------------------------
  # overwrite method: draw_actor_simple_status
  #--------------------------------------------------------------------------
  def draw_actor_simple_status(actor, dx, dy)
    dy -= line_height / 2
    draw_actor_name(actor, dx, dy)
    draw_actor_level(actor, dx, dy + line_height * 1)
    draw_actor_icons(actor, dx, dy + line_height * 2)
    dx = dx + 20
    dw = contents.width - dx - 124
    draw_actor_class(actor, dx + 120, dy, dw)
    draw_actor_hp(actor, dx + 120, dy + line_height * 1, dw)
    if YEA::MENU::DRAW_TP_GAUGE && actor.draw_tp? && !actor.draw_mp?
      draw_actor_tp(actor, dx + 120, dy + line_height * 2, dw)
    elsif YEA::MENU::DRAW_TP_GAUGE && actor.draw_tp? && actor.draw_mp?
      if $imported["YEA-BattleEngine"]
        draw_actor_tp(actor, dx + 120, dy + line_height * 2, dw/2 - 1)
        draw_actor_mp(actor, dx + 120 + dw/2, dy + (line_height * 2), dw/2 + 1)
      else
        draw_actor_mp(actor, dx + 120, dy + line_height * 2, dw/2 - 1)
        draw_actor_tp(actor, dx + 120 + dw/2, dy + line_height * 2, dw/2 + 1)
      end
    elsif YEA::MENU::DRAW_TP_GAUGE && actor.draw_mp?
      draw_actor_mp(actor, dx + 120, dy + line_height * 2, dw)
    end
   
  end
 
  alias r2_draw_actor_class_924v  draw_actor_simple_status
  def draw_actor_simple_status(actor, dx, dy)
    r2_draw_actor_class_924v(actor, dx, dy)
    @class_id = actor.class_id
    @sublass_id = actor.subclass.nil? ? nil : actor.subclass.id
    dy = dy - 10
    draw_actor_jp_class(actor, @class_id, dx, dy + line_height * 2)
    if !actor.subclass.nil?
    draw_actor_jp_subclass(actor, @subclass_id, dx, dy + line_height * 3)
    end
  end

  def draw_actor_jp_class(actor, class_id, dx, dy, dw = 112)
    draw_icon(Icon.jp, dx + dw - 24, dy) if Icon.jp > 0
    dw -= 24 if Icon.jp > 0
    change_color(system_color)
    dw = dw + 20
    draw_text(dx, dy, dw, line_height, Vocab::jp, 2)
    draw_text(dx, dy, dw, line_height, actor.class.name, 3)
    dw -= text_size(Vocab::jp).width
    change_color(normal_color)
    draw_text(dx, dy, dw, line_height, actor.jp(class_id).group, 2)
  end

  def draw_actor_jp_subclass(actor, subclass_id, dx, dy, dw = 112)
    draw_icon(Icon.jp, dx + dw - 24, dy) if Icon.jp > 0
    dw -= 24 if Icon.jp > 0
    change_color(system_color)
    dw = dw + 20
    draw_text(dx, dy, dw, line_height, Vocab::jp, 2)
    draw_text(dx, dy, dw, line_height, actor.subclass.name, 3)
    dw -= text_size(Vocab::jp).width
    change_color(normal_color)
    draw_text(dx, dy, dw, line_height, actor.jp(actor.subclass.id).group, 2)
  end

end # Window_Base
Requires Yanfly Class System
ESTRIOLE YEA - SUBCLASS ADD ON
Yanfly JP Manager
This patch -< me
Yanfly Learn Skills

In that order worked for me.
I am getting this error when i try to go to the menu:
I am getting this error when i try to go to the menu
So you're not using yanfly menu script? Are you willing to add it in?
So you're not using yanfly menu script? Are you willing to add it in?
What Menu script?
Sorry, I just realized that I added in double pieces.

Never mind about the menu script. I'll update the post above in a few seconds.
Sorry, I just realized that I added in double pieces.

Never mind about the menu script. I'll update the post above in a few seconds.
So it worked but i am now getting this:

Ok, good news, i got the gunner part fixed but now i am running into this JP problem with the primary class:

Nvm, i got bot problems fixed. Still trying to figure out how to put the primary up a bit to space it out from the secondary.
BTW, i am also trying to fix this:

see how the name is kind of under the SP, how would i fix that?
So i did a quest and when i leveled up the primary class got SP but the subclass didn't. How do i fix this?
now getting this
The first picture would be correct with the code I gave you, except you have the show jp in there twice somehow.
You may have had the code duplicated somewhere.
Is your game using 640x480 resoluton?
Would you like to send me your scripts.rvdata2 file?

I updated the code again to have support for yanfly menu engine.
You should install Yanfly Engine Ace - Ace Menu Engine v1.08
upload_2019-10-6_8-22-7.png

upload_2019-10-6_8-22-42.png
The first picture would be correct with the code I gave you, except you have the show jp in there twice somehow.
You may have had the code duplicated somewhere.
Is your game using 640x480 resoluton?
Would you like to send me your scripts.rvdata2 file?

I updated the code again to have support for yanfly menu engine.
You should install Yanfly Engine Ace - Ace Menu Engine v1.08
View attachment 125023
View attachment 125024
Ok, so good news, i got the update to work correctly, but when i do a quest and level up that way the subclass doesn't get any JP, and instead the primary gets the JP that the subclass would have gotten. How do i fix this? BTW, when i go to learn a skills for subclass it uses primary class JP and doesn't use the subclass JP.
when i go to learn a skills for subclass it uses primary class JP
That's not how it works for me. Again might be easier for you to share your scripts.rvdata2 file to me in a private message. Or your whole project.

What quest script was it?
That's not how it works for me. Again might be easier for you to share your scripts.rvdata2 file to me in a private message. Or your whole project.

What quest script was it?
How do i share the scripts.rvdata2 file?
Script posted in completed script section.
https://forums.rpgmakerweb.com/index.php?threads/yanfly-subclass-jp-addon.114163/

Original thread: https://forums.rpgmakerweb.com/threads/jp-skill-engine-problem-with-subclass.113925/