Xemnas Posted May 3, 2010 Share Posted May 3, 2010 (edited) Buona sera ragazzi...come molti di voi sapranno stavo creando uno starter lit e, cercando mi sono inmbattuto in questo script veramente molto utile!Autore:modern algebraTitolo:Extra Movement Frames v. 1.0( script di compatibilità grafica da RMXP to RMVX ) #======================================================================= # Extra Movement Frames v. 1.0 # Author: modern algebra (rmrk.net) # Date: January 20, 2008 #------------------------------------------------------------------------------ # Instructions: # Insert this script above main in the database. To add a character with # extra movement frames, simply rename the character graphic to something # of the form: # !$%[<number of movement frames>]<Regular name> # # Example: !$%[4]001-Fighter01 # That would make the graphic 001-Fighter01 be interpreted as having 4 frames #------------------------------------------------------------------------------ # ** Game_Character #------------------------------------------------------------------------------ # Summary of changes: # aliased methods - update_animation # new class variables - height divisor, width divisor # new methods - calculate_divisors #======================================================================= class Game_Character #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_reader :height_divisor # The height of a single frame attr_reader :width_divisor # number of frames in the x direction attr_reader :char_frames #-------------------------------------------------------------------------- # * Calculate Divisors #-------------------------------------------------------------------------- # Sets up the instance variables required #-------------------------------------------------------------------------- def calculate_divisors return unless @previous_character.nil? || @previous_character != @character_name bitmap = Cache.character (@character_name) sign = @character_name[/^[\!\$].[\%]\[\d*\]/] if !sign.nil? && sign.size > 5 @original_pattern = 0 @width_divisor = sign[4, sign.size - 5].to_i @height_divisor = 4 @char_frames = @width_divisor elsif !sign.nil? && sign.include? ('$') @width_divisor = 3 @height_divisor = 4 @char_frames = 3 else @width_divisor = 12 @height_divisor = 8 @char_frames = 3 end @previous_character = @character_name end #-------------------------------------------------------------------------- # * Update Animation #-------------------------------------------------------------------------- # Change the hard coded values to ones dependent on character graphic format #-------------------------------------------------------------------------- alias ma_extra_movement_frames_anim_upd update_animation def update_animation if @width_divisor == 12 || @width_divisor == 3 ma_extra_movement_frames_anim_upd return end saved_anime_count = @anime_count pattern_original = @pattern speed = @move_speed + (dash? ? 1 : 0) ma_extra_movement_frames_anim_upd if (saved_anime_count > (18 - speed * 2)) && (@step_anime || (@stop_count <= 0)) @pattern = (pattern_original + 1) % @char_frames end end end #======================================================================= # * Sprite Character #------------------------------------------------------------------------------ # Summary of changes: # aliased methods - update_src_rect, update_bitmap #======================================================================= class Sprite_Character #-------------------------------------------------------------------------- # * Update Src Rect #-------------------------------------------------------------------------- # Interpret multiple movement frames: Changed pattern #-------------------------------------------------------------------------- alias ma_extra_movement_frames_src_rect_upd update_src_rect def update_src_rect if @tile_id == 0 ma_extra_movement_frames_src_rect_upd index = @character.character_index pattern = @character.pattern < @character.char_frames ? @character.pattern : 1 sx = (index % 4 * 3 + pattern) * @cw sy = (index / 4 * 4 + (@character.direction - 2) / 2) * @ch self.src_rect.set(sx, sy, @cw, @ch) end end #-------------------------------------------------------------------------- # * Update Bitmap #-------------------------------------------------------------------------- # Change hard coded values to ones dependent on character graphic #-------------------------------------------------------------------------- alias ma_extra_movement_frames_bmp_upd update_bitmap def update_bitmap @character.calculate_divisors saved_tile_id = @tile_id saved_character_name = @character_name saved_character_index = @character_index ma_extra_movement_frames_bmp_upd if saved_tile_id != @character.tile_id or saved_character_name != @character.character_name or saved_character_index != @character.character_index unless @tile_id > 0 @cw = bitmap.width / @character.width_divisor @ch = bitmap.height / @character.height_divisor self.ox = @cw / 2 self.oy = @ch end end end end #======================================================================= # ** Window Base #------------------------------------------------------------------------------ # Summary of changes: # overwritten methods - draw_character #======================================================================= class Window_Base #-------------------------------------------------------------------------- # * Draw Charater (overwritten for extra movement frames) # character_name : the name of the character file # character_index : the index of the character in the file # x : the x position to draw # y : the y position to draw #-------------------------------------------------------------------------- def draw_character(character_name, character_index, x, y) return if character_name == nil bitmap = Cache.character(character_name) sign = character_name[/^[\!\$].[\%]\[\d*\]/] if !sign.nil? && sign.size > 5 cw = bitmap.width / sign[4, sign.size - 5].to_i ch = bitmap.height / 4 elsif sign != nil and sign.include?('$') cw = bitmap.width / 3 ch = bitmap.height / 4 else cw = bitmap.width / 12 ch = bitmap.height / 8 end n = character_index src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch) self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect) end end \Istruzioni/:Per far interpretare al database le immagini che hanno 4 frame (RMXP) o di più ( 5, 6, 7, 8, 9, 10,.., )basta aggiungere questariga davanti al nome dell'immagine:!$%[numeroframe]nome immagine Esempio:!$%[4]Civilian0001.png E con questo vi ho dato 2 script che permettono di riportare alla luce RMXP su RMVX!!! se a qualcuno interessa l'altro script cliccate quì:Risoluzione RMXP (640x480) Spero che non c'era sul forum^_^ A presto con lo Starter Kit in otima fase di produzione^_^!!! Ciao a tutti...: Da:Xemnas :rolleyes: Edited May 4, 2010 by Xemnas Cliccate sullo spoiler per vedere la mia firma...^_^: http://i84.servimg.com/u/f84/14/44/79/04/graffi11.gifVenite a trovarmi nel mio nuovo Sito:The Word of the New Game Ecco la Mia firma fatta da me!!!:http://img11.imageshack.us/img11/1676/firmaol.png Ecco il Banner del mio sito!http://searchfile.altervista.org/Immagini/Bannepng.png http://img692.imageshack.us/img692/1655/pywrightsyte.gifBasnners by Me^_^ Link to comment Share on other sites More sharing options...
Guardian of Irael Posted May 3, 2010 Share Posted May 3, 2010 Bello script Xemnas ^ ^Ricorda però di applicare un poco meglio il template, soprattutto, visto che nello script è presente, metti il nome dell' autore in vista.^ ^ (\_/)(^ ^) <----coniglietto rosso, me! (> <) Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^ http://i.imgur.com/KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^ http://i.imgur.com/FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^ REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^ 🖤http://www.rpg2s.net/dax_games/r2s_regali2s.png E:3 http://www.rpg2s.net/dax_games/xmas/gifnatale123.gifhttp://i.imgur.com/FfvHCGG.png by Testament (notare dettaglio in basso a destra)! E:3http://i.imgur.com/MpaUphY.jpg by Idriu E:3Membro Onorario, Ambasciatore dei Coniglietti (Membro n.44) http://i.imgur.com/PgUqHPm.pngUfficiale"Ad opera della sua onestà e del suo completo appoggio alla causa dei Panda, Guardian Of Irael viene ufficialmente considerato un Membro portante del Partito, e Ambasciatore del suo Popolo presso di noi"http://i.imgur.com/TbRr4iS.png<- Grazie Testament E:3Ricorda...se rivolgi il tuo sguardo ^ ^ a Guardian anche Guardian volge il suo sguardo ^ ^ a te ^ ^http://i.imgur.com/u8UJ4Vm.gifby Flame ^ ^http://i.imgur.com/VbggEKS.gifhttp://i.imgur.com/2tJmjFJ.gifhttp://projectste.altervista.org/Our_Hero_adotta/ado2.pngGrazie Testament XD Fan n°1 ufficiale di PQ! :DVivail Rhaxen! <- Folletto te lo avevo detto (fa pure rima) che nonavevo programmi di grafica per fare un banner su questo pc XD (ora ho dinuovo il mio PC veramente :D) Rosso Guardiano dellahttp://i.imgur.com/Os5rvhx.pngRpg2s RPG BY FORUM:Nome: Darth Reveal PV totali 2PA totali 16Descrizione: ragazzo dai lunghi capelli rossi ed occhi dello stesso colore. Indossa una elegante giacca rossa sopra ad una maglietta nera. Porta pantaloni rossi larghi, una cintura nera e degli stivali dello stesso colore. E' solito trasportare lo spadone dietro la schiena in un fodero apposito. Ha un pendente al collo e tiene ben legato un pezzo di stoffa (che gli sta particolarmente a cuore) intorno al braccio sinistro sotto la giacca, copre una cicatrice.Bozze vesti non definitive qui.Equipaggiamento:Indossa:60$ e 59$ divisi in due tasche interneLevaitanSpada a due mani elsa lungaGuanti del Defender (2PA)Anello del linguaggio animale (diventato del Richiamo)Scrinieri da lanciere (2 PA)Elmo del Leone (5 PA)Corazza del Leone in Ferro Corrazzato (7 PA) ZAINO (20) contenente:Portamonete in pelle di cinghiale contenente: 100$Scatola Sanitaria Sigillata (può contenere e tenere al sicuro fino a 4 oggetti curativi) (contiene Benda di pronto soccorso x3, Pozione di cura)CordaBottiglia di idromeleForma di formaggioTorcia (serve ad illuminare, dura tre settori)Fiasca di ceramica con Giglio Amaro (Dona +1PN e Velocità all'utilizzatore)Ampolla BiancaSemi di Balissa CAVALLO NORMALE + SELLA (30 +2 armi) contentente:66$Benda di pronto soccorso x3Spada a due maniFagotto per Adara (fazzoletto ricamato) Link to comment Share on other sites More sharing options...
MasterSion Posted May 3, 2010 Share Posted May 3, 2010 Ottimo! Servirebbe uno script per far leggere i tileset come l'xp almeno non diventa quadrato perso il gioco xD. http://img256.imageshack.us/img256/7639/ihateyou.gifUn uomo senza religione è come un pesce senza bicicletta.http://img18.imageshack.us/img18/3668/decasoft1.pnghttp://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif 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