-
Numero contenuti
1074 -
Iscritto
-
Ultima visita
-
Days Won
17
Tipo di contenuto
Profili
Calendario
Forum
Gallery
Downloads
Tutti i contenuti di Ally
-
Nome Script: Rafidelis Fire Emblem Title Versione: N/D Autore/i: Rafidelis Informazioni: Questo script è stato creato prendendo la base del title del noto gioco Fire Emblem ^^ Istruzioni: Inserite la solita Classe sopra Main e poi inserite nella cartella Picture del vostro progetto le immagini con i rispettivi nomi: 'NewGame' 'Continue' 'Exit' (potete cambiarli anche attraverso lo script) Script: #===================================================== #~Rafidelis Fire Emblem Title # By Rafidelis ( [img=http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/xd.gif] ) # [email protected] # www.ReinoRpg.com # Credits: Mog Hunter to create a version for RMXP # Date: 30/11/08 (Lack little to 2009) #==================================================== #==================================================== # ~ Instructions: #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Paste above the Main, then configure the rest in # Module Rafidelis, below. #======================================================= #==================================================== # ~Start OF SETTINGS #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ module Rafidelis FE_COMMAND_PIC_NAMES = [ "newgame", # # Name of the New Game Image "continue", ## Name of the Image of Load Game "exit" # Name of Image Exit ] BACK_PIC_NAME = "back" TRANSITION_NAME = "Transition" # |Transition Name TRANSITION_TIME = 90 # Transition Time end #==================================================== # ~END OF SETTINGS AND START OF THE SCRIPT #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class Scene_Title < Scene_Base include Rafidelis alias rafidelis_fe_vx_title_start start def start rafidelis_fe_vx_title_start create_fe_title_options @command_window.opacity = 0 @command_window.contents_opacity = 0 end def create_fe_title_options @back = Plane.new @back.bitmap = Cache.picture(BACK_PIC_NAME) @back.z = 0 @back.opacity = 250 @back.blend_type = 1 @back2 = Plane.new @back2.bitmap = Cache.picture(BACK_PIC_NAME) @back2.z = 0 @back2.opacity = 90 Graphics.transition(TRANSITION_TIME, "Graphics/Pictures/#{TRANSITION_NAME}",60) @newgame = Sprite.new @newgame.bitmap = Cache.picture(FE_COMMAND_PIC_NAMES[0]) @newgame.x = -300 @newgame.y = (Graphics.height - @newgame.height)/3 @continue = Sprite.new @continue.bitmap = Cache.picture(FE_COMMAND_PIC_NAMES[1]) @continue.x = 600 @continue.y = @newgame.y + @continue.height + 20 @exitgame = Sprite.new @exitgame.bitmap = Cache.picture(FE_COMMAND_PIC_NAMES[2]) @exitgame.x = -300 @exitgame.y = @continue.y + @exitgame.height + 20 end alias rafidelis_fe_vx_title_update update def update rafidelis_fe_vx_title_update @back.ox += 1 @back.oy += 2 @back2.ox -= 1 @back2.oy += 2 if @newgame.x < (Graphics.width - @newgame.width)/2 @newgame.x += 10 end if @continue.x > (Graphics.width - @continue.width)/2 + 10 @continue.x -= 10 end if @exitgame.x < (Graphics.width - @exitgame.width)/2 @exitgame.x += 10 end @newgame.opacity += 10 if @newgame.opacity < 255 @continue.opacity += 10 if @continue.opacity < 255 @exitgame.opacity += 10 if @exitgame.opacity < 255 case @command_window.index when 0 @newgame.tone = Tone.new(0,0,0) @continue.tone = Tone.new(0,0,0,255) @exitgame.tone = Tone.new(0,0,0,255) if @newgame.opacity >= 255 @newgame.opacity = 0 end when 1 @newgame.tone = Tone.new(0,0,0,255) @continue.tone = Tone.new(0,0,0) @exitgame.tone = Tone.new(0,0,0,255) if @continue.opacity >= 255 @continue.opacity = 0 end when 2 @newgame.tone = Tone.new(0,0,0,255) @continue.tone = Tone.new(0,0,0,255) @exitgame.tone = Tone.new(0,0,0) if @exitgame.opacity >= 255 @exitgame.opacity = 0 end end end def terminate @newgame.dispose @continue.dispose @exitgame.dispose @back.dispose @back2.dispose @sprite.dispose end end #=============================================================================== = # END OF SCRIPT - Find more Rafidelis scripts in www.ReinoRpg.com / forum #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ Demo: http://www.4shared.com/file/78660619/558326e1/Rafidelis_Fe_Title.html?dirPwdVerified=184905c Incompatibilità: N/D
-
Non serve la demo, è presente lo script ed è di facile utilizzo.. Domani comunque vedo di prepararne una io così aggiorno il link al download..
-
Grazie @ ^^
-
Entrando nelle sezioni Script noterete che tutti i topic hanno delle etichette accanto al titolo. Ciò è stato fatto per riuscire a raggruppare gli script per categoria e facilitare quindi le ricerche ^^ Se ad esempio siete alla ricerca di un Battle System, anziché guardare tutti i topic, vi basterà cliccare sul tag CBS (che sta appunto per Custom Battle System) e vedrete filtrati soltanto gli script di vostro interesse! I tag dovrebbero essere abbastanza comprensibili, in caso contrario, eccovi la lista con la spiegazione completa Scripts pack - pacchetti di script, il cui contenuto può variare; CBS - (Custom Battle System) qui sono contenuti i BS completi; CMS - (Custom Menu System) qui sono contenuti i Menu completi con skill, item, equip, ecc.; BS/Battlers Addon - qui addon per la battaglia (esempio le schermate di vittoria) e per i combattenti (tipo ap, jp e sistemi che influiscono sui parametri); AMS/UMS - Message System, così come tutto ciò che modifica la finestra dei messaggi; Minigame - questo parla da solo credo xD HUD - per HUD oltre agli ovvi sistemi che mostrano hp, mp, ecc. su mappa, vanno anche tutte le altre cose che mostrano info. Ad esempio il nome della mappa; Schermate - qui schermate varie, tipo title, crediti, script per scene di intermezzo. Cose che comunque interrompono il gameplay; Interfacce - qui sono contenute tutte le schermate che comprendono finestre: crafting, menu opzioni, bestiario, quest diary, ecc. Inoltre tutte le modifiche alle finestre (come il cursore a manina) andranno qui; Gameplay - qui tutto quello che riguarda le mappe intese anche come eventi e chara. Quindi avremo sistemi di luci, fog, swapxt, weather, così come 8 direzioni, eventi che seguono l'eroe, i suoni per i passi menzionati prima e roba così. Anche messaggi popup che non siano HUD (ad esempio testo sopra i chara) vanno qui; Audio Mod - come Graphic Mod, tutti quelli che si applicano al sistema audio con modifiche ad esso (un jukebox andrebbe in Interfacce, un sistema che riproduce suoni ogni passo andrebbe nella categoria Gameplay, ecc); System Mod - qui modifiche pesanti al sistema che non rientrano in altri gruppi, tipo lettura file video (audio no perché c'è la categoria), multiplayer, lan, cambio risoluzione, apertura file, mouse, tastiera estesa, ecc.; Graphic Mod - qui tutti gli script che riguardano modifiche al sistema grafico. Ad esempio metodi di disegno Bitmap; Maker tool - unica cosa da dire è la differenza con Scripter tool. Maker tool riguarda script che il maker usa per il debug o la creazione del gioco, e che poi magari li rimuove a gioco rilasciato; Bugfix - qui ci vanno gli script che correggono le imperfezioni degli Rpg Maker; Scripter tool - include degli snippets o anche script interi, ma che richiedono abilità nell'utilizzo degli script per essere usati e, la loro presenza è utile/necessaria anche a gioco completato, a differenza dei Maker tool; Altro - e nell'evenienza si usa questo. Per ottenere questo, è utile anche che chi posta script si prenda il tempo di impostare la categoria corretta. All'apertura di un nuovo topic, una lista conterrà tutti i tag disponibili e se ne potrà scegliere soltanto uno. Nel caso uno script appartenga a più categorie (esempio un battlers add on che comprende un'interfaccia di gestione, tipo un materia system, o un apprendimento skill con punti) considerate la priorità nella lista sopra. Nel caso dell'esempio tra parentesi avrete la scelta fra "4. BS/Battlers Addon" e "9. Interfacce". E la scelta andrà a BS/Battlers Addon in quanto ha priorità più alta. Spero di aver spiegato tutto bene, ma in caso di dubbi chiedete pure ^^
-
Nome Script: 139 colori predefiniti Versione: N/D Autore/i: BigEd781 Informazioni: Con questo script avrete 139 colori predefiniti senza ogni volta scrivere il codice colore ecc ecc ^^ In questo link comunque,potete visualizzare i codici colore: Tabelle Colori Istruzioni: Inserite lo script sotto Material. Usate un call script del genere se volete cambiare colore: Font.default_color = Colors::LimeGreen Script: module Colors AliceBlue = Color.new(240,248,255) AntiquaWhite = Color.new(250,235,215) Aqua = Color.new(0,255,255) Aquamarine = Color.new(127,255,212) Azure = Color.new(240,255,255) Beige = Color.new(245,245,220) Bisque = Color.new(255,228,196) Black = Color.new(0,0,0) BlanchedAlmond = Color.new(255,255,205) Blue = Color.new(0,0,255) BlueViolet = Color.new(138,43,226) Brown = Color.new(165,42,42) BurlyWood = Color.new(222,184,135) CadetBlue = Color.new(95,158,160) Chartreuse = Color.new(127,255,0) Chocolate = Color.new(210,105,30) Coral = Color.new(255,127,80) CornFlowerBlue = Color.new(100,149,237) Cornsilk = Color.new(255,248,220) Crimson = Color.new(220,20,60) Cyan = Color.new(0,255,255) DarkBlue = Color.new(0,0,139) DarkCyan = Color.new(0,139,139) DarkGoldenrod = Color.new(184,134,11) DarkGray = Color.new(169,169,169) DarkGreen = Color.new(0,100,0) DarkKhaki= Color.new(189,183,107) DarkMagenta = Color.new(139,0,139) DarkOliveGreen = Color.new(85,107,47) DarkOrange = Color.new(255,140,0) DarkRed = Color.new(139,0,0) DarkSalmon = Color.new(233,150,122) DarkSeaGreen = Color.new(143,188,143) DarkSlateBlue = Color.new(72,61,139) DarkSlateGray = Color.new(40,79,79) DarkTurquoise = Color.new(0,206,209) DarkViolet = Color.new(148,0,211) DeepPink = Color.new(255,20,147) DeepSkyBlue = Color.new(0,191,255) DimGray = Color.new(105,105,105) DodgerBlue = Color.new(30,144,255) FireBrick = Color.new(178,34,34) FloralWhite = Color.new(255,255,240) ForestGreen = Color.new(34,139,34) Fuschia = Color.new(255,0,255) Gainsboro = Color.new(220,220,220) GhostWhite = Color.new(248,248,255) Gold = Color.new(255,215,0) Goldenrod = Color.new(218,165,32) Gray = Color.new(128,128,128) Green = Color.new(0,128,0) GreenYellow = Color.new(173,255,47) Honeydew = Color.new(240,255,240) HotPink = Color.new(255,105,180) IndianRed = Color.new(205,92,92) Indigo = Color.new(75,0,130) Ivory = Color.new(255,240,240) Khaki = Color.new(240,230,140) Lavender = Color.new(230,230,250) LavenderBlush = Color.new(255,240,245) LawnGreen = Color.new(124,252,0) LemonChiffon = Color.new(255,250,205) LightBlue = Color.new(173,216,230) LightCoral = Color.new(240,128,128) LightCyan = Color.new(224,255,255) LightGoldenrodYellow = Color.new(250,250,210) LightGreen = Color.new(144,238,144) LightGray = Color.new(211,211,211) LightPink = Color.new(255,182,193) LightSalmon = Color.new(255,160,122) LightSeaGreen = Color.new(32,178,170) LightSkyBlue = Color.new(135,206,250) LightSlateGray = Color.new(119,136,153) LightSteelBlue = Color.new(176,196,222) LightYellow = Color.new(255,255,224) Lime = Color.new(0,255,0) LimeGreen = Color.new(50,205,50) Linen = Color.new(250,240,230) Magenta = Color.new(255,0,255) Maroon = Color.new(128,0,0) MediumAquamarine = Color.new(102,205,170) MediumBlue = Color.new(0,0,205) MediumOrchid = Color.new(186,85,211) MediumPurple = Color.new(147,112,219) MediumSeaGreen = Color.new(60,179,113) MediumSlateBlue = Color.new(123,104,238) MediumSpringGreen = Color.new(0,250,154) MediumTurquoise = Color.new(72,209,204) MediumVioletred = Color.new(199,21,112) MidnightBlue = Color.new(25,25,112) MintCream = Color.new(245,255,250) MistyRose = Color.new(255,228,225) Moccasin = Color.new(255,228,181) NavajoWhite = Color.new(255,222,173) Navy = Color.new(0,0,128) OldLace = Color.new(253,245,230) Olive = Color.new(128,128,0) OliveDrab = Color.new(107,142,45) Orange = Color.new(255,165,0) OrangeRed = Color.new(255,69,0) Orchid = Color.new(218,112,214) PaleGoldenRod = Color.new(238,232,170) PaleGreen = Color.new(152,251,152) PaleTurquoise = Color.new(175,238,238) PaleVioletRed = Color.new(219,112,147) PapayaWhip = Color.new(255,239,213) PeachPuff = Color.new(255,218,155) Peru = Color.new(205,133,63) Pink = Color.new(255,192,203) Plum = Color.new(221,160,221) PowderBlue = Color.new(176,224,230) Purple = Color.new(128,0,128) Red = Color.new(255,0,0) RosyBrown = Color.new(188,143,143) RoyalBlue = Color.new(65,105,225) SaddleBrown = Color.new(139,69,19) Salmon = Color.new(250,128,114) SandyBrown = Color.new(244,164,96) SeaGreen = Color.new(46,139,87) Seashell = Color.new(255,245,238) Sienna = Color.new(160,82,45) Silver = Color.new(192,192,192) SkyBlue = Color.new(135,206,235) SlateBlue = Color.new(106,90,205) SlateGray = Color.new(112,128,144) Snow = Color.new(255,250,250) SpringGreen = Color.new(0,255,127) SteelBlue = Color.new(70,130,180) Tan = Color.new(210,180,140) Teal = Color.new(0,128,128) Thistle = Color.new(216,191,216) Tomato = Color.new(253,99,71) Turquoise = Color.new(64,244,208) Violet = Color.new(238,130,238) Wheat = Color.new(245,222,179) White = Color.new(255,255,255) WhiteSmoke = Color.new(245,245,245) Yellow = Color.new(255,255,0) YellowGreen = Color.new(154,205,50) end
-
Nome Script: MRA_FreezeMoveRoute Versione: N/D Autore/i: Mr. Anonymous, Moon, Jeff Informazioni: Questo piccolo script fornisce una funzione di congelare i movimenti autonomi di tutti gli eventi attraverso l'uso di un singolo switch... Istruzioni: Inserite lo script sotto Material. Cambiate 12: SWITCH_ID = 12con il numero di una switch a voi scelta. Script: #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ #_/ ◆ Freeze Event Move Route - MRA_FreezeMoveRoute ◆ VX ◆ #_/ ◇ Last Update: 2008/09/30 ◇ #_/ ◆ Created by Mr. Anonymous ◆ #_/ ◆ Special Thanks to Moon for the 9/30 Update ◆ #_/ ◆ Creator's Blog: ◆ #_/ ◆ http://mraprojects.wordpress.com ◆ #_/---------------------------------------------------------------------------- #_/ This script provides a a function for freezing the automated movement #_/ routes of events through the use of a switch. #_/============================================================================ #_/ Aliased Method: Game_Character's update_self_movement #_/============================================================================ #_/ Install: Insert above main. #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ #=============================================================================# # ★ Customization ★ # #=============================================================================# module MRA module FreezeMoveRoute # ★ Freeze Movement Switch ID ★ # This allows you to designate a switch that freezes all moveroutes of # events on the map. SWITCH_ID = 12 end end #=============================================================================# # ★ End Customization ★ # #=============================================================================# #============================================================================== # ** Game_Character #------------------------------------------------------------------------------ # This class deals with characters. It's used as a superclass of the # Game_Player and Game_Event classes. #============================================================================== class Game_Character #-------------------------------------------------------------------------- # * Update During Self movement #-------------------------------------------------------------------------- alias update_self_movement_mra_freezemoveroute update_self_movement def update_self_movement update_self_movement_mra_freezemoveroute if !$game_switches[MRA] end end
-
Nome Script: Velocità movimento Versione: 1.0 Autore/i: Woratana Informazioni: Vi permette di cambiare la velocità del personaggio ^^ Istruzioni: Inserite lo script sotto Material. Script: #====================================================================== ======== # [VX] Extra Move Speed by Woratana #------------------------------------------------------------------------------ # Version: 1.0 # Released on: 11/02/2008 # by Woratana [[email protected]] # You can edit event's speed and/or frequency to be more than limit, # by put event command "Comment" in the event page you want to edit. # (Yes, you can set the different speed for different page in one event) # Add comment like this: # [speed(speed you want)][freq(frequncy you want)] # e.g. [speed8][freq4] # You can edit only speed by put [speed(speed you want)] # and edit only frequency by put [freq(frequency you want)] # You can increase character's Speed and/or Frequency by call script: # (character).add_speed(speed_plus,frequency_plus) # To decrease Speed and/or Frequency, you can just put negative number in it: # e.g. $game_player.add_speed(-1.5) # To change character's Speed to any number you want: # (character).fix_speed(speed you want) # To change character's Frequency to any number you want: # (character).fix_frequency(frequency you want) # Frequency shouldn't be more than 5 or 6, but there is no limit for Speed. # You can use decimal place for speed/frequency, # To change player's frequency, it will make no diffrent. # It will make different in speed even though the speed is just 0.5 more. #============================================================================== class Game_Character attr_accessor :move_speed, :move_frequency def add_speed(spd = 0,freq = 0) @move_speed += spd @move_frequency += freq end def fix_speed(spd = 0) @move_speed = spd end def fix_freq(freq = 0) @move_frequency = freq end end class Game_Event < Game_Character attr_accessor :event alias wor_event_setup setup def setup(new_page) wor_event_setup(new_page) for i in [email protected] next if @list[i].code != 108 if @list[i].parameters[0].include?("[speed") list = @list[i].parameters[0].scan(/[speed([0.0-9.9]+)]/) @move_speed = $1.to_i end if @list[i].parameters[0].include?("[freq") list = @list[i].parameters[0].scan(/[freq([0.0-9.9]+)]/) @move_frequency = $1.to_i end end end end Demo:http://www.mediafire.com/?8dd2ww7jkmc
-
Nome Script: Time Rewrite Versione: 1.1 Autore/i: Mac Informazioni: Questo script vi permette di visualizzare un timer,e di cambiarne l'opacità,di spostarlo a destra/sinistra/alto/basso,di cambiarne il tipo di font,e di impostare una posizione esatta sullo schermo Istruzioni: Inserite lo script sotto Material. Per personalizzare il tutto,andate a prendere queste righe che vi elencherò sotto: On/Off Timer $game_switches[numberhere] == false Posizione Timer #TOP LEFT $game_system.timer_position = 0 #TOP RIGHT $game_system.timer_position = 1 #BOTTOM LEFT $game_system.timer_position = 2 #BOTTOM RIGHT $game_system.timer_position = 3 Posizione esatta da x/y $game_system.timer_position = 4 $game_system.timer_posx = # $game_system.timer_posy = # Opacità(da 0 a 255) $game_system.timer_opacity = # Font e grandezza font $game_system.timer_fontsize = # $game_system.timer_fontsize = "fonthere" Script: #============================================================================== # ** Game_System #------------------------------------------------------------------------------ # This class handles system-related data. Also manages vehicles and BGM, etc. # The instance of this class is referenced by $game_system. #============================================================================== class Game_System #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_accessor :timer # timer attr_accessor :timer_working # timer working flag attr_accessor :timer_position # timer screen position attr_accessor :timer_posx # timer position x axis attr_accessor :timer_posy # timer position y axis attr_accessor :timer_opacity # timer opacity attr_accessor :timer_fonttype # timer font type attr_accessor :timer_fontsize # timer font size attr_accessor :save_disabled # save forbidden attr_accessor :menu_disabled # menu forbidden attr_accessor :encounter_disabled # encounter forbidden attr_accessor :save_count # save count attr_accessor :version_id # game version ID #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize @timer = 0 @timer_working = false @timer_position = 1 @timer_opacity = 255 @timer_posx = 0 @timer_posy = 0 @timer_fonttype = "Arial" @timer_fontsize = 32 @save_disabled = false @menu_disabled = false @encounter_disabled = false @save_count = 0 @version_id = 0 end #-------------------------------------------------------------------------- # * Get Battle BGM #-------------------------------------------------------------------------- def battle_bgm if @battle_bgm == nil return $data_system.battle_bgm else return @battle_bgm end end #-------------------------------------------------------------------------- # * Set Battle BGM # battle_bgm : new battle BGM #-------------------------------------------------------------------------- def battle_bgm=(battle_bgm) @battle_bgm = battle_bgm end #-------------------------------------------------------------------------- # * Get Battle End ME #-------------------------------------------------------------------------- def battle_end_me if @battle_end_me == nil return $data_system.battle_end_me else return @battle_end_me end end #-------------------------------------------------------------------------- # * Set Battle End ME # battle_end_me : new battle end ME #-------------------------------------------------------------------------- def battle_end_me=(battle_end_me) @battle_end_me = battle_end_me end #-------------------------------------------------------------------------- # * Get Position of Timer #-------------------------------------------------------------------------- def timer_position return @timer_position end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update if @timer_working and @timer > 0 @timer -= 1 if @timer == 0 and $game_temp.in_battle # If the timer 0 in battle $game_temp.next_scene = "map" # interrupt the battle end end end end #============================================================================== # ** Sprite_Timer #------------------------------------------------------------------------------ # This sprite is used to display the timer. It observes the $game_system # and automatically changes sprite conditions. #============================================================================== class Sprite_Timer < Sprite #-------------------------------------------------------------------------- # * Object Initialization # viewport : viewport #-------------------------------------------------------------------------- def initialize(viewport) super(viewport) self.bitmap = Bitmap.new(88, 48) self.bitmap.font.name = $game_system.timer_fonttype self.bitmap.font.size = $game_system.timer_fontsize @timer_position = $game_system.timer_position self.x = 544 self.y = 0 self.z = 200 update end #-------------------------------------------------------------------------- # * Dispose #-------------------------------------------------------------------------- def dispose self.bitmap.dispose super end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update case @timer_position when 0 # Top Left self.x = 85 - self.bitmap.width self.y = 0 when 1 # Top Right self.x = 544 - self.bitmap.width self.y = 0 when 2 # Bottom Left self.x = 85 - self.bitmap.width self.y = 370 when 3 # Bottom Right self.x = 544 - self.bitmap.width self.y = 370 when 4 # Custom self.x = $game_system.timer_posx self.y = $game_system.timer_posy end super self.visible = $game_system.timer_working self.bitmap.font.name = $game_system.timer_fonttype self.bitmap.font.size = $game_system.timer_fontsize if $game_switches[1] == false self.opacity = $game_system.timer_opacity else self.opacity = 0 end if $game_system.timer / Graphics.frame_rate != @total_sec self.bitmap.clear @timer_position = $game_system.timer_position @total_sec = $game_system.timer / Graphics.frame_rate min = @total_sec / 60 sec = @total_sec % 60 text = sprintf("%02d:%02d", min, sec) self.bitmap.font.color.set(255, 255, 255) self.bitmap.draw_text(self.bitmap.rect, text, 1) end end end
-
Nome Script: Chiama Evento Versione: 1.0 Autore/i: Woratana Informazioni: Fondamentalmente è come chiamare un evento comune normale,ma qui abbiamo l'opzione di richiamre pure un evento situato in un'altra mappa ^^ Istruzioni: Inserite lo script sotto Material. Usate i seguenti call script per richiamare l'evento comune: callev(event_id, page, map_id) callev(event_id,page) Script: #============================================================ # ? [VX] ? Call Event ? # * Missing features from RM2K #------------------------------------------------------------ # ? by Woratana [[email protected]] # ? Thaiware RPG Maker Community # ? Released Date: 04/05/2008 #------------------------------------------------------------ =begin +[How to use: Version 2]+ ========================================================================= >> Call event from other map by call script: callev(event id, page you want, map ID) ------------------------------------------------------------------------ e.g. callev(5,2,1) ^ to call event commands list from 'page 2' of 'event ID 5' in Map ID '1' ------------------------------------------------------------------------ >> Call event in current map by call script: callev(event id, page you want) ------------------------------------------------------------------------ >> If you want to call event in current page that it's running, set 'page you want' to 0 ------------------------------------------------------------------------ *Note: You CANNOT call erased event! ======================================================================== =end #------------------------------------------------------------ # Make variable 'event' readable from outside class Game_Event; attr_reader :event; end class Game_Interpreter def callev(evid = 0,page = 0, id_map = $game_map.map_id) return if evid == 0 if id_map != $game_map.map_id # Load new map data if event is not from current map dest_map = load_data(sprintf("Data/Map%03d.rvdata", id_map)) if page == 0 # Get first page if user haven't set page inter_event = dest_map.events[evid].pages[0] else inter_event = dest_map.events[evid].pages[page - 1] end else # Use $game_map if event is in current map if page == 0 inter_event = $game_map.events[evid] else inter_event = $game_map.events[evid].event.pages[page - 1] end end # Add new child_interpreter to run commands @child_interpreter = Game_Interpreter.new(@depth + 1) # Add commands from target event @child_interpreter.setup(inter_event.list, @event_id) end end
-
Nome Script: Debug velocità Versione: N/D Autore/i: Gammastar Informazioni: Velocizza la battaglia con il tasto F6. Istruzioni: Inserite lo script sotto Material Script: #By: Gammastar. #Debug speeder. Boosts the frame rate when you press the F6 key. #Press F6 again to return to normal. #This is much more effective if you dash while using it. #No need to give me credit, since this is only usable in debug mode. #Set variable to false. $using = false class Scene_Map #Alias the update method in Scene_Map. alias gammastar_speedupdate update #By aliasing, I add to the method instead of actually defining it. def update #Refer to alias (can't work without this) gammastar_speedupdate #Check to see if in debug and if F6 is pressed. if $TEST and Input.trigger?(Input::F6) #Check to see if you are using the speeder. if $using == false Graphics.frame_rate = 120 Sound.play_decision $using = true else Graphics.frame_rate = 60 Sound.play_cancel $using = false end end end end #Essentially the same as above. class Scene_Battle alias gammastar_speedupdate_b update def update gammastar_speedupdate_b if $TEST and Input.trigger?(Input::F6) if $using == false Graphics.frame_rate = 120 Sound.play_decision $using = true else Graphics.frame_rate = 60 Sound.play_cancel $using = false end end end end
-
Nome Script: Wait Gauge Battle Versione: N/D Autore/i: ziifee Informazioni: Rispetto ad un altro particolare sistema di battaglia,ziifee's Wait Gauge battaglia ricrea un qualcosa di molto più semplice. Guardate lo screen Screenshots: Istruzioni: All'interno della demo Demo: http://www.mediafire.com/?mkimjrfnnxz
-
Nome Script: Simple Mouse System Versione: 1.5 Autore/i: Woratana Informazioni: Un semplice script che implementa il mouse in rpgmvx Istruzioni: Inserire un immagine desiderata nella cartela system e rinominatela foxkeh_cursor. Demo: http://www.mediafire.com/?l4nzlj5nokj
-
Schermate Messaggio Game Over(Tales of Phantasia)
Ally ha aggiunto un topic in Scripts RPG Maker VX (RGSS2)
Nome Script: Messaggio Game Over(Tales of Phantasia) Versione: 1.0 Autore/i: Rafidelis Informazioni: Con questo script, è possibile visualizzare un messaggio sullo schermo ogni volta che il gruppo muore. Questo script ha preso spunto per l'ormai noto gioco per SNES Tales of Phantasia Istruzioni: Inserito lo script sotto Material Per modificare il messaggio, andate alla linea 56 ^^ Si può modificare anche il font e il colore del testo. Script: #==============================================================================# # [RGSS2] Tales of Phantasia(SNES) Gameover Message # #------------------------------------------------------------------------------# # $RafiScripts.by = Rafidelis(Rafis) # # $RafiScripts.version = 1.0 # # $RafiScripts.release_date = 08/03/09 # # $RafiScripts.email = [email protected] or [email protected] # # $RafiScripts.website = www.ReinoRPG.com or www.ReinoRPG.com/forum # #==============================================================================# #==============================================================================# # [** $RafiScripts.desc **] // Sobre o Script / About Script # #------------------------------------------------------------------------------# # Português : # # Este simples script permite exibir uma mensagem antes da tela de GameOver # # Como no jogo Tales of Phantasia de Snes,é muito cool (h) # #------------------------------------------------------------------------------# # English # # This simple script can display a message before the GameOver Screen # # Like the game Tales of Phantasia for SNES, it is very cool (h) # #==============================================================================# #==============================================================================# # [** $RafiScripts.features **] // Caracteristicas do Script/Script Features # #------------------------------------------------------------------------------# # Português: # # ** Janela com uma mensagem antes de ir para a tela de Gameover # # ** Digite quantas linhas de texto desejar # # ** Formatação Simples e Facil da mensagem. # # ** Não usa a Scene_Gameover,por isso um conflito com outro script # # | Que modifique a cena de GameOver é quase nula. ;D # #------------------------------------------------------------------------------# # English: # # ** Window with a message before going to the screen GameOver # # ** Enter how many lines of text like # # ** Simple and Easy Formatting of the message # # ** Don't use Scene_Gameover,therefore a conflict with another script # # | ** What change the scene gameover is almost nil. # #==============================================================================# #==============================================================================# # [** $RafiScripts.instr ] // Instruções / Instructions: # #------------------------------------------------------------------------------# # ** Cole acima do Main Paste Above Main # # ** Para configurar o script,edite o modulo Rafidelis::Rafis_GameOver_TOP # # ** To configure the script, edit the module Rafidelis: Rafis_GameOver_TOP # #==============================================================================# #==============================================================================# # [** $RafiScripts.conf_start ] Inicio das Configurações # #------------------------------------------------------------------------------# module Rafidelis module Rafis_GameOver_TOP #==============================================================================# Text_Lines = [] # ** Você pode digitar quantas linhas quiser,se por # exemplo você quiser uma terceira linha use Text[2] = "Texto" # ** You can enter how many lines you want, if for Example # you want to use a third line Text [2] = "Text" Text_Lines[0] = "As Mortes deles Marcaram o fim" # Text_Lines[1] = "de todos os sonhos e esperanças..." #==============================================================================# Win_text_position = 2 # 0=Emcima-UP ** 1=Centro-Center ** 2=Embaixo-Down Win_text_Opacity = 0 # Opacidade da Janela da mensagem - Message Window Opacity Text_Size = 27 # Tamanho da Fonte da Mensagem Message Font size Text_Bold = true # true = Use false = Don't use Text_Font = ["Courier New",Font.default_name] Text_Color = 0 # 0=Branco/White 1=Azul/Blue 2=Vermelho/Red 3=Verde/Green etc.. Use_Screen_Tone = false # true - usar/use false = não usar/Don't use end end #==============================================================================# # [** $RafiScripts.conf_end ] Fim das Configurações # #------------------------------------------------------------------------------# #===============================================================================# # [ ** Scene_MessageGameover ] Very Simple =) # #===============================================================================# class Scene_MessageGameover < Scene_Base include Rafidelis::Rafis_GameOver_TOP def start create_menu_background RPG::BGM.stop RPG::BGS.stop $data_system.gameover_me.play @win = Window_GameOverMessage.new if Use_Screen_Tone @menuback_sprite.tone.set(-20, -255,-255,0) end Graphics.transition(150) Graphics.freeze end def update if Input.trigger?(Input::C) Graphics.transition(100) $scene = Scene_Gameover.new end end def terminate @win.dispose end end #===============================================================================# # [ ** Window_GameOverMessage ] # #===============================================================================# class Window_GameOverMessage < Window_Base include Rafidelis::Rafis_GameOver_TOP attr_accessor :pos def initialize(pos=Win_text_position) @pos = pos super(0,0,544,Text_Lines.size * 32 + 32) define_y self.opacity = Win_text_Opacity refresh end def define_y if self.pos == 0 ; @y = 0 elsif self.pos == 1 ; @y = (Graphics.height - self.height)/2 elsif self.pos == 2 ; @y = Graphics.height - self.height end end def refresh self.contents.clear self.y = @y self.contents.font.size = Text_Size self.contents.font.name = Text_Font self.contents.font.color = text_color(0) self.contents.font.bold = Text_Bold self.contents.font.color = text_color(Text_Color) for i in 0...Text_Lines.size self.contents.draw_text(0,i * 24,self.width,32,Text_Lines[i]) end end end #===============================================================================# # [ ** Scene_Map ] # #===============================================================================# class Scene_Map < Scene_Base def call_gameover $game_temp.next_scene = nil $scene = Scene_MessageGameover.new end end #===============================================================================# # [ ** Scene_Battle ] # #===============================================================================# class Scene_Battle < Scene_Base def call_gameover $game_temp.next_scene = nil $scene = Scene_MessageGameover.new @message_window.clear end end #===============================================================================# # [ ** Scene_Item ] # #===============================================================================# class Scene_Item < Scene_Base def use_item_nontarget Sound.play_use_item $game_party.consume_item(@item) @item_window.draw_item(@item_window.index) @target_window.refresh if $game_party.all_dead? $scene = Scene_MessageGameover.new elsif @item.common_event_id > 0 $game_temp.common_event_id = @item.common_event_id $scene = Scene_Map.new end end end #===============================================================================# # [ ** Scene_Skill ] # #===============================================================================# class Scene_Skill < Scene_Base def use_skill_nontarget Sound.play_use_skill @actor.mp -= @actor.calc_mp_cost(@skill) @status_window.refresh @skill_window.refresh @target_window.refresh if $game_party.all_dead? $scene = Scene_MessageGameover.new elsif @skill.common_event_id > 0 $game_temp.common_event_id = @skill.common_event_id $scene = Scene_Map.new end end end #==============================================================================# # [** $RafiScripts.script_end] // Fim do Script - Script End # #------------------------------------------------------------------------------# # Você pode encontrar mais scripts meus em www.ReinoRPG.com # # You can find more scripts create for me at www.ReinoRPG.com # #==============================================================================# -
Nome Script: Simple Font Change Versione: N/D Autore/i: DeadlyDan Informazioni: Piccolo script,che permetterà di farvi cambare Font... Istruzioni: Andate nella classe Main,e prima di begin inserite questo codice: def FontExist? unless Font.exist? ( Font.default_name ) print "Unable to find #{Font.default_name} font." exit end end def FontLoad ( fontname, fontsize ) Font.default_name = fontname Font.default_size = fontsize FontExist? endPoi,prima della linea $scene = Scene_Title.new,inserite: FontLoad ( "Comic Sans MS", 15 )Se non vuoi installare il font che vuoi usare nel tuo game,basta creare una cartella nominata Fonts,dentro alla tua cartella di gioco
-
Nome Script: Light Effects VX Versione: 1.3 Autore/i: Kylock Informazioni: Potete inserire con un commento,un effetto di luce in un evento...tramite un'immagine ^^ Screenshots: Istruzioni: Inserite lo script sotto a Material... Poi,copia questa immagine,nella tua cartella Pictures: Per usare lo script,dovrete scrivere un commento dentro ad un evento,e spuntare queste opzioni come nell'immagine: Per i vari effetti che potete usare,prendete in considerazione questa parte dello script Script: #============================================================================== # ■ Light Effects VX 1.3 # 12.27.2008 #------------------------------------------------------------------------------ # Script by: Kylock (originally for RMXP by Near Fantastica) # Version 1.3 by Enelvon #============================================================================== # To make an event glow, give it a Comment: with any of the supported light # modes. # The SWITCH setting below will disable light effects from updating with the # switch is on. #============================================================================== # ● Change Log #------------------------------------------------------------------------------ # 1.0 - Original Release # 1.1 - New light modes added: LIGHT2, TORCH, TORCH2 # - Changed sprite blend mode to ADD (looks slightly better) # - Fire-based lights are now red in color # 1.2 - Bug fixed with looping maps and lights displaying above messageboxes # 1.3 - More bugfixes #============================================================================== # ● Light Modes #------------------------------------------------------------------------------ # GROUND - Medium steady white light. # FIRE - Large red light with a slight flicker. # LIGHT - Small steady white light. # LIGHT2 - X-Large steady white light. # TORCH - X-Large red light with a heavy flicker. # TORCH2 - X-Large red light with a sleight flicker. #============================================================================== class Spriteset_Map alias les_spriteset_map_initalize initialize alias les_spriteset_map_dispose dispose alias les_spriteset_map_update update def initialize @light_effects = [] setup_lights les_spriteset_map_initalize update end def dispose les_spriteset_map_dispose for effect in @light_effects effect.light.dispose end @light_effects = [] end def update les_spriteset_map_update update_light_effects end def setup_lights for event in $game_map.events.values next if event.list == nil for i in 0...event.list.size if event.list[i].code == 108 and event.list[i].parameters == ["GROUND"] type = "GROUND" light_effects = Light_Effect.new(event,type) light_effects.light.zoom_x = 2 light_effects.light.zoom_y = 2 light_effects.light.opacity = 100 @light_effects.push(light_effects) end if event.list[i].code == 108 and event.list[i].parameters == ["FIRE"] type = "FIRE" light_effects = Light_Effect.new(event,type) light_effects.light.zoom_x = 300 / 100.0 light_effects.light.zoom_y = 300 / 100.0 light_effects.light.opacity = 100 @light_effects.push(light_effects) end if event.list[i].code == 108 and event.list[i].parameters == ["LIGHT"] type = "LIGHT" light_effects = Light_Effect.new(event,type) light_effects.light.zoom_x = 1 light_effects.light.zoom_y = 1 light_effects.light.opacity = 150 @light_effects.push(light_effects) end if event.list[i].code == 108 and event.list[i].parameters == ["LIGHT2"] type = "LIGHT2" light_effects = Light_Effect.new(event,type) light_effects.light.zoom_x = 6 light_effects.light.zoom_y = 6 light_effects.light.opacity = 150 @light_effects.push(light_effects) end if event.list[i].code == 108 and event.list[i].parameters == ["TORCH"] type = "TORCH" light_effects = Light_Effect.new(event,type) light_effects.light.zoom_x = 6 light_effects.light.zoom_y = 6 light_effects.light.opacity = 150 @light_effects.push(light_effects) end if event.list[i].code == 108 and event.list[i].parameters == ["TORCH2"] type = "TORCH2" light_effects = Light_Effect.new(event,type) light_effects.light.zoom_x = 6 light_effects.light.zoom_y = 6 light_effects.light.opacity = 150 @light_effects.push(light_effects) end end end for effect in @light_effects case effect.type when "GROUND" effect.light.x = effect.event.screen_x - 64 effect.light.y = effect.event.screen_y - 86 effect.light.blend_type = 1 when "FIRE" effect.light.x = effect.event.screen_x - 96 + rand(6) - 3 effect.light.y = effect.event.screen_y - 118 + rand(6) - 3 effect.light.tone = Tone.new(255,-100,-255, 0) effect.light.blend_type = 1 when "LIGHT" effect.light.x = effect.event.screen_x - 32 effect.light.y = effect.event.screen_y - 54 effect.light.blend_type = 1 when "LIGHT2" effect.light.x = effect.event.screen_x - 182 - 20 effect.light.y = effect.event.screen_y - 214 effect.light.blend_type = 1 when "TORCH" effect.light.x = effect.event.screen_x - 182 - 20 + rand(20) - 10 effect.light.y = effect.event.screen_y - 214 + rand(20) - 10 effect.light.tone = Tone.new(255,-100,-255, 0) effect.light.blend_type = 1 when "TORCH2" effect.light.x = effect.event.screen_x - 182 - 20 effect.light.y = effect.event.screen_y - 214 effect.light.tone = Tone.new(255,-100,-255, 0) effect.light.blend_type = 1 end end end def update_light_effects if $game_switches[1] for effect in @light_effects next if effect.type == "FIRE" || effect.type == "TORCH" effect.light.visible = false end else for effect in @light_effects next if effect.type == "FIRE" || effect.type == "TORCH" effect.light.visible = true end end for effect in @light_effects case effect.type when "GROUND" effect.light.x = effect.event.screen_x - 64 effect.light.y = effect.event.screen_y - 86 when "FIRE" effect.light.x = effect.event.screen_x - 96 + rand(6) - 3 effect.light.y = effect.event.screen_y - 118 + rand(6) - 3 effect.light.opacity = rand(10) + 90 when "LIGHT" effect.light.x = effect.event.screen_x - 32 effect.light.y = effect.event.screen_y - 54 when "LIGHT2" effect.light.x = effect.event.screen_x - 182 - 20 effect.light.y = effect.event.screen_y - 214 when "TORCH" effect.light.x = effect.event.screen_x - 182 - 20 + rand(20) - 10 effect.light.y = effect.event.screen_y - 214 + rand(20) - 10 effect.light.opacity = rand(30) + 70 when "TORCH2" effect.light.x = effect.event.screen_x - 182 - 20 effect.light.y = effect.event.screen_y - 214 effect.light.opacity = rand(10) + 90 end end end end class Light_Effect attr_accessor :light attr_accessor :event attr_accessor :type def initialize(event, type) @light = Sprite.new @light.bitmap = Cache.picture("le.png") @light.visible = true @light.z = 190 @event = event @type = type end end
-
Nome Script: Lola Scene Menu Versione: N/D Autore/i: Master I Informazioni: Un menù diverso da quello di default che utilizza anche le picture ^^ Screenshots: Istruzioni: Inserite lo script che trovate dentro la demo sotto Material e inserite tutte le risorse che ci sono al suo interno... Demo: http://www.4shared.com/file/127187698/f97362b4/Lola_Scene_Menu.html
-
Nome Script: Risoluzione 640x480 Versione: 1.0 Autore/i: Drew Informazioni: Script che porta lo schermo alla risoluzione 640x480 come nell'XP... Istruzioni: Inserite lo script sotto Material Script: #============================================================================== # * Resolução 640X480 para VX[resolução XP] #------------------------------------------------------------------------------ # Résolution 640x480 (pour RPG Maker VX) par Krazplay # Version 1.0 (23/01/2008) # Dernière version, commentaires : http://rpgmaker/forum/index.php?topic=12460 #------------------------------------------------------------------------------ # Ce script ne fait pas que changer la résolution, il modifie pas mal de choses # pour que le jeu soit adapté à sa nouvelle résolution. # Sachant que ce script redéfinit pas mal de méthodes, il est vivement conseillé # de le placer au-dessus de vos autres scripts ajoutés (mais en-dessous de ceux # de base, à part Main évidemment) # # Résolution de base : 544x416 (17x13 cases de 32 pixels) # Nouvelle résolution : 640x480 (20x15 cases de 32 pixels) # On gagne donc 96x64 pixels #------------------------------------------------------------------------------ # Toutes les méthodes modifiées : # # ? Game_Map : calc_parallax_x, calc_parallax_y, setup_scroll, # scroll_down, scroll_right # ? Game_Player : center # ? Sprite_Base : start_animation # ? Sprite_Timer : initialize # ? Spriteset_Map : create_viewports # ? Spriteset_Battle : create_viewports, create_enemies, create_battleback, # create_battlefloor # ? Window_Help, Window_SkillStatus, Window_Equip : initialize # ? Window_Status, Window_SaveFile, Window_NumberInput : initialize # ? Window_ShopBuy, Window_ShopStatus : initialize # ? Window_MenuStatus : initialize, refresh, update_cursor # ? Window_Message : initialize, reset_window # ? Scene_Title : create_title_graphic, create_command_window # ? Scene_Menu : start # ? Scene_Item : start, show_target_window, hide_target_window # ? Scene_Skill : start, show_target_window, hide_target_window # ? Scene_Equip : create_item_windows # ? Scene_End : create_command_window # ? Scene_Shop : start # ? Scene_Battle : create_info_viewport, start_skill_selection, # start_item_selection #============================================================================== # Agrandir les images Title.png et BattleFloor.png si elles sont trop petites. AGRANDIR_IMAGES = true Graphics.resize_screen(640, 480) #============================================================================== # ¦ Game_Objects #============================================================================== # ? Game_Map # class Game_Map def calc_parallax_x(bitmap) if bitmap == nil return 0 elsif @parallax_loop_x return @parallax_x / 16 elsif loop_horizontal? return 0 else w1 = bitmap.width - 640 w2 = @map.width * 32 - 640 if w1 <= 0 or w2 <= 0 return 0 else return @parallax_x * w1 / w2 / 8 end end end def calc_parallax_y(bitmap) if bitmap == nil return 0 elsif @parallax_loop_y return @parallax_y / 16 elsif loop_vertical? return 0 else h1 = bitmap.height - 480 h2 = @map.height * 32 - 480 if h1 <= 0 or h2 <= 0 return 0 else return @parallax_y * h1 / h2 / 8 end end end def setup_scroll @scroll_direction = 2 @scroll_rest = 0 @scroll_speed = 4 @margin_x = (width - 20) * 256 / 2 # ? / 2 @margin_y = (height - 15) * 256 / 2 # ? / 2 end def scroll_down(distance) if loop_vertical? @display_y += distance @display_y %= @map.height * 256 @parallax_y += distance else last_y = @display_y @display_y = [@display_y + distance, (height - 15) * 256].min @parallax_y += @display_y - last_y end end def scroll_right(distance) if loop_horizontal? @display_x += distance @display_x %= @map.width * 256 @parallax_x += distance else last_x = @display_x @display_x = [@display_x + distance, (width - 20) * 256].min @parallax_x += @display_x - last_x end end end # ? Game_Player # class Game_Player < Game_Character CENTER_X = (640 / 2 - 16) * 8 # ? X ? * 8 CENTER_Y = (480 / 2 - 16) * 8 # ? Y ? * 8 def center(x, y) display_x = x * 256 - CENTER_X # ? unless $game_map.loop_horizontal? # ? max_x = ($game_map.width - 20) * 256 # ? display_x = [0, [display_x, max_x].min].max # ? end display_y = y * 256 - CENTER_Y # ? unless $game_map.loop_vertical? # ? max_y = ($game_map.height - 15) * 256 # ? display_y = [0, [display_y, max_y].min].max # ? end $game_map.set_display_pos(display_x, display_y) # ? end end #============================================================================== # ¦ Sprites #============================================================================== # ? Sprite_Base # class Sprite_Base < Sprite def start_animation(animation, mirror = false) dispose_animation @animation = animation return if @animation == nil @animation_mirror = mirror @animation_duration = @animation.frame_max * 4 + 1 load_animation_bitmap @animation_sprites = [] if @animation.position != 3 or not @@animations.include?(animation) if @use_sprite for i in 0..15 sprite = ::Sprite.new(viewport) sprite.visible = false @animation_sprites.push(sprite) end unless @@animations.include?(animation) @@animations.push(animation) end end end if @animation.position == 3 if viewport == nil @animation_ox = 640 / 2 @animation_oy = 480 / 2 else @animation_ox = viewport.rect.width / 2 @animation_oy = viewport.rect.height / 2 end else @animation_ox = x - ox + width / 2 @animation_oy = y - oy + height / 2 if @animation.position == 0 @animation_oy -= height / 2 elsif @animation.position == 2 @animation_oy += height / 2 end end end end # ? Sprite_Timer # class Sprite_Timer < Sprite def initialize(viewport) super(viewport) self.bitmap = Bitmap.new(88, 48) self.bitmap.font.name = "Arial" self.bitmap.font.size = 32 self.x = 640 - self.bitmap.width self.y = 0 self.z = 200 update end end # ? Spriteset_Map # class Spriteset_Map def create_viewports @viewport1 = Viewport.new(0, 0, 640, 480) @viewport2 = Viewport.new(0, 0, 640, 480) @viewport3 = Viewport.new(0, 0, 640, 480) @viewport2.z = 50 @viewport3.z = 100 end end # ? Spriteset_Battle # class Spriteset_Battle def create_viewports @viewport1 = Viewport.new(0, 0, 640, 480) @viewport2 = Viewport.new(0, 0, 640, 480) @viewport3 = Viewport.new(0, 0, 640, 480) @viewport2.z = 50 @viewport3.z = 100 end def create_enemies @enemy_sprites = [] for enemy in $game_troop.members.reverse enemy.screen_x += 48 # Recentrage des ennemis @enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy)) end end def create_battleback source = $game_temp.background_bitmap bitmap = Bitmap.new(640+96, 480+64) bitmap.stretch_blt(bitmap.rect, source, source.rect) bitmap.radial_blur(90, 12) @battleback_sprite = Sprite.new(@viewport1) @battleback_sprite.bitmap = bitmap @battleback_sprite.ox = 320+48 @battleback_sprite.oy = 240+32 @battleback_sprite.x = 320 #272 @battleback_sprite.y = 208 #176 @battleback_sprite.wave_amp = 8 @battleback_sprite.wave_length = 240 @battleback_sprite.wave_speed = 120 end def create_battlefloor @battlefloor_sprite = Sprite.new(@viewport1) battle_floor = Cache.system("BattleFloor") if AGRANDIR_IMAGES and battle_floor.width < 640 rect_dest = Rect.new(0, 0, 640, battle_floor.height) new_bitmap = Bitmap.new(640, battle_floor.height) new_bitmap.stretch_blt(rect_dest, battle_floor, battle_floor.rect) @battlefloor_sprite.bitmap = new_bitmap else @battlefloor_sprite.bitmap = battle_floor end @battlefloor_sprite.x = 0 @battlefloor_sprite.y = 192 @battlefloor_sprite.z = 1 @battlefloor_sprite.opacity = 128 end end #============================================================================== # ¦ Windows #============================================================================== # ? Window_Help # class Window_Help < Window_Base def initialize super(0, 0, 640, WLH + 32) end end # ? Window_MenuStatus # class Window_MenuStatus < Window_Selectable def initialize(x, y) super(x, y, 480, 480) refresh self.active = false self.index = -1 end def refresh self.contents.clear @item_max = $game_party.members.size for actor in $game_party.members draw_actor_face(actor, 2, actor.index * (96+21) + 2, 92) x = 104 y = actor.index * (96+21) + WLH / 2 draw_actor_name(actor, x, y) draw_actor_class(actor, x + 120, y) draw_actor_level(actor, x, y + WLH * 1) draw_actor_state(actor, x, y + WLH * 2) draw_actor_hp(actor, x + 120, y + WLH * 1, 216) draw_actor_mp(actor, x + 120, y + WLH * 2, 216) end end def update_cursor if @index < 0 # ? self.cursor_rect.empty elsif @index < @item_max # ? self.cursor_rect.set(0, @index * (96+21), contents.width, 96) elsif @index >= 100 # ? self.cursor_rect.set(0, (@index - 100) * 96, contents.width, 96) else # ? self.cursor_rect.set(0, 0, contents.width, @item_max * 96) end end end # ? Window_SkillStatus # class Window_SkillStatus < Window_Base def initialize(x, y, actor) super(x, y, 640, WLH + 32) @actor = actor refresh end end # ? Window_Equip # class Window_Equip < Window_Selectable def initialize(x, y, actor) super(x, y, 336+96, WLH * 5 + 32) @actor = actor refresh self.index = 0 end end # ? Window_Status # class Window_Status < Window_Base def initialize(actor) super(0, 0, 640, 480) @actor = actor refresh end end # ? Window_SaveFile # class Window_SaveFile < Window_Base def initialize(file_index, filename) super(0, 56 + file_index % 4 * (90+21), 640, 90) @file_index = file_index @filename = filename load_gamedata refresh @selected = false end end # ? Window_NumberInput # class Window_NumberInput < Window_Base def initialize super(0, 0, 640, 64) @number = 0 @digits_max = 6 @index = 0 self.opacity = 0 self.active = false self.z += 9999 refresh update_cursor end end # ? Window_ShopBuy # class Window_ShopBuy < Window_Selectable def initialize(x, y) super(x, y, 304+96, 304+64) @shop_goods = $game_temp.shop_goods refresh self.index = 0 end end # ? Window_ShopStatus # class Window_ShopStatus < Window_Base def initialize(x, y) super(x, y, 240, 304+64) @item = nil refresh end end # ? Window_Message # class Window_Message < Window_Selectable def initialize super(0, 352, 640, 128) self.z = 200 self.active = false self.index = -1 self.openness = 0 @opening = false # ? @closing = false # ? @text = nil # ? @contents_x = 0 # ? X ? @contents_y = 0 # ? Y ? @line_count = 0 # ? @wait_count = 0 # ? @background = 0 # ? @position = 2 # ? @show_fast = false # ? @line_show_fast = false # ? @pause_skip = false # ? create_gold_window create_number_input_window create_back_sprite end def reset_window @background = $game_message.background @position = $game_message.position if @background == 0 # ? self.opacity = 255 else # ? self.opacity = 0 end case @position when 0 # ? self.y = 0 @gold_window.y = 360 when 1 # ? self.y = 208 @gold_window.y = 0 when 2 # ? self.y = 352 @gold_window.y = 0 end end end #============================================================================== # ¦ Scenes #============================================================================== # ? Scene_Title # class Scene_Title def create_title_graphic @sprite = Sprite.new cache_bitmap = Cache.system("Title") if AGRANDIR_IMAGES dest_rect = Rect.new(0, 0, Graphics.width, Graphics.height) bitmap = Bitmap.new(Graphics.width, Graphics.height) bitmap.stretch_blt(dest_rect, cache_bitmap, cache_bitmap.rect) @sprite.bitmap = bitmap else @sprite.bitmap = cache_bitmap end end def create_command_window s1 = Vocab::new_game s2 = Vocab::continue s3 = Vocab::shutdown @command_window = Window_Command.new(172, [s1, s2, s3]) @command_window.x = (640 - @command_window.width) / 2 @command_window.y = 288 if @continue_enabled # ? @command_window.index = 1 # ? else # ? @command_window.draw_item(1, false) # ? end @command_window.openness = 0 @command_window.open end end # ? Scene_Menu # class Scene_Menu < Scene_Base def start super create_menu_background create_command_window @gold_window = Window_Gold.new(0, 424) @status_window = Window_MenuStatus.new(160, 0) end end # ? Scene_Item # class Scene_Item < Scene_Base def start super create_menu_background @viewport = Viewport.new(0, 0, 640, 480) @help_window = Window_Help.new @help_window.viewport = @viewport @item_window = Window_Item.new(0, 56, 640, 424) @item_window.viewport = @viewport @item_window.help_window = @help_window @item_window.active = false @target_window = Window_MenuStatus.new(0, 0) hide_target_window end def show_target_window(right) @item_window.active = false width_remain = 640 - @target_window.width @target_window.x = right ? width_remain : 0 @target_window.visible = true @target_window.active = true if right @viewport.rect.set(0, 0, width_remain, 480) @viewport.ox = 0 else @viewport.rect.set(@target_window.width, 0, width_remain, 480) @viewport.ox = @target_window.width end end def hide_target_window @item_window.active = true @target_window.visible = false @target_window.active = false @viewport.rect.set(0, 0, 640, 480) @viewport.ox = 0 end end # ? Scene_Skill # class Scene_Skill < Scene_Base def start super create_menu_background @actor = $game_party.members[@actor_index] @viewport = Viewport.new(0, 0, 640, 480) @help_window = Window_Help.new @help_window.viewport = @viewport @status_window = Window_SkillStatus.new(0, 56, @actor) @status_window.viewport = @viewport @skill_window = Window_Skill.new(0, 112, 640, 368, @actor) @skill_window.viewport = @viewport @skill_window.help_window = @help_window @target_window = Window_MenuStatus.new(0, 0) hide_target_window end def show_target_window(right) @skill_window.active = false width_remain = 640 - @target_window.width @target_window.x = right ? width_remain : 0 @target_window.visible = true @target_window.active = true if right @viewport.rect.set(0, 0, width_remain, 480) @viewport.ox = 0 else @viewport.rect.set(@target_window.width, 0, width_remain, 480) @viewport.ox = @target_window.width end end def hide_target_window @skill_window.active = true @target_window.visible = false @target_window.active = false @viewport.rect.set(0, 0, 640, 480) @viewport.ox = 0 end end # ? Scene_Equip # class Scene_Equip < Scene_Base def create_item_windows @item_windows = [] for i in 0...EQUIP_TYPE_MAX @item_windows[i] = Window_EquipItem.new(0, 208, 640, 272, @actor, i) @item_windows[i].help_window = @help_window @item_windows[i].visible = (@equip_index == i) @item_windows[i].active = false @item_windows[i].index = -1 end end end # ? Scene_End # class Scene_End < Scene_Base def create_command_window s1 = Vocab::to_title s2 = Vocab::shutdown s3 = Vocab::cancel @command_window = Window_Command.new(172, [s1, s2, s3]) @command_window.x = (640 - @command_window.width) / 2 @command_window.y = (480 - @command_window.height) / 2 @command_window.openness = 0 end end # ? Scene_Shop # class Scene_Shop < Scene_Base def start super create_menu_background create_command_window @help_window = Window_Help.new @gold_window = Window_Gold.new(384+96, 56) @dummy_window = Window_Base.new(0, 112, 640, 368) @buy_window = Window_ShopBuy.new(0, 112) @buy_window.active = false @buy_window.visible = false @buy_window.help_window = @help_window @sell_window = Window_ShopSell.new(0, 112, 640, 368) @sell_window.active = false @sell_window.visible = false @sell_window.help_window = @help_window @number_window = Window_ShopNumber.new(0, 112) @number_window.active = false @number_window.visible = false @status_window = Window_ShopStatus.new(400, 112) @status_window.visible = false end end # ? Scene_Battle # class Scene_Battle < Scene_Base def create_info_viewport @info_viewport = Viewport.new(0, 288+64, 640, 128) @info_viewport.z = 100 @status_window = Window_BattleStatus.new @party_command_window = Window_PartyCommand.new @actor_command_window = Window_ActorCommand.new @status_window.viewport = @info_viewport @party_command_window.viewport = @info_viewport @actor_command_window.viewport = @info_viewport @status_window.x = 128 @actor_command_window.x = 544 @info_viewport.visible = false end def start_skill_selection @help_window = Window_Help.new @skill_window = Window_Skill.new(0, 56, 640, 296, @active_battler) @skill_window.help_window = @help_window @actor_command_window.active = false end def start_item_selection @help_window = Window_Help.new @item_window = Window_Item.new(0, 56, 640, 296) @item_window.help_window = @help_window @actor_command_window.active = false end end
-
Nome Script: Sistema i-phone Versione: N/D Autore/i: Necrozard Informazioni: Questo script simula un telefono in cui l'npc potrà ricevere ad esempio,sms,ascoltare la musica etc etc... Istruzioni: All'interno della demo Demo: http://www.mediafire.com/download.php?mn53zazjytm
-
Nome Script: Zoom+Opacità Schermo Versione: N/D Autore/i: Tomah Informazioni: Con questo script,potete usare due tipi di effetti: -Lo zoom -Opacizzare lo schermo Istruzioni: Inserite lo script sotto la classe Material. -Per zoomare,fate un call script con il seguente codice: $scene = Scene_Zoom.new(x,y)Dove in x e y si inseriranno numeri tra 100~800.Più sarà grande il numero,più si zoommerà la mappa ^^ -Per opacizzarla invece,fate un call script con il seguente codice: $scene = Scene_Zoom.new(100,100)Funziona come per lo zoom,ma qui si opacizzerà lo schermo Script: =begin [ =================================================================== ] [ =================================================================== ] [ ============= ] SCRIPT CRIADO POR: [ ============= ] [ ============= ] [ ============= ] [ ============= ] >>> Dark Chocobo [ ============= ] [ ============= ] [ ============= ] [ ============= ] [ ============= ] [ ============= ] > Zoom + Embaçar Tela < [ ============= ] [ ============= ] >>www.ReinoRpg.com<< [ ============= ] [ ============= ] [ ============= ] [ =================================================================== ] [ =============== ] : Comunidade RPG Maker VX : [ =============== ] [ ===== ] http://www.orkut.com/Community.aspx?cmm=40232098 [ ==== ] [ =================================================================== ] [ =================================================================== ] Resumo: - Com este script você pode fazer 2 tipos de efeitos bem legais que não podem ser feitos por evento: > Zoom > Embaçar Tela Instruções: - Zoom: Para dar Zoom utilise o comando "chamar script" da última aba da lista de comando dos eventos e escreva: $scene = Scene_Zoom.new(x,y) Substituindo as letras x e y por números entre 100~800, sendo quanto maior o número, maior o zoom. - Embaçar Tela: Para embaçar a tela utilise o comando: $scene = Scene_Zoom.new(100,100) Note que é o mesmo comando do zoom, porém, como os números escolhidos são 100, não haverá zoom, ao invéz disso, a tela ficará embaçada. Observação Final: - Não utilize números menores de 100, pôs o script consegue esticar a tela, mas não consegue comprimi-la. =end # Cria as configuraçíµes iniciais do script. $DarkChocoboScripts = {} if $DarkChocoboScripts.nil? $DarkChocoboScripts["Zoom + Embaçar Tela"] = true class Scene_Zoom < Scene_Base def initialize(zoom_x = 0, zoom_y = 0, color = nil) @zoom_x = zoom_x/100 @zoom_y = zoom_y/100 color = [0,0,0,0] if color.nil? @color = color end def start @viewport = Viewport.new((@zoom_x*544-544)/-2, (@zoom_y*416-416)/-2, @zoom_x*544, @zoom_y*416) @sprite = Sprite.new(@viewport) @sprite.bitmap = $game_temp.background_bitmap @sprite.color.set(@color[0], @color[1], @color[2], @color[3]) @sprite.zoom_x = @zoom_x @sprite.zoom_y = @zoom_y @sprite.update end def update if Input.trigger?(Input::C) $scene = Scene_Map.new end end def terminate @sprite.dispose end end
-
Nome Script: Rafidelis KaHh Box Title Versione: N/D Autore/i: Rafidelis Informazioni: Titolo basato su picture...capirete meglio dagli screen Screenshots: Istruzioni: All'interno della demo. Demo: http://www.4shared.com/file/79931901/6e6289db/Rafidelis_KaHh_Box_Title.html?dirPwdVerified=184905c
-
E' già pinnato Stavo pensado di metterne uno per ogni sezione script così da averli sempre a portata di mano =D
-
Eccoti!!! Ciao Lusian!!!!!
-
Nome Script: Sideview Battle System Tankentai XP Versione: 2.2 Autore/i: Enu, Atoa Informazioni: Il BS creato da Enu anche per XP convertito da Atoa Screenshots: Istruzioni: Le istruzioni sono all'interno della demo ^^ Una cosa però.Se non utilizzate la demo come progetto di inzio,dovrete trasportare in quello nuovo,le seguenti cose: Demo: SBS Tanketai XP
-
Nome Script: VX Battle System Versione: 1.0 Autore/i: Juunanagou, Gradient Bars by Amaranth Informazioni: Sistema di combattimento di RMVX su XP suddiviso in più script Screenshots: Istruzioni: Basta copiare i vari script sopra Main e sotto l'ultimo in modo che non facciano confusione. Potete anche sostituire quelli con lo stesso nome a quelli esistenti. Script: Window_PartyCommand: #============================================================================== # ** Window_PartyCommand #------------------------------------------------------------------------------ # This window is used to select whether to fight or escape on the battle # screen. #============================================================================== class Window_PartyCommand < Window_Selectable #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 640, 64) self.contents = Bitmap.new(width - 32, height - 32) self.back_opacity = 160 @commands = ["Fight", "Escape"] @item_max = 2 @column_max = 2 draw_item(0, normal_color) draw_item(1, $game_temp.battle_can_escape ? normal_color : disabled_color) self.active = true self.visible = true self.index = 0 end #-------------------------------------------------------------------------- # * Draw Item # index : item number # color : text character color #-------------------------------------------------------------------------- def draw_item(index, color) self.contents.font.color = color rect = Rect.new(160 + index * 160 + 4, 0, 128 - 10, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) self.contents.draw_text(rect, @commands[index], 1) end #-------------------------------------------------------------------------- # * Cursor Rectangle Update #-------------------------------------------------------------------------- def update_cursor_rect self.cursor_rect.set(160 + index * 160, 0, 128, 32) end end Window_BaseBattle (diverso da WindowBase, non sostituire ma aggiungere!): #============================================================================== # ** Window_Base #------------------------------------------------------------------------------ # This class is for all in-game windows. #============================================================================== class Window_BaseBattle < Window #-------------------------------------------------------------------------- # * Object Initialization # x : window x-coordinate # y : window y-coordinate # width : window width # height : window height #-------------------------------------------------------------------------- def initialize(x, y, width, height) super() @windowskin_name = $game_system.windowskin_name self.windowskin = RPG::Cache.windowskin(@windowskin_name) self.x = x self.y = y self.width = width self.height = height self.z = 100 end #-------------------------------------------------------------------------- # * Dispose #-------------------------------------------------------------------------- def dispose # Dispose if window contents bit map is set if self.contents != nil self.contents.dispose end super end #-------------------------------------------------------------------------- # * Get Text Color # n : text color number (0-7) #-------------------------------------------------------------------------- def text_color(n) case n when 0 return Color.new(255, 255, 255, 255) when 1 return Color.new(128, 128, 255, 255) when 2 return Color.new(255, 128, 128, 255) when 3 return Color.new(128, 255, 128, 255) when 4 return Color.new(128, 255, 255, 255) when 5 return Color.new(255, 128, 255, 255) when 6 return Color.new(255, 255, 128, 255) when 7 return Color.new(192, 192, 192, 255) else normal_color end end #-------------------------------------------------------------------------- # * Get Normal Text Color #-------------------------------------------------------------------------- def normal_color return Color.new(255, 255, 255, 255) end #-------------------------------------------------------------------------- # * Get Disabled Text Color #-------------------------------------------------------------------------- def disabled_color return Color.new(255, 255, 255, 128) end #-------------------------------------------------------------------------- # * Testo Nero delle barre #-------------------------------------------------------------------------- def bar_color return Color.new(0, 0, 0, 255) end #-------------------------------------------------------------------------- # * Get System Text Color #-------------------------------------------------------------------------- def system_color return Color.new(192, 224, 255, 255) end #-------------------------------------------------------------------------- # * Get Crisis Text Color #-------------------------------------------------------------------------- def crisis_color return Color.new(255, 255, 64, 255) end #-------------------------------------------------------------------------- # * Get Knockout Text Color #-------------------------------------------------------------------------- def knockout_color return Color.new(255, 64, 0) end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super # Reset if windowskin was changed if $game_system.windowskin_name != @windowskin_name @windowskin_name = $game_system.windowskin_name self.windowskin = RPG::Cache.windowskin(@windowskin_name) end end #-------------------------------------------------------------------------- # * Draw Graphic # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate #-------------------------------------------------------------------------- def draw_actor_graphic(actor, x, y) bitmap = RPG::Cache.character(actor.character_name, actor.character_hue) cw = bitmap.width / 4 ch = bitmap.height / 4 src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect) end #-------------------------------------------------------------------------- # * Draw Name # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate #-------------------------------------------------------------------------- def draw_actor_bt_name(actor, x, y) self.contents.font.color = normal_color self.contents.draw_text(x, y, 120, 32, actor.name) end #-------------------------------------------------------------------------- # * Make State Text String for Drawing # actor : actor # width : draw spot width # need_normal : Whether or not [normal] is needed (true / false) #-------------------------------------------------------------------------- def make_battler_state_text(battler, width, need_normal) # Get width of brackets brackets_width = self.contents.text_size("[]").width # Make text string for state names text = "" for i in battler.states if $data_states[i].rating >= 1 if text == "" text = $data_states[i].name else new_text = text + "/" + $data_states[i].name text_width = self.contents.text_size(new_text).width if text_width > width - brackets_width break end text = new_text end end end # If text string for state names is empty, make it [normal] if text == "" if need_normal text = "[Normal]" end else # Attach brackets text = "[" + text + "]" end # Return completed text string return text end #-------------------------------------------------------------------------- # * Draw State # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate # width : draw spot width #-------------------------------------------------------------------------- def draw_actor_bt_state(actor, x, y, width = 120) text = make_battler_state_text(actor, width, true) self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color self.contents.draw_text(x, y + 16, width, 32, text) end #-------------------------------------------------------------------------- # * Draw HP # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate # width : draw spot width #-------------------------------------------------------------------------- def draw_actor_bt_hp(actor, x, y, width = 144) # Draw "HP" text string self.contents.font.color = system_color self.contents.draw_text(x + 96, y, 32, 32, $data_system.words.hp) # Calculate if there is draw space for MaxHP if width - 32 >= 108 x = x + width - 108 flag = true elsif width - 32 >= 48 x = x + width - 48 flag = false end # Draw HP self.contents.font.color = actor.hp == 0 ? knockout_color : actor.hp <= actor.maxhp / 4 ? crisis_color : bar_color self.contents.draw_text(x + 128, y, 48, 32, actor.hp.to_s, 2) # Draw MaxHP if flag self.contents.font.color = normal_color self.contents.draw_text(x + 48, y, 12, 32, "/", 1) self.contents.draw_text(x + 60, y, 48, 32, actor.maxhp.to_s) end end #-------------------------------------------------------------------------- # * Draw SP # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate # width : draw spot width #-------------------------------------------------------------------------- def draw_actor_bt_sp(actor, x, y, width = 144) # Draw "SP" text string self.contents.font.color = system_color self.contents.draw_text(x + 288, y, 32, 32, $data_system.words.sp) # Calculate if there is draw space for MaxHP if width - 32 >= 108 x = x + width - 108 flag = true elsif width - 32 >= 48 x = x + width - 48 flag = false end # Draw SP self.contents.font.color = actor.sp == 0 ? knockout_color : actor.sp <= actor.maxsp / 4 ? crisis_color : bar_color self.contents.draw_text(x + 320, y, 48, 32, actor.sp.to_s, 2) # Draw MaxSP if flag self.contents.font.color = normal_color self.contents.draw_text(x + 48, y, 12, 32, "/", 1) self.contents.draw_text(x + 60, y, 48, 32, actor.maxsp.to_s) end end # Gradient Bars Amaranth #-------------------------------------------------------------------------- # ● Draw a gradient bar # actor : actor assigned to the bar # x : X coordinate of the upper-left pixel of the bar # y : Y coordinate of the upper-left pixel of the bar # bar_width : width of the bar # bar_height : height of the bar # current : current value to compare (eg. hp, sp, exp) # max : max value to compare (eg. max hp, max sp, max exp) # color : base color to use (eg. text_color(5)) #-------------------------------------------------------------------------- def draw_bar(actor, x, y, bar_width, bar_height, current, max, color) adj_width = bar_width - 4 adj_height = bar_height - 4 self.contents.font.size = 16 # outline of bar border_color = Color.new(255, 255, 255, 255) self.contents.fill_rect(x + 3, y + 8, bar_width, bar_height, border_color) # background of bar background_color = Color.new(0, 0, 0, 255) self.contents.fill_rect(x + 5, y + 10, adj_width, adj_height, background_color) # current bar if max != 0 percent = (current * 100) / max adj_width = (adj_width * percent) / 100 for i in 1..adj_width color.red += 1 color.blue += 1 color.green += 1 self.contents.fill_rect(x + 5, y + 10, adj_width, adj_height, color) x += 1 adj_width -= 1 end end end end Window_BattleStatus: #============================================================================== # ** Window_BattleStatus #------------------------------------------------------------------------------ # This window displays the status of all party members on the battle screen. #============================================================================== class Window_BattleStatus < Window_BaseBattle #-------------------------------------------------------------------------- # * Finestra dei personaggi #-------------------------------------------------------------------------- def initialize # Riduco la larghezza della finestra a 480 per far entrare i comandi super(0, 320, 480, 180) self.contents = Bitmap.new(width - 32, height - 32) @level_up_flags = [false, false, false, false] refresh end #-------------------------------------------------------------------------- # * Dispose #-------------------------------------------------------------------------- def dispose super end #-------------------------------------------------------------------------- # * Set Level Up Flag # actor_index : actor index #-------------------------------------------------------------------------- def level_up(actor_index) @level_up_flags[actor_index] = true end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear @item_max = $game_party.actors.size for i in 0...$game_party.actors.size @leader = "" x = 40 y = i * 32 actor = $game_party.actors[i] # actor_x = i * 160 + 4 actor_x = 0 # voglio che vada in verticale e non in orizzontale actor_y = i * 32 self.contents.font.size = 22 draw_actor_bt_name(actor, actor_x, actor_y) # Refresh della barra hp draw_bar(actor, x + 90, y, 100, 16, actor.hp, actor.maxhp, text_color(2)) draw_actor_bt_hp(actor, actor_x, actor_y, 32) # Refresh della barra sp draw_bar(actor, x + 280, y, 100, 16, actor.sp, actor.maxsp, text_color(4)) draw_actor_bt_sp(actor, actor_x, actor_y, 64) if @level_up_flags[i] self.contents.font.size = 14 self.contents.font.color = normal_color self.contents.draw_text(actor_x, actor_y, 120, 32, "LEVEL UP!") else self.contents.font.size = 14 draw_actor_bt_state(actor, actor_x, actor_y) end end end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super # Slightly lower opacity level during main phase if $game_temp.battle_main_phase self.contents_opacity -= 4 if self.contents_opacity > 191 else self.contents_opacity += 4 if self.contents_opacity < 255 end end end Scene_Battle1: #============================================================================== # ** Scene_Battle (part 1) #------------------------------------------------------------------------------ # This class performs battle screen processing. #============================================================================== class Scene_Battle #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main # Initialize each kind of temporary battle data $game_temp.in_battle = true $game_temp.battle_turn = 0 $game_temp.battle_event_flags.clear $game_temp.battle_abort = false $game_temp.battle_main_phase = false $game_temp.battleback_name = $game_map.battleback_name $game_temp.forcing_battler = nil # Initialize battle event interpreter $game_system.battle_interpreter.setup(nil, 0) # Prepare troop @troop_id = $game_temp.battle_troop_id $game_troop.setup(@troop_id) # Creo la command window coi 4 comandi: Attacca, Skills, Difendi, Oggetti s1 = $data_system.words.attack s2 = $data_system.words.skill s3 = $data_system.words.guard s4 = $data_system.words.item @actor_command_window = Window_Command.new(160, [s1, s2, s3, s4]) # Sposto la command window di lato @actor_command_window.x = 480 @actor_command_window.y = 320 @actor_command_window.back_opacity = 160 @actor_command_window.active = false @actor_command_window.visible = true # Crea le altre finestre @party_command_window = Window_PartyCommand.new @help_window = Window_Help.new @help_window.back_opacity = 160 @help_window.visible = false @status_window = Window_BattleStatus.new @message_window = Window_Message.new # Make sprite set @spriteset = Spriteset_Battle.new # Initialize wait count @wait_count = 0 # Execute transition if $data_system.battle_transition == "" Graphics.transition(20) else Graphics.transition(40, "Graphics/Transitions/" + $data_system.battle_transition) end # Start pre-battle phase start_phase1 # Main loop loop do # Update game screen Graphics.update # Update input information Input.update # Frame update update # Abort loop if screen is changed if $scene != self break end end # Refresh map $game_map.refresh # Prepare for transition Graphics.freeze # Dispone le finestre attori e poi i comandi di attacco @actor_command_window.dispose @party_command_window.dispose @help_window.dispose @status_window.dispose @message_window.dispose if @skill_window != nil @skill_window.dispose end if @item_window != nil @item_window.dispose end if @result_window != nil @result_window.dispose end # Dispose of sprite set @spriteset.dispose # If switching to title screen if $scene.is_a?(Scene_Title) # Fade out screen Graphics.transition Graphics.freeze end # If switching from battle test to any screen other than game over screen if $BTEST and not $scene.is_a?(Scene_Gameover) $scene = nil end end #-------------------------------------------------------------------------- # * Determine Battle Win/Loss Results #-------------------------------------------------------------------------- def judge # If all dead determinant is true, or number of members in party is 0 if $game_party.all_dead? or $game_party.actors.size == 0 # If possible to lose if $game_temp.battle_can_lose # Return to BGM before battle starts $game_system.bgm_play($game_temp.map_bgm) # Battle ends battle_end(2) # Return true return true end # Set game over flag $game_temp.gameover = true # Return true return true end # Return false if even 1 enemy exists for enemy in $game_troop.enemies if enemy.exist? return false end end # Start after battle phase (win) start_phase5 # Return true return true end #-------------------------------------------------------------------------- # * Battle Ends # result : results (0:win 1:lose 2:escape) #-------------------------------------------------------------------------- def battle_end(result) # Clear in battle flag $game_temp.in_battle = false # Clear entire party actions flag $game_party.clear_actions # Remove battle states for actor in $game_party.actors actor.remove_states_battle end # Clear enemies $game_troop.enemies.clear # Call battle callback if $game_temp.battle_proc != nil $game_temp.battle_proc.call(result) $game_temp.battle_proc = nil end # Switch to map screen $scene = Scene_Map.new end #-------------------------------------------------------------------------- # * Battle Event Setup #-------------------------------------------------------------------------- def setup_battle_event # If battle event is running if $game_system.battle_interpreter.running? return end # Search for all battle event pages for index in 0...$data_troops[@troop_id].pages.size # Get event pages page = $data_troops[@troop_id].pages[index] # Make event conditions possible for reference with c c = page.condition # Go to next page if no conditions are appointed unless c.turn_valid or c.enemy_valid or c.actor_valid or c.switch_valid next end # Go to next page if action has been completed if $game_temp.battle_event_flags[index] next end # Confirm turn conditions if c.turn_valid n = $game_temp.battle_turn a = c.turn_a b = c.turn_b if (b == 0 and n != a) or (b > 0 and (n < 1 or n < a or n % b != a % ) next end end # Confirm enemy conditions if c.enemy_valid enemy = $game_troop.enemies[c.enemy_index] if enemy == nil or enemy.hp * 100.0 / enemy.maxhp > c.enemy_hp next end end # Confirm actor conditions if c.actor_valid actor = $game_actors[c.actor_id] if actor == nil or actor.hp * 100.0 / actor.maxhp > c.actor_hp next end end # Confirm switch conditions if c.switch_valid if $game_switches[c.switch_id] == false next end end # Set up event $game_system.battle_interpreter.setup(page.list, 0) # If this page span is [battle] or [turn] if page.span <= 1 # Set action completed flag $game_temp.battle_event_flags[index] = true end return end end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update # If battle event is running if $game_system.battle_interpreter.running? # Update interpreter $game_system.battle_interpreter.update # If a battler which is forcing actions doesn't exist if $game_temp.forcing_battler == nil # If battle event has finished running unless $game_system.battle_interpreter.running? # Rerun battle event set up if battle continues unless judge setup_battle_event end end # If not after battle phase if @phase != 5 # Refresh status window @status_window.refresh end end end # Update system (timer) and screen $game_system.update $game_screen.update # If timer has reached 0 if $game_system.timer_working and $game_system.timer == 0 # Abort battle $game_temp.battle_abort = true end # Update windows @help_window.update @party_command_window.update @actor_command_window.update @status_window.update @message_window.update # Update sprite set @spriteset.update # If transition is processing if $game_temp.transition_processing # Clear transition processing flag $game_temp.transition_processing = false # Execute transition if $game_temp.transition_name == "" Graphics.transition(20) else Graphics.transition(40, "Graphics/Transitions/" + $game_temp.transition_name) end end # If message window is showing if $game_temp.message_window_showing return end # If effect is showing if @spriteset.effect? return end # If game over if $game_temp.gameover # Switch to game over screen $scene = Scene_Gameover.new return end # If returning to title screen if $game_temp.to_title # Switch to title screen $scene = Scene_Title.new return end # If battle is aborted if $game_temp.battle_abort # Return to BGM used before battle started $game_system.bgm_play($game_temp.map_bgm) # Battle ends battle_end(1) return end # If waiting if @wait_count > 0 # Decrease wait count @wait_count -= 1 return end # If battler forcing an action doesn't exist, # and battle event is running if $game_temp.forcing_battler == nil and $game_system.battle_interpreter.running? return end # Branch according to phase case @phase when 1 # pre-battle phase update_phase1 when 2 # party command phase update_phase2 when 3 # actor command phase update_phase3 when 4 # main phase update_phase4 when 5 # after battle phase update_phase5 end end end Scene_Battle2: #============================================================================== # ** Scene_Battle (part 2) #------------------------------------------------------------------------------ # This class performs battle screen processing. #============================================================================== class Scene_Battle #-------------------------------------------------------------------------- # * Start Pre-Battle Phase #-------------------------------------------------------------------------- def start_phase1 # Shift to phase 1 @phase = 1 # Clear all party member actions $game_party.clear_actions # Set up battle event setup_battle_event end #-------------------------------------------------------------------------- # * Frame Update (pre-battle phase) #-------------------------------------------------------------------------- def update_phase1 # Determine win/loss situation if judge # If won or lost: end method return end # Start party command phase start_phase2 end #-------------------------------------------------------------------------- # * Start Party Command Phase #-------------------------------------------------------------------------- def start_phase2 # Shift to phase 2 @phase = 2 # Set actor to non-selecting @actor_index = -1 @active_battler = nil # Enable party command window @party_command_window.active = true @party_command_window.visible = true # Disable actor command window @actor_command_window.active = false @actor_command_window.visible = true # Clear main phase flag $game_temp.battle_main_phase = false # Clear all party member actions $game_party.clear_actions # If impossible to input command unless $game_party.inputable? # Start main phase start_phase4 end end #-------------------------------------------------------------------------- # * Frame Update (party command phase) #-------------------------------------------------------------------------- def update_phase2 # If C button was pressed if Input.trigger?(Input::C) # Branch by party command window cursor position case @party_command_window.index when 0 # fight # Play decision SE $game_system.se_play($data_system.decision_se) # Start actor command phase start_phase3 when 1 # escape # If it's not possible to escape if $game_temp.battle_can_escape == false # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # Escape processing update_phase2_escape end return end end #-------------------------------------------------------------------------- # * Frame Update (party command phase: escape) #-------------------------------------------------------------------------- def update_phase2_escape # Calculate enemy agility average enemies_agi = 0 enemies_number = 0 for enemy in $game_troop.enemies if enemy.exist? enemies_agi += enemy.agi enemies_number += 1 end end if enemies_number > 0 enemies_agi /= enemies_number end # Calculate actor agility average actors_agi = 0 actors_number = 0 for actor in $game_party.actors if actor.exist? actors_agi += actor.agi actors_number += 1 end end if actors_number > 0 actors_agi /= actors_number end # Determine if escape is successful success = rand(100) < 50 * actors_agi / enemies_agi # If escape is successful if success # Play escape SE $game_system.se_play($data_system.escape_se) # Return to BGM before battle started $game_system.bgm_play($game_temp.map_bgm) # Battle ends battle_end(1) # If escape is failure else # Clear all party member actions $game_party.clear_actions # Start main phase start_phase4 end end #-------------------------------------------------------------------------- # * Start After Battle Phase #-------------------------------------------------------------------------- def start_phase5 # Shift to phase 5 @phase = 5 # Play battle end ME $game_system.me_play($game_system.battle_end_me) # Return to BGM before battle started $game_system.bgm_play($game_temp.map_bgm) # Initialize EXP, amount of gold, and treasure exp = 0 gold = 0 treasures = [] # Loop for enemy in $game_troop.enemies # If enemy is not hidden unless enemy.hidden # Add EXP and amount of gold obtained exp += enemy.exp gold += enemy.gold # Determine if treasure appears if rand(100) < enemy.treasure_prob if enemy.item_id > 0 treasures.push($data_items[enemy.item_id]) end if enemy.weapon_id > 0 treasures.push($data_weapons[enemy.weapon_id]) end if enemy.armor_id > 0 treasures.push($data_armors[enemy.armor_id]) end end end end # Treasure is limited to a maximum of 6 items treasures = treasures[0..5] # Obtaining EXP for i in 0...$game_party.actors.size actor = $game_party.actors[i] if actor.cant_get_exp? == false last_level = actor.level actor.exp += exp if actor.level > last_level @status_window.level_up(i) end end end # Obtaining gold $game_party.gain_gold(gold) # Obtaining treasure for item in treasures case item when RPG::Item $game_party.gain_item(item.id, 1) when RPG::Weapon $game_party.gain_weapon(item.id, 1) when RPG::Armor $game_party.gain_armor(item.id, 1) end end # Make battle result window @result_window = Window_BattleResult.new(exp, gold, treasures) # Set wait count @phase5_wait_count = 100 end #-------------------------------------------------------------------------- # * Frame Update (after battle phase) #-------------------------------------------------------------------------- def update_phase5 # If wait count is larger than 0 if @phase5_wait_count > 0 # Decrease wait count @phase5_wait_count -= 1 # If wait count reaches 0 if @phase5_wait_count == 0 # Show result window @result_window.visible = true # Clear main phase flag $game_temp.battle_main_phase = false # Refresh status window @status_window.refresh end return end # If C button was pressed if Input.trigger?(Input::C) # Battle ends battle_end(0) end end end Scene_Battle 3 #============================================================================== # ** Scene_Battle (part 3) #------------------------------------------------------------------------------ # This class performs battle screen processing. #============================================================================== class Scene_Battle #-------------------------------------------------------------------------- # * Start Actor Command Phase #-------------------------------------------------------------------------- def start_phase3 # Shift to phase 3 @phase = 3 # Set actor as unselectable @actor_index = -1 @active_battler = nil # Go to command input for next actor phase3_next_actor end #-------------------------------------------------------------------------- # * Go to Command Input for Next Actor #-------------------------------------------------------------------------- def phase3_next_actor # Loop begin # Actor blink effect OFF if @active_battler != nil @active_battler.blink = false end # If last actor if @actor_index == $game_party.actors.size-1 # Start main phase start_phase4 return end # Advance actor index @actor_index += 1 @active_battler = $game_party.actors[@actor_index] @active_battler.blink = true # Once more if actor refuses command input end until @active_battler.inputable? # Set up actor command window phase3_setup_command_window end #-------------------------------------------------------------------------- # * Go to Command Input of Previous Actor #-------------------------------------------------------------------------- def phase3_prior_actor # Loop begin # Actor blink effect OFF if @active_battler != nil @active_battler.blink = false end # If first actor if @actor_index == 0 # Start party command phase start_phase2 return end # Return to actor index @actor_index -= 1 @active_battler = $game_party.actors[@actor_index] @active_battler.blink = true # Once more if actor refuses command input end until @active_battler.inputable? # Set up actor command window phase3_setup_command_window end #-------------------------------------------------------------------------- # * Actor Command Window Setup #-------------------------------------------------------------------------- def phase3_setup_command_window # Disable party command window @party_command_window.active = false @party_command_window.visible = false # Enable actor command window @actor_command_window.active = true @actor_command_window.visible = true # Tolgo il posizionamento da qui # @actor_command_window.x = @actor_index * 160 # Set index to 0 @actor_command_window.index = 0 end #-------------------------------------------------------------------------- # * Frame Update (actor command phase) #-------------------------------------------------------------------------- def update_phase3 # If enemy arrow is enabled if @enemy_arrow != nil update_phase3_enemy_select # If actor arrow is enabled elsif @actor_arrow != nil update_phase3_actor_select # If skill window is enabled elsif @skill_window != nil update_phase3_skill_select # If item window is enabled elsif @item_window != nil update_phase3_item_select # If actor command window is enabled elsif @actor_command_window.active update_phase3_basic_command end end #-------------------------------------------------------------------------- # * Frame Update (actor command phase : basic command) #-------------------------------------------------------------------------- def update_phase3_basic_command # If B button was pressed if Input.trigger?(Input:: # Play cancel SE $game_system.se_play($data_system.cancel_se) # Go to command input for previous actor phase3_prior_actor return end # If C button was pressed if Input.trigger?(Input::C) # Branch by actor command window cursor position case @actor_command_window.index when 0 # attack # Play decision SE $game_system.se_play($data_system.decision_se) # Set action @active_battler.current_action.kind = 0 @active_battler.current_action.basic = 0 # Start enemy selection start_enemy_select when 1 # skill # Play decision SE $game_system.se_play($data_system.decision_se) # Set action @active_battler.current_action.kind = 1 # Start skill selection start_skill_select when 2 # guard # Play decision SE $game_system.se_play($data_system.decision_se) # Set action @active_battler.current_action.kind = 0 @active_battler.current_action.basic = 1 # Go to command input for next actor phase3_next_actor when 3 # item # Play decision SE $game_system.se_play($data_system.decision_se) # Set action @active_battler.current_action.kind = 2 # Start item selection start_item_select end return end end #-------------------------------------------------------------------------- # * Frame Update (actor command phase : skill selection) #-------------------------------------------------------------------------- def update_phase3_skill_select # Make skill window visible @skill_window.visible = true # Update skill window @skill_window.update # If B button was pressed if Input.trigger?(Input:: # Play cancel SE $game_system.se_play($data_system.cancel_se) # End skill selection end_skill_select return end # If C button was pressed if Input.trigger?(Input::C) # Get currently selected data on the skill window @skill = @skill_window.skill # If it can't be used if @skill == nil or not @active_battler.skill_can_use?(@skill.id) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # Set action @active_battler.current_action.skill_id = @skill.id # Make skill window invisible @skill_window.visible = false # If effect scope is single enemy if @skill.scope == 1 # Start enemy selection start_enemy_select # If effect scope is single ally elsif @skill.scope == 3 or @skill.scope == 5 # Start actor selection start_actor_select # If effect scope is not single else # End skill selection end_skill_select # Go to command input for next actor phase3_next_actor end return end end #-------------------------------------------------------------------------- # * Frame Update (actor command phase : item selection) #-------------------------------------------------------------------------- def update_phase3_item_select # Make item window visible @item_window.visible = true # Update item window @item_window.update # If B button was pressed if Input.trigger?(Input:: # Play cancel SE $game_system.se_play($data_system.cancel_se) # End item selection end_item_select return end # If C button was pressed if Input.trigger?(Input::C) # Get currently selected data on the item window @item = @item_window.item # If it can't be used unless $game_party.item_can_use?(@item.id) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # Set action @active_battler.current_action.item_id = @item.id # Make item window invisible @item_window.visible = false # If effect scope is single enemy if @item.scope == 1 # Start enemy selection start_enemy_select # If effect scope is single ally elsif @item.scope == 3 or @item.scope == 5 # Start actor selection start_actor_select # If effect scope is not single else # End item selection end_item_select # Go to command input for next actor phase3_next_actor end return end end #-------------------------------------------------------------------------- # * Frame Updat (actor command phase : enemy selection) #-------------------------------------------------------------------------- def update_phase3_enemy_select # Update enemy arrow @enemy_arrow.update # If B button was pressed if Input.trigger?(Input:: # Play cancel SE $game_system.se_play($data_system.cancel_se) # End enemy selection end_enemy_select return end # If C button was pressed if Input.trigger?(Input::C) # Play decision SE $game_system.se_play($data_system.decision_se) # Set action @active_battler.current_action.target_index = @enemy_arrow.index # End enemy selection end_enemy_select # If skill window is showing if @skill_window != nil # End skill selection end_skill_select end # If item window is showing if @item_window != nil # End item selection end_item_select end # Go to command input for next actor phase3_next_actor end end #-------------------------------------------------------------------------- # * Frame Update (actor command phase : actor selection) #-------------------------------------------------------------------------- def update_phase3_actor_select # Update actor arrow @actor_arrow.update # If B button was pressed if Input.trigger?(Input:: # Play cancel SE $game_system.se_play($data_system.cancel_se) # End actor selection end_actor_select return end # If C button was pressed if Input.trigger?(Input::C) # Play decision SE $game_system.se_play($data_system.decision_se) # Set action @active_battler.current_action.target_index = @actor_arrow.index # End actor selection end_actor_select # If skill window is showing if @skill_window != nil # End skill selection end_skill_select end # If item window is showing if @item_window != nil # End item selection end_item_select end # Go to command input for next actor phase3_next_actor end end #-------------------------------------------------------------------------- # * Start Enemy Selection #-------------------------------------------------------------------------- def start_enemy_select # Make enemy arrow @enemy_arrow = Arrow_Enemy.new(@spriteset.viewport1) # Associate help window @enemy_arrow.help_window = @help_window # Disable actor command window @actor_command_window.active = false @actor_command_window.visible = true end #-------------------------------------------------------------------------- # * End Enemy Selection #-------------------------------------------------------------------------- def end_enemy_select # Dispose of enemy arrow @enemy_arrow.dispose @enemy_arrow = nil # If command is [fight] if @actor_command_window.index == 0 # Enable actor command window @actor_command_window.active = true @actor_command_window.visible = true # Hide help window @help_window.visible = false end end #-------------------------------------------------------------------------- # * Start Actor Selection #-------------------------------------------------------------------------- def start_actor_select # Make actor arrow @actor_arrow = Arrow_Actor.new(@spriteset.viewport2) @actor_arrow.index = @actor_index # Associate help window @actor_arrow.help_window = @help_window # Disable actor command window @actor_command_window.active = false @actor_command_window.visible = true end #-------------------------------------------------------------------------- # * End Actor Selection #-------------------------------------------------------------------------- def end_actor_select # Dispose of actor arrow @actor_arrow.dispose @actor_arrow = nil end #-------------------------------------------------------------------------- # * Start Skill Selection #-------------------------------------------------------------------------- def start_skill_select # Make skill window @skill_window = Window_Skill.new(@active_battler) # Associate help window @skill_window.help_window = @help_window # Disable actor command window @actor_command_window.active = false @actor_command_window.visible = true end #-------------------------------------------------------------------------- # * End Skill Selection #-------------------------------------------------------------------------- def end_skill_select # Dispose of skill window @skill_window.dispose @skill_window = nil # Hide help window @help_window.visible = false # Enable actor command window @actor_command_window.active = true @actor_command_window.visible = true end #-------------------------------------------------------------------------- # * Start Item Selection #-------------------------------------------------------------------------- def start_item_select # Make item window @item_window = Window_Item.new # Associate help window @item_window.help_window = @help_window # Disable actor command window @actor_command_window.active = false @actor_command_window.visible = true end #-------------------------------------------------------------------------- # * End Item Selection #-------------------------------------------------------------------------- def end_item_select # Dispose of item window @item_window.dispose @item_window = nil # Hide help window @help_window.visible = false # Enable actor command window @actor_command_window.active = true @actor_command_window.visible = true end end Scene_Battle 4: #============================================================================== # ** Scene_Battle (part 4) #------------------------------------------------------------------------------ # This class performs battle screen processing. #============================================================================== class Scene_Battle #-------------------------------------------------------------------------- # * Start Main Phase #-------------------------------------------------------------------------- def start_phase4 # Shift to phase 4 @phase = 4 # Turn count $game_temp.battle_turn += 1 # Search all battle event pages for index in 0...$data_troops[@troop_id].pages.size # Get event page page = $data_troops[@troop_id].pages[index] # If this page span is [turn] if page.span == 1 # Clear action completed flags $game_temp.battle_event_flags[index] = false end end # Set actor as unselectable @actor_index = -1 @active_battler = nil # Enable party command window @party_command_window.active = false @party_command_window.visible = false # Disable actor command window @actor_command_window.active = false @actor_command_window.visible = true # Set main phase flag $game_temp.battle_main_phase = true # Make enemy action for enemy in $game_troop.enemies enemy.make_action end # Make action orders make_action_orders # Shift to step 1 @phase4_step = 1 end #-------------------------------------------------------------------------- # * Make Action Orders #-------------------------------------------------------------------------- def make_action_orders # Initialize @action_battlers array @action_battlers = [] # Add enemy to @action_battlers array for enemy in $game_troop.enemies @action_battlers.push(enemy) end # Add actor to @action_battlers array for actor in $game_party.actors @action_battlers.push(actor) end # Decide action speed for all for battler in @action_battlers battler.make_action_speed end # Line up action speed in order from greatest to least @action_battlers.sort! {|a,b| b.current_action.speed - a.current_action.speed } end #-------------------------------------------------------------------------- # * Frame Update (main phase) #-------------------------------------------------------------------------- def update_phase4 case @phase4_step when 1 update_phase4_step1 when 2 update_phase4_step2 when 3 update_phase4_step3 when 4 update_phase4_step4 when 5 update_phase4_step5 when 6 update_phase4_step6 end end #-------------------------------------------------------------------------- # * Frame Update (main phase step 1 : action preparation) #-------------------------------------------------------------------------- def update_phase4_step1 # Hide help window @help_window.visible = false # Determine win/loss if judge # If won, or if lost : end method return end # If an action forcing battler doesn't exist if $game_temp.forcing_battler == nil # Set up battle event setup_battle_event # If battle event is running if $game_system.battle_interpreter.running? return end end # If an action forcing battler exists if $game_temp.forcing_battler != nil # Add to head, or move @action_battlers.delete($game_temp.forcing_battler) @action_battlers.unshift($game_temp.forcing_battler) end # If no actionless battlers exist (all have performed an action) if @action_battlers.size == 0 # Start party command phase start_phase2 return end # Initialize animation ID and common event ID @animation1_id = 0 @animation2_id = 0 @common_event_id = 0 # Shift from head of actionless battlers @active_battler = @action_battlers.shift # If already removed from battle if @active_battler.index == nil return end # Slip damage if @active_battler.hp > 0 and @active_battler.slip_damage? @active_battler.slip_damage_effect @active_battler.damage_pop = true end # Natural removal of states @active_battler.remove_states_auto # Refresh status window @status_window.refresh # Shift to step 2 @phase4_step = 2 end #-------------------------------------------------------------------------- # * Frame Update (main phase step 2 : start action) #-------------------------------------------------------------------------- def update_phase4_step2 # If not a forcing action unless @active_battler.current_action.forcing # If restriction is [normal attack enemy] or [normal attack ally] if @active_battler.restriction == 2 or @active_battler.restriction == 3 # Set attack as an action @active_battler.current_action.kind = 0 @active_battler.current_action.basic = 0 end # If restriction is [cannot perform action] if @active_battler.restriction == 4 # Clear battler being forced into action $game_temp.forcing_battler = nil # Shift to step 1 @phase4_step = 1 return end end # Clear target battlers @target_battlers = [] # Branch according to each action case @active_battler.current_action.kind when 0 # basic make_basic_action_result when 1 # skill make_skill_action_result when 2 # item make_item_action_result end # Shift to step 3 if @phase4_step == 2 @phase4_step = 3 end end #-------------------------------------------------------------------------- # * Make Basic Action Results #-------------------------------------------------------------------------- def make_basic_action_result # If attack if @active_battler.current_action.basic == 0 # Set anaimation ID @animation1_id = @active_battler.animation1_id @animation2_id = @active_battler.animation2_id # If action battler is enemy if @active_battler.is_a?(Game_Enemy) if @active_battler.restriction == 3 target = $game_troop.random_target_enemy elsif @active_battler.restriction == 2 target = $game_party.random_target_actor else index = @active_battler.current_action.target_index target = $game_party.smooth_target_actor(index) end end # If action battler is actor if @active_battler.is_a?(Game_Actor) if @active_battler.restriction == 3 target = $game_party.random_target_actor elsif @active_battler.restriction == 2 target = $game_troop.random_target_enemy else index = @active_battler.current_action.target_index target = $game_troop.smooth_target_enemy(index) end end # Set array of targeted battlers @target_battlers = [target] # Apply normal attack results for target in @target_battlers target.attack_effect(@active_battler) end return end # If guard if @active_battler.current_action.basic == 1 # Display "Guard" in help window @help_window.set_text($data_system.words.guard, 1) return end # If escape if @active_battler.is_a?(Game_Enemy) and @active_battler.current_action.basic == 2 # Display "Escape" in help window @help_window.set_text("Escape", 1) # Escape @active_battler.escape return end # If doing nothing if @active_battler.current_action.basic == 3 # Clear battler being forced into action $game_temp.forcing_battler = nil # Shift to step 1 @phase4_step = 1 return end end #-------------------------------------------------------------------------- # * Set Targeted Battler for Skill or Item # scope : effect scope for skill or item #-------------------------------------------------------------------------- def set_target_battlers(scope) # If battler performing action is enemy if @active_battler.is_a?(Game_Enemy) # Branch by effect scope case scope when 1 # single enemy index = @active_battler.current_action.target_index @target_battlers.push($game_party.smooth_target_actor(index)) when 2 # all enemies for actor in $game_party.actors if actor.exist? @target_battlers.push(actor) end end when 3 # single ally index = @active_battler.current_action.target_index @target_battlers.push($game_troop.smooth_target_enemy(index)) when 4 # all allies for enemy in $game_troop.enemies if enemy.exist? @target_battlers.push(enemy) end end when 5 # single ally (HP 0) index = @active_battler.current_action.target_index enemy = $game_troop.enemies[index] if enemy != nil and enemy.hp0? @target_battlers.push(enemy) end when 6 # all allies (HP 0) for enemy in $game_troop.enemies if enemy != nil and enemy.hp0? @target_battlers.push(enemy) end end when 7 # user @target_battlers.push(@active_battler) end end # If battler performing action is actor if @active_battler.is_a?(Game_Actor) # Branch by effect scope case scope when 1 # single enemy index = @active_battler.current_action.target_index @target_battlers.push($game_troop.smooth_target_enemy(index)) when 2 # all enemies for enemy in $game_troop.enemies if enemy.exist? @target_battlers.push(enemy) end end when 3 # single ally index = @active_battler.current_action.target_index @target_battlers.push($game_party.smooth_target_actor(index)) when 4 # all allies for actor in $game_party.actors if actor.exist? @target_battlers.push(actor) end end when 5 # single ally (HP 0) index = @active_battler.current_action.target_index actor = $game_party.actors[index] if actor != nil and actor.hp0? @target_battlers.push(actor) end when 6 # all allies (HP 0) for actor in $game_party.actors if actor != nil and actor.hp0? @target_battlers.push(actor) end end when 7 # user @target_battlers.push(@active_battler) end end end #-------------------------------------------------------------------------- # * Make Skill Action Results #-------------------------------------------------------------------------- def make_skill_action_result # Get skill @skill = $data_skills[@active_battler.current_action.skill_id] # If not a forcing action unless @active_battler.current_action.forcing # If unable to use due to SP running out unless @active_battler.skill_can_use?(@skill.id) # Clear battler being forced into action $game_temp.forcing_battler = nil # Shift to step 1 @phase4_step = 1 return end end # Use up SP @active_battler.sp -= @skill.sp_cost # Refresh status window @status_window.refresh # Show skill name on help window @help_window.set_text(@skill.name, 1) # Set animation ID @animation1_id = @skill.animation1_id @animation2_id = @skill.animation2_id # Set command event ID @common_event_id = @skill.common_event_id # Set target battlers set_target_battlers(@skill.scope) # Apply skill effect for target in @target_battlers target.skill_effect(@active_battler, @skill) end end #-------------------------------------------------------------------------- # * Make Item Action Results #-------------------------------------------------------------------------- def make_item_action_result # Get item @item = $data_items[@active_battler.current_action.item_id] # If unable to use due to items running out unless $game_party.item_can_use?(@item.id) # Shift to step 1 @phase4_step = 1 return end # If consumable if @item.consumable # Decrease used item by 1 $game_party.lose_item(@item.id, 1) end # Display item name on help window @help_window.set_text(@item.name, 1) # Set animation ID @animation1_id = @item.animation1_id @animation2_id = @item.animation2_id # Set common event ID @common_event_id = @item.common_event_id # Decide on target index = @active_battler.current_action.target_index target = $game_party.smooth_target_actor(index) # Set targeted battlers set_target_battlers(@item.scope) # Apply item effect for target in @target_battlers target.item_effect(@item) end end #-------------------------------------------------------------------------- # * Frame Update (main phase step 3 : animation for action performer) #-------------------------------------------------------------------------- def update_phase4_step3 # Animation for action performer (if ID is 0, then white flash) if @animation1_id == 0 @active_battler.white_flash = true else @active_battler.animation_id = @animation1_id @active_battler.animation_hit = true end # Shift to step 4 @phase4_step = 4 end #-------------------------------------------------------------------------- # * Frame Update (main phase step 4 : animation for target) #-------------------------------------------------------------------------- def update_phase4_step4 # Animation for target for target in @target_battlers target.animation_id = @animation2_id target.animation_hit = (target.damage != "Miss") end # Animation has at least 8 frames, regardless of its length @wait_count = 8 # Shift to step 5 @phase4_step = 5 end #-------------------------------------------------------------------------- # * Frame Update (main phase step 5 : damage display) #-------------------------------------------------------------------------- def update_phase4_step5 # Hide help window @help_window.visible = false # Refresh status window @status_window.refresh # Display damage for target in @target_battlers if target.damage != nil target.damage_pop = true end end # Shift to step 6 @phase4_step = 6 end #-------------------------------------------------------------------------- # * Frame Update (main phase step 6 : refresh) #-------------------------------------------------------------------------- def update_phase4_step6 # Clear battler being forced into action $game_temp.forcing_battler = nil # If common event ID is valid if @common_event_id > 0 # Set up event common_event = $data_common_events[@common_event_id] $game_system.battle_interpreter.setup(common_event.list, 0) end # Shift to step 1 @phase4_step = 1 end end F.A.Q:Q: Vedo i battlers e uno finisce in fondo ai comandi! A: Dovete andare nel database e levare i battlers dei vostri personaggi. Q: Come diamine si combatte? A: Prima si da la conferma per attaccare il nemico o per scappare e poi diventano attive le finestre di comando. Quando finite di dare i comandi la finestra si "disattiva" ovvero non è possibile spostarsi tra un comando e l'altro ma diventa inusabile fino al turno successivo. Demo: http://www.mediafire.com/download/38k8b4ba27benwv/VXBattleSystem.exe Incompatibilità: Nessuna conosciuta Note dell'autore: Lo script è ad installazione automatica, o lo mettete in un unico script sopra il main e copiate tutto il codice uno sotto l'altro, oppure fate diversi script. In alternativa, aprite la demo e copiate i vari script selezionandoli - copiandoli - incollandoli sul vostro progetto. Purtroppo non sono in grado di fare codici più snelli ma so solo modificare quelli di partenza e le barre non sono mie, chissà che in futuro non mi decida a fare una versione più figa. Le cose che sono state modificate/aggiunte in genere hanno dei commenti in italiano, forse non tutto, ma la cosa funziona come si deve. Se avete domande chiedete pure. Abbiate pazienza è il mio primo script XD.
-
Nome Script: Picture Gallery Versione: 1.0 Autore/i: Moghunter Informazioni: Un sistema di galleria di immagini. Istruzioni: Basta copiare lo script all'interno della demo e copiare le immagini necessario contenute al suo interno nel vostro progetto. Demo: http://atelier-rgss.com/RGSS/Demos/XP_Gallery.zip Mirror: http://www.mediafire.com/?h1opryhyzm8n5h4