Sleeping Leonhart
Utenti-
Posts
569 -
Joined
-
Last visited
Sleeping Leonhart's Achievements
Animatore (4/7)
-
Allora quel 99 non ha un significato particolare, ovvero, serve solamente a dire "guarda che non ci sono scelte" e quindi è stato messo un valore fuori scala (maggiore di 3 in quanto le righe massime sono 4, da 0 a 3) , al posto di 99 poteva esserci anche 77 per farti capire e non sarebbe cambiato niente. Buona fortuna con il Vocabolario Tematico
-
@Squall errore opposto a quello di Hash if $fame == 10$fameswitch == false #<===== un solo = non 2end non si setta mai a falso così @Lomax Ebbene si mi stai antipatico e non ti rispondo Scherzi a parte non ho guardato tutte le domande irrisolte quindi non ho visto la tua, anche se mi viene da chiederti "ma cha ca... volo ti frega a te di $game_temp.choice_start ?" Che poi neanche è detto che io lo sappia... xD Comunque serve ad impostare la riga da cui partono le scelte nei messaggi, ovvero se è settato a 0 le scelte ed il cursore partono dalla prima riga se sta a 1 partono dalla 2° e cosi via, serve in quei casi in cui c'è del testo e subito sotto delle scelte, esempi visuali http://img5.imageshack.us/img5/5510/catturaex.png $game_temp.choice_start è settato a 1 http://img196.imageshack.us/img196/2721/cattura1s.png $game_temp.choice_start è settato a 2 http://img819.imageshack.us/img819/9709/cattura3j.png caso assurdo in cui ho forzato $game_temp.choice_start a 1 quando in realtà dovrebbe stare a 2. Spero di aver reso il concetto
-
@Squall Devi usare il metodo refresh, ma non chiamarlo continuamente poichè ridisegnare continuamente la grafica consuma risorse, ti conviene fare una cosa del tipo def update#roba varia if FAME != VECCHIAFAME @window_hudfame.refresh VECCHIAFAME = FAME end#roba variaend Anche se eviterei di usare FAME che è una costante, ti converrebbe crearti un variabile in Game_Actors oppure utilizzare una variabile degli eventi ($game_variables per intenderci) @Hash Hai toppato tutte le if in quanto hai fatto una associazione (un solo simbolo =) e non un confronto (==) correggi e dovresti aver risolto
-
Per Squall: Non hai inizializzato lo sprite, devi fare una cosa del tipo @barra = Sprite.new if FAME == 0 @barra.bitmap = Bitmap.new("Graphics/Pictures/Stanchezza_0.png") end ma se hai creato una finestra a questo punto ti conviene disegnarci direttamente sopra con blt, ad esempio class Window_HUD < Window_Base def initialize super(0, 0, 240, 480) self.contents = Bitmap.new(width - 32, height - 32) refresh end def refresh self.contents.clear @hud = Bitmap.new("Graphics/Pictures/Stanchezza_#{FAME}") self.contents.blt(0, 0, @hud, @hud.rect) #i parametri di blt sono x, y, src_bitmap, src_rect, opacity(opzionale) endend Per Hash: Mi ricordo di aver postato da qualche parte questo numerorandom = ((rand(valore) + (Time.now.sec * valore / 60.0)) / 2).ceil che sfruttava i secondi del pc per aiutare a "randomizzare", ovviamente è un po come barare e non è neanche così random però puoi fare una prova PS: sono vivo ma su internet un pochino di meno
-
*UCM - Universal Customizable Menu
Sleeping Leonhart replied to Sleeping Leonhart's topic in Scripts RGSS (XP)
Allora nella parte delle finestre c'è questo pezzo di codice self.contents.font.color = system_color self.contents.draw_text(x, y, 120, 32, parameter_name) self.contents.font.color = normal_color self.contents.draw_text(x + 88, y, 36, 32, parameter_value.to_s, 2) Dove c'è scritto system_color è il colore del nome della statisca dove c'è normal_color è il colore del valore. Puoi sostituirli con Color.new(R, V, B), R V B sono rispettivamente rosso verde e blu in una quantità che va da 0 a 255. -
Se devi aprire un file con il suo programma predefinito puoi usare questo: def call_extfile(filename) bfflnght = 80 path = " " * bfflnght Win32API.new("kernel32","GetWindowsDirectory",['P','N'],'N').call(path, bfflnght) if FileTest.exist?(filename) system(path.gsub(/\0.*$/) {} + "explorer.exe", filename) else p "Impossibile trovare il file " + filename endend Lo incolli sopra al Main e quando vuoi aprire un file esterno usi: call_extfile(NOMEFILE) NOMEFILE (è una stringa e va tra "" in più gli \ devi metterne due per farne uno) può essere un percorso assoluto (ad esempio D:\\Documenti\\Banana.pdf) o relativo (ad esempio Graphics\\Pictures\\Mango.jpg) Il gioco si ferma, la musica credo di no, puoi ovviare azzitandola prima di chiamare il comando e facendola ripartire poi.
-
Aggiornato di nuovo, come accennato le nuove aggiunte sono Aggiunti i codici \M, \T, \E, \O e \Icon \M usato all'interno di un Mostra Messaggio fa apparire un balloon (invece del messaggio) \T imposta il tipo di fumetto (o meglio la codina che lo collega al personaggio) \E imposta l'evento sopra cui appare il balloon, se omesso va sopra l'evento che richiama il comando e con 0 va sopra l'eroe \O cambia l'opacità del balloon \Icon disegna un icona. \M \T e \E si usano solo da Mostra Messaggio Nome della skin impostabile a piacere (in VX il Balloon è già usato :P). Il testo è colorabile attraverso i codici esadecimali, quindi usando \C si può inserire al suo interno un codice esadecimale come quelli usati per l'html (tipo #00AAFF). Spostata la gestione dei balloon su Sprite_Character (più logico oltre a risolvere alcuni problemi) Anche la versione XP è aggionata ;)
-
Sono lieto che tu sia lieto Per quanto riguardo la domanda... Si precisamente, per VX i colori della Windowskin e nell'XP quelli definiti ìn Window_Base anche se volendo posso fare in modo di fare usare i codici dei colori esadecimali (quelli che si usano nel web, roba tipo #AFAFAF). Stavo pensando di far inserire i messaggi dei balloon grazie ad un normale Mostra Messaggio, magari preceduto da uno \B per fargli capire che è indirizzato al balloon e non alla finestra dei messaggi normali. Ovviamente poi servirebbe comunque un delete_balloon oppure bisognerebbe impostarlo su autochiusura :P Ovviamente lascierei anche il metodo classico che può essere utile in diversi casi.
-
*UCM - Universal Customizable Menu
Sleeping Leonhart replied to Sleeping Leonhart's topic in Scripts RGSS (XP)
Scusa ma non è che ci sono sempre, inoltre il topic non me lo dava come da leggere. Il codice è molto vecchio e ci sono molti errori di gioventù, dovrei rifarlo ma aimè non ho ne il tempo ne la voglia. Allora, per la finestra di status sostituisci il codice della parte riguardante le finestre con questa class Game_Actor < Game_Battler def now_exp return @exp - @exp_list[@level] end def next_exp return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0 endend class Window_Base < Window def draw_actor_face(actor, x, y) bitmap = RPG::Cache.character("Face/"+actor.character_name, actor.character_hue) cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect) end def draw_actor_battler(actor, x, y) bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue) cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x, y, bitmap, src_rect) end def draw_actor_battler_trunc(actor, x, y) bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue) cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0+cw/8, 0, 80, ch) self.contents.blt(x, y, bitmap, src_rect) end def draw_actor_exps(actor, x, y) self.contents.font.color = system_color self.contents.draw_text(x, y, 28, 32, "Exp") self.contents.font.color = normal_color if actor.now_exp != 0 text = (actor.now_exp.to_f / actor.next_exp.to_f)*100.00 text = text.round else text = 0 end self.contents.draw_text(x + 40, y, 84, 32, text.to_s+"%") end def draw_actor_parameter(actor, x, y, type) case type when 0 parameter_name = $data_system.words.atk parameter_value = actor.atk when 1 parameter_name = $data_system.words.pdef parameter_value = actor.pdef when 2 parameter_name = $data_system.words.mdef parameter_value = actor.mdef when 3 parameter_name = $data_system.words.str parameter_value = actor.str when 4 parameter_name = $data_system.words.dex parameter_value = actor.dex when 5 parameter_name = $data_system.words.agi parameter_value = actor.agi when 6 parameter_name = $data_system.words.int parameter_value = actor.int when 7 parameter_name = "Evasione" parameter_value = actor.eva end self.contents.font.color = system_color self.contents.draw_text(x, y, 120, 32, parameter_name) self.contents.font.color = normal_color self.contents.draw_text(x + 88, y, 36, 32, parameter_value.to_s, 2) endend class Window_Selectable < Window_Base def command(index = self.index) return @commands[index] end def commands=(commands) return if @commands == commands @commands = commands item_max = @item_max @item_max = @commands.size @column_max = @item_max unless item_max == @item_max unless self.contents.nil? self.contents.dispose self.contents = nil end self.contents = Bitmap.new(@item_max * (width - 32), height - 32) end refresh endend class Window_MenuCommandVert < Window_Selectable def initialize super(0, 0, 160, COMMAND_SETUP.size * 32 + 32) @item_max = COMMAND_SETUP.size @commands = COMMAND_SETUP self.contents = Bitmap.new(width - 32, @item_max * 32) if COMMAND_PICTURE != "" @picture = Sprite.new @picture.bitmap = RPG::Cache.picture("Menu/" + COMMAND_PICTURE) @picture.x = 480 @picture.y = 640 @picture.bitmap.hue_change($game_system.skin_hue.to_i) self.opacity = 0 else self.opacity = COMMAND_WINDOW[3] end refresh self.index = 0 end def refresh self.contents.clear for i in 0...@item_max draw_item(i, normal_color) end end alias tslums_menucmdv_update update def update if COMMAND_PICTURE != "" @picture.x = self.x @picture.y = self.y end tslums_menucmdv_update end def draw_item(index, color) self.contents.font.color = color if ICON rect = Rect.new(24, 32 * index, self.contents.width - 8, 32) self.contents.fill_rect(rect, Color.new(18, 0, 0, 0)) bitmap = RPG::Cache.icon(COMMAND_SETUP[index]) self.contents.blt(0, 32*index, bitmap, Rect.new(0, 0, 24, 24)) else rect = Rect.new(4, 32 * index, self.contents.width - 8, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) end self.contents.draw_text(rect, @commands[index]) end def disable_item(index) draw_item(index, disabled_color) endend class Window_MenuCommandHoriz < Window_Selectable def initialize if COMMAND_SETUP.size > 6 super(COMMAND_WINDOW[1], COMMAND_WINDOW[2], 640, 96) else super(COMMAND_WINDOW[1], COMMAND_WINDOW[2], 640, 64) end self.contents = Bitmap.new(width - 32, height - 32) @item_max = COMMAND_SETUP.size if COMMAND_SETUP.size > 6 @column_max = 6 @row_max = 2 else @column_max = COMMAND_SETUP.size @row_max = 1 end @commands = COMMAND_SETUP @c_spacing = (640 - 32) if COMMAND_PICTURE != "" @picture = Sprite.new @picture.bitmap = RPG::Cache.picture("Menu/" + COMMAND_PICTURE) @picture.x = 480 @picture.y = 640 @picture.bitmap.hue_change($game_system.skin_hue.to_i) self.opacity = 0 else self.opacity = COMMAND_WINDOW[3] end refresh self.index = 0 end alias tslums_menucmd_update update def update if COMMAND_PICTURE != "" @picture.x = self.x @picture.y = self.y end tslums_menucmd_update end def refresh self.contents.clear for i in 0...@item_max draw_item(i, system_color) end end def draw_item(index, color) cursor_width = self.width / @column_max - 32 x = 4 + index % @column_max * (cursor_width + 32) y = index / @column_max * 32 rect = Rect.new(x, y, self.width / @column_max - 32, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) if ICON bitmap = RPG::Cache.icon(COMMAND_SETUP[index]) self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24)) self.contents.draw_text(16+x, y, cursor_width, 32, @commands[index], 0) else self.contents.draw_text(x, y, cursor_width, 32, @commands[index], 0) end end def disable_item(index) draw_item(index, disabled_color) endend class Window_Steps < Window_Base def initialize super(STEP_WINDOW[1], STEP_WINDOW[2], STEP_WINDOW[5], STEP_WINDOW[6]) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.size = STEP_WINDOW[7] if STEP_PICTURE != "" @picture = Sprite.new @picture.bitmap = RPG::Cache.picture("Menu/" + STEP_PICTURE) @picture.x = 640 @picture.y = 480 @picture.bitmap.hue_change($game_system.skin_hue.to_i) self.opacity = 0 else self.opacity = STEP_WINDOW[3] end refresh if STEP_ICON != "" bitmap = RPG::Cache.icon(STEP_ICON) self.contents.blt(0, STEP_WINDOW[7] + 4, bitmap, Rect.new(0, 0, 24, 24)) end end alias tslums_step_update update def update if STEP_PICTURE != "" @picture.x = self.x @picture.y = self.y end tslums_step_update end def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, 0, STEP_WINDOW[5]-40, 32, "Passi") self.contents.font.color = normal_color self.contents.draw_text(4, STEP_WINDOW[7], STEP_WINDOW[5]-40, 32, $game_party.steps.to_s, 2) endend class Game_Map def name $map_infos[@map_id] endendclass Scene_Title $map_infos = load_data("Data/MapInfos.rxdata") for key in $map_infos.keys $map_infos[key] = $map_infos[key].name endendclass Window_Location < Window_Base def initialize super(LOCATION_WINDOW[1], LOCATION_WINDOW[2], LOCATION_WINDOW[5], LOCATION_WINDOW[6]) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.size = LOCATION_WINDOW[7] if LOCATION_PICTURE != "" @picture = Sprite.new @picture.bitmap = RPG::Cache.picture("Menu/" + LOCATION_PICTURE) @picture.x = 640 @picture.y = 480 @picture.bitmap.hue_change($game_system.skin_hue.to_i) self.opacity = 0 else self.opacity = LOCATION_WINDOW[3] end refresh end def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(0 , 0, LOCATION_WINDOW[5], 32, "Luogo") self.contents.font.color = normal_color self.contents.draw_text(0 , LOCATION_WINDOW[7], LOCATION_WINDOW[5], 32, $game_map.name) end alias tslums_loc_update update def update if LOCATION_PICTURE != "" @picture.x = self.x @picture.y = self.y end tslums_loc_update endend class Window_Gold < Window_Base def initialize super(GOLD_WINDOW[1], GOLD_WINDOW[2], GOLD_WINDOW[5], GOLD_WINDOW[6]) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.size = GOLD_WINDOW[7] if GOLD_PICTURE != "" @picture = Sprite.new @picture.bitmap = Bitmap.new("Graphics/Pictures/Menu/" + GOLD_PICTURE) @picture.x = 640 @picture.y = 480 @picture.bitmap.hue_change($game_system.skin_hue.to_i) self.opacity = 0 else self.opacity = GOLD_WINDOW[3] end refresh if GOLD_ICON != "" bitmap = RPG::Cache.icon(GOLD_ICON) self.contents.blt(0, 0 + 4, bitmap, Rect.new(0, 0, 24, 24)) end end alias tslums_gold_update update def update if GOLD_PICTURE != "" @picture.x = self.x @picture.y = self.y end tslums_gold_update endend class Window_PlayTime < Window_Base def initialize super(TIME_WINDOW[1], TIME_WINDOW[2], TIME_WINDOW[5], TIME_WINDOW[6]) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.size = TIME_WINDOW[7] if TIME_PICTURE != "" @picture = Sprite.new @picture.bitmap = RPG::Cache.picture("Menu/" + TIME_PICTURE) @picture.x = 480 @picture.y = 640 @picture.bitmap.hue_change($game_system.skin_hue) self.opacity = 0 else self.opacity = TIME_WINDOW[3] end refresh if TIME_ICON != "" bitmap = RPG::Cache.icon(TIME_ICON) self.contents.blt(0, TIME_WINDOW[7] + 4, bitmap, Rect.new(0, 0, 24, 24)) end end alias tslums_time_update update def update if TIME_PICTURE != "" @picture.x = self.x @picture.y = self.y end tslums_time_update end def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, 0, TIME_WINDOW[5]-40, 32, "Tempo di Gioco") @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, TIME_WINDOW[7], TIME_WINDOW[5]-40, 32, text, 2) endend class Window_MenuStatus < Window_Selectable def initialize super(STATUS_WINDOW[1], STATUS_WINDOW[2], 480, 96*STATUS_WINDOW_MAX_PARTY+32) if STATUS_WINDOW_PARTY_DEPENDENCY self.height = 96*$game_party.actors.size+32 end self.contents = Bitmap.new(width - 32, 96*$game_party.actors.size) if STATUS_PICTURE != "" @picture = Sprite.new @picture.bitmap = RPG::Cache.picture("Menu/" + STATUS_PICTURE) @picture.x = 640 @picture.y = 480 self.opacity = 0 else self.opacity = STATUS_WINDOW[3] end refresh self.active = false self.index = -1 end alias tslums_stat_update update def update if STATUS_PICTURE != "" @picture.x = self.x @picture.y = self.y end tslums_stat_update end def refresh self.contents.clear @item_max = $game_party.actors.size for i in 0...$game_party.actors.size x = 64 y = i * 96 actor = $game_party.actors[i] if STATUS_WINDOW[4] == "Character" draw_actor_graphic(actor, x - 40, y + 80) elsif STATUS_WINDOW[4] == "Face" draw_actor_face(actor, x-20, y + 80) end draw_actor_name(actor, x, y) draw_actor_class(actor, x + 144, y) draw_actor_level(actor, x, y + 32) draw_actor_state(actor, x + 90, y + 32) draw_actor_exp(actor, x, y + 64) draw_actor_hp(actor, x + 236, y + 32) draw_actor_sp(actor, x + 236, y + 64) end end def top_row return self.oy / 96 end def top_row=(row) if row < 0 row = 0 end if row > row_max - 1 row = row_max - 1 end self.oy = row * 96 end def page_row_max return (self.height - 32) / 96 end def update_cursor_rect super return unless self.index >= 0 self.cursor_rect.empty cursor_width = self.width / @column_max - 32 x = @index % @column_max * (cursor_width + 32) y = @index / @column_max * 96 - self.oy self.cursor_rect.set(x, y, cursor_width, 96) endend class Window_MenuStatus2 < Window_Selectable def initialize super(STATUS_WINDOW[1], STATUS_WINDOW[2], 480, 96*STATUS_WINDOW_MAX_PARTY+32) if STATUS_WINDOW_PARTY_DEPENDENCY self.height = 96*$game_party.actors.size+32 end self.contents = Bitmap.new(width - 32, height - 32) if STATUS_PICTURE != "" @picture = Sprite.new @picture.bitmap = RPG::Cache.picture("Menu/" + STATUS_PICTURE) @picture.x = 640 @picture.y = 480 self.opacity = 0 else self.opacity = STATUS_WINDOW[3] end refresh self.active = false self.index = -1 end alias tslums_stat2_update update def update if STATUS_PICTURE != "" @picture.x = self.x @picture.y = self.y end tslums_stat2_update end def refresh self.contents.clear @item_max = $game_party.actors.size for i in 0...$game_party.actors.size x = 64 y = i * 96 actor = $game_party.actors[i] if STATUS_WINDOW[4] == "Character" draw_actor_graphic(actor, x - 40, y + 80) elsif STATUS_WINDOW[4] == "Face" draw_actor_face(actor, x-10, y + 80) end self.contents.font.size = 18 draw_actor_name(actor, x, y) draw_actor_hp(actor, x + 92, y) draw_actor_sp(actor, x + 236, y) draw_actor_state(actor, x, y + 18) draw_actor_level(actor, x, y + 36) draw_actor_exps(actor, x, y + 54) draw_actor_parameter(actor, x + 92, y + 16, 0) draw_actor_parameter(actor, x + 92, y + 32, 1) draw_actor_parameter(actor, x + 92, y + 48, 2) draw_actor_parameter(actor, x + 92, y + 64, 6) draw_actor_parameter(actor, x + 236, y + 16, 3) draw_actor_parameter(actor, x + 236, y + 32, 4) draw_actor_parameter(actor, x + 236, y + 48, 5) draw_actor_parameter(actor, x + 236, y + 64, 7) end end def top_row return self.oy / 96 end def top_row=(row) if row < 0 row = 0 end if row > row_max - 1 row = row_max - 1 end self.oy = row * 96 end def page_row_max return (self.height - 32) / 96 end def update_cursor_rect super return unless self.index >= 0 self.cursor_rect.empty cursor_width = self.width / @column_max - 32 x = @index % @column_max * (cursor_width + 32) y = @index / @column_max * 96 - self.oy self.cursor_rect.set(x, y, cursor_width, 96) endend class Window_MenuStatus3 < Window_Selectable def initialize super(STATUS_WINDOW[1], STATUS_WINDOW[2], 480, 416) if STATUS_PICTURE != "" @picture = Sprite.new @picture.bitmap = RPG::Cache.picture("Menu/" + STATUS_PICTURE) @picture.x = 640 @picture.y = 480 self.opacity = 0 else self.opacity = STATUS_WINDOW[3] end @column_max = 1 refresh self.index = -1 end alias tslums_stat2_update update def update if STATUS_PICTURE != "" @picture.x = self.x @picture.y = self.y end if self.index == -1 self.oy = 0 else self.oy = self.index*416 end tslums_stat2_update end def refresh if self.contents != nil self.contents.dispose self.contents = nil end @item_max = $game_party.actors.size if @item_max > 0 self.contents = Bitmap.new(448, 416*@item_max) for i in 0...@item_max y = i * 416 actor = $game_party.actors[i] if STATUS_WINDOW[4] == "Character" draw_actor_graphic(actor, x - 40, y + 80) elsif STATUS_WINDOW[4] == "Face" draw_actor_face(actor, x-80, y+80) end draw_actor_name(actor, 4, y + 0) draw_actor_class(actor, 4 + 144, y + 0) draw_actor_level(actor, 0, y + 32) draw_actor_state(actor, 0, y + 64) draw_actor_hp(actor, 0 + 144, y + 32, 172) draw_actor_sp(actor, 0 + 144, y + 64, 172) draw_actor_parameter(actor, 0, y + 160, 0) draw_actor_parameter(actor, 0, y + 192, 1) draw_actor_parameter(actor, 0, y + 224, 2) draw_actor_parameter(actor, 0, y + 256, 3) draw_actor_parameter(actor, 0, y + 288, 4) draw_actor_parameter(actor, 0, y + 320, 5) draw_actor_parameter(actor, 0, y + 352, 6) self.contents.font.color = system_color self.contents.draw_text(0, y + 96, 80, 32, "EXP") self.contents.draw_text(144, y + 96, 80, 32, "NEXT") self.contents.font.color = normal_color self.contents.draw_text(0 + 60, y + 96, 84, 32, actor.exp_s, 2) self.contents.draw_text(144 + 60, y + 96, 84, 32, actor.next_rest_exp_s, 2) self.contents.font.color = system_color self.contents.draw_text(192, y + 160, 96, 32, "Equipaggiamento") draw_item_name($data_weapons[actor.weapon_id], 192 + 16, y + 208) draw_item_name($data_armors[actor.armor1_id], 192 + 16, y + 256) draw_item_name($data_armors[actor.armor2_id], 192 + 16, y + 304) draw_item_name($data_armors[actor.armor3_id], 192 + 16, y + 352) draw_item_name($data_armors[actor.armor4_id], 192 + 16, y + 400) end end end def update_cursor_rect self.cursor_rect.empty end end class Window_Base < Window def draw_normal_barz(x, y, type, length, thick, e1, e2, c1 = Color.new(255,0,0,255), c2 = Color.new(0,0,0,255)) if type == "horizontal" width = length height = thick self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(255, 255, 255, 255)) self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0, 255)) w = width * e1 / e2 for i in 0..height r = c1.red + (c2.red - c1.red) * (height -i)/height + 0 * i/height g = c1.green + (c2.green - c1.green) * (height -i)/height + 0 * i/height b = c1.blue + (c2.blue - c1.blue) * (height -i)/height + 0 * i/height a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height + 255 * i/height self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a)) end elsif type == "vertical" width = thick height = length self.contents.fill_rect(x-1, y - 1, width+3, height + 2, Color.new(255, 255, 255, 255)) self.contents.fill_rect(x, y, width+1, height , Color.new(0, 0, 0, 255)) h = height * e1 / e2 for i in 0..width r = c1.red + (c2.red - c1.red) * (width -i)/width + 0 * i/width g = c1.green + (c2.green - c1.green) * (width -i)/width + 0 * i/width b = c1.blue + (c2.blue - c1.blue) * (width -i)/width + 0 * i/width a = c1.alpha + (c2.alpha - c1.alpha)* (width -i)/width + 255 * i/width self.contents.fill_rect(x+i, y, 1, h, Color.new(r, g, b, a)) end end endend class Game_System alias squall_leonhart_game_system_initialize initialize attr_accessor :skin_hue attr_accessor :progress attr_accessor :killed_monster def initialize @skin_hue = 0 @progress = 0.00 @killed_monster = 0 squall_leonhart_game_system_initialize endend class Window_Progress < Window_Base def initialize super(PROGRESS_WINDOW[1], PROGRESS_WINDOW[2], PROGRESS_WINDOW[5], PROGRESS_WINDOW[6]) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.size = PROGRESS_WINDOW[7] if PROGRESS_PICTURE != "" @picture = Sprite.new @picture.bitmap = RPG::Cache.picture("Menu/" + PROGRESS_PICTURE) @picture.x = 640 @picture.y = 480 @picture.bitmap.hue_change($game_system.skin_hue) self.opacity = 0 else self.opacity = PROGRESS_WINDOW[3] end update end def update self.contents.clear if PROGRESS_PICTURE != "" @picture.x = self.x @picture.y = self.y end if PROGRESS_ICON != "" bitmap = RPG::Cache.icon(PROGRESS_ICON) self.contents.blt(0, 4, bitmap, Rect.new(0, 0, 24, 24)) end self.contents.font.color = system_color @largezzatesto = self.contents.text_size("Progresso").width self.contents.draw_text(80 - (@largezzatesto/2)- 16, -8, @largezzatesto, 32, "Progresso") if $game_system.progress >= 100 self.contents.font.color = crisis_color draw_normal_barz(80-((128/2)+15), PROGRESS_WINDOW[7], "horizontal", PROGRESS_WINDOW[5]-34, 6, $game_system.progress, 100, PROGRESS_BAR_FILLED_COLOR_1, PROGRESS_BAR_FILLED_COLOR_2) else self.contents.font.color = normal_color draw_normal_barz(80-((128/2)+15), PROGRESS_WINDOW[7], "horizontal", PROGRESS_WINDOW[5]-34, 6, $game_system.progress, 100, PROGRESS_BAR_COLOR_1, PROGRESS_BAR_COLOR_2) end @largezzatesto2 = self.contents.text_size("#{$game_system.progress.to_f} %").width self.contents.draw_text(80 - (@largezzatesto2/2) - 16, PROGRESS_WINDOW[7] - 16, 128, 32, "#{$game_system.progress.to_f} %") endend class Game_Enemy alias tsl_ums_enemy_add_state add_state def add_state(*args) tsl_ums_enemy_add_state(*args) $game_system.killed_monster += 1 if dead? endend class Window_Killed < Window_Base def initialize super(KILLED_WINDOW[1], KILLED_WINDOW[2], KILLED_WINDOW[5], KILLED_WINDOW[6]) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.size = KILLED_WINDOW[7] if KILLED_PICTURE != "" @picture = Sprite.new @picture.bitmap = RPG::Cache.picture("Menu/" + KILLED_PICTURE) @picture.x = 640 @picture.y = 480 @picture.bitmap.hue_change($game_system.skin_hue) self.opacity = 0 else self.opacity = KILLED_WINDOW[3] end update end def update self.contents.clear if KILLED_PICTURE != "" @picture.x = self.x @picture.y = self.y end if KILLED_ICON != "" bitmap = RPG::Cache.icon(KILLED_ICON) self.contents.blt(0, KILLED_WINDOW[7] + 4, bitmap, Rect.new(0, 0, 24, 24)) end self.contents.font.color = system_color self.contents.draw_text(0, 0, 128, 32, "Mostri Uccisi:") self.contents.font.color = normal_color self.contents.draw_text(0, KILLED_WINDOW[7], 128, 32, "#{$game_system.killed_monster.to_s}",2) endend Mi sembra che evessi fatto delle modifiche per il face, in questo caso devi rifarle un'altra volta. Poi sulla configurazione imposta STATUS_WINDOW_PARTY_DEPENDENCY = falseSTATUS_WINDOW_MAX_PARTY = 3 E la status window dovrebbe essere ok. Per le icone devi seguire il consiglio di guardian, quindi questo codice self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24)) ma non devi modificare gli 0 bensì la x, magari sottraendo 7 o 8 pixel, e quindi il codice diventa self.contents.blt(x - 8, y + 4, bitmap, Rect.new(0, 0, 24, 24)) Per quanto riguarda il font dipende dove lo vuoi cambiare, se è un problema di windowskin devi cambiarlo in tutto il gioco, se invece vuoi cambiarlo solo nel menu devi dire quali parti di testo vuoi che vengano colorate diversamente. Se non ti rispondo subito non uppare il topic, al massimo mandami un MP che quando vedo rispondo ;) -
Event's Balloon Descrizione Topic palesemente copiato dalla versione XP . Questo script permette di mostrare dei fumetti sopra le teste dei personaggi su mappa (eventi ed eroe). I fumetti sono indipendenti dai messaggi standard e possono esserne visualizzati molti (uno per evento) in contemporanea. Autore The Sleeping Leonhart Allegati Skin del balloon da inserire in Systemhttp://img843.imageshack.us/img843/6973/balloonz.png Template per creare un skinhttp://img227.imageshack.us/img227/5739/balloontemplate.png Piccolo screen esplicativo Potete scaricare una piccola demo di esempio da QUI (v 1.3). Ogni evento è commentato quindi se avete dei dubbi guardate al suo interno, Istruzioni per l'uso Non ha argomenti ma valgono le stesse regole di set_balloon. Si può usare: Inoltre si può impostare un balloon tramite il comando evento Mostra Messaggio utilizzando all'interno del messaggio \M. Quando si usa \M il balloon viene posizionato sopra l'evento che richiama il Mostra Messaggio, per cambiare l'evento su cui appare utillizare \E[iDEVENTO], se IDEVENTO è 0 verrà mostrato sull'eroe. Per cambiare tipo di fumetto usare \T[TIPOFUMETTO] all'interno del Mostra Messaggio. Quando si scrive all'interno del Mostra Messaggio basta un solo \ per i codici speciali. Consiglio di scaricare la demo per farsi un'idea più approfondita dei comandi. Script #==============================================================================# ** Event's Balloon#------------------------------------------------------------------------------# Autore: The Sleeping Leonhart# Versione: 1.3# Data di rilascio: 13/01/2011#------------------------------------------------------------------------------# Descrizione:# Questo script permette di mostrare dei fumetti sopra le teste dei personaggi# su mappa (eventi ed eroe).#------------------------------------------------------------------------------# Versione:# 1.0 (06/01/2011): Versione Base.# 1.1 (11/01/2011): Rimosso l'allineamento del testo.# Aggiunti i codici N C e V per avere testo dinamico.# Risolto un Bug che continuava a mostrare i balloon.# 1.2 (12/01/2011): Corretto un Bug relativo ai salvataggi.# Rimossi automaticamente i caratteri di a capo (n).# Aggiunti altri codici: B, I, G, W e P.# 1.2b (12/01/2011): Corretto un Bug di posizionamento del balloon.# 1.3 (13/01/2011): Aggiunti i codici M, T, E, O e Icon.# Nome della skin impostabile a piacere (in VX Balloon è già usato).# Spostata la gestione dei balloon su Sprite_Character.# Il testo è colorabile attraverso i codici esadecimali.#------------------------------------------------------------------------------# Istruzioni:# Create la skin per il balloon ed inseritela nella cartella Windowskin.# Per chiamare un balloon si usa il comando# set_balloon(["riga 1", "riga 2", ecc...], tipo_fumetto)# tipo_fumetto è un numero opzionale da 0 a 3, in base a come si è impostata# la skin del balloon verrà mostrato un tipo di coda diverso# Se usato all'interno di un muovi evento il comando prenderà in considerazione# l'evento specificato, se si vuole specificare il character va anteposto a set_balloon# $game_player. per l'eroe e $game_map.events[IDEVENTO]. per gli eventi.# Per cancellare un balloon si usa il comando# delete_balloon# Non ha argomenti ma valgono le stesse regole di set_balloon.# Si può usare: # N[IDEROE] per mostrare il nome dell'eroe nel database# P[IDEROE] per mostrare il nome dell'eroe nel party (partendo da 0)# C[NUMEROCOLORE] per cambiare colore al testo con i colori di default# C[#VALOREHEX] cambia colore, VALOREHEX deve essere un esadecimale a 6 cifre# V[IDVARIABILE] per mostrare il valore di una variabile# B per attivare/disattivare il grassetto# I per attivare/disattivare l'italico# G per mostrare l'oro posseduto# W[NUMEROFRAME] per chiudere automaticamente il balloon# O[OPACITA] per impostare l'opacità del balloon# Icon[INDICEICONA] per mostrare un icona# Inoltre si può impostare un balloon tramite il comando evento Mostra Messaggio# utilizzando all'interno del messaggio M.# Quando si usa M il balloon viene posizionato sopra l'evento che richiama il# Mostra Messaggio, per cambiare l'evento su cui appare utillizare E[IDEVENTO],# se IDEVENTO è 0 verrà mostrato sull'eroe. Per cambiare tipo di fumetto usare# T[TIPOFUMETTO] all'interno del Mostra Messaggio.# Quando si scrive all'interno del Mostra Messaggio basta un solo per i codici speciali.# Per personalizzare lo script andate nella sezione Configurazione.#============================================================================== #==============================================================================# Configurazione#=============================================================================module Events_Balloon #========================================================================= # Line_Spacing: Imposta lo spazio tra un riga di test e l'altra #------------------------------------------------------------------------- # Sintassi: # Line_Spacing = size # Parametri: # size: numero di pixel che intercorrono tra due linee di testo #========================================================================= Line_Spacing = 12 #========================================================================= # Font_Name: Imposta il font usato per il balloon #------------------------------------------------------------------------- # Sintassi: # Font_Name = font # Parametri: # font: nome del font da utilizzare #========================================================================= Font_Name = "Times New Roman" #========================================================================= # Font_Size: Imposta la dimensione del font usato per il balloon #------------------------------------------------------------------------- # Sintassi: # Font_Size = size # Parametri: # size: dimensione del font da utilizzare #========================================================================= Font_Size = 12 #========================================================================= # Balloon_Opacity: Imposta l'opacità del balloon #------------------------------------------------------------------------- # Sintassi: # Balloon_Opacity = opacity # Parametri: # opacity: da 0(completamente trasparente) a 255(completamente opaco) #========================================================================= Balloon_Opacity = 192 #========================================================================= # Balloon_Skin: Imposta la skin del baloon #------------------------------------------------------------------------- # Sintassi: # Balloon_Skin = skin # Parametri: # skin: nome del file da inserire in System #========================================================================= Balloon_Skin = "MBalloon"end #==============================================================================# ** Game_Character#------------------------------------------------------------------------------# Questa classe si occupa dei characters. E' useta come superclasse per le# classi Game_Player e Game_Event.#==============================================================================class Game_Character #-------------------------------------------------------------------------- # * Variabili d'istanza pubbliche #-------------------------------------------------------------------------- attr_reader :balloon #-------------------------------------------------------------------------- # * Aliasing dei metodi #-------------------------------------------------------------------------- alias tslvntsblln_gmchrctr_init initialize #-------------------------------------------------------------------------- # * Inizializza la classe #-------------------------------------------------------------------------- def initialize #Richiama il metodo originale tslvntsblln_gmchrctr_init @balloon = [nil, nil] end #-------------------------------------------------------------------------- # * Imposta il balloon #-------------------------------------------------------------------------- def set_balloon(text, type = 0) #Cancella il balloon delete_balloon #E ne imposta uno nuovo @balloon = [text, type] end #-------------------------------------------------------------------------- # * Cancella il balloon dal personaggio #-------------------------------------------------------------------------- def delete_balloon #Imposta il balloon su nulla @balloon = [nil, nil] end end #==============================================================================# ** Sprite_Character#------------------------------------------------------------------------------# Questo sprite è usato per mostrare i characters. Osserva l'istanza della classe# Game_Character e cambia automaticamente le condizioni dello sprite.#==============================================================================class Sprite_Character #-------------------------------------------------------------------------- # * Aliasing dei metodi #-------------------------------------------------------------------------- alias tslvntsblln_sprtchrctr_init initialize alias tslvntsblln_sprtchrct_dsps dispose alias tslvntsblln_sprtchrct_pdt update #-------------------------------------------------------------------------- # * Inizializza la classe #-------------------------------------------------------------------------- def initialize(viewport, character = nil) @balloon = nil #Richiama il metodo originale tslvntsblln_sprtchrctr_init(viewport, character) end #-------------------------------------------------------------------------- # * Effettua il dispose #-------------------------------------------------------------------------- def dispose #Richiama il metodo originale tslvntsblln_sprtchrct_dsps #Cancella il balloon delete_message_balloon end #-------------------------------------------------------------------------- # * Cancella il balloon dal personaggio #-------------------------------------------------------------------------- def delete_message_balloon #Effettua il dispose del balloon se esiste if @balloon != nil @balloon.dispose @balloon = nil end end #-------------------------------------------------------------------------- # * Effettua l'aggiornamento #-------------------------------------------------------------------------- def update #Richiama il metodo originale tslvntsblln_sprtchrct_pdt #Se il character ha un balloon impostato if @character.balloon[0] != nil #Mostra il balloon @balloon = Window_Balloon.new(x, y, @character.balloon[0], @character.balloon[1]) if @balloon == nil @balloon.update #Aggiorna le coordinate in base alla posizione del personaggio @balloon.x = self.x - 16 - @balloon.width / 2 + 16 @balloon.y = self.y - 16 - @balloon.height @balloon.z = self.z #Cancella il balloon se il tempo di attesa è finito @character.delete_balloon if @balloon.wait == 0 else #Cancella il balloon delete_message_balloon end endend #==============================================================================# ** Window_Balloon#------------------------------------------------------------------------------# Finestra che mostra frasi sopra i personaggi.#==============================================================================class Window_Balloon < Window_Base #-------------------------------------------------------------------------- # * Variabili d'istanza pubbliche #-------------------------------------------------------------------------- attr_reader :wait #-------------------------------------------------------------------------- # * Inizializza la classe #-------------------------------------------------------------------------- def initialize(x, y, text, type) #Inizializza la finestra super(0, 0, 33, 33) #Imposta l'attesa per l'autochiusura a -1 @wait = -1 @max_opacity = Events_Balloon::Balloon_Opacity #Disegna il testo su una bitmap vuota e #calcola la larghezza della finestra attraverso il testo w = 32 @bmp = Bitmap.new(640, 480) @bmp.font.name = Events_Balloon::Font_Name @bmp.font.size = Events_Balloon::Font_Size @hp = 0 for i in 0...text.size w = [w, draw_text(text[i].clone, i * Events_Balloon::Line_Spacing + 8)].max end w += 48 #Calcola l'altezza del testo attraverso le righe scritte h = text.size * Events_Balloon::Line_Spacing + 48 + 8 #Inizializza la finestra self.x = x - w / 2 + 16 self.y = y - h self.width = w self.height = h + @hp self.contents.dispose self.contents = Bitmap.new(width - 32, height - 32) #Nasconde la windowskin self.windowskin = nil #Rende trasparente il contenuto del balloon in previsione del fade in self.contents_opacity = 0 #Disegna il balloon refresh(text, type) end #-------------------------------------------------------------------------- # * Disegno del balloon #-------------------------------------------------------------------------- def refresh(text, type) #Pulisce il contenuto della finestra self.contents.clear self.contents.font.name = Events_Balloon::Font_Name self.contents.font.size = Events_Balloon::Font_Size skin = Cache.system(Events_Balloon::Balloon_Skin) #Disegna gli angoli del balloon self.contents.blt(0, 0, skin, Rect.new(0, 0, 8, 8), @max_opacity) self.contents.blt(self.contents.width - 8, 0, skin, Rect.new(24, 0, 8, 8), @max_opacity) self.contents.blt(0, self.contents.height - 16, skin, Rect.new(0, 24, 8, 8), @max_opacity) self.contents.blt(self.contents.width - 8, self.contents.height - 16, skin, Rect.new(24, 24, 8, 8), @max_opacity) #Disegna i lati del balloon self.contents.stretch_blt(Rect.new(0, 8, 8, self.contents.height - 24), skin, Rect.new(0, 8, 8, 16), @max_opacity) self.contents.stretch_blt(Rect.new(self.contents.width - 8, 8, 8, self.contents.height - 24), skin, Rect.new(24, 8, 8, 16), @max_opacity) self.contents.stretch_blt(Rect.new(8, 0, self.contents.width - 16, 8), skin, Rect.new(8, 0, 16, 8), @max_opacity) self.contents.stretch_blt(Rect.new(8, self.contents.height - 16, self.contents.width - 16, 8), skin, Rect.new(8, 24, 16, 8), @max_opacity) #Disegna il rettangolo centrale del balloon self.contents.stretch_blt(Rect.new(8, 8, self.contents.width - 16, self.contents.height - 24), skin, Rect.new(8, 8, 16, 16), @max_opacity) #Disegna la coda del fumetto self.contents.blt(self.contents.width / 2 - 4, self.contents.height - 8, skin, Rect.new(32, 8 * type, 8, 8), @max_opacity) #Disegna il testo memorizzato nella bitmap self.contents.blt(0, 0, @bmp, Rect.new(0, 0, self.contents.width, self.contents.height)) end #-------------------------------------------------------------------------- # * Disegna il testo e applica i codici #-------------------------------------------------------------------------- def draw_text(text, y) x = 0 hp = 0 if text.clone.gsub!(/[Ii]con[([0-9]+)]/) {} != nil hp = 24 - Events_Balloon::Line_Spacing if Events_Balloon::Line_Spacing < 24 end begin last_text = text.clone #Rimuove n text.gsub!(/n/) { } #Rimuove M text.gsub!(/[Mm]/) { } #Sostituisce V con il valore della relativa variabile text.gsub!(/[Vv][([0-9]+)]/) { $game_variables[$1.to_i] } #Sostituisce G con il valore dell'oro posseduto text.gsub!(/[Gg]/) { $game_party.gold } end until text == last_text #Sostituisce N con il nome dell'eroe nel database text.gsub!(/[Nn][([0-9]+)]/) do $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : "" end #Sostituisce P con il nome dell'eroe nel party text.gsub!(/[Pp][([0-9]+)]/) do $game_party.members[$1.to_i] != nil ? $game_party.members[$1.to_i].name : "" end #Cambia "C" in "\001" text.gsub!(/[Cc][([0123456789ABCDEF#]+)]/) { "\001[#{$1}]" } #Cambia "B" in "\002" text.gsub!(/[Bb]/) { "\002" } #Cambia "Icon" in "\006" text.gsub!(/[Ii]con[([0-9]+)]/) { "\006[#{$1}]" } #Cambia "I" in "\003" text.gsub!(/[Ii]/) { "\003" } #Cambia "W" in "\004" text.gsub!(/[Ww][([0-9]+)]/) { "\004[#{$1}]" } #Cambia "O" in "\005" text.gsub!(/[Oo][([0-9]+)]/) { "\005[#{$1}]" } #Mette 1 carattere in c (cicla finchè ottiene testo) while ((c = text.slice!(/./m)) != nil) #Se C[n] case c when "\001" text.sub!(/[([0123456789ABCDEF#]+)]/, "") if $1[0, 1] != "#" color = $1.to_i if color >= 0 and color <= 7 @bmp.font.color = text_color(color) end else @bmp.font.color = Color.new($1[1, 2].hex, $1[3, 2].hex, $1[5, 2].hex) if $1.size == 7 end #Vai al prossimo testo next when "\002" #Imposta il grassetto @bmp.font.bold = !@bmp.font.bold #Vai al prossimo testo next when "\003" #Imposta l'italico @bmp.font.italic = !@bmp.font.italic #Vai al prossimo testo next when "\004" #Imposta l'attesa text.sub!(/[([0-9]+)]/, "") @wait = $1.to_i #Vai al prossimo testo next when "\005" #Imposta l'attesa text.sub!(/[([0-9]+)]/, "") @max_opacity = $1.to_i #Vai al prossimo testo next when "\006" #Imposta l'attesa text.sub!(/[([0-9]+)]/, "") bitmap = Cache.system("Iconset") x += 8 rect = Rect.new($1.to_i % 16 * 24, $1.to_i / 16 * 24, 24, 24) @bmp.blt(x, y + @hp, bitmap, rect) x += 16 #Vai al prossimo testo next end #Disegna il testo @bmp.draw_text(8 + x, y + @hp + hp / 2, @bmp.width - 16, Events_Balloon::Line_Spacing, c) #Aggiunge ad x la larghezza del testo disegnato x += @bmp.text_size©.width end @hp += hp return x end #-------------------------------------------------------------------------- # * Aggiornamento finestra #-------------------------------------------------------------------------- def update super #Dona un effetto fade in al balloon self.contents_opacity += 32 if self.contents_opacity < 255 #Nasconde il balloon se non si è su mappa #self.visible = $scene.is_a?(Scene_Map) @wait -= 1 if @wait > 0 endend #==============================================================================# ** Game_Interpreter#------------------------------------------------------------------------------# Un interprete per eseguire i comandi degli eventi. Questa classe è usata# all'interno di Game_Map, Game_Troop, e Game_Event.#==============================================================================class Game_Interpreter #-------------------------------------------------------------------------- # * Aliasing dei metodi #-------------------------------------------------------------------------- alias tslvntsblln_gmntrptr_cmmnd101 command_101 #-------------------------------------------------------------------------- # * Mostra Messaggio #-------------------------------------------------------------------------- def command_101 #Se il messaggio include M if @list[@index + 1].parameters[0].upcase.include?("M") #Inizializzazzione variabili ar = [] @index += 1 type = 0 ev_id = @event_id #Cicla finche trova il testo del messaggio corrente while @list[@index].code == 401 #Inserisce il messaggio e se trova E lo rimuove e ne da il valore a ev_id bt = balloon_text ar.push(bt[0]) ev_id = bt[1] if bt[1] != nil type = bt[2] if bt[2] != nil #Incremento l'indice del comando evento @index += 1 end @index -= 1 #Se ev_id è 0 viene mostrato il balloon sull'eroe altrimenti sull'evento con id uguale a ev_id ev_id == 0 ? $game_player.set_balloon(ar, type) : $game_map.events[ev_id].set_balloon(ar, type) else #Richiama il metodo originale tslvntsblln_gmntrptr_cmmnd101 end end #-------------------------------------------------------------------------- # * Analizza il testo del balloon #-------------------------------------------------------------------------- def balloon_text t = @list[@index].parameters[0].clone t.gsub!(/[Ee][([0-9]+)]/) {} ev_id = $1.to_i if $1 != nil t.gsub!(/[Tt][([0-9]+)]/) {} type = $1.to_i if $1 != nil return [t, ev_id, type] endend #==============================================================================# ** Scene_Map#------------------------------------------------------------------------------# Questa classe si occupa della mappa mostrata a schermo.#==============================================================================class Scene_Map #-------------------------------------------------------------------------- # * Aliasing dei metodi #-------------------------------------------------------------------------- alias tslvntblln_scnmp_trnsfrplr update_transfer_player #-------------------------------------------------------------------------- # * Trasporta il player in una nuova mappa #-------------------------------------------------------------------------- def update_transfer_player $game_player.delete_balloon #Richiama il metodo originale tslvntblln_scnmp_trnsfrplr endend Bugs e Conflitti Noti N/A Altri Dettagli E' uno script semplice (sono più i commenti che le righe di codice) che non dovrebbe creare problemi ma se ne avete vi prego VI PREGO leggete bene le istruzioni, poi postate tutti i dettagli che servono per risolvere i problemi: messaggi d'errore e condizione in cui sono usciti, script che avete in gioco(magari in ordine che spesso è quello che fa la differenza), nome da nubile di vostra madre ecc... Ignorerò qualunque persona mi posti il semplice mesaggio "Non mi funziona" o "Mi da errore" senza specificare nulla (non è per cattiveria eh) Come sempre sono ben accetti critiche (costruttive) commenti e suggerimenti :D
-
Ciao Oblivion, sono abbastanza vivo come puoi vedere, poi ci sentiamo che parliamo un pochino :D Ho aggiornato di nuovo lo script i cambiamenti sono Corretto un Bug relativo ai salvataggi. Rimossi automaticamente i caratteri di a capo (\n). Aggiunti altri codici: \\B, \\I, \\G, \\W e \\P. Per il box dei nomi posso vedere, non mi pare una cattiva idea però graficamente forse poi diventa troppo pesante a vedersi. Mediafire oggi mi sta facendo impazzire ma la demo dovrebbe essere aggiornata. Edit: Aggiornato alla v 1.2b che corregge un bug di posizionamento del balloon ;) (ecco cosa succede a non testare le cose)
-
Si ho lasciato il codice vecchio nell'evento(usava l'allineamento del testo) ma ho già sistemato la demo(probabilemente dopo che l'hai scaricata), adesso dovrebbe andare . Se ce la faccio più tardi posto anche per VX va (devo aggiornarlo solo allla 1.1), metto sullo stesso topic o ne apro uno nuovo nella sezione VX? :D
-
Ok sistemato, ho aggiornato script e demo, ecco i cambiamenti: Rimosso l'allineamento del testo (mi dava problemi con le dimensioni del balloon ma tanto non era essenzialissimo). Aggiunti i codici \\N \\C e \\V per avere testo dinamico (occhio che lo \ deve essere doppio altrimenti non lo vede). Risolto un Bug che continuava a mostrare i balloon.(Li cancella se si cambia mappa, li nasconde quando si aprono i menu) Volendo si possono aggiungere altri codici per i messaggi ma per il momento mi vengono in mente solo questi.
-
Me ne sono accorto adesso anche io, grazie della segnalazione Guardian ^ ^ Ho gia sistemato, prima di aggiornare però voglio permettere l'uso dei codici dei messaggi standard (\c \n ecc...)
-
Event's Balloon Descrizione E' un script a cui sto lavorando per Crystal Sanctuary, avrei dovuto rilasciarlo nel periodo epifanile ma non avuto il tempo di postarlo. Questo script permette di mostrare dei fumetti sopra le teste dei personaggi su mappa (eventi ed eroe). I fumetti sono indipendenti dai messaggi standard e possono esserne visualizzati molti (uno per evento) in contemporanea. Autore The Sleeping Leonhart Allegati Skin del balloon da inserire in Windowskins http://img408.imageshack.us/img408/5704/balloonu.png Template per creare un skin http://img227.imageshack.us/img227/5739/balloontemplate.png Piccolo screen esplicativo Potete scaricare una piccola demo di esempio da QUI (v 1.3). Ogni evento è commentato quindi se avete dei dubbi guardate al suo interno, Istruzioni per l'uso Create la skin per il balloon ed inseritela nella cartella Windowskins chiamandola Balloon. Per chiamare un balloon si usa il comando set_balloon(["riga 1", "riga 2", ecc...], tipo_fumetto) tipo_fumetto è un numero opzionale da 0 a 3, in base a come si è impostata la skin del balloon verrà mostrato un tipo di coda diverso Se usato all'interno di un muovi evento il comando prenderà in considerazione l'evento specificato, se si vuole specificare il character va anteposto a set_balloon $game_player. per l'eroe e $game_map.events[iDEVENTO]. per gli eventi. Per cancellare un balloon si usa il comando delete_balloon Non ha argomenti ma valgono le stesse regole di set_balloon. Si può usare: Inoltre si può impostare un balloon tramite il comando evento Mostra Messaggio utilizzando all'interno del messaggio \M. Quando si usa \M il balloon viene posizionato sopra l'evento che richiama il Mostra Messaggio, per cambiare l'evento su cui appare utillizare \E[iDEVENTO], se IDEVENTO è 0 verrà mostrato sull'eroe. Per cambiare tipo di fumetto usare \T[TIPOFUMETTO] all'interno del Mostra Messaggio. Quando si scrive all'interno del Mostra Messaggio basta un solo \ per i codici speciali. Consiglio di scaricare la demo per farsi un'idea più approfondita dei comandi. Script Bugs e Conflitti Noti N/A Altri Dettagli E' uno script semplice (sono più i commenti che le righe di codice) che non dovrebbe creare problemi ma se ne avete vi prego VI PREGO leggete bene le istruzioni, poi postate tutti i dettagli che servono per risolvere i problemi: messaggi d'errore e condizione in cui sono usciti, script che avete in gioco(magari in ordine che spesso è quello che fa la differenza), nome da nubile di vostra madre ecc... Ignorerò qualunque persona mi posti il semplice mesaggio "Non mi funziona" o "Mi da errore" senza specificare nulla (non è per cattiveria eh) Come sempre sono ben accetti critiche (costruttive) commenti e suggerimenti :D
