Hello People I just created a new Script that creates a new info in the stats menu, it's very simple and i am making it better. I used it to put on the stats menu a Extra Level (Like level in using the bathroom, by example).
#============================================================================== # Window_Status #------------------------------------------------------------------------------ # Janela que exibe os status dos personagens. #============================================================================== class Window_Status < Window_Base
#-------------------------------------------------------------------------- # Inicialização do objeto # actor : herói #-------------------------------------------------------------------------- def initialize(actor) super(0, 0, 544, 416) @actor = actor refresh end #-------------------------------------------------------------------------- # Atualização #-------------------------------------------------------------------------- def refresh self.contents.clear draw_actor_name(@actor, 4, 0) draw_actor_class(@actor, 128, 0) draw_actor_face(@actor, 8, 32) draw_basic_info(128, 32) draw_parameters(32, 160) draw_exp_info(288, 32) draw_equipments(288, 160) draw_actorstatus(288, 300) end #-------------------------------------------------------------------------- # Exibição de informações básicas # x : exibe na coordenada X # y : exibe na coordenada Y #-------------------------------------------------------------------------- def draw_basic_info(x, y) draw_actor_level(@actor, x, y + WLH * 0) draw_actor_state(@actor, x, y + WLH * 1) draw_actor_hp(@actor, x, y + WLH * 2) draw_actor_mp(@actor, x, y + WLH * 3) end #-------------------------------------------------------------------------- # Exibição dos parâmetros # x : exibe na coordenada X # y : exibe na coordenada Y #-------------------------------------------------------------------------- def draw_parameters(x, y) draw_actor_parameter(@actor, x, y + WLH * 0, 0) draw_actor_parameter(@actor, x, y + WLH * 1, 1) draw_actor_parameter(@actor, x, y + WLH * 2, 2) draw_actor_parameter(@actor, x, y + WLH * 3, 3) end #-------------------------------------------------------------------------- # Exibição da experiência # x : exibe na coordenada X # y : exibe na coordenada Y #-------------------------------------------------------------------------- def draw_exp_info(x, y) s1 = @actor.exp_s s2 = @actor.next_rest_exp_s s_next = sprintf(Vocab::ExpNext, Vocab::level) self.contents.font.color = system_color self.contents.draw_text(x, y + WLH * 0, 180, WLH, Vocab::ExpTotal) self.contents.draw_text(x, y + WLH * 2, 180, WLH, s_next) self.contents.font.color = normal_color self.contents.draw_text(x, y + WLH * 1, 180, WLH, s1, 2) self.contents.draw_text(x, y + WLH * 3, 180, WLH, s2, 2) end #-------------------------------------------------------------------------- # Exibição dos equipamentos # x : exibe na coordenada X # y : exibe na coordenada Y #-------------------------------------------------------------------------- def draw_equipments(x, y) self.contents.font.color = system_color self.contents.draw_text(x, y, 120, WLH, Vocab::equip) for i in 0..4 draw_item_name(@actor.equips[i], x + 16, y + WLH * (i + 1)) end end #------------------------------------------------------------------------ class Game_Actors def initialize @data = [] end def [](actor_id) if @data[actor_id] == nil and $data_actors[actor_id] != nil @data[actor_id] = Game_Actor.new(actor_id) end return @data[actor_id] end end #------------------------------------------------------------------------ #Level de Exercito # #------------------------------------------------------------------------ def draw_actorstatus(x, y) self.contents.font.color = system_color self.contents.draw_text(x, y, 200, WLH, "Extra Level or Info Here") self.contents.font.color = normal_color if @actor.id == 1 actorid = $game_variables[1] end if @actor.id == 2 actorid = $game_variables[2] end if @actor.id == 3 actorid = $game_variables[3] end self.contents.draw_text(x, y + 30, 120, WLH, actorid) end end
This Script Creates a new level or stats in menu, it uses diferent variables for diferent caracters.
To change the actors used, find any one of this lines: if @actor.id == 1 if @actor.id == 2 if @actor.id == 3
chose one and change the number to the ID of the actor that you want to use
To change the variables that you are using, find this line, under the line : if @actor.id == "actor id here" were actor id here is the id of the actor that will use this variable. (ex. to set actor 1 to variable 1, you will modify the line under : if @actor.id == 1)
actorid = $game_variables[variable number here]
change variable number here to variable ID that you will use.
To change the stats name find this line:
self.contents.draw_text(x, y, 200, WLH, "Extra Level or Info Here")
and change Extra Level or Info Here to the name that you want.
To change the value of the status, change the value of the variable.
To Add this information to an extra actor, add a line like this, before : self.contents.draw_text(x, y + 30, 120, WLH, actorid)
if @actor.id == Actor Id here actorid = $game_variables[variable number here] end
Screenshots are attached.
It's my first script so it's very simple. Sorry for my english i am from Brazil.
This post has been edited by onidsouza: Nov 12 2008, 08:43 AM
This script can actually become very useful if implemented properly. There are many possibilities to this script. Nice work.
__________________________
Currently working on:
Underground Syndicate (mafioso/modern type RPG) Mind Maze (old school dungeon crawler with a different feel) Dragon Adventure (Dragon Quest type fangame with more customization) Dark Grind (Survival horror RPG)