Yanfly TP Manager Edit

Silenity

Veteran
Veteran
Joined
Dec 17, 2013
Messages
677
Reaction score
271
First Language
English
Primarily Uses
RMMV
Hello.

I'm using Yanfly's TP Manager script.

I'm trying to make it so whenever you change TP modes you will also learn a special skill.

Here's how I have my game setup:

At 100 TP you gain a state which increases all your paramaters.

At 100 TP you can use a very strong special skill, draining you of all of your TP.

I would like to use Yanfly's TP Manager so that each TP Mode can have it's own special skill.

Example:

Eric is in Warrior TP Mode.

At 100 TP he can use Battle Shout which deals damage to all enemies and increases his party's attack and defense.

Eric changes to Healer TP Mode.

At 100 TP he can use Divine Prayer which fully restores his party's HP and status ailments.

Eric changes to Bard TP Mode.

At 100 TP he can use Voice of an Angel which inflicts random status ailments on every enemy and skips their next turn.

etc. etc.
 

Moogle_X

Veteran
Veteran
Joined
Apr 25, 2015
Messages
157
Reaction score
318
First Language
English
First of all, you need to create two kind of states. First is the state that's added when actor has full TP (ex: stat boost).

Second, a bunch of different states that's applied when changing tp mode. These states must have "add skill" feature in them.

Make sure that those "skill-adding" state:

1. Do not have any icon.

2. Don't tick "Remove at Battle End"

3. Do not have any auto removal conditions.

And then, you can use this snippet that I made. Put it BELOW Yanfly's TP Manager script.

Don't forget to edit the script configuration part.

#Ver.1.1
# - Clear States bug fix.
#Ver.1.0
# - Script complete.
#==============================================================================
#SCRIPT CONFIGURATION
#==============================================================================
module Moogle_X
  module TP_MODE
    # Below is the state id that will be automatically add to actor when
    # he/she have 100 TP.
    FULL_TP_STATE = 0   # <= Change this to state id of your choice.
    
    # Change the value below to the "skill-adding" state id that you want to
    # add when you change TP Mode.
    # The state icon must be empty to make it "hidden".
    # DO NOT MAKE THE STATE "AUTO-REMOVE" AFTER BATTLE!!!
    # Make sure the added-skill cost 100 TP to cast.
    SKILL_STATE = [
    0,  # TP Mode 0
    0,  # TP Mode 1
    0,  # TP Mode 2
    0,  # TP Mode 3
    0,  # TP Mode 4
    0,  # TP Mode 5
    0,  # TP Mode 6
    0,  # TP Mode 7
    0,  # TP Mode 8
    0,  # TP Mode 9
    0,  # TP Mode 10
    0,  # TP Mode 11
    0,  # TP Mode 12
    0,  # TP Mode 13
    0,  # TP Mode 14
    0,  # TP Mode 15
    
] # <= don't delete this!

  end # TP_MODE
end # Moogle_X

#==============================================================================
#SCRIPT CONFIGURATION END
#==============================================================================


#==============================================================================
# ¦ Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
 
  #--------------------------------------------------------------------------
  # alias method: setup
  #--------------------------------------------------------------------------
  alias moogle_x_setup_tpm setup
  def setup(actor_id)
    moogle_x_setup_tpm(actor_id)
    self.add_state(Moogle_X::TP_MODE::SKILL_STATE[@tp_mode])
  end

  #--------------------------------------------------------------------------
  # alias method: change_tp_mode
  #--------------------------------------------------------------------------
  alias moogle_x_change_tp change_tp_mode
  def change_tp_mode(mode)
    moogle_x_change_tp(mode)
#~     tp_skills = Moogle_X::TP_MODE::SKILL_STATE
#~     for tp_skill_id in tp_skills
#~       self.remove_state(tp_skill_id)
#~     end
    self.clear_states
    self.add_state(Moogle_X::TP_MODE::SKILL_STATE[mode])
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: revive
  #--------------------------------------------------------------------------
  def revive
    super
    self.add_state(Moogle_X::TP_MODE::SKILL_STATE[self.tp_mode])
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: change_tp
  #--------------------------------------------------------------------------
  def tp=(tp)
    super
    if tp_rate == 1.0
      self.add_state(Moogle_X::TP_MODE::FULL_TP_STATE)
    else
      self.remove_state(Moogle_X::TP_MODE::FULL_TP_STATE)
    end
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: clear_states
  #--------------------------------------------------------------------------
  def clear_states
    super
    refresh_tp_states # Bug fix.
  end
 
  #--------------------------------------------------------------------------
  # new method: refresh_tp_states
  #--------------------------------------------------------------------------
  def refresh_tp_states
    self.add_state(Moogle_X::TP_MODE::FULL_TP_STATE) if tp_rate == 1.0
    self.add_state(Moogle_X::TP_MODE::SKILL_STATE[@tp_mode]) if @tp_mode != nil
  end
 
#-----

end # class Game_Actor
Edit: Small bug fix update.
 
Last edited by a moderator:

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

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,038
Members
137,567
Latest member
sashalag
Top