This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.
What this does
This is a script that can be used to replace the name of classes in the menu to titles that are totally unrelated to classes.
The Script
Clicky
Code:
#================================
# Title Script
#================================
# Comments will be placed where needed. Follow the
# instuctions in these comments to get the script to
# work correctly
#================================
class Game_Actor
attr_accessor :title # Adds attribute to @title
alias title_setup setup
def setup(actor_id)
title_setup(actor_id)
@title = "" # Defines contents of @title as nothing
end
end
class Window_Base < Window
def draw_actor_class(actor, x, y)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 236, 32, actor.title) # Draws Title instead of class
end
end
class Title
def initialize
start_title(1,"Spearman") #defines initial titles
end
def change_title(actor_id,new_title)
$game_actors[actor_id].title = new_title # Method to change titles
end
def start_title(actor_id,new_title)
if $game_actors[actor_id].title == ""
$game_actors[actor_id].title = new_title
end
end
end
class Scene_Title
alias title_new_game command_new_game
def command_new_game
title_new_game
$titles = Title.new # Assignes the class Title to a global variable $titles
end
end
class Scene_Load
alias title_save_data read_save_data
def read_save_data(file)
title_save_data(file)
$titles = Title.new
end
end
#================================
# ENJOY MY SCRIPT!!!!!!! ^_^
#================================
How to use.
1. Open up the script and in the def initialize method of the Title Class
repeat the line start_title(1,"Spearman") replacing 1 with the ID of the Actor this is for and "Spearman" with the name of the new title in quotations (").
2. You can now use a call script of change_title(1,"Title") replacing the same things as in step one.