Black_Dragon Posted January 3, 2008 Share Posted January 3, 2008 Ciao a tutti.Con questo script sarà possibile visualizzare l'armatura indossata da qualsiasi personaggio.Preciso che questa è una prima versione dello script, già domani potrebbe arrivare un'aggiornamento .Le istruzioni sono all'interno Script: #Titolo: VES (Visible equiment system) #Autore: Black_Dragon #Per utilizzare copiate questo script nel vostro #progetto. #Ogni volta che chiamerete il metodo draw_actro_graphic #verrà disegnate la grafica completa di armatura. #Istruzioni: #bhe non è che ci sia molto da dire se non queste poche #cose: #-bisogna mettere le varie risorse in Character/Equip #-ogni risorsa deve avere il nome che ha l'oggetto nel database #Varie: #per problemi mandatemi un mp o contattatemi a black_dasa@hotmail.it class Sprite_equip<RPG::Sprite def initialize(viewport,actor,equip) super(viewport) @character=actor @x=@character.screen_x @y=@character.screen_y if equip==nil @name="" else @name=equip.name+".png" end update end def update if @name != "" if @tile_id != @character.tile_id or @character_name != @character.character_name or @character_hue != @character.character_hue @tile_id = @character.tile_id @character_name = @character.character_name @character_hue = @character.character_hue if @tile_id >= 384 self.bitmap = RPG::Cache.tile($game_map.tileset_name, @tile_id, @character.character_hue) self.src_rect.set(0, 0, 32, 32) self.ox = 16 self.oy = 32 else self.bitmap = RPG::Cache.character("Equip/"+@name,@character.character_hue) @cw = bitmap.width / 4 @ch = bitmap.height / 4 self.ox = @cw / 2 self.oy = @ch end end self.visible = (not @character.transparent) if @tile_id == 0 sx = @character.pattern * @cw sy = (@character.direction - 2) / 2 * @ch self.src_rect.set(sx, sy, @cw, @ch) end self.x = @character.screen_x self.y = @character.screen_y self.z = @character.screen_z(@ch)+1 self.opacity = @character.opacity self.blend_type = @character.blend_type self.bush_depth = @character.bush_depth if @character.animation_id != 0 animation = $data_animations[@character.animation_id] animation(animation, true) @character.animation_id = 0 end end end end #Aggiunta a game temp del flag per refresh chara class Game_Temp attr_accessor :ref_char alias new_ini initialize def initialize new_ini @ref_char=false end end #Aggiunta del metodo che ritorna la classe actor class Game_Player < Game_Character def actor return $game_party.actors[0] end end #Modifica di parte dell'interprete class Interpreter def command_129 #aggiunge e rimuove membri al party actor = $game_actors[@parameters[0]] if actor != nil if @parameters[1] == 0 if @parameters[2] == 1 $game_actors[@parameters[0]].setup(@parameters[0]) end $game_party.add_actor(@parameters[0]) else $game_party.remove_actor(@parameters[0]) end end $game_temp.ref_char=true return true end end #Mie creazioni class Sprite_Player < RPG::Sprite attr_accessor :character def initialize(viewport,char = nil) super(viewport) #inserimento equipaggiamento setup(char) update end def update #aggiornamento if $game_temp.ref_char==true dispose setup($game_player) $game_temp.ref_char=false end for i in 0...@equip.size @vis_equip[i].update end @character.update end def dispose for i in 0...@equip.size @vis_equip[i].dispose end @character.dispose end def setup(char) if $game_party.actors.size !=0 @actor = char.actor @equip=Array.new @vis_equip=Array.new @equip.push($data_armors[@actor.armor1_id]) @equip.push($data_armors[@actor.armor2_id]) @equip.push($data_armors[@actor.armor3_id]) @equip.push($data_armors[@actor.armor4_id]) @equip.push($data_weapons[@actor.weapon_id]) for i in 0...@equip.size @vis_equip.push(Sprite_equip.new(viewport,char,@equip[i])) end @character=Sprite_Character.new(viewport,$game_player) end end end class Window_Base<Window def draw_armor_graphic(actor,equip, x, y) if equip !=nil bitmap = RPG::Cache.character("Equip/"+equip.name, actor.character_hue) cw = bitmap.width / 4 ch = bitmap.height / 4 src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect) end end alias old_draw draw_actor_graphic def draw_actor_graphic(actor,x,y) old_draw(actor,x,y) equip=Array.new equip.push($data_armors[actor.armor1_id]) equip.push($data_armors[actor.armor2_id]) equip.push($data_armors[actor.armor3_id]) equip.push($data_armors[actor.armor4_id]) equip.push($data_weapons[actor.weapon_id]) for i in 0...equip.size draw_armor_graphic(actor,equip[i],x,y) end end end V.E.S.rar "Fight for honor, fight for your life. Pray to god that our side is right.-Avenged sevenfold M.I.A. http://mypsn.eu.playstation.com/psn/profile/Black_Serian.png Link to comment Share on other sites More sharing options...
amivaleo Posted January 3, 2008 Share Posted January 3, 2008 Non capisco cosa faccia esattamente questo script...cioè... non c'è già l'opzione "Equip" nel menù per questo...? Link to comment Share on other sites More sharing options...
Silver Element Posted January 3, 2008 Share Posted January 3, 2008 Effettivamente non si capisce molto cosa faccia questo script. Penso forse intenda durante il combattimento oppure in mappa...boh... Link to comment Share on other sites More sharing options...
Sleeping Leonhart Posted January 3, 2008 Share Posted January 3, 2008 Penso che faccia vedere l'armatura indossata dal personaggio sullo sprite, e quindi nel menu, nella mappa e ovunque è usato il metodo draw_actor_graphic.Carino ma già era stata realizzata una cosa simile, comunque bel lavoro. http://img296.imageshack.us/img296/8784/csuserbarew2.pngScarica la Demo!Tutti i miei script(o quasi) li trovi Qui! Link to comment Share on other sites More sharing options...
amivaleo Posted January 3, 2008 Share Posted January 3, 2008 Avevo scritto uno script simile qualche tempo fa. Non è difficile da fare, solo noioso a causa di tutte quelle coordinate da settare per la posizione delle immagini...Il risultato finale non è male. Link to comment Share on other sites More sharing options...
Black_Dragon Posted January 4, 2008 Author Share Posted January 4, 2008 ho capito....non interessa a nessuno....... "Fight for honor, fight for your life. Pray to god that our side is right.-Avenged sevenfold M.I.A. http://mypsn.eu.playstation.com/psn/profile/Black_Serian.png Link to comment Share on other sites More sharing options...
Tio Posted January 4, 2008 Share Posted January 4, 2008 Uno script del genere esisteva già, ma ti assicuro che è un ottimo modo per iniziare con qualcosa di più complicato della media. Continua così e vedrai che alla fine potrai fare uno script più comodo ed elaborato ;) "Dopo gli ultimi Final Fantasy, ho capito solamente una cosa: che il gioco è bello quando Nomura poco."Making is not dead. You are dead.RELEASE: La Bussola d'Oro | Download | Video di anteprima - La Partenza di Hanna http://i.imgur.com/cFgc2lW.png Prova Standrama! Link to comment Share on other sites More sharing options...
Black_Dragon Posted January 4, 2008 Author Share Posted January 4, 2008 A dir la verità di esperienza ne ho solo che non ho il tempo per sviluppare un BS o un menu extra figus.Comunque se a qualcuno interessa tra breve posterò come scritto ieri l'aggiornamento. "Fight for honor, fight for your life. Pray to god that our side is right.-Avenged sevenfold M.I.A. http://mypsn.eu.playstation.com/psn/profile/Black_Serian.png Link to comment Share on other sites More sharing options...
amivaleo Posted January 4, 2008 Share Posted January 4, 2008 Dai dragon, non volevamo buttarti giù.E' uno script abbastanza facile da scrivere, questo non vuol dire che averne già uno bello e pronto sia inutile! Poi non tutti sanno scrivere uno script simile. Link to comment Share on other sites More sharing options...
Sleeping Leonhart Posted January 4, 2008 Share Posted January 4, 2008 Concordo con Ziel.Scusa se ti ho buttato giù di morale. http://img296.imageshack.us/img296/8784/csuserbarew2.pngScarica la Demo!Tutti i miei script(o quasi) li trovi Qui! Link to comment Share on other sites More sharing options...
Black_Dragon Posted January 4, 2008 Author Share Posted January 4, 2008 Non è che mi ha avete buttato giù il morale.E' solo che l'ho postato solo su questa community perchè credo sia l'unica che apprezzi veramente i lavori non come altre. Quindi sono rimasto un po' deluso tutto qui. "Fight for honor, fight for your life. Pray to god that our side is right.-Avenged sevenfold M.I.A. http://mypsn.eu.playstation.com/psn/profile/Black_Serian.png Link to comment Share on other sites More sharing options...
Silver Element Posted January 8, 2008 Share Posted January 8, 2008 Non è che mi ha avete buttato giù il morale.E' solo che l'ho postato solo su questa community perchè credo sia l'unica che apprezzi veramente i lavori non come altre. Quindi sono rimasto un po' deluso tutto qui. Gli scripter sono merce rara, e comunque uno script del genere (ai miei occhi profani) pare una cosa piuttosto complessa, quindi tranquilla, non sempre si ricevono commenti positivi ai propri lavori o comunque immediati.Questo ti deve solo spronare a fare ancora meglio, a dare tutto quello che hai ^^ Link to comment Share on other sites More sharing options...
the-joker Posted May 15, 2008 Share Posted May 15, 2008 Non potresti postare uno screen? "Quarantadue!" urlò Loonquawl. "Questo è tutto ciò che sai dire dopo un lavoro di sette milioni e mezzo di anni?""Ho controllato molto approfonditamente," disse il computer, "e questa è sicuramente la risposta. Ad essere sinceri, penso che il problema sia che voi non abbiate mai saputo veramente qual è la domanda." Gioco disponibile: Prophecy of Last Era - OPEN SOURCE http://www.mediafire.com/?u6aut42ks12ixgf Puoi utilizzare qualsiasi evento, mappa, chara, grafica, e programmazione contenuta nel gioco-demo.Nessun diritto di copia.Hope you enjoy.http://www.rpg2s.net/awards/bestmusician3.jpg 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