lotgd Posted February 22, 2008 Share Posted February 22, 2008 (edited) Un Buon scipt per visualizza l'hp l'mp l'exp ed i soldi sullo schermo. Lo sto usando per il mio progetto.Autore : MeisMeGrafica : Peaches, oshie666 & AxeraxCrea una nuova classe sopra main, chiamala come ti pare ed inserisci questo codice :<div style="margin:20px;margin-top:5px" "=""> #============================================================= #========== # ** Game_Actor # Script by MeisMe # Graphics added by Peaches # Icons made by Joshie666 & Axerax #------------------------------------------------------------------------------ # This class handles the actor. It's used within the Game_Actors class # ($game_actors) and refers to the Game_Party class ($game_party). #============================================================================== class Game_Actor #-------------------------------------------------------------------------- # * Get the current EXP #-------------------------------------------------------------------------- def now_exp return @exp - @exp_list[@level] end #-------------------------------------------------------------------------- # * Get the next level's EXP #-------------------------------------------------------------------------- def next_exp return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0 end end #============================================================================== # ** Window_HUD #------------------------------------------------------------------------------ # This class is used to display HP, SP and Gold on the map. #============================================================================== class Window_HUD < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(-16, -16, 672, 150) self.contents = Bitmap.new(width-32, height-32) self.opacity = 0 self.contents.font.size = 14 self.contents.font.name = "Arial" @actors = [] @old_hp = [] @old_sp = [] @old_exp = [] @old_level = [] for i in 0...$game_party.actors.size @actors.push($game_party.actors[i]) @old_hp.push(@actors[i].hp) @old_sp.push(@actors[i].sp) @old_exp.push(@actors[i].now_exp) @old_level.push(@actors[i].level) end @old_gold = $game_party.gold refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = system_color #self.contents.draw_text(6, 0, 32, 14, $data_system.words.hp + "") #self.contents.draw_text(6, 14, 32, 14, $data_system.words.sp + "") self.contents.draw_text(6, 28, 32, 14, "") #self.contents.draw_text(6, 42, 32, 14, $data_system.words.gold + "") self.contents.font.color = normal_color #Images case @actors.size when 1 bitmap = RPG::Cache.picture("HUD Graphic") self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 500, 500)) when 2 bitmap = RPG::Cache.picture("HUD Graphic2") self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 500, 500)) when 3 bitmap = RPG::Cache.picture("HUD Graphic2") self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 500, 500)) when 4 bitmap = RPG::Cache.picture("HUD Graphic3") self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 640, 500)) when 5 bitmap = RPG::Cache.picture("HUD Graphic3") self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 640, 500)) end #bitmap = RPG::Cache.picture("HUD Graphic") #self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 500, 500)) bitmap = RPG::Cache.icon("HP Symbol") self.contents.blt(3, 10, bitmap, Rect.new(0, 0, 24, 24)) bitmap = RPG::Cache.icon("SP Symbol") self.contents.blt(3, 30, bitmap, Rect.new(0, 0, 24, 24)) bitmap = RPG::Cache.icon("EXP Symbol") self.contents.blt(3, 50, bitmap, Rect.new(0, 0, 24, 24)) bitmap = RPG::Cache.icon("Hero") self.contents.blt(25, 67, bitmap, Rect.new(0, 0, 24, 24)) if $game_switches[99] == true if $game_variables[99] == 0 self.contents.draw_text(x, y, 210, 14, $game_party.item_number[1]) elsif $game_variables[8] == 1 self.contents.draw_text(x, y, 210, 14, $game_party.item_number(2)) elsif $game_variables[8] ==2 self.contents.draw_text(x, y, 110, 14, @actors[i].name) end end x = 32 for i in 0...@actors.size y = 6 self.contents.draw_text(x, y, 110, 14, @actors[i].name) self.contents.draw_text(x, y, 110, 14, "Lv: #{@actors[i].level}", 2) y += 16 draw_hp_bar(@actors[i], x, y, 112, 5) y += 19 draw_sp_bar(@actors[i], x, y, 104, 5) y += 19 draw_exp_bar(@actors[i], x, y, 88, 5) y += 19 x += 130 end x = 32 self.contents.draw_text(45, 73, 110, 14, $game_party.gold.to_s) end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super if @actors.size != $game_party.actors.size @actors = [] for i in 0...$game_party.actors.size @actors.push($game_party.actors[i]) end refresh return end for i in 0...@actors.size if @old_hp[i] != @actors[i].hp or @old_sp[i] != @actors[i].sp or @old_exp[i] != @actors[i].now_exp or @old_level[i] != @actors[i].level or @old_gold != $game_party.gold refresh @old_hp[i] = @actors[i].hp @old_sp[i] = @actors[i].sp @old_exp[i] = @actors[i].now_exp @old_level[i] = @actors[i].level @old_gold = $game_party.gold end end end #-------------------------------------------------------------------------- # * Draw HP Bar #-------------------------------------------------------------------------- def draw_hp_bar(actor, x, y, length, thick) width = length height = thick c1 = Color.new(255, 0, 0) c2 = Color.new(155, 0, 0) e1 = actor.hp e2 = actor.maxhp 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 end #-------------------------------------------------------------------------- # * Draw SP Bar #-------------------------------------------------------------------------- def draw_sp_bar(actor, x, y, length, thick) width = length height = thick c1 = Color.new(0, 0, 255) c2 = Color.new(0, 0, 155) e1 = actor.sp e2 = actor.maxsp self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(255, 255, 255)) self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0)) 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 end #-------------------------------------------------------------------------- # * Draw EXP Bar #-------------------------------------------------------------------------- def draw_exp_bar(actor, x, y, length, thick) width = length height = thick c1 = Color.new(158, 208, 9) c2 = Color.new(58, 108, 0) e1 = actor.now_exp e2 = actor.next_exp if actor.next_exp == 0 e1 = 1 e2 = 1 end 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 end end #============================================================================== # ** Scene_Map #------------------------------------------------------------------------------ # This class performs map screen processing. #============================================================================== class Scene_Map #-------------------------------------------------------------------------- # * Object Aliasing #-------------------------------------------------------------------------- alias hud_scene_map_main main alias hud_scene_map_update update #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def main @HUD = Window_HUD.new hud_scene_map_main @HUD.dispose end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update @HUD.update hud_scene_map_update end end Screenshotcon 1 pghttp://img33.picoodle.com/img/img33/4/2/22/t_hudsingolom_d3bd2ea.jpgcon il partyhttp://img31.picoodle.com/img/img31/4/2/22/t_hudm_5bafaad.jpgIstruzioni : dopo aver creato la nuova classe ed inserito lo script, inserite queste immagini, nelle rispettive cartelle icon e pictures. (eliminare eventualmente nella seconda riga i === in eccesso che straborda.Download ImmaginiSe non volete usare la visualizzazione del party ma solo quello del PG principale (tipo il 1° screenshot) andate QUI per trovare lo script modificato. Edited March 16, 2013 by Apo applicato tag code IL MIO NICK è FRISKON Quando mi son registrato, credevo di fare lo spettatore! http://www.making-videogames.net/pubblicita.gifVideogiochi Usati Link to comment Share on other sites More sharing options...
PSYKO Posted February 22, 2008 Share Posted February 22, 2008 :rovatfl: Forte....davvero utile.Lo possiamo usare per i nostri progetti? Il making con il cuorehttp://i62.servimg.com/u/f62/13/12/87/37/nuovob11.pngNuovo LegendRpgMania http://images4.wikia.nocookie.net/nonciclopedia/images/3/35/This_is_sparda.jpg http://www.ff-fan.com/chartest/banners/kuja.jpghttp://www.ff-fan.com/chartest/banners/sephiroth.jpghttp://www.ff-fan.com/chartest/banners/auron.jpgWhich Final Fantasy Character Are You?Final Fantasy 7 Link to comment Share on other sites More sharing options...
Anthair Posted February 22, 2008 Share Posted February 22, 2008 (edited) mmm...lodevole, veramente lodevoleci dò una guardata poi commento meglio! EDIT.Molto bello ma c'è un errore!!!Cancellate la seconda riga per farlo funzionare correttamente! Edited February 22, 2008 by Anthair http://img13.imageshack.us/img13/1359/userbarlor.png "La Storia Ha Orrore Dei Paradossi"(Raziel)Partecipante al Rpg2s.net Game Contest 2008/2009http://www.rpg2s.net/contest/GameContest0809/gc0809-bannerino.jpgGioco in Sviluppo: Æterna Nova Lux RMXP.IT, Rest In Peace! Link to comment Share on other sites More sharing options...
Sylaer Posted February 22, 2008 Share Posted February 22, 2008 Non è proprio un errore, è solo che gli uguali della prima riga debordano sulla seconda, per evitare che succeda basta mettere il codice non solo all'interno dello spoiler ma anche all'interno del tag codice. http://www.rpg2s.net/awards/bestscripter1.jpgSe avete bisogno di modifiche, correzioni o creazioni da zero di script RGSS, allora visitate la mia bottega.La bottega di Sylaer Link to comment Share on other sites More sharing options...
marigno Posted February 22, 2008 Share Posted February 22, 2008 Perfavore, applicate sempre il Template agli scripts che postate, in modo da rendere il tutto più leggibile e ordinato. :rovatfl: Link to comment Share on other sites More sharing options...
lotgd Posted February 23, 2008 Author Share Posted February 23, 2008 (edited) [ O T ] ecco... la prossima volta mi faccio i fatti miei... ma se ci sono script senza uno screenshot, e messi alla azz di cane... addirittura erano linkati dalla lista script, senza offesa ma sapendo che son qui da 4 giorni... [ / O T ] ho levato lo spoiler e messo il codebox e mica è cambiato qualcosa...scusate se ogni tanto voglio aiutare anch'io. Edited February 23, 2008 by lotgd IL MIO NICK è FRISKON Quando mi son registrato, credevo di fare lo spettatore! http://www.making-videogames.net/pubblicita.gifVideogiochi Usati Link to comment Share on other sites More sharing options...
lotgd Posted February 23, 2008 Author Share Posted February 23, 2008 (edited) PSYKO certo che lo puoi usare ^_^ 1° non sono io l'autore, 2° Qui si postano script da mettere a disposizione degli utenti del sito. (ho perso 2 giorni x trovare sto script che mi serviva tanto) Sylaer GRAZIE ancora, se eri donna ti violentavo :D (x l'aiuto) (scusate il doppio post, ma non trovo il tasto per eliminare il mex, volevo far 1 mex solo) Edited February 23, 2008 by lotgd IL MIO NICK è FRISKON Quando mi son registrato, credevo di fare lo spettatore! http://www.making-videogames.net/pubblicita.gifVideogiochi Usati Link to comment Share on other sites More sharing options...
Sylaer Posted February 23, 2008 Share Posted February 23, 2008 Sylaer GRAZIE ancora, se eri donna ti violentavo :D (x l'aiuto)Me lo dicono in tanti.(scusate il doppio post, ma non trovo il tasto per eliminare il mex, volevo far 1 mex solo)non devi eliminare il messaggio clicca sul pulsante edit in fondo alla finestrella del post accanto a quelli +quote e reply, così modifichi il messaggio precedente. http://www.rpg2s.net/awards/bestscripter1.jpgSe avete bisogno di modifiche, correzioni o creazioni da zero di script RGSS, allora visitate la mia bottega.La bottega di Sylaer Link to comment Share on other sites More sharing options...
lotgd Posted February 23, 2008 Author Share Posted February 23, 2008 non devi eliminare il messaggio clicca sul pulsante edit in fondo alla finestrella del post accanto a quelli +quote e reply, così modifichi il messaggio precedente. si so editarli ... ma invece di editare avevo scritto n'altro messaggio... IL MIO NICK è FRISKON Quando mi son registrato, credevo di fare lo spettatore! http://www.making-videogames.net/pubblicita.gifVideogiochi Usati Link to comment Share on other sites More sharing options...
53PH!R07 Posted July 27, 2008 Share Posted July 27, 2008 Ragazzi xkè le icone non hanno bordo bianco ma bensì mi da lo sfondo ? Link to comment Share on other sites More sharing options...
=DahiL= Posted July 27, 2008 Share Posted July 27, 2008 (edited) bello script, solo ke lo avevo già visto appena trovo dove metto il link... EDIT: ecco era nella sezione VX, era uno script Xp che con la total conversion diventava compatibile con il VXhttp://www.rpg2s.net/forum/index.php?showtopic=4284 Edited July 27, 2008 by =DahiL= http://img145.imageshack.us/img145/3703/2597sg7.pnghttp://img229.imageshack.us/img229/9955/mozillafirefoxuser4zj.pnghttp://i213.photobucket.com/albums/cc264/badbunny699/dexterza5.pnghttp://img359.imageshack.us/img359/220/clipboard028ar.jpghttp://img402.imageshack.us/img402/9318/virgilflyvy0.gif AsD Fanhttp://i67.servimg.com/u/f67/13/07/24/89/banner12.pngProssimamente... Link to comment Share on other sites More sharing options...
nitrol1luigi Posted September 3, 2008 Share Posted September 3, 2008 Scusate, io non sono abbastanza bravo con gli script, ma volevo fare in modo che si potesse levare e rimettere l'HUD tramite evento call script... Almeno le parti "narrative" sono più cinematografiche senza l'hud... Link to comment Share on other sites More sharing options...
nitrol1luigi Posted September 5, 2008 Share Posted September 5, 2008 up.... Link to comment Share on other sites More sharing options...
Viewtiful Joe Posted September 7, 2008 Share Posted September 7, 2008 Un Buon scipt per visualizza l'hp l'mp l'exp ed i soldi sullo schermo. Lo sto usando per il mio progetto. Autore : MeisMeGrafica : Peaches, oshie666 & Axerax Crea una nuova classe sopra main, chiamala come ti pare ed inserisci questo codice :Spoiler #============================================================= ========== # ** Game_Actor # Script by MeisMe # Graphics added by Peaches # Icons made by Joshie666 & Axerax #------------------------------------------------------------------------------ # This class handles the actor. It's used within the Game_Actors class # ($game_actors) and refers to the Game_Party class ($game_party). #============================================================================== class Game_Actor #-------------------------------------------------------------------------- # * Get the current EXP #-------------------------------------------------------------------------- def now_exp return @exp - @exp_list[@level] end #-------------------------------------------------------------------------- # * Get the next level's EXP #-------------------------------------------------------------------------- def next_exp return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0 end end #============================================================================== # ** Window_HUD #------------------------------------------------------------------------------ # This class is used to display HP, SP and Gold on the map. #============================================================================== class Window_HUD < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(-16, -16, 672, 150) self.contents = Bitmap.new(width-32, height-32) self.opacity = 0 self.contents.font.size = 14 self.contents.font.name = "Arial" @actors = [] @old_hp = [] @old_sp = [] @old_exp = [] @old_level = [] for i in 0...$game_party.actors.size @actors.push($game_party.actors[i]) @old_hp.push(@actors[i].hp) @old_sp.push(@actors[i].sp) @old_exp.push(@actors[i].now_exp) @old_level.push(@actors[i].level) end @old_gold = $game_party.gold refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = system_color #self.contents.draw_text(6, 0, 32, 14, $data_system.words.hp + "") #self.contents.draw_text(6, 14, 32, 14, $data_system.words.sp + "") self.contents.draw_text(6, 28, 32, 14, "") #self.contents.draw_text(6, 42, 32, 14, $data_system.words.gold + "") self.contents.font.color = normal_color #Images case @actors.size when 1 bitmap = RPG::Cache.picture("HUD Graphic") self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 500, 500)) when 2 bitmap = RPG::Cache.picture("HUD Graphic2") self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 500, 500)) when 3 bitmap = RPG::Cache.picture("HUD Graphic2") self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 500, 500)) when 4 bitmap = RPG::Cache.picture("HUD Graphic3") self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 640, 500)) when 5 bitmap = RPG::Cache.picture("HUD Graphic3") self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 640, 500)) end #bitmap = RPG::Cache.picture("HUD Graphic") #self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 500, 500)) bitmap = RPG::Cache.icon("HP Symbol") self.contents.blt(3, 10, bitmap, Rect.new(0, 0, 24, 24)) bitmap = RPG::Cache.icon("SP Symbol") self.contents.blt(3, 30, bitmap, Rect.new(0, 0, 24, 24)) bitmap = RPG::Cache.icon("EXP Symbol") self.contents.blt(3, 50, bitmap, Rect.new(0, 0, 24, 24)) bitmap = RPG::Cache.icon("Hero") self.contents.blt(25, 67, bitmap, Rect.new(0, 0, 24, 24)) if $game_switches[99] == true if $game_variables[99] == 0 self.contents.draw_text(x, y, 210, 14, $game_party.item_number[1]) elsif $game_variables[8] == 1 self.contents.draw_text(x, y, 210, 14, $game_party.item_number(2)) elsif $game_variables[8] ==2 self.contents.draw_text(x, y, 110, 14, @actors[i].name) end end x = 32 for i in 0...@actors.size y = 6 self.contents.draw_text(x, y, 110, 14, @actors[i].name) self.contents.draw_text(x, y, 110, 14, "Lv: #{@actors[i].level}", 2) y += 16 draw_hp_bar(@actors[i], x, y, 112, 5) y += 19 draw_sp_bar(@actors[i], x, y, 104, 5) y += 19 draw_exp_bar(@actors[i], x, y, 88, 5) y += 19 x += 130 end x = 32 self.contents.draw_text(45, 73, 110, 14, $game_party.gold.to_s) end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super if @actors.size != $game_party.actors.size @actors = [] for i in 0...$game_party.actors.size @actors.push($game_party.actors[i]) end refresh return end for i in 0...@actors.size if @old_hp[i] != @actors[i].hp or @old_sp[i] != @actors[i].sp or @old_exp[i] != @actors[i].now_exp or @old_level[i] != @actors[i].level or @old_gold != $game_party.gold refresh @old_hp[i] = @actors[i].hp @old_sp[i] = @actors[i].sp @old_exp[i] = @actors[i].now_exp @old_level[i] = @actors[i].level @old_gold = $game_party.gold end end end #-------------------------------------------------------------------------- # * Draw HP Bar #-------------------------------------------------------------------------- def draw_hp_bar(actor, x, y, length, thick) width = length height = thick c1 = Color.new(255, 0, 0) c2 = Color.new(155, 0, 0) e1 = actor.hp e2 = actor.maxhp 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 end #-------------------------------------------------------------------------- # * Draw SP Bar #-------------------------------------------------------------------------- def draw_sp_bar(actor, x, y, length, thick) width = length height = thick c1 = Color.new(0, 0, 255) c2 = Color.new(0, 0, 155) e1 = actor.sp e2 = actor.maxsp self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(255, 255, 255)) self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0)) 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 end #-------------------------------------------------------------------------- # * Draw EXP Bar #-------------------------------------------------------------------------- def draw_exp_bar(actor, x, y, length, thick) width = length height = thick c1 = Color.new(158, 208, 9) c2 = Color.new(58, 108, 0) e1 = actor.now_exp e2 = actor.next_exp if actor.next_exp == 0 e1 = 1 e2 = 1 end 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 end end #============================================================================== # ** Scene_Map #------------------------------------------------------------------------------ # This class performs map screen processing. #============================================================================== class Scene_Map #-------------------------------------------------------------------------- # * Object Aliasing #-------------------------------------------------------------------------- alias hud_scene_map_main main alias hud_scene_map_update update #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def main @HUD = Window_HUD.new hud_scene_map_main @HUD.dispose end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update @HUD.update hud_scene_map_update end end Screenshotcon 1 pghttp://img33.picoodle.com/img/img33/4/2/22/t_hudsingolom_d3bd2ea.jpg con il partyhttp://img31.picoodle.com/img/img31/4/2/22/t_hudm_5bafaad.jpgIstruzioni : dopo aver creato la nuova classe ed inserito lo script, inserite queste immagini, nelle rispettive cartelle icon e pictures. (eliminare eventualmente nella seconda riga i === in eccesso che straborda. Download ImmaginiSe non volete usare la visualizzazione del party ma solo quello del PG principale (tipo il 1° screenshot) andate QUI per trovare lo script modificato. Link to comment Share on other sites More sharing options...
Viewtiful Joe Posted September 7, 2008 Share Posted September 7, 2008 (edited) Bello!come faccio a cambiare la posizione del "contamonete"?Come posso cambiare la grafica delle barre?é possibile visualzzare gli hp anche con i numeri? Edited September 7, 2008 by Viewtiful Joe Link to comment Share on other sites More sharing options...
nitrol1luigi Posted September 9, 2008 Share Posted September 9, 2008 Io riuppo sempre... si può fare in modo che attraverso un call script si possa levare l'HUD per poi rimetterlo? Link to comment Share on other sites More sharing options...
Megaman Posted November 6, 2008 Share Posted November 6, 2008 Complimenti mi serviva proprio questo script. :rovatfl: Ho provato quelli degli altri post ma non funzionano. :Ok: Spero ke questo funzioni. Passo e chiudo. Che c'è?? Mi piace adottare e per questo sono favorevole!!!!Spoiler http://img508.imageshack.us/img508/7690/kyuubicp8.gifhttp://img212.imageshack.us/img212/1453/narutofe1.gifhttp://img114.imageshack.us/img114/9343/chijisz1.gifhttp://img205.imageshack.us/img205/451/jirayadc8.gifhttp://img230.imageshack.us/img230/6766/gokuia2.gifhttp://img412.imageshack.us/img412/9338/gotenel3.gifhttp://img262.imageshack.us/img262/6382/gohanssj2ky4.gifhttp://i32.tinypic.com/1j2tm1.gifhttp://img231.imageshack.us/img231/791/zorosn7.gifhttp://img215.imageshack.us/img215/6690/sanjiqw0.gifhttp://img228.imageshack.us/img228/8339/sanjirotantebr6.gifhttp://img522.imageshack.us/img522/1112/rufyafrokx4.gifhttp://img228.imageshack.us/img228/9480/rufyfn6.gifhttp://img525.imageshack.us/img525/6821/chopperfg2.gifhttp://img510.imageshack.us/img510/4945/rufygearks5.gifhttp://img132.imageshack.us/img132/8950/gonfl4.gifhttp://img174.imageshack.us/img174/3047/killuall4.gifhttp://img161.imageshack.us/img161/5866/kurapicamc5.gif Link to comment Share on other sites More sharing options...
giver Posted November 6, 2008 Share Posted November 6, 2008 (edited) Io riuppo sempre...si può fare in modo che attraverso un call script si possa levare l'HUD per poi rimetterlo?Puoi provare così, ma non sono sicuro che funzioni . . .Aggiungi, subito dopo class Scene_Map, in questo script o nello Scene_Map standard class Scene_Map # Inserire questa dichiarazione attr_accessor :HUD poi, per eliminarlo usa, tramite call script $scene.HUD.dispose e per farlo riapparire $scene.HUD = Window_HUD.new Edited March 16, 2013 by Apo applicato tag code SCRIPT RGSS (RPG Maker XP) VINTAGE LIBRARY [2018+]http://www.rpg2s.net/forum/index.php/topic/21892-vintagevisualsrewrite-enhanced-revised-victory-screen-v-35-da-autori-vari-a-giver/ http://www.rpg2s.net/forum/index.php/topic/21868-eventing-utility-simple-last-battle-events-fix-v-30-by-giver/ http://www.rpg2s.net/forum/index.php/topic/21853-vintagerewrite-constance-menu-per-4-personaggi-da-team-constance-a-giver/ http://www.rpg2s.net/forum/index.php/topic/22126-vintagedoveroso-necroedit-dummy-title-22u-update-per-crearlo-ad-eventi-su-mappa-by-giver/ http://www.rpg2s.net/forum/index.php/topic/22127-vintagevisuals-tale-chapters-save-system-20-by-giver/ Breaking (in ogni senso) News: "Treno deraglia per via del seno di Sakurai Aoi . . ." - Info nello spoiler !! http://afantasymachine.altervista.org/_altervista_ht/NOOOOOOOOOilMIOtreninooooo_500.gifNon riesco a smettere di essere affascinato da immagini come questa . . .http://anime.vl-vostok.ru/art/photos2011/17/78049800/wall_VladAnime_WWA_1885-1680x1050.jpgAlcuni wallpapers che faccio ruotare sul mio vecchio PC . . .http://afantasymachine.altervista.org/_altervista_ht/gits_window.jpghttp://afantasymachine.altervista.org/_altervista_ht/madoka_group01.jpghttp://afantasymachine.altervista.org/_altervista_ht/arisu_picipici_01.jpghttp://afantasymachine.altervista.org/_altervista_ht/phantom_wp01_einzwei.jpg La parte più spassosa della mia vita è quando gli altri cercano di spiegarmi i miei pensieri . . . BBCode TestingTypeface & Size Link to comment Share on other sites More sharing options...
nihil-omen Posted May 2, 2009 Share Posted May 2, 2009 (edited) Scusate ma se i volessi far apparire esclusivamente le barre HP ed MP? (non ho trovato uno script che fosse uno con questa funzione ed ho usato il tasto Cerca con tutte le alternative possibili immaginabili -.-")E per cambiare i color?Grazie mille ^^ EDIT:Ok ce l'ho fatta, mi ci son un pò incaponito, ma le lezioni di script del forum (e un piccolo aiuto del'lhelp) cominciano a dare i loro frutti. Ecco un elenco dei cambiamenti: Invece di mostrare il nome del pg vengono mostrati "Hp : [attuali]/[massimi]" e al posto del Lvl "Sp: [attuali]"Le barre le ho avvicinate e fatte un pò più sottili (erano troppo larghe per i miei gusti) ho cambiato i colori ed ho eliminato quella dell'exp, ora mi accingo ad eliminare anche le icone, ma volendo quelle si possono pure lasciare (basta farle un pò più piccine visto che ora gli spazi son ridotti) Se qualche matto come me fosse interessato mi faccia un fischio, glielo passo volentieri ^^(o in caso glielo modifico su misura, ma non molto poichè sono una zappa con l'rgss é.è ) Edited May 3, 2009 by nihil-omen http://i30.tinypic.com/xehois.gif} 2rA - web site {E' disponibile il primo capitolo completo di 2rA!} 2rA: Capitolo I { Link to comment Share on other sites More sharing options...
nihil-omen Posted May 4, 2009 Share Posted May 4, 2009 Domandina: (sti giorni vi sto tempestando!) E se io volessi spostare le barre? Che ne so, metterle in basso a sinistra [mi serve soprattutto per poterle lasciare lì in basso quando poi apro il menù Compact]? Ho provato a cambiare le coordinate, ma se le abbasso all'infuori del luogo in cui è situata la picture semplicemente non mi appaiono. Ho capito che c'entra qualcosa con la pic, solo che non so come intervenire >.< Inoltre io ho eliminato la barra dell'exp, però vorrei creare una barra basata su due variabili, come faccio? Ora provo a studiarmi lo script per carpire tutti i processi per creare la barra però non sicuro di riucsire da solo é_è Help! T.T http://i30.tinypic.com/xehois.gif} 2rA - web site {E' disponibile il primo capitolo completo di 2rA!} 2rA: Capitolo I { Link to comment Share on other sites More sharing options...
giver Posted May 5, 2009 Share Posted May 5, 2009 (edited) # Valore che determina il riempimento della barra e1 = idvarfill # Valore massimo della barra e2 = idvarmax Domandina: (sti giorni vi sto tempestando!) E se io volessi spostare le barre? Che ne so, metterle in basso a sinistra [mi serve soprattutto per poterle lasciare lì in basso quando poi apro il menù Compact]? Ho provato a cambiare le coordinate, ma se le abbasso all'infuori del luogo in cui è situata la picture semplicemente non mi appaiono. Ho capito che c'entra qualcosa con la pic, solo che non so come intervenire >.< Inoltre io ho eliminato la barra dell'exp, però vorrei creare una barra basata su due variabili, come faccio? Ora provo a studiarmi lo script per carpire tutti i processi per creare la barra però non sicuro di riucsire da solo é_è Help! T.TE' colpa dell'altezza della finestra, i cui contents sono grandi giusto il necessario per usare la picture. Basta aumentare il valore del quarto parametro dell'istruzione super nell'initialize della finestra . . . Se non sei riuscito a creare una barra basata su due variabili, qui ti faccio un esempio di metodo basato sul codice originale delle barre di questo script . . .I due valori usati per stabilire il riempimento della barra sono nelle variabili locali e1 ed e2 def draw_vars_bar(idvarfill, idvarmax, x, y, length, thick) width = length height = thick c1 = Color.new(255, 0, 0) c2 = Color.new(155, 0, 0) # i valori idvarfill e idvarmax sono gli ID delle variabili usate # Valore che determina il riempimento della barra e1 = $game_variables[idvarfill] # Valore massimo della barra e2 = $game_variables[idvarmax] # Se il valore di riempimento è maggiore di quello di barra piena # usa come valore di riempimento quello di barra piena e1 = [e1, e2].min 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 end Il riempimento della barra appare rosso visto che l'esempio è la versione modificata della barra degli HP . . .Se per variabili intendevi variabili ruby invece che variabili evento, basta modificare le righe 8 e 10 del metodo postato quest_completed = $quest_data[quest_id].completed_steps quest_end = $quest_data[quest_id].steps.size draw_vars_bar(quest_completed, quest_end, 160, 32 * quest_id, 80, 20) # ma anche, ad esempio var1 = $game_variables[122] var2 = $game_variables[123] draw_vars_bar(var1, var2, 160, 32, 120, 8) # o un valore preso da una variabile evento ed uno stabilito in altro modo . . . Edited March 16, 2013 by Apo applicato tag code SCRIPT RGSS (RPG Maker XP) VINTAGE LIBRARY [2018+]http://www.rpg2s.net/forum/index.php/topic/21892-vintagevisualsrewrite-enhanced-revised-victory-screen-v-35-da-autori-vari-a-giver/ http://www.rpg2s.net/forum/index.php/topic/21868-eventing-utility-simple-last-battle-events-fix-v-30-by-giver/ http://www.rpg2s.net/forum/index.php/topic/21853-vintagerewrite-constance-menu-per-4-personaggi-da-team-constance-a-giver/ http://www.rpg2s.net/forum/index.php/topic/22126-vintagedoveroso-necroedit-dummy-title-22u-update-per-crearlo-ad-eventi-su-mappa-by-giver/ http://www.rpg2s.net/forum/index.php/topic/22127-vintagevisuals-tale-chapters-save-system-20-by-giver/ Breaking (in ogni senso) News: "Treno deraglia per via del seno di Sakurai Aoi . . ." - Info nello spoiler !! http://afantasymachine.altervista.org/_altervista_ht/NOOOOOOOOOilMIOtreninooooo_500.gifNon riesco a smettere di essere affascinato da immagini come questa . . .http://anime.vl-vostok.ru/art/photos2011/17/78049800/wall_VladAnime_WWA_1885-1680x1050.jpgAlcuni wallpapers che faccio ruotare sul mio vecchio PC . . .http://afantasymachine.altervista.org/_altervista_ht/gits_window.jpghttp://afantasymachine.altervista.org/_altervista_ht/madoka_group01.jpghttp://afantasymachine.altervista.org/_altervista_ht/arisu_picipici_01.jpghttp://afantasymachine.altervista.org/_altervista_ht/phantom_wp01_einzwei.jpg La parte più spassosa della mia vita è quando gli altri cercano di spiegarmi i miei pensieri . . . BBCode TestingTypeface & Size Link to comment Share on other sites More sharing options...
nihil-omen Posted May 5, 2009 Share Posted May 5, 2009 (edited) Avevo intuito che c'era un qualche settagio iniziale della classe che impediva di far apparire le cose al di là di determinate coordinate (appunto dovevano apparire nella finestrella...) solo che non sapevo quale parametro era é.èChiedo venia per tutte queste domande, è che devo imparare e solo così noto miglioramenti... Comunque si, sono riuscito a fare la terza barra ^^ l'unico problema è che il valore di essa aumenta solo col refresh dellealtre due, devo dunque aggiungere altro oppure è un problema tutto degli eventi che settano la crescita di quella barra?(la barra in questinoe, come quella degli SP, si ricaricano col tempo, più sono alti determinati parametri del pg più velocemente si ricaricano, però se il pg fa level up senza perdere hp o sp il cambiameto di velocità della terza barra non cambia).Grazie mille in ogni caso ^^ [son riuscito addirittura a mettere i colori che volevo io!!!!! e a far apparire l'icona dell'arma equippata!]] Edited May 5, 2009 by nihil-omen http://i30.tinypic.com/xehois.gif} 2rA - web site {E' disponibile il primo capitolo completo di 2rA!} 2rA: Capitolo I { Link to comment Share on other sites More sharing options...
giver Posted May 5, 2009 Share Posted May 5, 2009 (edited) Devi intervenire sul metodo (def) update della finestra dell'HUD.def update super if @actors.size != $game_party.actors.size @actors = [] for i in 0...$game_party.actors.size @actors.push($game_party.actors[i]) end refresh return end for i in 0...@actors.size if @old_hp[i] != @actors[i].hp or @old_sp[i] != @actors[i].sp or @old_exp[i] != @actors[i].now_exp or @old_level[i] != @actors[i].level or @old_gold != $game_party.gold refresh @old_hp[i] = @actors[i].hp @old_sp[i] = @actors[i].sp @old_exp[i] = @actors[i].now_exp @old_level[i] = @actors[i].level @old_gold = $game_party.gold end endendA partire dalla linea 12 del pezzo di codice che ho postato viene fatta la verifica del cambiamento di tutti i parametri mostrati in finestra, quindi devi aggiungere qui la verifica del cambiamento del parametro che regola il riempimento della terza barra, e dopo la chiamata al refresh settare @old_parambarra3 = parambarra3. Edited May 5, 2009 by giver SCRIPT RGSS (RPG Maker XP) VINTAGE LIBRARY [2018+]http://www.rpg2s.net/forum/index.php/topic/21892-vintagevisualsrewrite-enhanced-revised-victory-screen-v-35-da-autori-vari-a-giver/ http://www.rpg2s.net/forum/index.php/topic/21868-eventing-utility-simple-last-battle-events-fix-v-30-by-giver/ http://www.rpg2s.net/forum/index.php/topic/21853-vintagerewrite-constance-menu-per-4-personaggi-da-team-constance-a-giver/ http://www.rpg2s.net/forum/index.php/topic/22126-vintagedoveroso-necroedit-dummy-title-22u-update-per-crearlo-ad-eventi-su-mappa-by-giver/ http://www.rpg2s.net/forum/index.php/topic/22127-vintagevisuals-tale-chapters-save-system-20-by-giver/ Breaking (in ogni senso) News: "Treno deraglia per via del seno di Sakurai Aoi . . ." - Info nello spoiler !! http://afantasymachine.altervista.org/_altervista_ht/NOOOOOOOOOilMIOtreninooooo_500.gifNon riesco a smettere di essere affascinato da immagini come questa . . .http://anime.vl-vostok.ru/art/photos2011/17/78049800/wall_VladAnime_WWA_1885-1680x1050.jpgAlcuni wallpapers che faccio ruotare sul mio vecchio PC . . .http://afantasymachine.altervista.org/_altervista_ht/gits_window.jpghttp://afantasymachine.altervista.org/_altervista_ht/madoka_group01.jpghttp://afantasymachine.altervista.org/_altervista_ht/arisu_picipici_01.jpghttp://afantasymachine.altervista.org/_altervista_ht/phantom_wp01_einzwei.jpg La parte più spassosa della mia vita è quando gli altri cercano di spiegarmi i miei pensieri . . . BBCode TestingTypeface & Size Link to comment Share on other sites More sharing options...
nihil-omen Posted May 5, 2009 Share Posted May 5, 2009 Forse ho capito ma ora non ho tempo di mettermi a far prove, stasera quando torno provo e ti faccio sapere ^^Grazie! ^^ http://i30.tinypic.com/xehois.gif} 2rA - web site {E' disponibile il primo capitolo completo di 2rA!} 2rA: Capitolo I { Link to comment Share on other sites More sharing options...
BIN.AD. corporation™ Posted April 27, 2010 Share Posted April 27, 2010 (edited) Puoi provare così, ma non sono sicuro che funzioni . . . Aggiungi, subito dopo class Scene_Map, in questo script o nello Scene_Map standard class Scene_Map # Inserire questa dichiarazione attr_accessor :HUD poi, per eliminarlo usa, tramite call script $scene.HUD.dispose e per farlo riapparire $scene.HUD = Window_HUD.new Non si potrebbe fare in modo che sia necessario chiamarlo e basta? Nel senso non appare finchè non lo attivo. Edited April 27, 2010 by BIN.AD. corporation™ BIN.AD. corporation™ All rights ® reservedVisita il sito http://binadcorporation.jimdo.comVedrai, ti catturerà!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now