| Artisan (Nv 5) |
 |
Inscrit le: 22 Nov 2011, 22:01 Messages: 199 Niveau RPG Maker: Moyen Logiciel(s) préféré(s): RPG Maker XP Point(s) Fort(s): Scripts Sexe: Masculin Points d'aide: 17/60
Créations :
Voir ses créations
|
Salut Crème brûlée, Alors j'ai fais le script par contre il n'est pas complet je te passe ça pour l'instant, je mettrai la suite demain. En attendant voilà un aperçu.
Screen:
- Code: Tout sélectionner
# ============================================================================== # ■ Module StatusConfig # -------------------- # Auteur: Bad_maker # ============================================================================== module StatusConfig # WINDOW OF CHARACTERS' NAME NAMEWINDOWSX = 0 # x pos NAMEWINDOWSY = 64 # y pos NAMEWINDOWSW = 128 # width NAMEWINDOWSH = 64 # height NAMEWINDOWSS = true # false = vertical scrolling NAMEWINDOWSD = 0 # distance between two windows (+width or +height) # WINDOW OF CHARACTERS' STAT FONTSIZE = 18 # text size STATSWINDOWSX = 0 # x pos STATSWINDOWSY = 128 # y pos STATSWINDOWSW = 256 # width STATSWINDOWSH = 352 # height STATSWINDOWSS = true # false = vertical scrolling STATSWINDOWSD = 64 # distance between two windows # MINI WINDOWS L&R WLX = 512 # L: x pos WLY = 288 # L: y pos WRX = 576 # R: x pos WRY = 288 # R: y pos # SKILLS WINDOW WSSX = 480 # x pos WSSY = 352 # y pos WSSW = 160 # width WSSH = 64 # height TEXTSKILLSX = 0 TEXTSKILLSY = 0 TEXTSKILLST = "Compétences" # EQUIP WINDOW WSEX = 480 # x pos WSEY = 416 # y pos WSEW = 160 # width WSEH = 64 # height TEXTEQUIPX = 0 # x pos TEXTEQUIPY = 0 # y pos TEXTEQUIPT = "Equipement" # TEXTS IN HELP WINDOW TEXT1 = "Appuyez sur gauche ou droite pour changer de personnage" TEXT2 = "Aller au menu des compétences" TEXT3 = "Aller au menu de l'équipement" # BATTLER BATTLER9 = true # false to hide battler BATTLERX = 0 # x pos BATTLERY = 0 # y pos # GRAPHIC GRAPHIC9 = true GRAPHICX = 120 GRAPHICY = 64 # CLASS CLASS9 = true CLASSX = 130 CLASSY = 106 # LEVEL LEVEL9 = true LEVELX = 160 LEVELY = 64 # STATE STATE9 = true STATEX = 160 STATEY = 84 # HP HP9 = false HPX = 0 HPY = 0 # SP SP9 = false SPX = 0 SPY = 0 # EXP EXP9 = false EXPX = 0 EXPY = 0 # EXP TO REACH NEXT LVL NEXP9 = false NEXPX = 0 NEXPY = 0 # EXP TEXT EXPT = "Expérience : " EXPT9 = false EXPTX = 0 EXPTY = 0 # EXP TO REACH NEXT LVL TEXT NEXPT = "Niveau suivant : " NEXPT9 = false NEXPTX = 0 NEXPTY = 0 # ATK PARAM09 = true PARAM0X = 28 PARAM0Y = 182 # DEF PHYS PARAM19 = true PARAM1X = 28 PARAM1Y = 200 # DEF MAG PARAM29 = true PARAM2X = 28 PARAM2Y = 218 # STR PARAM39 = true PARAM3X = 28 PARAM3Y = 236 # DEX PARAM49 = true PARAM4X = 28 PARAM4Y = 254 # ESQ PARAM59 = true PARAM5X = 28 PARAM5Y = 272 # INT PARAM69 = true PARAM6X = 28 PARAM6Y = 290 end
# ============================================================================== # ● Window_Base # ============================================================================== class Window_Base < Window def draw_icon(name,x,y) bitmap = RPG::Cache.icon(name) src_rect = Rect.new(0,0,bitmap.width,bitmap.height) self.contents.blt(x,y,bitmap,src_rect) end def draw_actor_battler(actor,x,y) bitmap = RPG::Cache.battler(actor.character_name, actor.character_hue) src_rect = Rect.new(0,0,bitmap.width,bitmap.height) self.contents.blt(x,y,bitmap,src_rect) end end
# ============================================================================== # ● Window_L # ----------------------- # Auteur: Bad_maker # ============================================================================== class Window_L < Window_Base def initialize x = StatusConfig::WLX y = StatusConfig::WLY super(x,y,64,64) self.contents = Bitmap.new(32,32) $fontface = "Arial" if defined?($fontface).nil? $fontsize = 24 if defined?($fontsize).nil? self.contents.font.name = $fontface self.contents.font.size = $fontsize refresh end def refresh self.contents.clear wt = self.contents.text_size("L").width self.contents.draw_text(0,0,wt,32,"L") end end
# ============================================================================== # ● Window_R # ----------------------- # Auteur: Bad_maker # ============================================================================== class Window_R < Window_Base def initialize x = StatusConfig::WRX y = StatusConfig::WRY super(x,y,64,64) self.contents = Bitmap.new(32,32) $fontface = "Arial" if defined?($fontface).nil? $fontsize = 24 if defined?($fontsize).nil? self.contents.font.name = $fontface self.contents.font.size = $fontsize refresh end def refresh self.contents.clear wt = self.contents.text_size("R").width self.contents.draw_text(0,0,wt,32,"R") end end
# ============================================================================== # ● Window_StatusSkills # ----------------------- # Auteur: Bad_maker # ============================================================================== class Window_StatusSkills < Window_Base def initialize x = StatusConfig::WSSX y = StatusConfig::WSSY w = StatusConfig::WSSW h = StatusConfig::WSSH super(x,y,w,h) self.contents = Bitmap.new(w-32, h-32) $fontface = "Arial" if defined?($fontface).nil? $fontsize = 22 if defined?($fontsize).nil? self.contents.font.name = $fontface self.contents.font.size = $fontsize refresh end def refresh self.contents.clear t = StatusConfig::TEXTSKILLST xt = StatusConfig::TEXTSKILLSX yt = StatusConfig::TEXTSKILLSY wt = self.contents.text_size(t).width self.contents.draw_text(xt,yt,wt,32,t) end end
# ============================================================================== # ● Window_StatusEquip # ----------------------- # Auteur: Bad_maker # ============================================================================== class Window_StatusEquip < Window_Base def initialize x = StatusConfig::WSEX y = StatusConfig::WSEY w = StatusConfig::WSEW h = StatusConfig::WSEH super(x,y,w,h) self.contents = Bitmap.new(w-32, h-32) $fontface = "Arial" if defined?($fontface).nil? $fontsize = 22 if defined?($fontsize).nil? self.contents.font.name = $fontface self.contents.font.size = $fontsize refresh end def refresh self.contents.clear t = StatusConfig::TEXTEQUIPT xt = StatusConfig::TEXTEQUIPX yt = StatusConfig::TEXTEQUIPY wt = self.contents.text_size(t).width self.contents.draw_text(xt,yt,wt,32,t) end end
# ============================================================================== # ● Window_StatusActorName # ----------------------- # Auteur: Bad_maker # ============================================================================== class Window_StatusActorName < Window_Base def initialize(actor,x,y) w = StatusConfig::NAMEWINDOWSW h = StatusConfig::NAMEWINDOWSH super(x,y,w,h) self.contents = Bitmap.new(w-32, h-32) $fontface = "Arial" if defined?($fontface).nil? $fontsize = 22 if defined?($fontsize).nil? self.contents.font.name = $fontface self.contents.font.size = $fontsize @actor = actor refresh end def refresh self.contents.clear self.draw_actor_name(@actor,0,0) end end
# ============================================================================== # ● Window_StatusActorStats # ----------------------- # Auteur: Bad_maker # ============================================================================== class Window_StatusActorStats < Window_Base def initialize(actor,x,y) w = StatusConfig::STATSWINDOWSW h = StatusConfig::STATSWINDOWSH super(x,y,w,h) self.contents = Bitmap.new(w-32, h-32) $fontface = "Arial" if defined?($fontface).nil? $fontsize = 22 if defined?($fontsize).nil? self.contents.font.name = $fontface self.contents.font.size = StatusConfig::FONTSIZE @actor = actor refresh end def refresh self.contents.clear exp = @actor.exp_s newp = @actor.next_rest_exp_s xpt = StatusConfig::EXPT nxpt = StatusConfig::NEXPT xb = StatusConfig::BATTLERX ; yb = StatusConfig::BATTLERY xg = StatusConfig::GRAPHICX ; yg = StatusConfig::GRAPHICY xc = StatusConfig::CLASSX ; yc = StatusConfig::CLASSY xl = StatusConfig::LEVELX ; yl = StatusConfig::LEVELY xs = StatusConfig::STATEX ; ys = StatusConfig::STATEY xh = StatusConfig::HPX ; yh = StatusConfig::HPY xs2 = StatusConfig::SPX ; ys2 = StatusConfig::SPY xexp = StatusConfig::EXPX ; yexp = StatusConfig::EXPY xnexp = StatusConfig::NEXPX ; ynexp = StatusConfig::NEXPY xxpt = StatusConfig::EXPTX ; yxpt = StatusConfig::EXPTY xnxpt = StatusConfig::NEXPTX ; ynxpt = StatusConfig::NEXPTY xp0 = StatusConfig::PARAM0X ; yp0 = StatusConfig::PARAM0Y xp1 = StatusConfig::PARAM1X ; yp1 = StatusConfig::PARAM1Y xp2 = StatusConfig::PARAM2X ; yp2 = StatusConfig::PARAM2Y xp3 = StatusConfig::PARAM3X ; yp3 = StatusConfig::PARAM3Y xp4 = StatusConfig::PARAM4X ; yp4 = StatusConfig::PARAM4Y xp5 = StatusConfig::PARAM5X ; yp5 = StatusConfig::PARAM5Y xp6 = StatusConfig::PARAM6X ; yp6 = StatusConfig::PARAM6Y self.draw_actor_battler(@actor,xb,yb) if StatusConfig::BATTLER9 self.draw_actor_graphic(@actor, xg+16, yg+48) if StatusConfig::GRAPHIC9 self.draw_actor_class(@actor, xc, yc) if StatusConfig::CLASS9 self.draw_actor_level(@actor, xl, yl) if StatusConfig::LEVEL9 self.draw_actor_state(@actor, xs, ys) if StatusConfig::STATE9 self.draw_actor_hp(@actor, xh, yh) if StatusConfig::HP9 self.draw_actor_sp(@actor, xs2, ys2) if StatusConfig::SP9 self.contents.draw_text(xexp,yexp,84,32,exp,2) if StatusConfig::EXP9 self.contents.draw_text(xnexp,ynexp,84,32,nexp,2) if StatusConfig::NEXP9 self.contents.draw_text(xxpt,yxpt,84,32, xpt,2) if StatusConfig::EXPT9 self.contents.draw_text(xnxpt,ynxpt,84,32, nxpt,2) if StatusConfig::NEXPT9 self.draw_actor_parameter(@actor, xp0, yp0, 0) if StatusConfig::PARAM09 self.draw_actor_parameter(@actor, xp1, yp1, 1) if StatusConfig::PARAM19 self.draw_actor_parameter(@actor, xp2, yp2, 2) if StatusConfig::PARAM29 self.draw_actor_parameter(@actor, xp3, yp3, 3) if StatusConfig::PARAM39 self.draw_actor_parameter(@actor, xp4, yp4, 4) if StatusConfig::PARAM49 self.draw_actor_parameter(@actor, xp5, yp5, 5) if StatusConfig::PARAM59 self.draw_actor_parameter(@actor, xp6, yp6, 6) if StatusConfig::PARAM69 end end
# ============================================================================== # ■ Scene_Status # ------------- # Auteur: Bad_maker # ============================================================================== class Scene_Status def initialize(actor_index = 0, equip_index = 0) @actor_index = actor_index @status_index = 0 @choice = 0 end def main @help_window = Window_Help.new @help_window.set_text(StatusConfig::TEXT1) @skillsI = Window_StatusSkills.new @equipI = Window_StatusEquip.new @lwindow = Window_L.new @rwindow = Window_R.new @skillsI.opacity = 255 @equipI.opacity = 55 @lwindow.opacity = 55 @rwindow.opacity = 255 @actorNW = [] ; @actorSW = [] anwx = StatusConfig::NAMEWINDOWSX ; anwy = StatusConfig::NAMEWINDOWSY aswx = StatusConfig::STATSWINDOWSX ; aswy = StatusConfig::STATSWINDOWSY aswz = 100 for i in 0..$game_party.actors.size-1 actor = $game_party.actors[i] @actorNW[i] = Window_StatusActorName.new(actor,anwx,anwy) @actorSW[i] = Window_StatusActorStats.new(actor,aswx,aswy) i==@actor_index ? aswz = 100 : aswz -= 10 i==@actor_index ? @actorNW[i].opacity = 255 : @actorNW[i].opacity = 55 i==@actor_index ? @actorSW[i].opacity = 255 : @actorSW[i].opacity = 55 i==@actor_index ? @actorSW[i].contents_opacity = 255 : @actorSW[i].contents_opacity = 0 @actorSW[i].z = aswz anwx += StatusConfig::NAMEWINDOWSD if StatusConfig::NAMEWINDOWSS anwx += StatusConfig::NAMEWINDOWSW if StatusConfig::NAMEWINDOWSS anwy += StatusConfig::NAMEWINDOWSD unless StatusConfig::NAMEWINDOWSS anwy += StatusConfig::NAMEWINDOWSH unless StatusConfig::NAMEWINDOWSS aswx += StatusConfig::STATSWINDOWSD if StatusConfig::STATSWINDOWSS aswy += StatusConfig::STATSWINDOWSD unless StatusConfig::STATSWINDOWSS end Graphics.transition loop do Graphics.update Input.update update break if $scene != self end Graphics.freeze @help_window.dispose @skillsI.dispose @equipI.dispose @lwindow.dispose @rwindow.dispose for i in 0..$game_party.actors.size-1 @actorNW[i].dispose @actorSW[i].dispose end end def update if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) $scene = Scene_Menu.new(3) return end @status_index==0 ? update_stats_windows : update_next_scene if Input.trigger?(Input::L) and @status_index == 1 $game_system.se_play($data_system.cursor_se) @help_window.set_text(StatusConfig::TEXT1) update_lr_windows @status_index = 0 elsif Input.trigger?(Input::R) and @status_index == 0 $game_system.se_play($data_system.cursor_se) @help_window.set_text(StatusConfig::TEXT2) if @choice == 0 @help_window.set_text(StatusConfig::TEXT3) if @choice == 1 update_lr_windows @status_index = 1 end end def update_stats_windows if StatusConfig::NAMEWINDOWSS if Input.repeat?(Input::LEFT) and @actor_index > 0 $game_system.se_play($data_system.cursor_se) @actor_index -= 1 aswz = 100 for i in 0..$game_party.actors.size-1 i==@actor_index ? aswz = 100 : aswz -= 10 i==@actor_index ? aswz = 100 : aswz -= 10 i==@actor_index ? @actorNW[i].opacity = 255 : @actorNW[i].opacity = 55 i==@actor_index ? @actorSW[i].opacity = 255 : @actorSW[i].opacity = 55 i==@actor_index ? @actorSW[i].contents_opacity = 255 : @actorSW[i].contents_opacity = 0 @actorSW[i].z = aswz end elsif Input.repeat?(Input::RIGHT) if @actor_index < $game_party.actors.size-1 $game_system.se_play($data_system.cursor_se) # indentation - 1 @actor_index += 1 aswz = 100 for i in 0..$game_party.actors.size-1 i==@actor_index ? aswz = 100 : aswz -= 10 i==@actor_index ? aswz = 100 : aswz -= 10 i==@actor_index ? @actorNW[i].opacity = 255 : @actorNW[i].opacity = 55 i==@actor_index ? @actorSW[i].opacity = 255 : @actorSW[i].opacity = 55 i==@actor_index ? @actorSW[i].contents_opacity = 255 : @actorSW[i].contents_opacity = 0 @actorSW[i].z = aswz # indentation + 1 end end end else if Input.repeat?(Input::UP) and @actor_index > 0 $game_system.se_play($data_system.cursor_se) @actor_index -= 1 acnwz = 100 for i in 0..$game_party.actors.size-1 i==@actor_index ? aswz = 100 : aswz -= 10 i==@actor_index ? aswz = 100 : aswz -= 10 i==@actor_index ? @actorNW[i].opacity = 255 : @actorNW[i].opacity = 55 i==@actor_index ? @actorSW[i].opacity = 255 : @actorSW[i].opacity = 55 i==@actor_index ? @actorSW[i].contents_opacity = 255 : @actorSW[i].contents_opacity = 0 @actorSW[i].z = aswz end elsif Input.repeat?(Input::DOWN) if @actor_index < $game_party.actors.size-1 $game_system.se_play($data_system.cursor_se) # indentation - 1 @actor_index -= 1 acnwz = 100 for i in 0..$game_party.actors.size-1 i==@actor_index ? aswz = 100 : aswz -= 10 i==@actor_index ? aswz = 100 : aswz -= 10 i==@actor_index ? @actorNW[i].opacity = 255 : @actorNW[i].opacity = 55 i==@actor_index ? @actorSW[i].opacity = 255 : @actorSW[i].opacity = 55 i==@actor_index ? @actorSW[i].contents_opacity = 255 : @actorSW[i].contents_opacity = 0 @actorSW[i].z = aswz # indentation + 1 end end end end end def update_next_scene @skillsI.opacity = 255 if @choice == 0 and @skillsI.opacity != 255 @equipI.opacity = 55 if @choice == 0 and @equipI.opacity != 55 @skillsI.opacity = 55 if @choice == 1 and @skillsI.opacity != 55 @equipI.opacity = 255 if @choice == 1 and @equipI.opacity != 255 if Input.trigger?(Input::UP) and @choice == 1 $game_system.se_play($data_system.cursor_se) @help_window.set_text(StatusConfig::TEXT2) @choice = 0 elsif Input.trigger?(Input::DOWN) and @choice == 0 $game_system.se_play($data_system.cursor_se) @help_window.set_text(StatusConfig::TEXT3) @choice = 1 end if Input.trigger?(Input::C) $game_system.se_play($data_system.cursor_se) $scene = Scene_Skill.new(@actor_index) if @choice == 0 $scene = Scene_Equip.new(@actor_index) if @choice == 1 end end def update_lr_windows @lwindow.opacity = 255 if @status_index == 0 @rwindow.opacity = 55 if @status_index == 0 @lwindow.opacity = 55 if @status_index == 1 @rwindow.opacity = 255 if @status_index == 1 end end
_________________
--- Bad_maker ---
Dernière édition par Bad_maker le 18 Fév 2012, 18:24, édité 1 fois au total.
|
|