#Trainer Card by Adiktuzmikomodule ADIK module TCARD #Title of the card TITLE = "ID Card" #X position of the title TITLE_X = 0 #Y position of the title TITLE_Y = 0 #Hometown is set per actor #Actor0, Actor1 and so on HOMETOWN = [nil,"RMWeb","RMWEB"] #X position of the hometown HOMETOWN_X = 96 #Y position of the hometown HOMETOWN_Y = 64 #Hometown title HOMETOWN_T = "Hometown:" #X of hometown title HOMETOWN_T_X = 0 #Y of hometown title HOMETOWN_T_Y = 64 #Gold title GOLD_T = "Gold:" #X of gold title GOLD_T_X = 0 #Y of gold title GOLD_T_Y = 128 #X of gold GOLD_X = 96 #Y of gold GOLD_Y = 128 #Time played title TPLAYED_T = "Time Played:" #X of time played title TPLAYED_T_X = 0 #Y of time played title TPLAYED_T_Y = 350 #X of time played TPLAYED_X = 400 #Y of time played TPLAYED_Y = 350 #Graphic settings for actors #Use actor sprite? #USE_SPRITE = [Actor0,Actor1,Actor2 and so on] USE_SPRITE = [false,true,true] #All custom graphics (aside from sprites) should be #placed in Graphics\System #Sprites will remain on the Characters folder #Name of graphics file to use if USE_SPRITE is false #Actual filename will be GRAPHICS + Id of actor #So Actor1 would be TCActor1 GRAPHICS = "TCActor" #X of actor graphic GRAPHICS_X = 100 + (Graphics.width/2) #Y of actor graphic GRAPHICS_Y = (Graphics.height/2) - 100 #Background graphics #Set to nil if no background BACKGROUND = "Clouds" #Windowskin #set to nil for no windowskin WINDOW = nil end endclass Scene_Trainer_Card < Scene_Base def start super @tc_window = Window_Trainer_Card.new end def terminate @tc_window.dispose super end def return_scene SceneManager.return end def update super if Input.trigger?

or Input.trigger?

A) return_scene end end endclass Window_Trainer_Card < Window_Selectable def initialize super(0,0,width,height) self.windowskin = ADIK::TCARD::WINDOW @index = 0 refresh end def width return Graphics.width end def height return Graphics.height end def refresh contents.clear settings = ADIK::TCARD if not settings::BACKGROUND.nil? bit = Cache.picture(settings::BACKGROUND) contents.blt(0,0,bit,Rect.new(0,0,bit.width,bit.height)) end contents.draw_text(settings::TITLE_X,settings::TITLE_Y,544,32,settings::TITLE) actor = $game_party.leader contents.draw_text(settings::HOMETOWN_T_X,settings::HOMETOWN_T_Y,544,32,settings::HOMETOWN_T) contents.draw_text(settings::HOMETOWN_X,settings::HOMETOWN_Y,544,32,settings::HOMETOWN[actor.id]) contents.draw_text(settings::GOLD_T_X,settings::GOLD_T_Y,544,32,settings::GOLD_T) contents.draw_text(settings::GOLD_X,settings::GOLD_Y,544,32,$game_party.gold.to_s) contents.draw_text(settings::TPLAYED_T_X,settings::TPLAYED_T_Y,544,32,settings::TPLAYED_T) contents.draw_text(settings::TPLAYED_X,settings::TPLAYED_Y,544,32,$game_system.playtime_s) if settings::USE_SPRITE[actor.id] char = $game_player.character_name index = $game_player.character_index bit = Cache.character(char) if char.include?("$") w = bit.width/3 h = bit.height/4 contents.blt(settings::GRAPHICS_X,settings::GRAPHICS_Y,bit,Rect.new(w,0,w,h)) else w = bit.width/12 h = bit.height/8 x = (index % 4 * 3 + 2) * w y = (index / 4 * 4 + (2 - 2) / 2) * h contents.blt(settings::GRAPHICS_X,settings::GRAPHICS_Y,bit,Rect.new(x,y,w,h)) end else bit = Cache.picture(settings::GRAPHICS + actor.id.to_s) contents.blt(settings::GRAPHICS_X,settings::GRAPHICS_Y,bit,Rect.new(0,0,bit.width,bit.height)) end end #So that there is no cursor def update_cursor end endclass Scene_Menu #You can use this as the handler if you're going to #add a command from the menu to open the Trainer Card def command_adik_tcard SceneManager.call(Scene_Trainer_Card) endend