Lusianl Posted May 28, 2008 Share Posted May 28, 2008 Hub bar stile Zelda DescrizionePermette di avere le statistiche dell'eroe su schermo, attraverso la visualizzazione di cuori per gli hp e linee per gli mp.. AutoreMog-Hunter AllegatiLo screen:http://img156.imageshack.us/img156/1426/screnhubgb6.jpg Demo:http://www.mediafire.com/?4bbfxzyb03d Istruzioni per l'usoCreate una nuova classe sopra main e inserite questo script e chiamndolo "MOG-MPW Icon HUD": #_______________________________________________________________________________ # MOG_MPW ICON V1.0 #_______________________________________________________________________________ # By Moghunter # http://www.atelier-rgss.com #_______________________________________________________________________________ # HUD que apresenta o HP e SP em forma de ícones. # # É preciso ter as imagens: # HP_Icon # HP_Icon_Back # SP_Icon # SP_Icon_Back # Nome_do_Heroi_Face (Opcional) # Dentro da pasta Graphics/Pictures. # # NOTA - O script vai calcular cada ícone pela porcentagem de # HP ou SP, ou seja, não é porque você toma um ponto de dano # que você vai perder um ícone de HP (a não ser que seu HP final # seja igual a quantidade final de ícones. # #------------------------------------------------------------------------------- module MOG #Posição do HUD. STMAPX = 0 # X Pos STMAPY = 0 # Y Pos #Switch que desativa o HUD. STMAPVIS = 5 #Quantidade maxima final de ícones para o HP. MAX_ICON_HP = 20 #Quantidade maxima final de ícones para o SP. MAX_ICON_SP = 20 #Espaço entre os ícones de HP na horizontal. HP_ICON_SPACE_X = 20 #Espaço entre os ícones de SP na horizontal. SP_ICON_SPACE_X = 10 #Espaço entre a primeira linha de ícones com a segunda linha. #(Somente se a DIV_HP_LINE estiver como true) HP_ICON_SPACE_Y = 48 #Espaço entre a primeira linha de ícones com a segunda linha. #(Somente se a DIV_SP_LINE estiver como true) SP_ICON_SPACE_Y = 64 #Deixar os ìcones de HP em 2 linhas quando o HP #passar da metade do valor maximo final. DIV_HP_LINE = true #Deixar os ìcones de SP em 2 linhas quando o SP #passar da metade do valor maximo final. DIV_SP_LINE = false #Mostrar a condição do personagem. SHOW_STATES = true end $mogscript = {} if $mogscript == nil $mogscript["mpstelen"] = true ############## # Game_Actor # ############## class Game_Actor < Game_Battler attr_reader :final_maxhp attr_reader :final_maxsp def final_maxhp return $data_actors[@actor_id].parameters[0,$data_actors[@actor_id].final_level] end def final_maxsp return $data_actors[@actor_id].parameters[1,$data_actors[@actor_id].final_level] end end ############### # Window_Base # ############### class Window_Base < Window def draw_maphp2(actor, x, y) one_icon_hp_max = actor.final_maxhp * MOG::MAX_ICON_HP / actor.final_maxhp valor = 100 * actor.final_maxhp / 100 valor2 = 100 * actor.hp / 100 valor3 = one_icon_hp_max * valor2 / valor valor4 = 100 * actor.maxhp / 100 valor5 = one_icon_hp_max * valor4 / valor valor6 = one_icon_hp_max * valor / valor now_hp = RPG::Cache.icon("HP_Icon") now_cw = now_hp.width now_ch = now_hp.height now_hp_src_rect = Rect.new(0, 0, now_cw, now_ch) max_hp = RPG::Cache.icon("HP_Icon_Back") max_cw = max_hp.width max_ch = max_hp.height max_hp_src_rect = Rect.new(0, 0, max_cw, max_ch) if valor5 < 1 valor5 = 1 end if valor3 < 1 and actor.hp > 0 valor3 = 1 elsif valor3 <= 0 valor3 = 0 end if MOG::DIV_HP_LINE == true div = valor6 / 2 if valor5 < div for r in 0...valor5 x = r * MOG::HP_ICON_SPACE_X self.contents.blt(x + 80, y - max_ch + 30, max_hp, max_hp_src_rect) end else for r in 0...div x = r * MOG::HP_ICON_SPACE_X self.contents.blt(x + 80, y - max_ch + 30, max_hp, max_hp_src_rect) end for r in div...valor5 x = r * MOG::HP_ICON_SPACE_X self.contents.blt(x + 80 - MOG::HP_ICON_SPACE_X * div, y - max_ch + MOG::HP_ICON_SPACE_Y, max_hp, max_hp_src_rect) end end else for r in 0...valor5 x = r * MOG::HP_ICON_SPACE_X self.contents.blt(x + 80, y - max_ch + 30, max_hp, max_hp_src_rect) end end if MOG::DIV_HP_LINE == true div2 = valor6 / 2 if valor3 < div2 for i in 0...valor3 x = i * MOG::HP_ICON_SPACE_X self.contents.blt(x + 80, y - now_ch + 30, now_hp, now_hp_src_rect) end else for i in 0...div2 x = i * MOG::HP_ICON_SPACE_X self.contents.blt(x + 80, y - now_ch + 30, now_hp, now_hp_src_rect) end for i in div2...valor3 x = i * MOG::HP_ICON_SPACE_X self.contents.blt(x + 80 - MOG::HP_ICON_SPACE_X * div2, y - now_ch + MOG::HP_ICON_SPACE_Y, now_hp, now_hp_src_rect) end end else for i in 0...valor3 x = i * MOG::HP_ICON_SPACE self.contents.blt(x + 80, y - now_ch + 30, now_hp, now_hp_src_rect) end end end def draw_mapsp2(actor, x, y) one_icon_sp_max = actor.final_maxsp * MOG::MAX_ICON_SP / actor.final_maxsp valor = 100 * actor.final_maxsp / 100 valor2 = 100 * actor.sp / 100 valor3 = one_icon_sp_max * valor2 / valor valor4 = 100 * actor.maxsp / 100 valor5 = one_icon_sp_max * valor4 / valor valor6 = one_icon_sp_max * valor / valor now_sp = RPG::Cache.icon("SP_Icon") now_cw = now_sp.width now_ch = now_sp.height now_sp_src_rect = Rect.new(0, 0, now_cw, now_ch) max_sp = RPG::Cache.icon("SP_Icon_Back") max_cw = max_sp.width max_ch = max_sp.height max_sp_src_rect = Rect.new(0, 0, max_cw, max_ch) if valor5 < 1 valor5 = 1 end if valor3 < 1 and actor.sp > 0 valor3 = 1 elsif valor3 <= 0 valor3 = 0 end if MOG::DIV_SP_LINE == true div = valor6 / 2 if valor5 < div for r in 0...valor5 x = r * MOG::SP_ICON_SPACE_X self.contents.blt(x + 80, y - max_ch + 30, max_sp, max_sp_src_rect) end else for r in 0...div x = r * MOG::SP_ICON_SPACE_X self.contents.blt(x + 80, y - max_ch + 30, max_sp, max_sp_src_rect) end for r in div...valor5 x = r * MOG::SP_ICON_SPACE_X self.contents.blt(x + 80 - MOG::SP_ICON_SPACE_X * div, y - max_ch + MOG::SP_ICON_SPACE_Y, max_sp, max_sp_src_rect) end end else for r in 0...valor5 x = r * MOG::SP_ICON_SPACE_X self.contents.blt(x + 80, y - max_ch + 30, max_sp, max_sp_src_rect) end end if MOG::DIV_SP_LINE == true div = valor6 / 2 if valor5 < div for r in 0...valor3 x = r * MOG::SP_ICON_SPACE_X self.contents.blt(x + 80, y - now_ch + 30, now_sp, now_sp_src_rect) end else for r in 0...div x = r * MOG::SP_ICON_SPACE_X self.contents.blt(x + 80, y - now_ch + 30, now_sp, now_sp_src_rect) end for r in div...valor3 x = r * MOG::SP_ICON_SPACE_X self.contents.blt(x + 80 - MOG::SP_ICON_SPACE_X * div, y - now_ch + MOG::SP_ICON_SPACE_Y, now_sp, now_sp_src_rect) end end else for i in 0...valor3 x = i * MOG::SP_ICON_SPACE_X self.contents.blt(x + 80, y - now_ch + 30, now_sp, now_sp_src_rect) end end end def nada face = RPG::Cache.picture("") end def draw_heroface(actor,x,y) face = RPG::Cache.picture(actor.name + "_face") rescue nada cw = face.width ch = face.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x , y - ch, face, src_rect) end def draw_actor_statemap(actor, x, y) self.contents.font.size = 16 self.contents.font.name = "Georgia" text = make_battler_state_text(actor, width, true) self.contents.font.color = Color.new(0,0,0,255) self.contents.draw_text(x + 1, y + 1, 120, 32, text,1) self.contents.font.color = Color.new(250,255,255,255) self.contents.draw_text(x, y, 120, 32, text,1) end end ##################### # Window_Status_Map # ##################### class Window_Sthero < Window_Base def initialize super(0, 0, 640, 160) self.contents = Bitmap.new(width - 32, height - 32) self.windowskin = RPG::Cache.windowskin("") self.contents.font.bold = true self.contents.font.size = 20 self.contents.font.name = "Georgia" self.opacity = 0 refresh end def refresh self.contents.clear actor = $game_party.actors[0] draw_maphp2(actor,0, 0) draw_mapsp2(actor, - 50, 50) draw_heroface(actor, 0, 80) draw_actor_statemap(actor, 0, 75) if MOG::SHOW_STATES == true end end ############### # Game_Player # ############### class Game_Player < Game_Character attr_accessor :wref end ############# # Scene_Map # ############# class Scene_Map alias mog11_main main def main @sthero = Window_Sthero.new @sthero.x = MOG::STMAPX @sthero.y = MOG::STMAPY if $game_switches[MOG::STMAPVIS] == false @sthero.visible = true else @sthero.visible = false end mog11_main @sthero.dispose end alias mog11_update update def update if $game_switches[MOG::STMAPVIS] == false @sthero.visible = true else @sthero.visible = false end if $game_player.wref == true @sthero.refresh $game_player.wref = false end mog11_update end end ############## # Game_Party # ############### class Game_Party alias mog11_check_map_slip_damage check_map_slip_damage def check_map_slip_damage for actor in @actors if actor.hp > 0 and actor.slip_damage? $game_player.wref = true end end mog11_check_map_slip_damage end end ############### # Interpreter # ############### class Interpreter alias mog11_command_311 command_311 def command_311 mog11_command_311 $game_player.wref = true end alias mog11_command_312 command_312 def command_312 mog11_command_312 $game_player.wref = true end alias mog11_command_313 command_313 def command_313 mog11_command_313 $game_player.wref = true end alias mog11_command_314 command_314 def command_314 mog11_command_314 $game_player.wref = true end alias mog11_command_315 command_315 def command_315 mog11_command_315 $game_player.wref = true end end ################ # Game_Battler # ################ class Game_Battler alias mog11_attack_effect attack_effect def attack_effect(attacker) mog11_attack_effect(attacker) $game_player.wref = true end alias mog11_skill_effect skill_effect def skill_effect(user, skill) mog11_skill_effect(user, skill) $game_player.wref = true end alias mog11_item_effect item_effect def item_effect(item) mog11_item_effect(item) $game_player.wref = true end alias mog11_add_state add_state def add_state(state_id, force = false) mog11_add_state(state_id, force = false) $game_player.wref = true end end Ricordate che per visualizzare il l'immagine dell'eroe, chiamate il face come il nome del protagonista! http://www.freankexpo.net/signature/1129.pngPremi RpgMaker http://www.rpg2s.net/forum/uploads/monthly_01_2017/msg-293-0-48316500-1483794996.jpghttp://www.rpg2s.net/dax_games/r2s_regali2.pngContesthttp://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest3Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest3Oct.gifhttp://rpg2s.net/gif/SCContest3Oct.gifhttp://rpg2s.net/gif/SCContest3Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest3Oct.gifhttp://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif http://rpg2s.net/gif/SCContest1Oct.gif http://rpg2s.net/gif/SCContest2Oct.gif http://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest1Oct.gifhttp://www.rpg2s.net/awards/bestpixel2.jpghttp://www.rpg2s.net/awards/bestresourCSist2.jpghttp://www.rpg2s.net/awards/mostproductive1.jpghttp://i42.servimg.com/u/f42/13/12/87/37/iconap13.pnghttp://i42.servimg.com/u/f42/13/12/87/37/iconap14.pnghttp://i42.servimg.com/u/f42/13/12/87/37/iconap15.pnghttp://i42.servimg.com/u/f42/13/12/87/37/iconap16.pnghttp://i42.servimg.com/u/f42/13/12/87/37/screen10.pnghttp://www.rpgmkr.net/contest/screen-contest-primo.pnghttp://www.makerando.com/forum/uploads/jawards/iconawards3.png Link to comment Share on other sites More sharing options...
Dark Sora Posted May 29, 2008 Share Posted May 29, 2008 O_OChe figo sto script!!! I miei tutorialBS in tempo reale ad eventiTecnica RubaPesca ad eventiEvocareLancio del massoMinigioco del NegozioPartecipante al Rpg2s.net Game Contest 2008/2009http://www.rpg2s.net/contest/GameContest0809/gc0809-bannerino.jpgGioco in Sviluppo: Factionshttp://img252.imageshack.us/img252/8742/bannerinoteamlrmiu6.png http://img393.imageshack.us/img393/9920/legenrpgmaniamu3.gifForum:The legend of making 26373462 I love you!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Mai Dire Speciale CinemaL'Uomo che Usciva TuttiBotte e Risposte / Rapine a mano a manoMobbastaMobbasta veramente per�Mani in AltoPer un peloGiammangiatoAnche no / Il buio / AhiaBurleAcqua Corrente / UrgenzeLegendRpgManiaIl 70% dei ragazzi pensa che GTA sia il miglior gioco del mondo. Il restante 30% pensa che Kingdom Hearts sia il gioco pi� bello. Se fai parte di questo 30% copia e incolla questa frase nella tua firma/blog.MITICO OBSIDIAN LORD!!!The March of The SwordmasterHoly ThunderforceBard's SongTALES OF MAGICEntra nella scuola di magia e diventa il mago pi� grande del mondo!Tales of Magic � completamente gratuito e senza alcun obbligo! Il manuale ti fornir� informazioni sulle modalit� di funzionamento del gioco.LINK DEL GIOCOBunnies AreaBunnies Can't PhoneBunnies Can't play 360Bunnies Can't play RugbyBunnies Can't win racesBunnies Can't Cook EggsBunnies Can't cook turkeyBunnies Can't DateBunnies Can't ParkBunnies Can't play with FireworksMi conoscete???Se s� cliccate qui Epitaffi:1)E' diventato carne secca...2)Giocava a buttarsi gi� dal castello...3)Stava abbracciando una bomba a mano...4)Gli piaceva bere nitroglicerina...5)Ha ingoiato un candelotto di dinamite...6)Ha effettuato il salto in lungo nel cratere di un vulcano...7)Quando i suoi compagni di classe giocavano a calcio lui era la palla...________________________________________________________________________________A prescindere dal colore della pelle e dalla religione siamo tutti uguali e tutti abbiamo ugal diritto di vivere. Credi la scuola sia una seccatura? Un'imposizione dei genitori? Sai quanto darebbero questi bambini per avere un'istruzione? Invece loro ed i loro genitori vengono sfruttati nelle industrie delle pi� note multinazionali americane ed europee: Nike, Nestl�, Kraft...Se sei anche tu contro il razzismo e contro lo sfruttamento inserisci questa frase nella tua firma.________________________________________________________________________________Now Playing:PS3 : Soul Calibur 4PS2 : Kingdom Hearts Re Chain of MemoriesDS : Final Fantasy IV / Final Fantasy XII : Revenant Wings / Spore Creatures / Dinosaur KingPSP : Ratchet and Clank : Size Matters / Secret Agent Clank / Naruto Ultimate Ninja Heroes 2 / GuitarWay To Heaven 4 AmplifiedPC : Frets on Fire con la chitarra!!! O_ORpg Maker XpI miei progetti:Per ora nulla...http://team.ffonline.it/imgpersonaggio/cloud_it.jpghttp://img230.imageshack.us/img230/608/pencehaynerroxasolettejyt1.th.jpghttp://r3.fodey.com/15d01c4c6f2dd4908b320f697f7fbe7bd.1.gifhttp://img801.mytextgraphics.com/flamewordmaker/2008/03/28/2554b85201dbda32d87d5873d964a4fd.gif Link to comment Share on other sites More sharing options...
Soul Eater Posted May 29, 2008 Share Posted May 29, 2008 Molto carino, bravo che l'hai postato^^ Targhettehttp://www.rpg2s.net/awards/mostpolite2.jpghttp://www.rpg2s.net/awards/mostpresent1.jpghttp://i51.tinypic.com/2mfnpt2.png http://www.rpg2s.net/dax_games/r2s_regali5.png Link to comment Share on other sites More sharing options...
rizzuccio Posted April 21, 2011 Share Posted April 21, 2011 Lo so' ke arrivo in ritardo, ma a me sto script mi servirebbe cn una piccola modifica...la faccia dell'eroe cn i cuori e le barre si potrebbero mettere nell'angolo in basso a sinistra anzike in alto a sinistra ? http://www.freankexpo.net/signature.php?gid=683.png Link to comment Share on other sites More sharing options...
giver Posted April 21, 2011 Share Posted April 21, 2011 Per riposizionare l'HUD basta cambiare le due costanti che si trovano quasi all'inizio dello script, come dicono anche le istruzioni, a dire il vero . . .#Posição do HUD.STMAPX = 0 # X PosSTMAPY = 0 # Y PosAdesso, non ho calcolato quanto è alto l'HUD per avere una stima precisa del valore di Y da assegnargli, comunque puoi cominciare a dargli STMAPY = 400, ed aggiustare il valore dopo aver visto come rende . . . 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...
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