Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
- # Name Compat Snip 1 for Kai Monkey's Character Creation
- #-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
- # Usage:
- #
- # Put the names of the actor's in the database inside of the hash here.
- # For example, if the name of actor 1 in the database is Apple and the name
- # of Actor 3 in the databasae is Orange, the Actor_Names hash should look like:
- # Actor_Names = {
- # 1 => "Apple",
- # 3 => "John"
- # }
- #
- # The when creating a unit-event for that actor use the name that is inside of
- # the database, so even if the actor with the name "Apple" has his name changed
- # to "Papaya" later on in the game, all of the unit-events for that actor should
- # still have the name apple.
- #
- # This is just a temp solution so I don't have to write all of the code to
- # completely fix the problem yet. Note - The names of the actors will appear to be
- # wrong during a tactical battle
- #-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
- module TBNameCompatCat
- Actor_Names = {
- 1 => "Test Diff Name",
- 2 => "Actor 2's name in the database goes here"
- }
- end
- module TactBattleManager
- # Make aliased pointers
- class << self
- alias setup_compatname_hera setup
- alias exit_compatname_hera exit_tb
- end
- # Alias Setup
- def self.setup(id = 0)
- return unless SceneManager.scene_is?(Scene_Map)
- $game_system.tb_swap_store_cmpt_cat_nmes # store and swap def names
- setup_compatname_hera(id)
- end
- # Alias exit_tb
- def self.exit_tb
- return unless @tact_battle = true
- $game_system.tb_swap_reset_cmpt_cat_nmes # reset names to what they were
- exit_compatname_hera
- end
- end
- class Game_System
- # Alias, Initialize
- alias initialize_tb_cmpt_cat_hera initialize
- def initialize
- initialize_tb_cmpt_cat_hera
- @tb_compat_cat_names = {}
- end
- # Store Names
- def tb_swap_store_cmpt_cat_nmes
- @tb_compat_cat_names = {}
- $data_actors.each do |a|
- next if !a
- id = a.id
- @tb_compat_cat_names[id] = a.name
- $game_actors[id].name = TBNameCompatCat::Actor_Names[id]
- end
- end
- # Reset Names
- def tb_swap_reset_cmpt_cat_nmes
- $data_actors.each do |a|
- next if !a
- id = a.id
- $game_actors[id].name = @tb_compat_cat_names[id]
- end
- end
- # Get stored name by id
- def tb_get_st_cmpt_nm(id)
- @tb_compat_cat_names[id]
- end
- end # Game_System
Advertisement
Add Comment
Please, Sign In to add comment