-
Numero contenuti
1074 -
Iscritto
-
Ultima visita
-
Days Won
17
Tipo di contenuto
Profili
Calendario
Forum
Gallery
Downloads
Tutti i contenuti di Ally
-
Nome Script: AMS Script Dubealex - Update 2z Versione: R4 Update 2z Autore/i: Dubealex, modificato da Zarethal. Informazioni: Ebbene finalmente sono riuscito a tappare i bug più evidenti di questo script, ossia l'impossibilità di mostrare alcuni numeri durante il gioco (o in alcuni casi il crash dello stesso quando si visualizza un dialogo contenente dei numeri). Non so se le modifiche possano avere degli effetti collaterali, tuttavia penso possa essere ugualmente utile a chi come me per molto tempo ha dato i numeri nel cercare una soluzione che rendesse questo script più abbordabile. Inoltre, rispetto a gran parte delle fonti su internet, ho provveduto ad integrare le istruzioni per i comandi speciali all'interno dello script stesso in modo da facilitarne l'uso, spero vi sia d'aiuto :clindoeil: Istruzioni: Inserito lo script sopra Main. Altre istruzioni all'interno dello script. Script: #=================================================== # ■ AMS - Advanced Message Script - R4 [Update #2z] #=================================================== # Per informazioni e aggiornamenti sullo script visitate: # www.dubealex.com (Creation Asylum) # # Modificato, aggiustato e migliorato da: Dubealex # Original Script Core by: XRXS Scripter (Jap Dudes) # HTML Hexadecimal color feature from: Phylomorphis # # Ringraziamenti: # Rabu: Per aver aggiunto l'opzione Mostra face # # Traduzione in italiano by Tio # Per più informazioni visitate www.rpgshrine.altervista.org # Per trovare gli ultimi aggiornamenti nello script cercate: #NEW # Per configurare il bottone che fa saltare il dialogo cercare: #SKIP_TEXT_CODE # # May 18, 2005 #=================================================== #=================================================== # ISTRUZIONI E CORREZIONE BUG - ZARETHAL #=================================================== # # Mostra oro: \G # Cambiare font: \t[FontName] # Mostra la classe di un pg: \Class[Hero ID] # Prezzo di uno strumento: \Price[Item ID] # Mostra il nome di una mappa: \ Map # Inserire un faceset nel dialogo: \f[FileName] (devono essere per forza file png di 96x96 pixel messi nella cartella pictures) # Usare comandi per i colori in exadecimale: \\c[#000000](modificare i numeri) # Cambiare colore al testo: \c[Color ID] # Mostrare qualcosa: \v[ID]-->Mostra una variabile # \v[i ID]-->mostra un oggetto # \v[w ID]-->mostra un'arma # \v[a ID]-->mostra un'armatura # \v[s ID]-->mostra una abilità # Mettere il messaggio su un evento: \P[Event ID] # Mettere il messaggio sul giocatore: \ p[0] ,se mettere \p[-1] verrà la window skin senza bordi e background # Mostrare il nome: \name[Nome] # Mostrare il nome di un eroe: \n[ID] # Mostrare il nome di un eroe nel window name: \name[\n[ID]] # Cambiare la velocità: \s[0-19]La velocità va da 0 a 19(0 è il più veloce,19 il più lento) # Cambire la grandezza del dialogo:\h[6-32] 36 è il più grande,6 ci vuole il microscopio. # Mostrare un nome di mostro: \m[ID] # Attendi imput: \! # Iniziare/Interrompere la modalità letter-by-letter: finisce con \>,inizia con \< # Aspettare: \| è un secondo,\. è 0.25 secondi # Cambaire l'opacità: \o[Numero],da 0(trasparente) a 255. # Attivare/disattivare la modalità salta dialogo: \% # Modificare il colore permanentemente: \Color[ID] # Cambiare il colore nel nome: \z[ID] # Chiusura automatica di un testo: \~ #=================================================== LETTER_BY_LETTER_MODE = true #Setta la modalità di lettura lettera per lettera #(per toglierla modificare true in false) #=================================================== # ▼ Inizio CLASSE AMS #=================================================== class AMS attr_accessor :name_box_x_offset attr_accessor :name_box_y_offset attr_accessor :font_type attr_accessor :name_font_type attr_accessor :font_size attr_accessor :name_font_size attr_accessor :message_box_opacity attr_accessor :name_box_skin attr_accessor :name_box_text_color attr_accessor :message_box_text_color attr_accessor :message_box_skin attr_accessor :name_box_width attr_accessor :name_box_height attr_accessor :message_width attr_accessor :message_height attr_accessor :message_x attr_accessor :message_y_bottom attr_accessor :message_y_middle attr_accessor :message_y_top attr_accessor :event_message_x_ofset attr_accessor :event_message_y_ofset def initialize @name_box_x_offset = 10 #Sceglie la posizione X della finestra col nome. Iniziale= 0 @name_box_y_offset = 25 #Sceglie la posizione Y della finestra col nome. Iniziale= -10 @name_box_width = 20 #Sceglie la larghezza della finestra col nome. Iniziale= 8 @name_box_height = 26 #Sceglie l'altezza della finestra col nome. Iniziale= 26 @font_type = "Tahoma" #Sceglie il font per la finestra dei messaggi @name_font_type = "Tahoma" #Sceglie il font per la finestra col nome @font_size = 22 #Sceglie la grandezza del font nella finestra dei messaggi @name_font_size = 22 #Sceglie la grandezza del font per la finestra col nome @name_box_text_color=0 #Sceglie il colore del font per la finestra dei messaggi @message_box_text_color=0 #Sceglie il colore del font per la finestra col nome @message_box_opacity = 200 #Sceglie l'opacità della finestra dei messaggi.Iniziale=160 @message_box_skin = "001-Blue01" #Nome della Windowskin della finestra dei messaggi. @name_box_skin = "001-Blue01" #Nome della Windowskin della finestra col nome. @message_width = 480 #Sceglie la larghezza della finestra dei messaggi. Iniziale=480 @message_height = 160 #Sceglie l'altezza della finestra dei messaggi. Iniziale=160 @message_x = 80 #Sceglie la posizione X della finestra dei messaggi. Iniziale=80 @message_y_bottom = 304 #Sceglie la posizione Y della finestra a partire dal basso. Iniziale=304 @message_y_middle = 160 #Sceglie la posizione Y della finestra a partire dall'alto. Iniziale=160 @message_y_top = 16 #Sceglie la posizione della finestra del nome in alto. Iniziale=16 @event_message_x_ofset = 0 #Sceglie la posizione X della finestra orientata agli eventi. Iniziale=0 @event_message_y_ofset = 48 #Sceglie la posizione Y della finestra orientata agli eventi. Iniziale=48 end end #=================================================== # ▲ Finisce CLASSE AMS #=================================================== #=================================================== # ▼ Inizia Classe Window_Message #=================================================== class Window_Message < Window_Selectable alias xrxs9_initialize initialize def initialize @[member=alex]_skip = false xrxs9_initialize if $soundname_on_speak == nil then $soundname_on_speak = "" end $gaiji_file = "./Graphics/Gaiji/sample.png" if FileTest.exist?($gaiji_file) @gaiji_cache = Bitmap.new($gaiji_file) else @gaigi_cache = nil end @opacity_text_buf = Bitmap.new(32, 32) end #-------------------------------------------------------------------------- alias xrxs9_terminate_message terminate_message def terminate_message if @name_window_frame != nil @name_window_frame.dispose @name_window_frame = nil end if @name_window_text != nil @name_window_text.dispose @name_window_text = nil end xrxs9_terminate_message end #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = text_color($ams.message_box_text_color) self.contents.font.name = $ams.font_type self.contents.font.size = $ams.font_size self.windowskin = RPG::Cache.windowskin($ams.message_box_skin) @x = @y = @max_x = @max_y = @indent = @lines = 0 @face_indent = 0 @opacity = 255 @cursor_width = 0 @write_speed = 0 @write_wait = 0 @mid_stop = false @face_file = nil @popchar = -2 if $game_temp.choice_start == 0 @x = 8 end if $game_temp.message_text != nil @now_text = $game_temp.message_text if (/\A\\[Ff]\[(.+?)\]/.match(@now_text))!=nil then @face_file = $1 + ".png" @x = @face_indent = 128 if FileTest.exist?("Graphics/Pictures/" + $1 + ".png") self.contents.blt(16, 16, RPG::Cache.picture(@face_file), Rect.new(0, 0, 96, 96)) end @now_text.gsub!(/\\[Ff]\[(.*?)\]/) { "" } end begin last_text = @now_text.clone @now_text.gsub!(/\\[Vv]\[([IiWwAaSs]?)([0-9]+)\]/) { convart_value($1, $2.to_i) } end until @now_text == last_text @now_text.gsub!(/\\[Nn]\[([0-9]+)\]/) do $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : "" end #NEW #Dubealex's Stop Skip Text ON-OFF @now_text.gsub!(/\\[%]/) { "\100" } #Fine nuovo comando #NEW #Dubealex's Show Monster Name Feature @now_text.gsub!(/\\[Mm]\[([0-9]+)\]/) do $data_enemies[$1.to_i] != nil ? $data_enemies[$1.to_i].name : "" end #Fine nuovo comando #NEW #Dubealex's Show Item Price Feature @now_text.gsub!(/\\[Pp]rice\[([0-9]+)\]/) do $data_items[$1.to_i] != nil ? $data_items[$1.to_i].price : "" end #Fine nuovo comando #NEW #Dubealex's Show Hero Class Name Feature @now_text.gsub!(/\\[Cc]lass\[([0-9]+)\]/) do $data_classes[$data_actors[$1.to_i].class_id] != nil ? $data_classes[$data_actors [$1.to_i].class_id].name : "" end #Fine nuovo comando #NEW #Dubealex's Show Current Map Name Feature @now_text.gsub!(/\\[Mm]ap/) do $game_map.name != nil ? $game_map.name : "" end #Fine nuovo comando #NEW #Dubealex's Choose Name Box Text Color @now_text.gsub!(/\\[Zz]\[([0-9]+)\]/) do $ams.name_box_text_color=$1.to_i @now_text.sub!(/\\[Zz]\[([0-9]+)\]/) { "" } end #FIne nuovo comando name_window_set = false if (/\\[Nn]ame\[(.+?)\]/.match(@now_text)) != nil name_window_set = true name_text = $1 @now_text.sub!(/\\[Nn]ame\[(.*?)\]/) { "" } end if (/\\[Pp]\[([-1,0-9]+)\]/.match(@now_text))!=nil then @popchar = $1.to_i if @popchar == -1 @x = @indent = 48 @y = 4 end @now_text.gsub!(/\\[Pp]\[([-1,0-9]+)\]/) { "" } end @max_choice_x = 0 if @popchar >= 0 @text_save = @now_text.clone @max_x = 0 @max_y = 4 for i in 0..3 line = @now_text.split(/\n/)[3-i] @max_y -= 1 if line == nil and @max_y <= 4-i next if line == nil line.gsub!(/\\\w\[(\w+)\]/) { "" } cx = contents.text_size(line).width @max_x = cx if cx > @max_x if i >= $game_temp.choice_start @max_choice_x = cx if cx > @max_choice_x end end self.width = @max_x + 32 + @face_indent self.height = (@max_y - 1) * 32 + 64 @max_choice_x -= 68 @max_choice_x -= @face_indent*216/128 else @max_x = self.width - 32 - @face_indent for i in 0..3 line = @now_text.split(/\n/)[i] next if line == nil line.gsub!(/\\\w\[(\w+)\]/) { "" } cx = contents.text_size(line).width if i >= $game_temp.choice_start @max_choice_x = cx if cx > @max_choice_x end end @max_choice_x += 8 end @cursor_width = 0 @now_text.gsub!(/\\\\/) { "0" } @now_text.gsub!(/\\[Cc]\[([0123456789ABCDEF#]+)\]/) { "1[#{$1}]" } @now_text.gsub!(/\\[Gg]/) { "2" } @now_text.gsub!(/\\[Ss]\[([0-9]+)\]/) { "3[#{$1}]" } @now_text.gsub!(/\\[Aa]\[(.*?)\]/) { "4[#{$1}]" } #NEW #Dubealex's Permanent Color Change @now_text.gsub!(/\\[Cc]olor\[([0-9]+)\]/) do $ams.message_box_text_color= $1.to_i @now_text.sub!(/\\[Cc]\[([0-9]+)\]/) { "" } end #Fine nuovo comando #NEW #Dubealex's Font Change Feature @now_text.gsub(/\\[Tt]\[(.*?)\]/) do buftxt = $1.to_s $ams.font_type = buftxt @now_text.sub!(/\\[Tt]\[(.*?)\]/) { "" } end #Fine nuovo comando @now_text.gsub!(/\\[.]/) { "5" } @now_text.gsub!(/\\[|]/) { "6" } @now_text.gsub!(/\\[>]/) { "16" } @now_text.gsub!(/\\[<]/) { "17" } @now_text.gsub!(/\\[!]/) { "20" } @now_text.gsub!(/\\[~]/) { "21" } @now_text.gsub!(/\\[Ee]\[([0-9]+)\]/) { "22[#{$1}]" } @now_text.gsub!(/\\[Ii]/) { "23" } @now_text.gsub!(/\\[Oo]\[([0-9]+)\]/) { "24[#{$1}]" } @now_text.gsub!(/\\[Hh]\[([0-9]+)\]/) { "25[#{$1}]" } @now_text.gsub!(/\\[Bb]\[([0-9]+)\]/) { "26[#{$1}]" } @now_text.gsub!(/\\[Rr]\[(.*?)\]/) { "27[#{$1}]" } reset_window if name_window_set color=$ams.name_box_text_color off_x = $ams.name_box_x_offset off_y = $ams.name_box_y_offset space = 2 x = self.x + off_x - space / 2 y = self.y + off_y - space / 2 w = self.contents.text_size(name_text).width + $ams.name_box_width + space h = $ams.name_box_height + space @name_window_frame = Window_Frame.new(x, y, w, h) @name_window_frame.z = self.z + 1 x = self.x + off_x + 4 y = self.y + off_y @name_window_text = Air_Text.new(x, y, name_text, color) @name_window_text.z = self.z + 2 end end reset_window if $game_temp.choice_max > 0 @item_max = $game_temp.choice_max self.active = true self.index = 0 end if $game_temp.num_input_variable_id > 0 digits_max = $game_temp.num_input_digits_max number = $game_variables[$game_temp.num_input_variable_id] @input_number_window = Window_InputNumber.new(digits_max) @input_number_window.number = number @input_number_window.x = self.x + 8 @input_number_window.y = self.y + $game_temp.num_input_start * 32 end end #-------------------------------------------------------------------------- def update super if @fade_in self.contents_opacity += 24 if @input_number_window != nil @input_number_window.contents_opacity += 24 end if self.contents_opacity == 255 @fade_in = false end return end @now_text = nil if @now_text == "" if @now_text != nil and @mid_stop == false if @write_wait > 0 @write_wait -= 1 return end text_not_skip = LETTER_BY_LETTER_MODE while true @max_x = @x if @max_x < @x @max_y = @y if @max_y < @y if (c = @now_text.slice!(/./m)) != nil if c == "\0" c = "\\" end if c == "\1" @now_text.sub!(/\[([0123456789ABCDEF#]+)\]/, "") temp_color = $1 color = temp_color.to_i leading_x = temp_color.to_s.slice!(/./m) if leading_x == "#" self.contents.font.color = hex_color(temp_color) next end if color >= 0 and color <= 7 self.contents.font.color = text_color(color) end next end if c == "\2" if @gold_window == nil and @popchar <= 0 @gold_window = Window_Gold.new @gold_window.x = 560 - @gold_window.width if $game_temp.in_battle @gold_window.y = 192 else @gold_window.y = self.y >= 128 ? 32 : 384 end @gold_window.opacity = self.opacity @gold_window.back_opacity = self.back_opacity end c = "" end if c == "\3" @now_text.sub!(/\[([0-9]+)\]/, "") speed = $1.to_i if speed >= 0 and speed <= 19 @write_speed = speed end c = "" end if c == "\4" @now_text.sub!(/\[(.*?)\]/, "") buftxt = $1.dup.to_s if buftxt.match(/\//) == nil and buftxt != "" then $soundname_on_speak = "Audio/SE/" + buftxt else $soundname_on_speak = buftxt.dup end c = "" elsif c == "\4" c = "" end if c == "\5" @write_wait += 5 c = "" end if c == "\6" @write_wait += 20 c = "" end if c == "16" text_not_skip = false c = "" end if c == "17" text_not_skip = true c = "" end if c == "20" @mid_stop = true c = "" end if c == "21" terminate_message return end if c == "23" @indent = @x c = "" end if c == "24" @now_text.sub!(/\[([0-9]+)\]/, "") @opacity = $1.to_i color = self.contents.font.color self.contents.font.name = $ams.font_type self.contents.font.size = $ams.font_size self.contents.font.color = Color.new(color.red, color.green, color.blue, color.alpha * @opacity / 255) c = "" end if c == "25" @now_text.sub!(/\[([0-9]+)\]/, "") self.contents.font.size = [[$1.to_i, 6].max, 32].min c = "" end if c == "26" @now_text.sub!(/\[([0-9]+)\]/, "") @x += $1.to_i c = "" end if c == "27" @now_text.sub!(/\[(.*?)\]/, "") @x += ruby_draw_text(self.contents, @x, @y * line_height + (line_height - self.contents.font.size), $1, @opacity) if $soundname_on_speak != "" Audio.se_play($soundname_on_speak) end c = "" end if c == "30" @now_text.sub!(/\[(.*?)\]/, "") self.contents.blt(@x , @y * line_height + 8, RPG::Cache.icon($1), Rect.new(0, 0, 24, 24)) if $soundname_on_speak != "" Audio.se_play($soundname_on_speak) end @x += 24 c = "" end if c == "\n" @lines += 1 @y += 1 @x = 0 + @indent + @face_indent if @lines >= $game_temp.choice_start @x = 8 + @indent + @face_indent @cursor_width = @max_choice_x end c = "" end if c == "22" @now_text.sub!(/\[([0-9]+)\]/, "") @x += gaiji_draw(4 + @x, @y * line_height + (line_height - self.contents.font.size), $1.to_i) c = "" end #NEW #Dubealex's Text Skip On/OFF Command if c == "\100" if @[member=alex]_skip==false @[member=alex]_skip=true else @[member=alex]_skip=false end c = "" end #Fine nuovo comando if c != "" self.contents.draw_text(0+@x, 32 * @y, 40, 32, c) @x += self.contents.text_size(c).width if $soundname_on_speak != "" then Audio.se_play($soundname_on_speak) end end #SKIP_TEXT_CODE # B = Esc, 0 (tastiera numerica), X # C = Invio, Barra spaziatrice e C # A = Shift, Z if Input.press?(Input::C) # <-- Cambia il valore in quella linea if @[member=alex]_skip==false text_not_skip = false end end else text_not_skip = true break end if text_not_skip break end end @write_wait += @write_speed return end if @input_number_window != nil @input_number_window.update if Input.trigger?(Input::C) $game_system.se_play($data_system.decision_se) $game_variables[$game_temp.num_input_variable_id] = @input_number_window.number $game_map.need_refresh = true @input_number_window.dispose @input_number_window = nil terminate_message end return end if @contents_showing if $game_temp.choice_max == 0 self.pause = true end if Input.trigger?(Input:: if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0 $game_system.se_play($data_system.cancel_se) $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1) terminate_message end end if Input.trigger?(Input::C) if $game_temp.choice_max > 0 $game_system.se_play($data_system.decision_se) $game_temp.choice_proc.call(self.index) end if @mid_stop @mid_stop = false return else terminate_message end end return end if @fade_out == false and $game_temp.message_text != nil @contents_showing = true $game_temp.message_window_showing = true refresh Graphics.frame_reset self.visible = true self.contents_opacity = 0 if @input_number_window != nil @input_number_window.contents_opacity = 0 end @fade_in = true return end if self.visible @fade_out = true self.opacity -= 48 if self.opacity == 0 self.visible = false @fade_out = false $game_temp.message_window_showing = false end return end end #-------------------------------------------------------------------------- def get_character(parameter) case parameter when 0 return $game_player else events = $game_map.events return events == nil ? nil : events[parameter] end end #-------------------------------------------------------------------------- def reset_window #GRANDEZZA_MESSAGGIO #POSIZIONE_MESSAGGIO if @popchar >= 0 events = $game_map.events if events != nil character = get_character(@popchar) x = [[character.screen_x - $ams.event_message_x_ofset - self.width / 2, 4].max, 636 - self.width].min y = [[character.screen_y - $ams.event_message_y_ofset - self.height, 4].max, 476 - self.height].min self.x = x self.y = y end elsif @popchar == -1 self.x = -4 self.y = -4 self.width = 648 self.height = 488 else if $game_temp.in_battle self.y = 16 else case $game_system.message_position when 0 self.y = $ams.message_y_top when 1 self.y = $ams.message_y_middle when 2 self.y = $ams.message_y_bottom end self.x = $ams.message_x if @face_file == nil self.width = $ams.message_width self.x = $ams.message_x else if self.width <= 600 self.width = 600 self.x -=60 end end self.height = $ams.message_height end end self.contents = Bitmap.new(self.width - 32, self.height - 32) self.contents.font.color = text_color($ams.message_box_text_color) self.contents.font.name = $ams.font_type self.contents.font.size = $ams.font_size if @face_file != nil self.contents.blt(16, 16, RPG::Cache.picture(@face_file), Rect.new(0, 0, 96, 96)) end if @popchar == -1 self.opacity = 255 self.back_opacity = 0 elsif $game_system.message_frame == 0 self.opacity = 255 self.back_opacity = $ams.message_box_opacity else self.opacity = 0 self.back_opacity = $ams.message_box_opacity end end #-------------------------------------------------------------------------- def gaiji_draw(x, y, num) if @gaiji_cache == nil return 0 else if @gaiji_cache.width < num * 24 return 0 end if self.contents.font.size >= 20 and self.contents.font.size <= 24 size = 24 else size = self.contents.font.size * 100 * 24 / 2200 end self.contents.stretch_blt(Rect.new(x, y, size, size), @gaiji_cache, Rect.new(num * 24, 0, 24, 24)) if $soundname_on_speak != "" then Audio.se_play($soundname_on_speak) end return size end end #-------------------------------------------------------------------------- def line_height return 32 if self.contents.font.size >= 20 and self.contents.font.size <= 24 return 32 else return self.contents.font.size * 15 / 10 end end #-------------------------------------------------------------------------- def ruby_draw_text(target, x, y, str,opacity) sizeback = target.font.size target.font.size * 3 / 2 > 32 ? rubysize = 32 - target.font.size : rubysize = target.font.size / 2 rubysize = [rubysize, 6].max opacity = [[opacity, 0].max, 255].min split_s = str.split(/,/) split_s[0] == nil ? split_s[0] = "" : nil split_s[1] == nil ? split_s[1] = "" : nil height = sizeback + rubysize width = target.text_size(split_s[0]).width target.font.size = rubysize ruby_width = target.text_size(split_s[1]).width target.font.size = sizeback buf_width = [target.text_size(split_s[0]).width, ruby_width].max width - ruby_width != 0 ? sub_x = (width - ruby_width) / 2 : sub_x = 0 if opacity == 255 target.font.size = rubysize target.draw_text(x + sub_x, y - target.font.size, target.text_size(split_s[1]).width, target.font.size, split_s[1]) target.font.size = sizeback target.draw_text(x, y, width, target.font.size, split_s[0]) return width else if @opacity_text_buf.width < buf_width or @opacity_text_buf.height < height @opacity_text_buf.dispose @opacity_text_buf = Bitmap.new(buf_width, height) else @opacity_text_buf.clear end @opacity_text_buf.font.size = rubysize @opacity_text_buf.draw_text(0 , 0, buf_width, rubysize, split_s[1], 1) @opacity_text_buf.font.size = sizeback @opacity_text_buf.draw_text(0 , rubysize, buf_width, sizeback, split_s[0], 1) if sub_x >= 0 target.blt(x, y - rubysize, @opacity_text_buf, Rect.new(0, 0, buf_width, height), opacity) else target.blt(x + sub_x, y - rubysize, @opacity_text_buf, Rect.new(0, 0, buf_width, height), opacity) end return width end end #-------------------------------------------------------------------------- def convart_value(option, index) option == nil ? option = "" : nil option.downcase! case option when "i" unless $data_items[index].name == nil r = sprintf("30[%s]%s", $data_items[index].icon_name, $data_items[index].name) end when "w" unless $data_weapons[index].name == nil r = sprintf("30[%s]%s", $data_weapons[index].icon_name, $data_weapons[index].name) end when "a" unless $data_armors[index].name == nil r = sprintf("30[%s]%s", $data_armors[index].icon_name, $data_armors[index].name) end when "s" unless $data_skills[index].name == nil r = sprintf("30[%s]%s", $data_skills[index].icon_name, $data_skills[index].name) end else r = $game_variables[index] end r == nil ? r = "" : nil return r end #-------------------------------------------------------------------------- def dispose terminate_message if @gaiji_cache != nil unless @gaiji_cache.disposed? @gaiji_cache.dispose end end unless @opacity_text_buf.disposed? @opacity_text_buf.dispose end $game_temp.message_window_showing = false if @input_number_window != nil @input_number_window.dispose end super end #-------------------------------------------------------------------------- def update_cursor_rect if @index >= 0 n = $game_temp.choice_start + @index self.cursor_rect.set(8 + @indent + @face_indent, n * 32, @cursor_width, 32) else self.cursor_rect.empty end end end #========================================= # ▲ Finisce CLASSE Window_Message #========================================= #========================================= # ▼ Inizia Classe Window_Frame #========================================= class Window_Frame < Window_Base def initialize(x, y, width, height) super(x, y, width, height) self.windowskin = RPG::Cache.windowskin($ams.name_box_skin) self.contents = nil end #-------------------------------------------------------------------------- def dispose super end end #========================================= # ▲ Esci CLASSE Window_Frame #========================================= #========================================= # ▼ Inizia aggiunte classe Game_Map #========================================= class Game_Map #Dubealex's Addition (from XRXS), mostra nome della mappa nel gioco def name $map_infos[@map_id] end end #========================================= # ▲ Finisce aggiunte classe Game_Map #========================================= #========================================= # ▼ Inizia aggiunte classe Scene_Title #========================================= class Scene_Title #Dubealex's Addition (from XRXS) mostra nome della mappa nel gioco $map_infos = load_data("Data/MapInfos.rxdata") for key in $map_infos.keys $map_infos[key] = $map_infos[key].name end #Dubealex's addition, salva i dati dei messaggi quando salvi il gioco $ams = AMS.new end #========================================= # ▲ Finisce aggiunte classe Scene_Title #========================================= #========================================= # ▼ Inizia aggiunte classe Window_Base #========================================= class Window_Base < Window #Dubealex Addition (from Phylomorphis) per usare i codici dei colori HTML def hex_color(string) red = 0 green = 0 blue = 0 if string.size != 6 print("Vengono usati sei carrateri.") print("Sarà usato il colore bianco per il testo.") return Color.new(255, 255, 255, 255) end for i in 1..6 s = string.slice!(/./m) if s == "#" print("Potrebbe non essere prensete il carattere \"#\".") print("Sarà usato il colore bianco per il testo.") return Color.new(255, 255, 255, 255) end value = hex_convert(s) if value == -1 print("Errore nel convertire il valore.") print("Sarà usato il colore bianco per il testo.") return Color.new(255, 255, 255, 255) end case i when 1 red += value * 16 when 2 red += value when 3 green += value * 16 when 4 green += value when 5 blue += value * 16 when 6 blue += value end end return Color.new(red, green, blue, 255) end #-------------------------------------------------------------------------- def hex_convert(character) case character when "0" return 0 when "1" return 1 when "2" return 2 when "3" return 3 when "4" return 4 when "5" return 5 when "6" return 6 when "7" return 7 when "8" return 8 when "9" return 9 when "A" return 10 when "B" return 11 when "C" return 12 when "D" return 13 when "E" return 14 when "F" return 15 end return -1 end end #========================================= # ▲ Finisce aggiunte classe Window_Base #========================================= #========================================= # ▼ Inizia classe Air_Text #========================================= class Air_Text < Window_Base def initialize(x, y, designate_text, color=0) super(x-16, y-16, 32 + designate_text.size * 12, 56) self.opacity = 0 self.back_opacity = 0 self.contents = Bitmap.new(self.width - 32, self.height - 32) w = self.contents.width h = self.contents.height self.contents.font.name = $ams.name_font_type self.contents.font.size = $ams.name_font_size self.contents.font.color = text_color(color) self.contents.draw_text(0, 0, w, h, designate_text) end #-------------------------------------------------------------------------- def dispose self.contents.clear super end end #========================================== # ▲ Finisce classe Air_Text #========================================== #=================================================== # ▼ Inizia aggiunte classe Scene_Save #=================================================== class Scene_Save < Scene_File alias ams_original_write_save_data write_save_data def write_save_data(file) ams_original_write_save_data(file) Marshal.dump($ams, file) end end #=================================================== # ▲ Finisce aggiunte classe Scene_Save #=================================================== #=================================================== # ▼ Inizia aggiunte classe Scene_Load #=================================================== class Scene_Load < Scene_File alias ams_original_read_save_data read_save_data def read_save_data(file) ams_original_read_save_data(file) $ams = Marshal.load(file) end end #=================================================== # ▲ Finisce aggiunte classe Scene_Load #=================================================== Se avete qualche commento da fare scrivete pure, non sono sicuro sia privo di errori perciò accetto qualsiasi critica >.<
-
Titolo: Blizz-ABS Versione: 2.84 Autore/i: Blizzard Informazioni: Questo script vi permetterà di effetuare battaglie direttamente sulla mappa. Degli esempi che usano questo sistema di battaglia,sono: Zelda,Secret of Mana,Diablo,etc etc... Questo ABS ha molte caratteristiche avanzate,ed è molto potente Sta alla vostra personalizzazione per sfruttarlo al massimo... Presenta anche molti add-ons,che pian piano posteremo ^^ Screenshots: Istruzioni: All'interno della demo. N.B:questo ABS,richiede il Microsoft .NET Framework,che potete reperire da QUI Demo: http://downloads.chaos-project.com/scripts/Blizz-ABS%202.84.zip Incompatibilità: 90% compatibile con l'SDK 1.x. 80% compatibile con l'SDK 2.x. Compatibile con ogni CMS.
-
Nome Script: Menù per un solo PG Versione: 1.2 Autore/i: LilBrudder917's Informazioni: Questo script è adatto per chi usa un solo PG nel suo game. Tutte le varie finestre possono essere attivate o disattivate ^^ (potete vedere la differenza dai due screen,una che ha attiva la locazione,e l'altro no) Inoltre,potete inserire un vostro sfondo in basso a destra con un'immagine di 150x60. Istruzioni: Inserite lo script sopra Main. Script: #============================================================================== # Project CMS by lilbrudder917 # Version 1.22 #------------------------------------------------------------------------------ # Overrides Scene_Menu and Window_MenuStatus. Rewrites the "Draw Level" parts of # Window_Base to change settings. Window_PlayTime has been changed in Width. # Rewrites Window_Steps. #============================================================================== #============================================================================== # CONFIGURATION #============================================================================== ItemName = "Inventory" # Default is Item SkillName = "Cast Spell" # Default is Skill EquipName = "Wear" # Default is Equip StatusName = "Status" # Default is Status SaveName = "Save Data" # Default is Save EndName = "Quit Game" # Default is End Game CommandW = 150 # Width of the Command Window Custom_Map = false # If true, you can have a picture as a background. Map_Picture = "mappic" # If Custom_Map = true, this will be the background. Facesets = true # If true and the face file is missing, the actor's #sprite will be used instead FaceIMG = "Face" # Filename for the face image. FFILETYPE = ".png" # Face File Type CornerLogo = true # In the bottom right corner, want a 148x61 icon? LogoIcon = "logoicon" # Name of icon LogoFType = ".png" # Icon File Type #============================================================================= # Scene_Menu Window Add-ons #============================================================================= $MapBG = true # If true, the map will be your background $UseNotes = true # To use Window_Notes, have this true. $UsePTime = true # To use Window_PlayTime, have this true. $UseRTime = true # To use Window_RealTime, have this true. RTHVar = 2 # Variable used for storing hours RTMVar = 3 # Variable used for storing minutes RTAPVar= 4 # Variable used for storing AM/PM RTSVar = 5 # Variable used for storing seconds $TwelClock = true # 12-Hour Clock if true, false = 24-Hour Clock $UseVar = true # To use Window_Variable, have this true. $UseSteps = true # To use Window_Steps, have this true. $UseGold = true # To use Window_Gold, have this true. $UseLoca = true # To use Window_Location, have this true. ############################################################################### # Coordinate Controls # #-----------------------------------------------------------------------------# # Unless you know what you are doing, I don't recommend touching these. # # These are the display settings of Window_MenuStatus. # ############################################################################### ShowName = true # Show Actor's Name? NameX = 135 # Actor_Name X Position NameY = 0 # Actor_Name Y Position ShowClass = true # Show Actor's Class? ClassX = 128 # Actor_Class X Position ClassY = 30 # Actor_Class Y Position ShowLevel = true # Show Actor's Level? LevelX = 0 # Actor_Level X Position LevelY = 139 # Actor_Level Y Position LevelT = "Level" # Custom Title for Level? ShowState = true # Show Actor_State? StateX = 123 # Actor_State X Position StateY = 50 # Actor_State Y Position ShowHP = true # Show HP/MaxHP String? UseBARS = nil # Coming Soon HPX = 0 # Hitpoints String X Position HPY = 100 # Hitpoints String Y Position ShowSP = true # Show SP/MaxSP String? SpecX = 0 # Specpoints String X Position SpecY = 125 # Specpoints String Y Position ShowEXP = true # Show Experience String? ExperX = 0 # Experience String X Position ExperY = 185 # Experience String Y Position CommandX = 488 # Window_Command X Position WINNOTES_X= 2 # Window_Notes X Position WINNOTES_Y= 242 # Window_Notes Y Position RealTimeX = 488 # Window_RealTime X Position RealTimeY = 320 # Window_RealTime Y Position PlayTimeX = 488 # Window_PlayTime X Position PlayTimeY = 224 # Window_PlayTime Y Position VariableX = 243 # Window_Variable X Position VariableY = 66 # Window_Variable Y Position WStepX = 243 # Window_Steps X Position WStepY = 163 # Window_Steps Y Position WGoldX = 243 # Window_Gold X Position WGoldY = 2 # Window_Gold Y Position PLogoX = 490 # Game_Logo X Position PLogoY = 418 # Game_Logo Y Position WMStatusX = 2 # Window_MenuStatus X Position WMStatusY = 2 # Window_MenuStatus Y Position LOCATION_X= 2 LOCATION_Y= 430 VariTitle = "Bank" # Text in Window_Variable VariShoNum= 1 # Variable used in Window_Variable GoldName = "Gold" # Currency Name StepName = "Steps" # Text in Window_Steps PlTiName = "Play Time"# Text in Window_PlayTime NoteVName = "Notes" # Text in Window_Notes CurTiName = "Time" # Text in Window_RealTime LocaName = "Location:"# Text in Window_Location if $MapBG && Custom_Map == true print "Both $MapBG and Custom_Map cannot be on at the same time! Turning off Custom_Map." Custom_Map = false end #============================================================================== # ** Window_MenuStatus #------------------------------------------------------------------------------ # This window displays party member status on the menu screen. #============================================================================== class Window_MenuStatus < Window_Selectable #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 240, 240) self.contents = Bitmap.new(width - 32, height - 32) refresh self.active = false self.index = -1 end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear @item_max = $game_party.actors.size for i in 0...$game_party.actors.size x = 0 y = 0 actor = $game_party.actors[i] if Facesets == true #Facesets True? if FileTest.exist?("Graphics/Pictures/" + FaceIMG + FFILETYPE) #File Exist @face_file = FaceIMG + FFILETYPE self.contents.blt(x, y, RPG::Cache.picture(@face_file), Rect.new(x, y, 112, 112)) else #File Not Exist draw_actor_graphic(actor, 24, 56) end #End File Check else #Facesets Else draw_actor_graphic(actor, 24, 56) end #Faceset End if ShowName == true draw_actor_name(actor, NameX, NameY) end if ShowLevel == true draw_actor_level(actor, 0, 0) end if ShowState == true draw_actor_state(actor, StateX, StateY) end draw_actor_exp(actor, ExperX, ExperY) if ShowClass == true draw_actor_class(actor, ClassX, ClassY) end if ShowHP == true draw_actor_hp(actor, HPX, HPY) end if ShowSP == true draw_actor_sp(actor, SpecX, SpecY) end end end #-------------------------------------------------------------------------- # * Cursor Rectangle Update #-------------------------------------------------------------------------- def update_cursor_rect if @index < 0 self.cursor_rect.empty else self.cursor_rect.set(0, @index * 116, self.width - 32, 96) end end end #============================================================================== # End Window_MenuStatus #============================================================================== #============================================================================== # Window Base Level Edit #============================================================================== class Window_Base def draw_actor_level(actor, x, y) self.contents.font.color = system_color self.contents.draw_text(LevelX, 160, 32, 32, LevelT, 2) self.contents.font.color = normal_color self.contents.draw_text(LevelX + 32, 160, 24, 32, actor.level.to_s, 2) end end #============================================================================== # End Window_Base #============================================================================== class Window_Steps < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 245, 78) self.contents = Bitmap.new(width - 32, height - 32) refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(0, -5, 120, 32, StepName) self.contents.font.color = normal_color self.contents.draw_text(4, 16, 200, 32, $game_party.steps.to_s, 2) end end #============================================================================== # ** Window_Gold #------------------------------------------------------------------------------ # This window displays amount of gold. #============================================================================== class Window_Gold < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 245, 64) self.contents = Bitmap.new(width - 32, height - 32) refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear cx = contents.text_size(GoldName).width self.contents.font.color = normal_color self.contents.draw_text(4, 0, 180-cx-2, 32, $game_party.gold.to_s, 2) self.contents.font.color = system_color self.contents.draw_text(184-cx, 0, cx, 32, GoldName, 2) end end #============================================================================== # ** Window_PlayTime #------------------------------------------------------------------------------ # This window displays play time on the menu screen. #============================================================================== class Window_PlayTime < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 150, 96) self.contents = Bitmap.new(width - 32, height - 32) refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, 0, 100, 32, PlTiName) @total_sec = Graphics.frame_count / Graphics.frame_rate hour = @total_sec / 60 / 60 min = @total_sec / 60 % 60 sec = @total_sec % 60 text = sprintf("%02d:%02d:%02d", hour, min, sec) self.contents.font.color = normal_color self.contents.draw_text(4, 32, 100, 32, text, 2) end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super if Graphics.frame_count / Graphics.frame_rate != @total_sec refresh end end end #============================================================================= # End Window_Steps #============================================================================== #============================================================================== # ** Window_Notes by lilbrudder917 #------------------------------------------------------------------------------ # This window displays custom-made notes made for the menu screen, but # can be called anywhere. Requires Project CMS to work. I think. #============================================================================== $MESSAGE1_L1 = "Welcome to the Menu! This Window is called" # First line for the first message $MESSAGE1_L2 = "the Notes Window! Text automatically aligns" # Second line for the first message $MESSAGE1_L3 = "to the right side of the Window, and the" # Third line for the first message $MESSAGE1_L4 = "Window stores up to 5 lines per message!" $MESSAGE1_L5 = " " $MESSAGE2_L1 = "Since you talked to the Shady Noter," $MESSAGE2_L2 = "you have unlocked this new message to be" $MESSAGE2_L3 = "placed in your notes!" $MESSAGE2_L4 = " " $MESSAGE2_L5 = "Butterscotch." $MESSAGE3_L1 = "If you want, you can define these to say" $MESSAGE3_L2 = "what you want them to and then Script Call" $MESSAGE3_L3 = "'$DEFMESSAGE = (MessageNumber)' without " $MESSAGE3_L4 = "quotations or parentheses." $MESSAGE3_L5 = " " $MESSAGE4_L1 = "Oh, if you want a blank line, just put a" $MESSAGE4_L2 = "space where the message would go." $MESSAGE4_L3 = " " $MESSAGE4_L4 = " " $MESSAGE4_L5 = "See?" $DEFMESSAGE = 1 # Can be changed in game. class Window_Notes < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(240, 20, 485, 190) self.contents = Bitmap.new(width - 32, height - 32) refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, 0, 120, 32, NoteVName) if $DEFMESSAGE == 1 text_L1 = $MESSAGE1_L1 text_L2 = $MESSAGE1_L2 text_L3 = $MESSAGE1_L3 text_L4 = $MESSAGE1_L4 text_L5 = $MESSAGE1_L5 elsif $DEFMESSAGE == 2 text_L1 = $MESSAGE2_L1 text_L2 = $MESSAGE2_L2 text_L3 = $MESSAGE2_L3 text_L4 = $MESSAGE2_L4 text_L5 = $MESSAGE2_L5 elsif $DEFMESSAGE == 3 text_L1 = $MESSAGE3_L1 text_L2 = $MESSAGE3_L2 text_L3 = $MESSAGE3_L3 text_L4 = $MESSAGE3_L4 text_L5 = $MESSAGE3_L5 elsif $DEFMESSAGE == 4 text_L1 = $MESSAGE4_L1 text_L2 = $MESSAGE4_L2 text_L3 = $MESSAGE4_L3 text_L4 = $MESSAGE4_L4 text_L5 = $MESSAGE4_L5 else text_L1 = " " text_L2 = " " text_L3 = "You have nothing stored in your notes." text_L4 = " " text_L5 = " " end self.contents.font.color = normal_color self.contents.draw_text(4, 32, 350, 32, text_L1, 2) self.contents.draw_text(4, 64, 350, 32, text_L2, 2) self.contents.draw_text(4, 96, 350, 32, text_L3, 2) self.contents.draw_text(4, 128, 350, 32, text_L4, 2) self.contents.draw_text(4, 160, 350, 32, text_L5, 2) end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super refresh end end #============================================================================== # ** Window_Location by lilbrudder917 #------------------------------------------------------------------------------ # This window displays the map's name. #============================================================================== class Window_Location < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 485, 48) self.contents = Bitmap.new(width - 32, height - 32) refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(0, -10, 120, 32, LocaName) self.contents.font.color = normal_color cx = contents.text_size(LocaName).width self.contents.draw_text(cx+30, -10, 120, 32, $game_map.name) end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super refresh end end #------------------------------------------------------------------------- # * Define Map Title #------------------------------------------------------------------------- class Scene_Title alias locationname main def main $map_infos = load_data('Data/MapInfos.rxdata') $map_infos.keys.each {|key| $map_infos[key] = $map_infos[key].name} locationname end end class Game_Map def name return $map_infos[@map_id] end end #============================================================================== # ** Window_Variable by lilbrudder917 #------------------------------------------------------------------------------ # This window displays a variable made for the menu screen, but can be called # anywhere. Requires Project CMS to work. I think. #============================================================================== class Window_Variable < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 245, 96) self.contents = Bitmap.new(width - 32, height - 32) refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, 0, 120, 32, VariTitle) text = "#{$game_variables[VariShoNum]}" self.contents.font.color = normal_color self.contents.draw_text(4, 32, 120, 32, text, 2) end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super refresh end end #============================================================================== # ** Window_RealTime by lilbrudder917 #------------------------------------------------------------------------------ # This window displays the time stored on your computer's internal clock, # made for the menu screen, but can be called anywhere. Requires Project CMS # to work. I think. #============================================================================== class Window_RealTime < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize @time_stamp = Time.new if $TwelClock == true $game_variables[RTHVar] = @time_stamp.strftime("%I") # Hour, 12-Hour Format $game_variables[RTMVar] = @time_stamp.strftime("%M") # Minutes $game_variables[RTAPVar] = @time_stamp.strftime("%p")# AM/PM $game_variables[RTSVar] = @time_stamp.strftime("%S") # Seconds else $game_variables[RTHVar] = @time_stamp.strftime("%H") # Hour, 24-Hour Format $game_variables[RTMVar] = @time_stamp.strftime("%M") # Minutes $game_variables[RTSVar] = @time_stamp.strftime("%S") # Seconds end super(0, 0, 150, 96) self.contents = Bitmap.new(width - 32, height - 32) refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, 0, 100, 32, CurTiName) if $TwelClock == true text = "#{$game_variables[RTHVar]}: #{$game_variables[RTMVar]}: #{$game_variables[RTSVar]} #{$game_variables[RTAPVar]}" else text = "#{$game_variables[RTHVar]}: #{$game_variables[RTMVar]}: #{$game_variables[RTSVar]}" end self.contents.font.color = normal_color self.contents.draw_text(4, 32, 100, 32, text, 2) end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super refresh end end class Scene_Menu #-------------------------------------------------------------------------- # * Object Initialization # menu_index : command cursor's initial position #-------------------------------------------------------------------------- def initialize(menu_index = 0) @menu_index = menu_index end #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main #-------------------------------------------------------------------------- # * Menu Background #-------------------------------------------------------------------------- if $MapBG == true @map = Spriteset_Map.new end if Custom_Map == true @sprite = Sprite.new @sprite.bitmap = RPG::Cache.picture(Map_Picture) end # Make command window s1 = ItemName s2 = SkillName s3 = EquipName s4 = StatusName s5 = SaveName s6 = EndName @command_window = Window_Command.new(CommandW, [s1, s2, s3, s4, s5, s6]) @command_window.x = CommandX @command_window.index = 0 # If number of party members is 0 if $game_party.actors.size == 0 # Disable items, skills, equipment, and status @command_window.disable_item(0) @command_window.disable_item(1) @command_window.disable_item(2) @command_window.disable_item(3) end # If save is forbidden if $game_system.save_disabled # Disable save @command_window.disable_item(4) end if $UseNotes == true @mnotes_window = Window_Notes.new @mnotes_window.x = WINNOTES_X @mnotes_window.y = WINNOTES_Y end if $UseLoca == true @location_window = Window_Location.new @location_window.x = LOCATION_X @location_window.y = LOCATION_Y end # Make play time window if $UsePTime == true @playtime_window = Window_PlayTime.new @playtime_window.x = PlayTimeX @playtime_window.y = PlayTimeY end if $UseRTime == true @realtime_window = Window_RealTime.new @realtime_window.x = RealTimeX @realtime_window.y = RealTimeY end if $UseVar == true @vartime_window = Window_Variable.new @vartime_window.x = VariableX @vartime_window.y = VariableY end #Make steps window if $UseSteps ==true @steps_window = Window_Steps.new @steps_window.x = WStepX @steps_window.y = WStepY end # Make gold window if $UseGold == true @gold_window = Window_Gold.new @gold_window.x = WGoldX @gold_window.y = WGoldY end if CornerLogo == true @image = Sprite.new @image.bitmap = RPG::Cache.picture(LogoIcon) @image.x = PLogoX @image.y = PLogoY end # Make status window @status_window = Window_MenuStatus.new @status_window.x = WMStatusX @status_window.y = WMStatusY # Execute transition Graphics.transition # 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 # Prepare for transition Graphics.freeze # Dispose of windows @command_window.dispose if $MapBG == true @map.dispose end if $UseLoca == true @location_window.dispose end if $UseNotes == true @mnotes_window.dispose end if $UsePTime == true @playtime_window.dispose end if $UseRTime == true @realtime_window.dispose end if $UseVar == true @vartime_window.dispose end if $UseSteps ==true @steps_window.dispose end if $UseGold == true @gold_window.dispose end if CornerLogo == true @image.dispose end @status_window.dispose #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update # Update windows @command_window.update if $UseNotes == true @mnotes_window.update end if $UseLoca == true @location_window.update end if $UsePTime == true @playtime_window.update end if $UseRTime == true @realtime_window.update end if $UseVar == true @vartime_window.update end if $UseSteps ==true @steps_window.update end if $UseGold == true @gold_window.update end if CornerLogo == true @image.update end @status_window.update # If command window is active: call update_command if @command_window.active update_command return end # If status window is active: call update_status if @status_window.active update_status return end end #-------------------------------------------------------------------------- # * Frame Update (when command window is active) #-------------------------------------------------------------------------- def update_command # If B button was pressed if Input.trigger?(Input:: # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to map screen $scene = Scene_Map.new return end # If C button was pressed if Input.trigger?(Input::C) # If command other than save or end game, and party members = 0 if $game_party.actors.size == 0 and @command_window.index < 4 # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Branch by command window cursor position case @command_window.index when 0 # item # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to item screen $scene = Scene_Item.new when 1 # skill # Play decision SE $game_system.se_play($data_system.decision_se) # Make status window active @command_window.active = false @status_window.active = true @status_window.index = 0 when 2 # equipment # Play decision SE $game_system.se_play($data_system.decision_se) # Make status window active @command_window.active = false @status_window.active = true @status_window.index = 0 when 3 # status # Play decision SE $game_system.se_play($data_system.decision_se) # Make status window active @command_window.active = false @status_window.active = true @status_window.index = 0 when 4 # save # If saving is forbidden if $game_system.save_disabled # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to save screen $scene = Scene_Save.new when 5 # end game # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to end game screen $scene = Scene_End.new end return end end #-------------------------------------------------------------------------- # * Frame Update (when status window is active) #-------------------------------------------------------------------------- def update_status # If B button was pressed if Input.trigger?(Input:: # Play cancel SE $game_system.se_play($data_system.cancel_se) # Make command window active @command_window.active = true @status_window.active = false @status_window.index = -1 return end # If C button was pressed if Input.trigger?(Input::C) # Branch by command window cursor position case @command_window.index when 1 # skill # If this actor's action limit is 2 or more if $game_party.actors[@status_window.index].restriction >= 2 # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to skill screen $scene = Scene_Skill.new(@status_window.index) when 2 # equipment # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to equipment screen $scene = Scene_Equip.new(@status_window.index) when 3 # status # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to status screen $scene = Scene_Status.new(@status_window.index) end return end end end end Demo:Menù per un solo PG
-
Nome Script: One-Player Battle System V1.03 Versione: 1.03 Autore/i: Tigurus Fay Informazioni: Una piccola modifica al battle system originale di RMXP. Ottimizzato per funzionare solo con un battler e in una 'prospettiva di spalla'. Istruzioni: Istruzioni e script sono all'interno della demo. Demo: http://www.mediafire.com/?94xj1ccrsrv8qk1 Incompatibilità: Incompatibile con altri tipi di battle system.
-
BS/Battlers Addon Nemici che usano gli item
Ally ha aggiunto un topic in Scripts RPG Maker XP (RGSS)
Nome script: Nemici che usano gli item Versione: 2 Autore/i: DerVVulfman, Fomar0153 Informazioni: Semplice script che permette ai nemici durante la battaglia di curarsi con gli oggetti o di lanciarveli contro.XD Istruzioni: Inserite lo script sopra Main. Altre istruzioni le potete trovare all'interno dello script. Script: #====================================================================== ======== # ** Enemies Use Items #------------------------------------------------------------------------------ # by Fomar0153 # version 2 # 04-27-2007 # Full SDK 2.2 Compatible (Does not need or require SDK 2.2) #------------------------------------------------------------------------------ # # INTRODUCTION: # # This system allows enemy battlers to use items during battle. This is accom- # plished by switching the skill used by an enemy to that of an item in a pre- # defined list in the configuration section. # # By example, you could set up a Skeleton enemy to use a 'Tonic' in battle when # it performs its 'Sleep' skill. This 'skill-to-item' change would have to be # defined in either the SWITCH_SKILL_ITEM hash, or the SWITCH_ENEMY_SKILL_ITEM # hash (explained in the configuration section below). # # The enemies can either have infinite item usage, or can be limited to the no. # of items used based on the SP points at their disposal. This feature is con- # trolled by the SWITCH_SP_LIMIT value. As long as it is false, enemies can use # items without running out. But if it is true, the enemies will use up their # SP points as they use items. The SP points used will be based on the SP Cost # of the Skill it is switched from. # #------------------------------------------------------------------------------ # # COMPATABILITY: # # This system is compatible with the default battlesystem, SDK 2.2, the RTAB # system, Fomar's Action Cost, ParaDog's and XRXS's battle system in certain # limits. # # Systems that use AT bars (everything except the 'default' and 'SDK default' # battlesystems) must have the SWITCH_SP_LIMIT value set to 'false'. All other # systems either use up the enemy sp through repeated calls of the make_action # def as their AT gauges are filled, or uses values other than sp_cost. # # In short, the 'SWITCH_SP_LIMIT' value can only be 'true' if you're using the # default or SDK default battlesystems. # #============================================================================== #======================================================================== # ** C O N F I G U R A T I O N S Y S T E M ** # #======================================================================== # This constant holds the list of skills and items they are switched with. It # is in the following format: { skill.id => item.id, skill.id => item.id,... } # The sample currently switches the "Heal" skill with the "Sharp Stone" item, # and the "Greater Heal" with the "Potion" item. SWITCH_SKILL_ITEM = {1 => 13, 2 => 1} # This constant holds the lists of skills & items switched for each enemy that # uses them. The format to apply the switch mimics the design to the one above: # { enemy.id => ( skill.id => item.id), enemy.id =>{ skill.id => item.id},... } # The sample currently switches the "Mass Heal" skill with the "Tonic" item for # the GHOST enemy, and changes the "Heal" skill with the "Barrier Stone" item # for the BASILISK enemy. SWITCH_ENEMY_SKILL_ITEM = { 1 => {3 => 9}, 2 => {1 => 14}} # This merely determines if you limit the items based on Skill SP cost. If this # is true, then the enemy must have enough SP to use the original skill before # the item is used. If it is false, then the enemy has an infinite supply. SWITCH_SP_LIMIT = false #============================================================================== # ** Game_Enemy #------------------------------------------------------------------------------ # This class handles enemies. It's used within the Game_Troop class # ($game_troop). #============================================================================== class Game_Enemy < Game_Battler #-------------------------------------------------------------------------- # * Make Action #-------------------------------------------------------------------------- alias item_make_action make_action def make_action item_make_action temp_hash = {} switch_id = self.current_action.skill_id # Sets the Skill Limiting switch if the SWITCH_SP_LIMIT is true. # If true, this sets 'sp_limted' to true if SP is too low for item use. if SWITCH_SP_LIMIT if $data_skills[switch_id].sp_cost > self.sp sp_limited = true else sp_limited = nil end else sp_limited = nil end # Perform Skill/Item switch if 'sp_limited' switch isn't true. # It won't be true if there's enough SP, or if SWITCH_SP_LIMITED is false. if !sp_limited if SWITCH_SKILL_ITEM.include? switch_id self.current_action.kind = 2 self.current_action.item_id = SWITCH_SKILL_ITEM[switch_id] self.current_action.decide_random_target_for_enemy end temp_hash = SWITCH_ENEMY_SKILL_ITEM[self.id] if SWITCH_ENEMY_SKILL_ITEM.include? self.id if temp_hash.include? switch_id self.current_action.kind = 2 self.current_action.item_id = temp_hash[switch_id] self.current_action.decide_random_target_for_enemy end end # Use up SP (If SWITCH_SP_LIMIT is true) if SWITCH_SP_LIMIT self.sp =- $data_skills[switch_id].sp_cost end end end #============================================================================== # ** Scene_Battle #------------------------------------------------------------------------------ # This class performs battle screen processing. #============================================================================== class Scene_Battle #-------------------------------------------------------------------------- # * Make Item Action Results #-------------------------------------------------------------------------- alias e_make_item_action_result make_item_action_result def make_item_action_result(battler = @active_battler) @rtab = !@target_battlers if @active_battler.is_a?(Game_Actor) @rtab ? e_make_item_action_result(battler) : e_make_item_action_result else # Get item @item = $data_items[battler.current_action.item_id] if @rtab # Setting animation ID battler.anime1 = @item.animation1_id battler.anime2 = @item.animation2_id # Setting common event ID battler.event = @item.common_event_id else # 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 end # Deciding the object index = battler.current_action.target_index target = $game_party.smooth_target_actor(index) if @rtab # Setting the object side battler set_target_battlers(@item.scope, battler) # Applying the effect of the item for target in battler.target target.item_effect(@item, battler) end else # Set targeted battlers set_target_battlers(@item.scope) # Apply item effect for target in @target_battlers target.item_effect(@item) end end end end end -
Nome Script: Hero Name Input RMXP Versione: N/D Autore/i: Zarethal Informazioni: Potrebbe essere capitato a qualcuno di voi, nell'utilizzare Rpg Maker XP, di non riuscire a vedere durante il gioco nessuna lettera durante l'inserimento del nome dell'eroe (Hero Name Input), questo potrebbe essere dovuto a qualche sostituzione o mancanza di fonts che il programma usa come standard. Per rimediare a questo fastidioso problema, ho postato qui una versione leggermente modificata da me dello script standard, in modo che i caratteri siano facilmente visualizzabili per chiunque abbia riscontrato problemi. Istruzioni: Attenzione: Non va creato un altro script sopra Main, dovete copiare tutto il contenuto riportato qui sotto e sostituire per intero lo script "Window_NameInput". Script: #============================================================================== # ■ Window_NameInput #------------------------------------------------------------------------------ # EDITED BY ZARETHAL #============================================================================== class Window_NameInput < Window_Base CHARACTER_TABLE = [ "A","B","C","D","E", "F","G","H","I","J", "K","L","M","N","O", "P","Q","R","S","T", "U","V","W","X","Y", "Z","","","","", "","","","","", "", "" ,"", "" ,"", "","","","","", "", "" ,"", "" ,"", "","","","","", "","","","","", "","","","","", "","","","","", "","","","","", "","","","","", "","","","","", "","", "" , "" , "" , "a","b","c","d","e", "f","g","h","i","j", "k","l","m","n","o", "p","q","r","s","t", "u","v","w","x","y", "z","","","","", "","","","","", "", "" ,"", "" ,"", "","","","","", "", "" ,"", "" ,"", "","","","","", "","","","","", "","","","","", "","","","","", "","","","","", "","","","","", "","","","","", "","", "" , "" , "" , ] #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize super(0, 128, 640, 352) self.contents = Bitmap.new(width - 32, height - 32) @index = 0 refresh update_cursor_rect end #-------------------------------------------------------------------------- # ● 文字の取得 #-------------------------------------------------------------------------- def character return CHARACTER_TABLE[@index] end #-------------------------------------------------------------------------- # ● FONT DEI CARATTERI #-------------------------------------------------------------------------- def refresh self.contents.font.name = $fontface self.contents.font.size = $fontsize self.contents.clear for i in 0..179 x = 4 + i / 5 / 9 * 152 + i % 5 * 28 y = i / 5 % 9 * 32 self.contents.draw_text(x, y, 28, 32, CHARACTER_TABLE[i], 1) end self.contents.draw_text(544, 9 * 32, 64, 32, "OK", 1) end #-------------------------------------------------------------------------- # ● カーソルの矩形更新 #-------------------------------------------------------------------------- def update_cursor_rect # カーソル位置が [決定] の場合 if @index >= 180 self.cursor_rect.set(544, 9 * 32, 64, 32) # カーソル位置が [決定] 以外の場合 else x = 4 + @index / 5 / 9 * 152 + @index % 5 * 28 y = @index / 5 % 9 * 32 self.cursor_rect.set(x, y, 28, 32) end end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update super # カーソル位置が [決定] の場合 if @index >= 180 # カーソル下 if Input.trigger?(Input::DOWN) $game_system.se_play($data_system.cursor_se) @index -= 180 end # カーソル上 if Input.repeat?(Input::UP) $game_system.se_play($data_system.cursor_se) @index -= 180 - 40 end # カーソル位置が [決定] 以外の場合 else # 方向ボタンの右が押された場合 if Input.repeat?(Input::RIGHT) # 押下状態がリピートでない場合か、 # カーソル位置が右端ではない場合 if Input.trigger?(Input::RIGHT) or @index / 45 < 3 or @index % 5 < 4 # カーソルを右に移動 $game_system.se_play($data_system.cursor_se) if @index % 5 < 4 @index += 1 else @index += 45 - 4 end if @index >= 180 @index -= 180 end end end # 方向ボタンの左が押された場合 if Input.repeat?(Input::LEFT) # 押下状態がリピートでない場合か、 # カーソル位置が左端ではない場合 if Input.trigger?(Input::LEFT) or @index / 45 > 0 or @index % 5 > 0 # カーソルを左に移動 $game_system.se_play($data_system.cursor_se) if @index % 5 > 0 @index -= 1 else @index -= 45 - 4 end if @index < 0 @index += 180 end end end # 方向ボタンの下が押された場合 if Input.repeat?(Input::DOWN) # カーソルを下に移動 $game_system.se_play($data_system.cursor_se) if @index % 45 < 40 @index += 5 else @index += 180 - 40 end end # 方向ボタンの上が押された場合 if Input.repeat?(Input::UP) # 押下状態がリピートでない場合か、 # カーソル位置が上端ではない場合 if Input.trigger?(Input::UP) or @index % 45 >= 5 # カーソルを上に移動 $game_system.se_play($data_system.cursor_se) if @index % 45 >= 5 @index -= 5 else @index += 180 end end end # L ボタンか R ボタンが押された場合 if Input.repeat?(Input::L) or Input.repeat?(Input::R) # ひらがな / カタカナ 移動 $game_system.se_play($data_system.cursor_se) if @index / 45 < 2 @index += 90 else @index -= 90 end end end update_cursor_rect end end Note dell'autore:Spero sia stato d'aiuto a qualcuno ^^ (anche se sarebbe meglio se a nessuno succeda questo errore xD)
-
Nome Script: Hearts of Iron 3 Quick Menù Versione: 1.1 Autore/i: Tigurus Fay Informazioni: Lo script aggiunge un Menù rapido che consente di accedere rapidamente a una certa difficoltà, scenario, bonus, ecc... Istruzioni: Istruzioni e script all'interno della demo. Demo: http://www.mediafire.com/?m6iki63em5o8ed1 Incompatibilità: Non testato con lo script SDK.
-
Nome Script: Title Skip 3 Versione: N/D Autore/i: PK8 Informazioni: A differenza di molti script che danno l'opportunità di creare un proprio titolo ad eventi su mappa, i metodi vengono sovrascritti, mentre in questo si mantiene un'integrità sul codice in modo da essere compatibile con il restante degli script presenti sul proprio progetto. Istruzioni: Inserite lo script sopra Main. Le istruzioni sono all'interno dello script. Script: =begin Title Skip 3 (RMXP) by PK8 Created: 8/7/2012 - 8/8/2012 (XP), 8/9/2012 (VX), 8/10/2012 (Ace) Modified: --/--/---- ────────────────────────────────────────────────────────────────────────────── ■ Author's Notes The goal behind this version of my Title Skip script was to make sure I wasn't overriding any of RPG Maker's default methods. It was a pretty tough challenge so I had to come up with some odd ideas to pull it off. The trick here wasn't to skip the title screen, but to nullify several elements of the title screen such as visuals and audio. To do this, I needed to find a way to make the title scene automatically use the command_new_game method without making a sound while hiding the title graphic and the command window. It turns out that I had to make the @command_window and @sprite instance variables of Scene_Title accessible, alias the Initialize method of Window_Command to include an if conditional to check if $scene is a Scene_Title for the purpose of making @command_window and @sprite invisible. I'm not so sure if this works with the SDK but if it does then colour me surprised! I'm proud of this considering that unlike my last two versions of this script, this is NOT a rewrite of Scene_Title. ────────────────────────────────────────────────────────────────────────────── ■ Introduction If you're familiar with Title Skip scripts, you should be familiar with the functionality here and the opportunity such scripts allows for developers to build their own introductions. Unlike most Title Skip scripts (and even my older ones), no methods were overwritten. ────────────────────────────────────────────────────────────────────────────── ■ Features o No overwritten methods, ensuring decent compatibility. (It's not so much a feature, but I'd like to think of it as a selling point.) o You can battle test. (Certain Title Skip scripts do not do this.) o Seemingly a standard in Title Skip scripts, this script will now launch the Scene_Load scene should it detect a saved file. It can be turned off. ────────────────────────────────────────────────────────────────────────────── ■ Methods Aliased Game_Temp.initialize Window_Command.initialize Scene_Title.update Scene_Title.command_new_game ────────────────────────────────────────────────────────────────────────────── ■ Changelog v1 (01/05/2007): My first Title Skip script. It was a direct edit of Scene_Title. I didn't know how to script at the time. v2 (07/08/2008): It was an improvement over the first in that it wasn't a direct edit of the script, and it featured the option of going straight into the debug screen (which I'm not proud of implementing). v3 (08/07/2012): My third Title Skip script. For this attempt, I wanted to rewrite as very little of Scene_Title as possible, which was hard but I think I pulled it off. This drops the "Skip to Debug" option that was available in v2 and adds the "Skip to Continue" option that seems to be a standard in other Title Skip scripts. =end #============================================================================== # ** Configuration #============================================================================== module PK8 class Title_Skip #-------------------------------------------------------------------------- # * General Settings #-------------------------------------------------------------------------- # Turn script on (true) or off (false). Switch = true # Head to the Load scene before starting a new game? yes (true)/no (false) Continue_First = true end end #============================================================================== # ** Scene_Title #------------------------------------------------------------------------------ # This class performs title screen processing. #============================================================================== class Scene_Title #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_accessor :sprite, :command_window #-------------------------------------------------------------------------- # * Alias Listings #-------------------------------------------------------------------------- unless method_defined?(:pk8_titleskip_update) alias_method(:pk8_titleskip_update, :update) alias_method(:pk8_titleskip_command_new_game, :command_new_game) end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update pk8_titleskip_update command_new_game if PK8::Title_Skip::Switch == true end #-------------------------------------------------------------------------- # * Command: New Game (aliased method) #-------------------------------------------------------------------------- def command_new_game if PK8::Title_Skip::Switch == true # Temporarily replaces Decision sound effect with nothing. decision_se = $data_system.decision_se.name $data_system.decision_se.name = "" end # Start regular command_new_game method pk8_titleskip_command_new_game if PK8::Title_Skip::Switch == true # Gives the game back its Title BGM. (See Game Temp below) $data_system.title_bgm.name = $game_temp.title_bgm $game_temp.title_bgm = nil # Decision sound effect is back $data_system.decision_se.name = decision_se # If developer wants to head to Scene_Load before starting a new game. if PK8::Title_Skip::Continue_First == true # Nullifying $game_map.autoplay $game_system.bgm_stop Audio.bgs_stop # Checks @continue_enabled and sets a flag when going to Scene_Load. if @continue_enabled and $game_temp.titleskip_loadattempt == nil $game_temp.titleskip_loadattempt = true $scene = Scene_Load.new else $game_temp.titleskip_loadattempt = nil $game_map.autoplay end end end end end #============================================================================== # ** Window_Command #------------------------------------------------------------------------------ # This window deals with general command choices. #============================================================================== class Window_Command < Window_Selectable #-------------------------------------------------------------------------- # * Alias Listings #-------------------------------------------------------------------------- unless method_defined?(:pk8_titleskip_initialize) alias_method(:pk8_titleskip_initialize, :initialize) end #-------------------------------------------------------------------------- # * Object Initialization (aliased method) # width : window width # commands : command text string array #-------------------------------------------------------------------------- def initialize(*args) pk8_titleskip_initialize(*args) # Checks if $scene is Scene_Title to remove visibility of sprite and window. if PK8::Title_Skip::Switch == true if $scene.is_a?(Scene_Title) self.visible = false $scene.sprite.visible = false if $scene.sprite != nil end end end end #============================================================================== # ** Game_Temp #------------------------------------------------------------------------------ # This class handles temporary data that is not included with save data. # Refer to "$game_temp" for the instance of this class. #============================================================================== class Game_Temp #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_accessor :titleskip_loadattempt, :title_bgm #-------------------------------------------------------------------------- # * Alias Listings #-------------------------------------------------------------------------- unless method_defined?(:pk8_titleskip_initialize) alias_method(:pk8_titleskip_initialize, :initialize) end #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize pk8_titleskip_initialize if PK8::Title_Skip::Switch == true @titleskip_loadattempt = nil if $scene.is_a?(Scene_Title) @title_bgm = $data_system.title_bgm.name $data_system.title_bgm.name = "" end end end end Incompatibilità:Incompatibilità probabilmente con l'SDK.
-
BS/Battlers Addon Modify Battler Collapse Effect
Ally ha aggiunto un topic in Scripts RPG Maker XP (RGSS)
Nome Script: Modify Battler Collapse Effect Versione: 1.1 Autore/i: PK8 Informazioni: Questo script permette di modificare l'effetto 'morte' dei mostri al momento del K.O con altri effetti che non sono quelli dei default. Istruzioni: Inserite lo script sopra Main. Le configurazioni sono all'interno dello script. E' possibile provare le varie configurazioni anche in modalità Test. Script: =begin ╔══════════════════════════════════════════════════════════════════════════════╗ ║ Modify Battler Collapse Effect 1.1 (formerly known as Battler Collapse Color)║ ║ by PK8 ║ ║ Created: 11/18/2009 ║ ║ Modified: 4/2/2012 ║ ╟──────────────────────────────────────────────────────────────────────────────╢ ║ ■ Table of Contents ║ ║ ○ Author's Notes - Line 15-17 ║ ║ ○ Introduction & Description - Line 19-21 ║ ║ ○ Features - Line 23,24 ║ ║ ○ Methods Aliased - Line 26,27 ║ ║ ○ Thanks - Line 29,30 ║ ║ ○ Changelog - Line 32-35 ║ ╟──────────────────────────────────────────────────────────────────────────────╢ ║ ■ Author's Note ║ ║ When I first wrote the script a few years ago, it was moreorless me trying to║ ║ see what else I could do in scripting. I was running out of ideas at the time║ ╟──────────────────────────────────────────────────────────────────────────────╢ ║ ■ Introduction & Description ║ ║ This script lets you modify the blend type, color, duration, and animation ║ ║ of the Collapse effect. ║ ╟──────────────────────────────────────────────────────────────────────────────╢ ║ ■ Features ║ ║ Modify color, blend type, duration, and animation of the collapse effect. ║ ╟──────────────────────────────────────────────────────────────────────────────╢ ║ ■ Methods Aliased ║ ║ ● collapse of Sprite < ::Sprite class in the RPG module. ║ ╟──────────────────────────────────────────────────────────────────────────────╢ ║ ■ Thanks ║ ║ Yeyinde helped me fix the stacking error by telling me to use method_defined ║ ╟──────────────────────────────────────────────────────────────────────────────╢ ║ ■ Changelog (MM/DD/YYYY) ║ ║ v1.0.0 (11/18/2009) - Initial release. ║ ║ v1.0.1 (11/18/2009) - Fixed stacking error. ║ ║ v1.1 (4/2/2012) - Recoded settings, added Flag & Animation settings, new name║ ╚══════════════════════════════════════════════════════════════════════════════╝ =end module PK8 class Collapse Animation_Flag = true # Turn on Animation Animation = 33 # Animation ID for the Collapse effect Blend_Flag = true # Turn New Blend Type on or off Blend = 1 # Blend Type Color_Flag = true # Turn New Colors on or off Color_Red = 255 # Amount of Red in the Collapse color Color_Green = 0 # Amount of Green in the Collapse color Color_Blue = 230 # Amount of Blue in the Collapse color Color_Alpha = 255 # Amount of Opacity in the Collapse color Duration_Flag = true # Turn New Fade Duration on or off Duration = 40 # Set new duration of fade end end #=============================================================================== # * RPG Module, Sprite Class. #=============================================================================== module RPG class Sprite < ::Sprite #--------------------------------------------------------------------------- # * Alias Listings #--------------------------------------------------------------------------- unless method_defined?(:pk8_newcollapse_collapse) alias_method(:pk8_newcollapse_collapse, :collapse) end #--------------------------------------------------------------------------- # * Collapse #--------------------------------------------------------------------------- def collapse pk8_newcollapse_collapse if PK8::Collapse::Animation_Flag == true self.animation($data_animations[PK8::Collapse::Animation], true) end if PK8::Collapse::Blend_Flag == true self.blend_type = PK8::Collapse::Blend end if PK8::Collapse::Color_Flag == true self.color.set(PK8::Collapse::Color_Red, PK8::Collapse::Color_Green, PK8::Collapse::Color_Blue, PK8::Collapse::Color_Alpha) end if PK8::Collapse::Duration_Flag == true @_collapse_duration = PK8::Collapse::Duration end end end end Note dell'autore:Per un uso commerciale, chiedere il permesso all'autore. -
Nome Script: Equipment Requirements Versione: 1.2 Autore/i: Ayene Informazioni: Lo script permette di impostare i requisiti per armi e armature. Per esempio, equipaggiare un eroe con ascia a due mani sarebbe possibile solo dopo aver raggiunto un determinato livello o se dispone di statistiche adeguate. Inoltre ha aggiunto un opzione che permette di richiedere determinate abilità. Features: - Semplice da configurare - Finestra che mostra se le statistiche sono troppo basse e quali competenze sono necessarie - Viene mostrata l'abilità che può essere attivata e disattivata Istruzioni: Per utilizzare lo script è sufficiente configurare i requisiti di seguito (separatamente per ogni arma e armatura), secondo questo codice: WEAPON [weapon ID] = [lv, maxhp, maxsp, str, dex, agi, int, [skill_id, skill_id, ...]] Esempio:Se si vuole equipaggiare un personaggio con un'arma dal 2° al 6° livello, a condizione che abbia max 120 HP, 40 forza, 70 intelligenza, guardate come riferimento questo codice: WEAPON [2] = [6, 120, 0, 40, 0, 0, 70, []] Successivamente, per equipaggiare un armatura ID 3, che "richiede" l'agilità e le impostazioni degli ID 10 e 40, fate in questo modo: ARMOR [3] = [0, 0, 0, 0, 70, 0, 0, [10, 40]] Script: #=================================================================== # Equipment Requirements [XP] # by Ayene # 26.03.2010 ver 1.2 # www.ultimateam.pl #=================================================================== # Opis: # The script allows you to set requirements for weapon and armor. # For instance, outfitting a hero with two-handed axe would be possible # only after reaching a specific level or having adequate statistics. # Also added an option that allows to require certain skills. # # Instruction: # To use the script simply configure requirements below (separately for each # weapon and armor), according to the formula: # # WEAPON [weapon ID] = [lv, maxhp, maxsp, str, dex, agi, int, [skill_id, skill_id, ...]] # # For example: # If you want a character to equip a weapon ID 2 at level 6, provided that # it has 120 max HP, 40 strength, 70 intelligence, # type in configuration below: # WEAPON [2] = [6, 120, 0, 40, 0, 0, 70, []] # Next, to equip an armor ID 3, which "requires" adequate agility # and knowledge of the skill ID 10 and 40, type: # ARMOR [3] = [0, 0, 0, 0, 70, 0, 0, [10, 40]] # #=================================================================== # CONFIGURATION module AYENE module EQUIP_REQ WEAPON = [] ARMOR = [] # ~~~~~~~~~~~~~~~~~BRONIE~~~~~~~~~~~~~~~~ # WEAPON [weapon ID] = [lv, maxhp, maxsp, str, dex, agi, int, [skill_id, skill_id, ...]] WEAPON[1] = [2, 10, 10, 10, 10, 10, 10, [4]] WEAPON[3] = [3, 500, 20, 0, 0, 0, 0, []] # ~~~~~~~~~~~~~~~~PANCERZE~~~~~~~~~~~~~~~~ # ARMOR [armor ID] = [lv, maxhp, maxsp, str, dex, agi, int, [skill_id, skill_id, ...]] ARMOR[2] = [1, 300, 0, 0, 0, 0, 0, []] ARMOR[3] = [3, 400, 0, 0, 0, 0, 0, []] ACC_TEXT = "Your stats are too low to equip this item." PARAM_NAMES = ["Level", "Max HP", "Max SP", "Strength", "Dexterity", "Agility", "Intelligence", "Skills:"] SHOW_SKILL_REQ = true # Show which skill is needed? WLH = 32 # Line Height in Requirements Window end end #=================================================================== # Game_Actor #=================================================================== class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # * Determine if Item can be Equiped (Actor's Parameters) # stat : stats #-------------------------------------------------------------------------- def equip_allowed?(stat) return true if stat[0] <= level && stat[1] <= base_maxhp && stat[2] <= base_maxsp && stat[3] <= base_str && stat[4] <= base_dex && stat[5] <= base_agi && stat[6] <= base_int && equip_skill_allowed?(stat) return false end #-------------------------------------------------------------------------- # * Determine if Item can be Equiped (Actor's Skills ) # stat : stats #-------------------------------------------------------------------------- def equip_skill_allowed?(stat) return true if stat[7].empty? stat[7].each{|skill_id| return false if !skill_learn?(skill_id) } return true end end #=================================================================== # Window_Help #=================================================================== class Window_EquipReq < Window_Base include AYENE::EQUIP_REQ #-------------------------------------------------------------------------- # * Object Initialization # item : item # data : parameters (array) # actor : actor # skill : skill #-------------------------------------------------------------------------- def initialize(item, data, actor, skill) if skill.empty? or !SHOW_SKILL_REQ height = (data.size+1) / 2 * WLH + WLH + 32 else height = (data.size+1) / 2 * WLH + WLH + 32 + WLH * [skill.size, 7].min end super(100, 200 - height/2, 460, height) self.contents = Bitmap.new(width - 32, height - 32) self.z = 1000 self.opacity = 255 self.contents.font.color = crisis_color self.contents.draw_text(4, 0, self.width - 40, WLH, ACC_TEXT, 1) x = 10 y = WLH data.each_with_index{|array, i| self.contents.font.color = system_color self.contents.draw_text(x+i%2*240, y+i/2*WLH, 200, WLH, PARAM_NAMES[array[0]].to_s, 0) self.contents.font.color = normal_color self.contents.draw_text(x+120+i%2*240, y+i/2*WLH, 40, WLH, array[1].to_s, 2) } if !skill.empty? and SHOW_SKILL_REQ size = (data.size+1)/2*WLH self.contents.font.color = system_color self.contents.draw_text(x, y+size, 200, WLH, PARAM_NAMES[7].to_s, 0) self.contents.font.color = normal_color skill.each_with_index{|id, i| self.contents.draw_text(x+140, y+size+WLH*i, 200, WLH, "- #{$data_skills[id].name}", 0) } end end end #=================================================================== # Scene_Equip #=================================================================== class Scene_Equip include AYENE::EQUIP_REQ #-------------------------------------------------------------------------- # * Aliased Definitions #-------------------------------------------------------------------------- alias ayene_item_stats_sceq_update update alias ayene_item_stats_sceq_update_item update_item #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update @req_window != nil ? update_spec_selection : ayene_item_stats_sceq_update end #-------------------------------------------------------------------------- # * Frame Update (when item window is active) #-------------------------------------------------------------------------- def update_item @stat = nil item = @item_window.item case item when RPG::Weapon @stat = WEAPON[item.id] else @stat = ARMOR[item.id] end unless @stat == nil if Input.trigger?(Input::C) && [email protected]_allowed?(@stat) $game_system.se_play($data_system.buzzer_se) @item_window.active = false show_spec_window return end end ayene_item_stats_sceq_update_item end #-------------------------------------------------------------------------- # * Frame Update (when requirements window is active) #-------------------------------------------------------------------------- def update_spec_selection @frame < 100 ? @frame += 1 : @frame = 0 if @frame == 100 or Input.trigger?(Input::C) or Input.trigger?(Input:: @req_window.dispose @req_window = nil @item_window.active = true end end #-------------------------------------------------------------------------- # * Show Requirements Window #-------------------------------------------------------------------------- def show_spec_window @frame = 0 data = [] @stat.each_with_index {|value, type| data.push([type, value]) if value > 0 if type < 7 } data.sort!{|a,b| a[0] <=> b[0]} skill = @stat[7] @req_window = Window_EquipReq.new(@item, data, @actor, skill) end end #=================================================================== # Game_Interpreter #=================================================================== class Interpreter include AYENE::EQUIP_REQ #-------------------------------------------------------------------------- # * Aliased Definitions #-------------------------------------------------------------------------- alias aye_command_315 command_315 alias aye_command_316 command_316 alias aye_command_317 command_317 alias aye_command_318 command_318 #-------------------------------------------------------------------------- # * Change EXP #-------------------------------------------------------------------------- def command_315 aye_command_315 iterate_actor(@parameters[0]) do |actor| check_change_equip(actor) end end #-------------------------------------------------------------------------- # * Change Level #-------------------------------------------------------------------------- def command_316 aye_command_316 iterate_actor(@parameters[0]) do |actor| check_change_equip(actor) end end #-------------------------------------------------------------------------- # * Change Parameters #-------------------------------------------------------------------------- def command_317 aye_command_317 iterate_actor(@parameters[0]) do |actor| check_change_equip(actor) end end #-------------------------------------------------------------------------- # * Change Skills #-------------------------------------------------------------------------- def command_318 aye_command_318 iterate_actor(@parameters[0]) do |actor| check_change_equip(actor) end end #-------------------------------------------------------------------------- # * Check Equipment # actor : actor #-------------------------------------------------------------------------- def check_change_equip(actor) for i in 0..4 case i when 0 item = $data_weapons[actor.weapon_id] stat = WEAPON[item.id] when 1 item = $data_armors[actor.armor1_id] stat = ARMOR[item.id] when 2 item = $data_armors[actor.armor2_id] stat = ARMOR[item.id] when 3 item = $data_armors[actor.armor3_id] stat = ARMOR[item.id] when 4 item = $data_armors[actor.armor4_id] stat = ARMOR[item.id] end actor.equip(i, 0) if !stat.nil? && !actor.equip_allowed?(stat) end end end
-
Nome Script: Original Diablo Starter Kit Versione: 1 Autore/i: Sprugles555(Per aver messo insieme gli script e creato il kit),Mr.Mo,Aleworks,Selwin,Trickster,Arevulopapo,Peter O.,Moghunter,DarkSchneider,Dargor,Mr_Smith Informazioni: Kit preparato per creare giochi in stile Diablo. L'autore ha messo insieme vari script che vanno infine a comporre questo kit. Screenshots: Istruzioni: Istruzioni nella demo Demo: https://rapidshare.com/#!download|555p4|165048106|Original_Diablo_Starter_kit.rar|2695|0|0 Incompatibilità: N/D
-
Titolo: Kingdom Hearts ABS Versione: N/D Autore/i: Sephiroth Spawn Informazioni: ABS che riprende lo stile di battaglia del famoso Kingdom Hearts Istruzioni: All'interno della Demo Demo: http://www.mediafire.com/?uokhs0g535cac73
-
Titolo: Tales of Symphonia menù Versione: 2.4.3 Autore/i: Vash Informazioni: Script che permette di avere un menù stile tales of symphonia Istruzioni: Semplicemente copiare ed incollare il tales of symphonia menù sopra main e copiare le icone richieste nella vostra cartella icons Demo: http://www.mediafire.com/?axjjgy7a6wfsnwc Incompatibilita: Avendo la finestra save e status modificata può causare problemi con chi usa altri sistemi di status o save.
-
Nome Script: Some Popup Versione: 2.8 Autore/i: mikb89 Informazioni: Con questo script potrete specificare del testo in un evento che verrà mostrato quando il giocatore si avvicina. Features: Sono disponibili diversi effetti di comparsa ed è possibile utilizzare picture anziché testo. Il testo può essere mostrato, oltre che sul giocatore, anche agganciato all'evento, per scomparire quando questo si allontana. È possibile riprodurre un suono SE, ME, BGM e BGS, sia generico che personalizzato per evento. Screenshots: Istruzioni: Inserite lo script sotto Materials. Le istruzioni sono fra i commenti. Script Demo: Demo multilingua v. 2.8 (800.43 KB) http://www.mediafire.com/?mmg50jxofjq9jtl Incompatibilità: Sovrascrive lo script per la camminata in 8 direzioni. O viene sovrascritto, a seconda. Per ovviare, questo script è stato incorporato ed è attivabile/disattivabile tramite opzione. Note dell'autore: Ringrazio Unamuno per aver chiesto la versione VX altrimenti non l'avrei postata né convertita e Guardian of Irael per avermi suggerito molti miglioramenti.
-
Nome Script: Fire Emblem Starter Kit Versione: 1.0.1 Autore/i: mechacrash, Eivien, Ryethe, Paradox, Woratana, Zeriab, Hiretsukan, Cowlol, Dargor, poccil, ERZENGEL, Informazioni: Uno Starter Kit che riprende alla perfezione Fire Emblem! Assolutamente da provare! Screenshots: Istruzioni: Tutto il necessario è all'interno dello Starter Kit Demo: http://www.bwdyeti.com/FEXP/FEXP-1_0_1.rar
-
Titolo: Mini HUD Versione: N/D Autore/i: topinhobr Informazioni: Un mini hud semplice,ma carino ^^ Istruzioni: Inserite lo script sopra Main... Script: #=============================================================================# # Nome do Script: Mini-HUD # # Desenvolvido por: topinhobr # # Ajude-me doando créditos. # #=============================================================================# # Créditos também a: dodoop. # # por postar o tutorial. # #=============================================================================# class Hud < Window_Base #-------------------------------------------------------------------------- # * Inicialização dos objetos #-------------------------------------------------------------------------- def initialize super(1, 0, 640, 49) #Selecionar a Window Skin self.windowskin = RPG::Cache.windowskin('modern-blue Kitty_F') #Criar Bitmap self.contents = Bitmap.new(width - 32, height - 32) #Posição Z self.z = 100 #Adquirir conteúdos get_contents #Atualiza e adiciona o conteúdo da janela refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh #Limpa o Bitmap self.contents.clear #Adiciona o Conteúdo add_contents end #-------------------------------------------------------------------------- # * Adicionando o Conteúdo da Janela no add_contents #-------------------------------------------------------------------------- def add_contents #Get all the contents for cont in @content next if cont == nil #If the content is a text if cont.is_a?(Game_Text) # Add the text add_text(cont.text,cont.x,cont.y,cont.w,cont.h,cont.size,cont.color,cont.bol,cont.it) elsif cont.is_a?(Game_Bar) # Add Bar draw_bar_type(cont.x, cont.y, cont.min, cont.max, cont.file, cont.w , cont.h, cont.hue, cont.back, cont.back2, cont.view) elsif cont.is_a?(Game_HpBar) #Draw HP Bar draw_actor_hp(cont.actor, cont.x, cont.y, cont.w, cont.file) elsif cont.is_a?(Game_SpBar) #Draw Sp Bar draw_actor_sp(cont.actor, cont.x, cont.y, cont.w, cont.file) elsif cont.is_a?(Game_ExpBar) #Draw Exp Bar draw_actor_exp(cont.actor, cont.x, cont.y, cont.w, cont.file) elsif cont.is_a?(Game_ParaBar) #Draw Para Bar draw_actor_parameter(cont.actor, cont.x, cont.y, cont.type, cont.file) elsif cont.is_a?(Game_Pic) #Draw Picture add_picture(cont.file,cont.x,cont.y,cont.w,cont.h) elsif cont.is_a?(Game_CharacterSet) #Draw Characterset add_characterset(cont.file,cont.x,cont.y,cont.dir,cont.h,cont.w,cont.hue) elsif cont.is_a?(Game_Bat) #Draw Game Battler add_battler(cont.file,cont.x,cont.y,cont.w,cont.h,cont.hue) elsif cont.is_a?(Game_AcCharacterSet) #Draw Characterset add_characterset(cont.file,cont.x,cont.y,cont.dir,cont.h,cont.w,cont.hue) elsif cont.is_a?(Game_AcBat) #Draw Game Battler add_battler(cont.file,cont.x,cont.y,cont.w,cont.h,cont.hue) elsif cont.is_a?(Game_Icon) #Draw Icon add_icon(cont.file,cont.x,cont.y,cont.w,cont.h) end end end #-------------------------------------------------------------------------- # * Criando conteúdos da janela no get_contents #-------------------------------------------------------------------------- def get_contents #Set the content array @content = [] #Salvar Conteúdo: HP Bar @content[0] = Game_HpBar.new(10,-8,144,12,1,'Database','014-Reds01') #Salvar Conteúdo: SP Bar @content[1] = Game_SpBar.new(168,-8,144,12,1,'Database','013-Blues01') #Salvar Conteúdo: EXP Bar @content[2] = Game_ExpBar.new(316,-8,144,12,1,'Database','015-Greens01') end end #Esse script coloca a janela da hud na tela! class Scene_Map alias hud_main main def main @Hud = Hud.new hud_main @Hud.dispose end alias hud_update update def update hud_update @Hud.update @Hud.refresh end end
-
Titolo: Sistema Coltivazione Versione: N/D Autore/i: RTH Informazioni: Script che implementa 3 funzioni: - Sistema Tempo Avanzato (giorno e notte) - Sistema coltivazione - Sistema orologio su schermo Istruzioni: All'interno della Demo Demo: http://www.4shared.com/file/20507290/c8 ... a_2_0.html
-
Titolo: Corsa e Velocità Versione: N/D Autore/i: FantasyX2 Informazioni: Semplicissimo script che permette di fare correre il pg e di poterne cambiare la velocità ^^ Istruzioni: Inserite lo script sopra Main. Correre: SHIFT Cambiare velocità: fate riferimento alle righe 17 - 19 Script: #----------------------------------------------------- # # Criado por FantasyX2 # #----------------------------------------------------- class Game_Character attr_accessor :move_speed end class Scene_Map alias new_update update def update new_update if Input.press?(Input::SHIFT) $game_player.move_speed = 3 else $game_player.move_speed = 2 end end end
-
Nome Script: Zelda engine final beta 4 Versione: 4 Autore/i: leggi sotto Informazioni: Salve oggi pomeriggio guardavo un forum inglese è ho scoperto che il team che aveva vreato lo starter kit di zelda ha rilasciato una versione da paura con questa confronto la prima potete creare un vero e proprio gioco di zelda guardate gli screen... -Siamo molto lieti di aggiornare il "Progetto Motore Zelda - Zelda la Starter Kit" per la comunità dei giocatori di avere finalmente la possibilità di creare il proprio personale giochi di Zelda, tthat può essere utilizzato per l'intrattenimento personale e per motivi nostalgici, e lasciare che la Zelda i fan hanno un gioco completo strumento di elaborazione con cui giocare, nel tempo libero! Noi, gruppo di sviluppo del progetto Zelda Engine, sostengono, nessuno dei crediti sul "Progetto Motore Zelda - Zelda Starter Kit" oltre il lavoro della comunità su di esso e del materiale / spirituale contributo ad essa, che appartiene al loro creatori corrispondente. I titoli e dei marchi, invece, appartengono ai rispettivi proprietari ed autori: Tutti i crediti per la creazione e lo sviluppo originale del "Progetto Motore Zelda - Zelda The Starter Kit" andare a Mastermind, e il suo team di sviluppo. Tutti i crediti per l'RPG Maker XP andare a Enterbrain, che ha tutti i diritti per essa riservati. E tutti i crediti per The Legend of Zelda andare a Nintendo Co., Ltd. (Il nome "Zelda", naturalmente, non è una denominazione protetta, perché esisteva molto prima della nascita del gioco del nome stesso. Ma il Zelda logo del gioco, i personaggi, storia, musica, grafica, ecc, tutti appartengono a Nintendo e solo. le idee dei giochi di Zelda sono tutelati come bene. sua una "proprietà intellettuale" di Nintendo, che ha tutti i diritti riservati.). E, infine, tutti gli sprite in più, la grafica o file audio che vengono dalla rete, sono accreditati ai loro creatori / autori. Se qualcuno vuole vedere il suo nome elencato nella lista crediti, per il contributo dei suoi materiali al progetto Motore di Zelda, per favore, sentitevi liberi di darmi una notifica e sarò lieto di aggiungere i crediti il prima possibile! E circa l'attuale team di sviluppo del motore del progetto di Zelda, abbiamo davvero non vogliamo alcun credito a tutti, oltre il nostro lavoro e il contributo ad esso, come ad esempio gli script e la grafica facciamo per questo che sono accreditati per noi. Screenshots: Istruzioni: all'interno della demo Demo: http://www.mediafire.com/download/d7ud1f275bacn90/The+Legend+of+Zelda+%28Project+Zelda%29.7z Incompatibilità: N/D
-
Nome Script: Ombre sotto il font Versione: 1.0 Autore/i: Saul Informazioni: Come dice il titolo, questo script permette di inserire un ombra sotto i caratteri. Come in RPG Maker VX. Istruzioni: Nessuna istruzione, basta inserire lo script sopra il Main. Script: #=============================================================================== # Ombra sotto il font v 1.0 # 23/06/11 #=============================================================================== module Ombra_testo Ombra_Font = true # Se è true, verrà attivata l'ombra, se false, ovviamente no. end #=============================================================================== # IF: L'ombra del font è attiva. #=============================================================================== if Ombra_testo::Ombra_Font #=============================================================================== class Bitmap if not method_defined?('original_draw_text') alias Ombra_testo_original_draw_text draw_text def draw_text(*arg) original_color = self.font.color.dup self.font.color = Color.new(0, 0, 0, 128) if arg[0].is_a?(Rect) arg[0].x += 2 arg[0].y += 2 self.Ombra_testo_original_draw_text(*arg) arg[0].x -= 2 arg[0].y -= 2 else arg[0] += 2 arg[1] += 2 self.Ombra_testo_original_draw_text(*arg) arg[0] -= 2 arg[1] -= 2 end self.font.color = original_color self.Ombra_testo_original_draw_text(*arg) end end end end
-
Nome Script: Modifica RGB ai chara Versione: N/D Autore/i: Nechigawara Sanzenin Informazioni: Script che con dei commenti cambia il colore RGB e Alpha degli eventi =) Istruzioni: Inserite lo script sopra Main. Per cambiare colore a un evento, inserite un commento con i seguenti comandi: Praticamente funziona come il cambio di tonalità all'interno del tool per quanto riguarda le picture, mentre questa da la possibilità di cambiarlo ai chara durante il gioco. Script: #======================================== # Edit Character Channel # By Nechigawara Sanzenin #======================================== =begin Edit Charater Color in Map How to Use : Add these text to comment in the event page [r.....] For Red Channal ( -255 to 255 ) [g....] For Green Channal ( -255 to 255 ) [b....] For Blue Channal ( -255 to 255 ) [al...] For Alpha Channal ( 0 to 255 ) =end class Game_Character attr_accessor :tone #-------------------------------------------------------------------------- # - Object initialization #-------------------------------------------------------------------------- alias inc_initialize initialize def initialize inc_initialize @tone = [0,0,0,0] end end #============================================================================== class Game_Event < Game_Character alias inc_update update def update # check Code for i in [email protected] next if @list[i].code != 108 # For Red Channel if @list[i].parameters[0].include?("[r") text = @list[i].parameters[0].scan(/[r([-,0-9]+)]/) red = $1.to_i if red > 255 red = 255 elsif red < -255 red = -255 end @tone[0] = red end # For Green Channel if @list[i].parameters[0].include?("[g") text = @list[i].parameters[0].scan(/[g([-,0-9]+)]/) green = $1.to_i if green > 255 green = 255 elsif green < -255 green = -255 end @tone[1] = green end # For Blue Channel if @list[i].parameters[0].include?("[b") text = @list[i].parameters[0].scan(/[b([-,0-9]+)]/) blue = $1.to_i if blue > 255 blue = 255 elsif blue < -255 blue = -255 end @tone[2] = blue end # For Alpha Channel if @list[i].parameters[0].include?("[al") text = @list[i].parameters[0].scan(/[al([0-9]+)]/) alpha = $1.to_i if alpha > 255 alpha = 255 elsif alpha < 0 alpha = 0 end @tone[3] = alpha end end #Load Orginal Update inc_update end end #============================================================================== class Sprite_Character < RPG::Sprite #-------------------------------------------------------------------------- # - Frame renewal #-------------------------------------------------------------------------- def update super @character.update self.tone.set(@character.tone[0],@character.tone[1],@character.tone[2],@character.tone[3]) # When tile ID and file name, either one of hue differs from present ones if @tile_id != @character.tile_id or @character_name != @character.character_name or @character_hue != @character.character_hue # Tile ID and file name, remembering hue @tile_id = @character.tile_id @character_name = @character.character_name @character_hue = @character.character_hue # When it is the value whose tile ID is effective if @tile_id >= 384 self.bitmap = RPG::Cache.tile($game_map.tileset_name, @tile_id, @character.character_hue) self.src_rect.set(0, 0, 32, 32) self.ox = 16 self.oy = 32 # When it is the value whose tile ID is invalid else self.bitmap = RPG::Cache.character(@character.character_name, @character.character_hue) @cw = bitmap.width / 4 @ch = bitmap.height / 4 self.ox = @cw / 2 self.oy = @ch end end # Setting visible state self.visible = (not @character.transparent) # When graphics is the character if @tile_id == 0 # Setting transfer original rectangle sx = @character.pattern * @cw sy = (@character.direction - 2) / 2 * @ch self.src_rect.set(sx, sy, @cw, @ch) end # Setting the coordinate of sprite self.x = @character.screen_x self.y = @character.screen_y self.z = @character.screen_z(@ch) # Opacity, synthetic method, setting thicket depth self.opacity = @character.opacity self.blend_type = @character.blend_type self.bush_depth = @character.bush_depth # Animation if @character.animation_id != 0 animation = $data_animations[@character.animation_id] animation(animation, true) @character.animation_id = 0 end end end
-
Nome Script: Danni Limitati Versione: 1.00 Autore/i: Synthesize Informazioni: Uqesto script da la possibilità di impostare un adanno minimo e massimo di un attacco singolo. Istruzioni: Inserite lo script sopra Main. Istruzioni all'interno dello script. Script: #============================================================================ # Limiting Damage #---------------------------------------------------------------------------- # Written by Synthesize # Version 100 # October 1st, 2007 #============================================================================ # Compatibility: # Rewrites: # Game_Battler::attack_effect # Game_Battler::skill_effect #-------------------------------------------------------------------------- # Begin Customization Section #-------------------------------------------------------------------------- module LimitDamage Maximum_Damage = 9999 Minimum_Damage = 1 Maximum_SkillDamage = 9999 Minimum_SkillDamage = 1 # Change these values to your expected setting. # Note: By default minimum damage is 0. end #-------------------------------------------------------------------------- # End Customization Section #-------------------------------------------------------------------------- # Begin Game_Battler Rewrite #-------------------------------------------------------------------------- class Game_Battler def attack_effect(attacker) # Clear critical flag self.critical = false # First hit detection hit_result = (rand(100) < attacker.hit) # If hit occurs if hit_result == true # Calculate basic damage atk = [attacker.atk - self.pdef / 2, 0].max self.damage = atk * (20 + attacker.str) / 20 # Element correction self.damage *= elements_correct(attacker.element_set) self.damage /= 100 # If damage value is strictly positive if self.damage > 0 # Critical correction if rand(100) < 4 * attacker.dex / self.agi self.damage *= 2 self.critical = true end # Guard correction if self.guarding? self.damage /= 2 end end # Dispersion if self.damage.abs > 0 amp = [self.damage.abs * 15 / 100, 1].max self.damage += rand(amp+1) + rand(amp+1) - amp end # Second hit detection eva = 8 * self.agi / attacker.dex + self.eva hit = self.damage < 0 ? 100 : 100 - eva hit = self.cant_evade? ? 100 : hit hit_result = (rand(100) < hit) end # If hit occurs if hit_result == true # State Removed by Shock remove_states_shock # Substract damage from HP if self.damage < LimitDamage::Minimum_Damage self.damage = LimitDamage::Minimum_Damage elsif self.damage > LimitDamage::Maximum_Damage self.damage = LimitDamage::Maximum_Damage end self.hp -= self.damage # State change @state_changed = false states_plus(attacker.plus_state_set) states_minus(attacker.minus_state_set) # When missing else # Set damage to "Miss" self.damage = "Miss" # Clear critical flag self.critical = false end # End Method return true end #--------------------------------------------------------------------- # Begin Skill Adjustment #--------------------------------------------------------------------- def skill_effect(user, skill) # Clear critical flag self.critical = false # If skill scope is for ally with 1 or more HP, and your own HP = 0, # or skill scope is for ally with 0, and your own HP = 1 or more if ((skill.scope == 3 or skill.scope == 4) and self.hp == 0) or ((skill.scope == 5 or skill.scope == 6) and self.hp >= 1) # End Method return false end # Clear effective flag effective = false # Set effective flag if common ID is effective effective |= skill.common_event_id > 0 # First hit detection hit = skill.hit if skill.atk_f > 0 hit *= user.hit / 100 end hit_result = (rand(100) < hit) # Set effective flag if skill is uncertain effective |= hit < 100 # If hit occurs if hit_result == true # Calculate power power = skill.power + user.atk * skill.atk_f / 100 if power > 0 power -= self.pdef * skill.pdef_f / 200 power -= self.mdef * skill.mdef_f / 200 power = [power, 0].max end # Calculate rate rate = 20 rate += (user.str * skill.str_f / 100) rate += (user.dex * skill.dex_f / 100) rate += (user.agi * skill.agi_f / 100) rate += (user.int * skill.int_f / 100) # Calculate basic damage self.damage = power * rate / 20 # Element correction self.damage *= elements_correct(skill.element_set) self.damage /= 100 # If damage value is strictly positive if self.damage > 0 # Guard correction if self.guarding? self.damage /= 2 end end # Dispersion if skill.variance > 0 and self.damage.abs > 0 amp = [self.damage.abs * skill.variance / 100, 1].max self.damage += rand(amp+1) + rand(amp+1) - amp end # Second hit detection eva = 8 * self.agi / user.dex + self.eva hit = self.damage < 0 ? 100 : 100 - eva * skill.eva_f / 100 hit = self.cant_evade? ? 100 : hit hit_result = (rand(100) < hit) # Set effective flag if skill is uncertain effective |= hit < 100 end # If hit occurs if hit_result == true # If physical attack has power other than 0 if skill.power != 0 and skill.atk_f > 0 # State Removed by Shock remove_states_shock # Set to effective flag effective = true end # Substract damage from HP if self.damage < LimitDamage::Minimum_SkillDamage self.damage = LimitDamage::Minimum_SkillDamage elsif self.damage > LimitDamage::Maximum_SkillDamage self.damage = LimitDamage::Maximum_SkillDamage end last_hp = self.hp self.hp -= self.damage effective |= self.hp != last_hp # State change @state_changed = false effective |= states_plus(skill.plus_state_set) effective |= states_minus(skill.minus_state_set) # If power is 0 if skill.power == 0 # Set damage to an empty string self.damage = "" # If state is unchanged unless @state_changed # Set damage to "Miss" self.damage = "Miss" end end # If miss occurs else # Set damage to "Miss" self.damage = "Miss" end # If not in battle unless $game_temp.in_battle # Set damage to nil self.damage = nil end # End Method return effective end end #============================================================================ # Written by Synthesize # Special Thanks: Peter for the request #---------------------------------------------------------------------------- # Limiting Damage #============================================================================
-
Nome Script: Window_NomeMappa Versione: 1.0 Autore/i: Melosx Informazioni: Aggiunge una window per mostrare il nome della mappa in cui vi trovate. Istruzioni: Copiare sopra Main. Script: #============================================================================= # ** Window_NomeMappa #============================================================================= # Autore: Melosx # Versione: 1.0 # Data di creazione: 7-9-2011 => v1.0 # # Descrizione: # # Aggiunge una window per mostrare il nome della mappa in cui vi trovate. # # Istruzioni: # # Copiate lo Script sopra Main. # #============================================================================= class Window_NomeMappa < Window_Base def initialize super(0, 320, 182, 64) self.contents = Bitmap.new(width - 32, height - 32) refresh end def update refresh if @map != $game_map.map_name end def refresh self.contents.clear self.contents.font.size = 18 @map = $game_map.map_name text = @map self.contents.draw_text(30, 0, 122, 32, text, 0) end end #============================================================================= # ** Game_Map #============================================================================= class Game_Map def map_name infos = load_data('Data/MapInfos.rxdata') return infos[@map_id].name end end #============================================================================= # ** Scene_Menu #============================================================================= class Scene_Menu alias area_name_main main unless $@ alias area_name_updt update unless $@ def main @areaname_window = Window_NomeMappa.new @areaname_window.visible = true area_name_main @areaname_window.dispose end def update area_name_updt @areaname_window.update end end
-
Nome Script: Script Cursore Versione: N/D Autore/i: Selwyn Informazioni: Script che aggiunge un cursore come succede nei giochi di Final Fantasy. Istruzioni: Inserite lo script sopra Main. Aggiungete poi questa immagine nella cartella Pictures del vostro progetto: Script: #============================================================================== # ■Cursor Script #------------------------------------------------------------------------------ #  Script to display a cursor instead of a highlight box # by Selwyn # [email protected] #============================================================================== #============================================================================== # ■Cursor_Sprite #============================================================================== class Sprite_Cursor < Sprite #-------------------------------------------------------------------------- # ◠instances #-------------------------------------------------------------------------- attr_accessor :true_x attr_accessor :true_y #-------------------------------------------------------------------------- # ◠initialize #-------------------------------------------------------------------------- def initialize(x = 0, y = 0) super() self.x = @true_x = x self.y = @true_y = y self.z = 10000 self.bitmap = RPG::Cache.picture("cursor") rescue Bitmap.new(32, 32) end #-------------------------------------------------------------------------- # ◠update #-------------------------------------------------------------------------- def update super if self.y < @true_y n = (@true_y - self.y) / 3 n = 1 if n == 0 self.y += n elsif self.y > @true_y n = (self.y - @true_y) / 3 n = 1 if n == 0 self.y -= n end if self.x < @true_x n = (@true_x - self.<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt=':doute2' /> / 3 n = 1 if n == 0 self.x += n elsif self.x > @true_x n = (self.x - @true_<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt='X)' /> / 3 n = 1 if n == 0 self.x -= n end end end #============================================================================== # ■Window_Selectable #============================================================================== class Window_Selectable < Window_Base #-------------------------------------------------------------------------- # ◠instances #-------------------------------------------------------------------------- attr_accessor :cursor alias initialize_cursor initialize alias update_cursor_moves update alias dispose_cursor dispose #-------------------------------------------------------------------------- # ◠initialize #-------------------------------------------------------------------------- def initialize(x, y, width, height) initialize_cursor(x, y, width, height) @cursor = Sprite_Cursor.new(x, y) update_cursor end #-------------------------------------------------------------------------- # ◠x= #-------------------------------------------------------------------------- def x=(<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt='X)' /> super @cursor.x = x if [email protected]? end #-------------------------------------------------------------------------- # ◠y= #-------------------------------------------------------------------------- def y= super @cursor.y = y if [email protected]? end #-------------------------------------------------------------------------- # ◠visible= #-------------------------------------------------------------------------- def visible=(visible) super if [email protected]? and visible == false @cursor.visible = false end end #-------------------------------------------------------------------------- # ◠dispose #-------------------------------------------------------------------------- def dispose dispose_cursor @cursor.dispose end #-------------------------------------------------------------------------- # ◠update_cursor_rect #-------------------------------------------------------------------------- def update_cursor_rect if @index < 0 self.cursor_rect.empty return end row = @index / @column_max if row < self.top_row self.top_row = row end if row > self.top_row + (self.page_row_max - 1) self.top_row = row - (self.page_row_max - 1) end cursor_width = self.width / @column_max - 32 x = @index % @column_max * (cursor_width + 32) y = @index / @column_max * 32 - self.oy self.cursor_rect.set(x, y, cursor_width, 32) end #-------------------------------------------------------------------------- # ◠update_cursor #-------------------------------------------------------------------------- def update_cursor @cursor.true_x = self.cursor_rect.x + self.x - 8 @cursor.true_y = self.cursor_rect.y + self.y + 16 @cursor.update @cursor.visible = (self.visible and self.index >= 0) end #-------------------------------------------------------------------------- # ◠update #-------------------------------------------------------------------------- def update update_cursor_moves update_cursor end end
-
Nome Script: Game Over in base al livello Versione: Ember Autore/i: N/D Informazioni: Questo script semplicissimo permette di avere un Game Over diverso che dipenderà dal livello attuale dell'eroe. Istruzioni: Trovate questa riga in Scene_Gameover: [c]@sprite.bitmap = RPG::Cache.gameover($data_system.gameover_name)[/c] e sostituitela con lo script postato di seguito. Le immagini dei nuovi Gameover dovranno chiamarsi 1, 2, 3, 4, oppure potete cambiarne il nome direttamente negli script. Come avrete intuito, le immagini dovranno essere inserite nella cartella dei Gameover. Script: #=============================================================================== #Gameover Screen Based on Level Script #By: Eccid #With help fromn kaito #Edited to gameover by Sam Drew #------------------------------------------------------------------------------- #---Start Edit--- case $game_actors[1].level#finds actor level when 1 ... 24#When actor level is... @sprite.bitmap = RPG::Cache.gameover("1.png")#Show gameover when 25 ... 49 @sprite.bitmap = RPG::Cache.gameover("2.png") when 50 ... 74 @sprite.bitmap = RPG::Cache.gameover("3.png") when 75 ... 100 @sprite.bitmap = RPG::Cache.gameover("4.png") end else @sprite.bitmap = RPG::Cache.gameover("1.png")#set regular gameover end #---End Edit--- #===============================================================================