-
Posts
82 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Calendar
Posts posted by Burton
-
-
Beh io ho fatto la distinzione per farvi capire come funzionano, nel gioco sono 40 e non sono suddivise, se le trovi, bene, altrimenti ti attacchi XD
-
Le immagini originali appartengono a qualche gioco che non conosco o le hai realizzate tu?
-
Ci sono tre tipi di lettere:
-Quelle che raccontano l'accaduto.
-Quelle che insegnano nuove skills.
-Quelle che raffigurano progetti per armi particolari (ma su questo non dirò altro) :D
La maggior parte delle lettere della seconda categoria le troverete nel corso della storia principale (la maggior parte... non tutte :D).
Le restanti saranno nascoste, in modo da spingere il giocatore ad esaminare accuratamente il mondo di gioco e, perché no, anche di affrontare delle sidequest.
-
Intelligere = Intendere, concepire, comprendere.
-
Essendo lui di umili origini, ho deciso di mettergli in mano questo pugnale molto semplice, che ricorda appunto un coltello :)
Comunque quel pugnale non è così tanto importante, non ci saranno pugnali nel gioco, è puramente "decorativo".
Alle spalle del chara manca solo un martello che è la tipologia di armi da lui usata.
NEWS:
La storyline del progetto è molto più definita quindi credo di potervi rivelare i dettagli principali dei nostri quattro protagonisti.
Repetita iuvant:
La leggenda di nonno Kiome narra di un semidio che ha infranto un patto con gli Dei, dando alla luce un figlio.
"Quando fu scoperto fu privato dei suoi poteri e il cuore per lui creato smise di battere.
Gli dei temevano il potere del neonato ma egli era protetto e nascosto, e con stupore scoprirono che la creatura era invisibile ai loro sensi.
Spaventati e corrotti dall’odio e dall’ira, spazzarono via l’intera specie, ma resisi conto del loro errore risparmiarono i pochi sopravvissuti e decisero che mai più tale sciagura si sarebbe abbattuta su di loro."
Cosa accadde dopo?
I sopravvissuti diedero origine a nuove generazioni, ripopolando il continente, lo stesso fece il piccolo semidio.
Quest ultimo, sopravvissuto perchè protetto, lascia il rifugio creato dal padre.
Da lui discende quella che nel gioco viene definita la "stirpe angelica".
Nei secoli la stirpe angelica si è suddivisa in quattro famiglie che si sono distribuite nel territorio dell'Iperios (il mondo di gioco di Holy Blood).
Da ognuna delle quattro famiglie discende uno dei membri del team.
Ad ogni famiglia viene associata una virtù.
PRIMA FAMIGLIA: La famiglia Keron, la cui virtù è la Forza, è la famiglia alla quale appartiene il protagonista: Akeros.
Gli ultimi discendenti sono il giovane Akeros e suo padre Akartis. Si stabilirono in un piccolo villagio chiamato Altitudi, situato sulla vetta di un monte.
SECONDA FAMIGLIA: La famiglia Kirotos possiede la virtù dell'Intelligenza, sono abili mercanti e si stabilirono a Porto Iperia.
TERZA FAMIGLIA: La famiglia Kaliotos possiede la virtù del Controllo.
Regnano sull'impero di Divite e sono venerati come divinità. A quanto pare sotto il dominio della famiglia Kaliotos, l'impero di Divide vive il suo periodo d'oro.
QUARTA FAMIGLIA: La famiglia Koration possiede la virtù della Saggezza e si stabilirono nel bosco Trunci, lontani dalla società, per osservare gli ideali di purezza e serenità.
Ogni membro del team è specializzato in una tipologia di armi:
Akeros (Keron): Martelli o Armi pesanti in generale.
Noima (Kirotos): Armi da fuoco.
Elena (Kaliotos): Aste e Scettri.
Sofia (Koration): Libri e Tomi.
Nel descrivere cosa accadde dopo la punizione degli Dei sono stato molto vago, questo perchè nel gioco, sotto forma di collezionabili, troverete alcune lettere (circa una quarantina).
Lettere lasciate dal padre divino (così definito dalle generazioni attuali e si riferisce a colui che violò il patto con gli Dei) al figlio per spiegargli quanto accaduto.
Queste lettere costituiscono l'epistolario della verità, il cui scopo non è solo quello di narrarvi l'accaduto ma anche di insegnare nuovi attacchi ai membri del team.
Spero gradiate quanto avete letto :)
-
Ma... gli spunta un'ala dal braccio?Sono piume, una decorazione per l'armatura.
Simboleggia la loro discendenza divina.
cosa tiene in mano? ^ ^Pugnale :)
-
Fa la sua porca figura

-
http://kashikoi.altervista.org/Holy_Blood/Main_Chara.png
Sotto spoiler trovate il concept del protagonista di Holy Blood: Akeros!
Dietro i silenzi di Akeros si nascondono profonde riflessioni e minuziosa analisi dei dettagli.
La sua virtù è la forza.
Il suo fisico non proprio massiccio è la perfetta dimostrazione che la forza mentale è ben più importante di quella fisica.
Ad ogni modo, alla tenera età di tre anni alzava tronchi come fossero piume.
-
Effettivamente non ha l'aria dell'eroe o del protagonista, forse lo riuserò come cittadino, mi serviva solo definire lo stile del progetto con qualcosa di semplice che potessi usare per iniziare a mappare :D
-
E poi non è mica da tutti fare in uno stesso gioco sia la grafica che gli script da soli!Eh magari fosse davvero così XD In realtà gli script li realizza Maxy, io mi occupo di tutto il resto.
Per avere un team "essenziale" mi mancherebbe solo un compositore.
Poi qualsiasi altro aiuto servirebbe a perfezionare ma per quello è presto.
lo vedevo poco dinamico in quel colpo di lama!Perchè ha solo gli occhi chiusi XD dovrebbe avere anche le braccia alzate ma lavorare su tutte le pose del chara ora non avrebbe senso in quanto è previsto un cambio di personaggio a breve.
-
Il pg pare rimanere statico, giusto? ^ ^A dire il vero per il PG avevo in mente tutta una serie di posizioni per ogni situazione:
Corsa, Magia, Arrampicata.
Addirittura ho intenzione di far muovere il personaggio anche quando questo resta fermo troppo a lungo, ad esempio passati 2-3 secondi il chara inizia a girare la testa di 3/4, la alza verso il cielo ecc.
Miro ad una scena molto movimentata, non voglio che sia tutto troppo fermo.
Ottimo, così avremo tanta interazione su mappa! E:3Vedo tanti progetti e la maggior parte punta sempre molto, forse troppo, sulle lotte o sulla storia, dimenticando quasi di coinvolgere il giocatore.
L'interazione su mappa è essenziale, non ci si dovrebbe limitare alla camminata o la chiacchierata con i personaggi nell'edificio o fuori, l'interazione apre le porte all'esplorazione vera e propria, di quel tipo che quando trovi quel determinato oggetto o quella determinata stanza o addirittura mappa, sei contento.
A questo scopo inserirò nel mio progetto tre modalità di movimento: Corsa, Camminata, Accovacciato, alcune zone saranno raggiungibili solo usandole nel modo giusto.
Funziona così:
Nel secondo schermo posto proprio sotto quello principale ci saranno tre tasti, ognuno collegato ad una modalità di movimento, premendo uno di questi tasti il personaggio resterà in quella modalità finché vorrai.
Inutile dire che la modalità "camminata" è quella predefinita.
-
"Una razza di esseri divini con un'intelligenza sopraffina e stupefacenti poteri!"
http://kashikoi.altervista.org/Holy_Blood/Lama.png
Non vi dico quanto ho impiegato per capire come funzionassero più o meno le animazioni XD
Quello che vedete nello screen è realizzato tramite evento, ancora devo risolvere il problemino riguardante il collegamento: menu/mossa/reazione ambiente.
Ma credo che questo sia già un gran passo :)
Un po' di informazioni:
Il potere utilizzato nello screen è "Lama".
Utilizzato solo dal protagonista principale, "Lama" appartiene alla virtù della forza, può essere usato sia fuori che nella battaglia.
A nord-ovest del giocatore potete assistere ad una cassa contenente una pozione e a sud una cassa spostabile dal giocatore stesso tramite il contatto.
Spero vi piaccia :)
EDIT: Modificata l'introduzione, giusto per portarvi sulla strada sbagliata :D
-------------
“SOFIDE: L’uomo è tra le creature più straordinarie che popolano questo pianeta, egli è intelligente, ma ignorante al tempo stesso. Ignora la conoscenza ma intellige l’ignoranza!
E’ preda dei peccati e agisce in modo irrazionale, buffo, uomini e Dei sono così simili tra loro, si potrebbe quasi dire che gli uni discendano dagli altri.
ALUNNO: Ma questo è scontato!
SOFIDE: Se è davvero così scontato, dimmi chi discende da chi.
ALUNNO: Gli uomini discendono dagli Dei!
SOFIDE: E' perchè non potrebbe essere il contrario?”
- Dialogo sopra i posteri - Sofide il Saggio-
-Manoscritto di Holy Blood-
-
Cercherò per quanto possibile di realizzare tutta la parte grafica del progetto, non faccio promesse da marinaio perchè non è una cosa facile, potrei anche decidere di fare uso di risorse esterne, opportunamente modificate per adattarsi allo stile del gioco ovviamente, ma solo se strettamente necessario.
-
Grafica custom, cercando di non ottenere quell'effetto troppo squadrato che non amo particolarmente.
Se vuoi farti un'idea di quella che sarà la mia mappa del mondo ti basta guardare quella di Golden Sun (al quale Holy Blood si ispira molto).
-
http://kashikoi.altervista.org/Holy_Blood/mappa_del_mondo-completa.png
Quella di prima era solo un piccola prova per farmi un'idea dell'effetto finale ma le montagne non piacciono nemmeno a me quindi ho deciso che le farò rocciose, grigie e non marroni.
Questi sono i quattro continenti e rispettive isole.
Questa mappa sarà presente nel gioco in tre versioni:
-Digitale, per la presentazione del progetto.
-Carta geografica vecchio stile, per una consultazione durante la partita, con tanto di omino per indicare la posizione :D e in base alla scheda selezionata: con suddivisione dei territori.
-E infine mappata, per essere esplorata direttamente e per muoversi di luogo in luogo.
Inutile dire che il gioco non si svolgerà al 100% su questa mappa, in alcuni punti della partita potreste trovarvi in luoghi che possono comportare la comparsa di una simpatica scritta:
"non presente sulla mappa"
Ma sarà compito vostro raggiungere questi posti. :D
-
Ora vedi qualcosa?
-
"Iperios è sempre stata magica, un mondo affascinante per così dire. Colpita dalla peggiore calamità qual è l'uomo, tuttavia sempre verde e viva."
http://kashikoi.altervista.org/Holy_Blood/mappa_del_mondo-completa.png
Hi fellas :D
Sono tornato!! Mi mancava il progetto così ho trovato la voglia di "comprare"... :D RPGmaker XP e ricominciare a lavorare.
Ho scritto un bel po' di storia ed eventi e sto facendo i primi schizzi dei quattro membri del team.
Ho finito di disegnare la mappa del mondo e ora la sto elaborando a computer, quello che vedete sopra è il primo continente: Perienia!
Un po' di storia:
Iperios è il mondo di gioco di Holy Blood, si suddivide in quattro continenti: Perienia, Defteria, Tritesia, Tetartia.
Come la Terra, secoli fa Iperios era unita, e i quattro continenti formavano la... Pangea :D
"Loro erano così pochi e noi così tanti, come poteva accadere altrimenti?"
Gli Dei, furibondi per la superbia dell'uomo, lo punirono!
"...La terra cominciò a tremare, sentimmo i piedi sprofondare nel terreno e pian piano vedemmo solchi enormi separare le case, i fiumi, le madri dai propri figli..."
I quattro continenti si distanziarono sempre più e non si sarebbero mai più incontrati fino al giorno della loro caduta.
(Allora la terra era considerata piatta e il continuo moto dei continenti sarebbe cessato in una caduta nel vuoto).
Non siate troppo severi nel giudicare la mappa del mondo, è ancora in fase di preparazione e molto di quello che vedere potrebbe addirittura essere modificato.
Avevo semplicemente voglia di raccontarvi qualcosa quindi ho scelto di condividere con voi questo :)
Hope you like it :D
-
What happened to Holy Blood?
Niente, ci sono stati un po' di eventi spiacevoli che mi hanno impedito di mantenere la promessa fatta (portarvi news su Holy Blood entro Natale).La verità è che il mio computer è stato infettato da virus di ogni genere, da li a breve non avrei potuto guardare nemmeno più la televisione... XD
Quindi ho dovuto formattare, fortunatamente non ho perso nulla, ma si tratta di installare nuovamente RPG Maker XP e di ehm "pagarlo"... ehm...
Non ho il tempo... ne la voglia, sono troppo occupato e quel poco di tempo libero non ho intenzione di passarlo d'avanti ad un computer.
Quindi attualmente Holy Blood è fermo, in attesa di tempi migliori.
Chiedo scusa a tutti coloro che seguono il progetto, continuate a visitare il topic perchè potrei aggiornare in qualsiasi momento.
Grazie per l'attenzione e buon anno nuovo (anche se molto in ritardo).
-
Ciao ragazzi!
Chiedo scusa se non sto aggiornando molto ma la verità è che sono impegnatissimo tra scuola e lavoro.
Presto ci saranno le vacanze di Natale e spero di concludere qualcosina in quel periodo e di farvi sapere di più.
Continuate a seguire Holy Blood e grazie :)
-
Grazie mille :) Sono davvero contento del risultato.
Per quanto riguarda le ombre, si, ci sto lavorando, infatti come puoi notare mancano anche alle case XD
-
Aggiorno dopo un bel po' con qualche screen di Altitudi, il villaggio sulla vetta della montagna, non che villaggio che ha dato i natali al nostro protagonista:
http://kashikoi.altervista.org/Holy_Blood/Screen__001.png
Voglio ringraziare Maxy che ha deciso di unirsi al gruppo e che ha già fatto molto :)
Spero vi piaccia :)
Ricordo che tutta la grafica che potete vedere in questi screen è stata realizzata dal sottoscritto, quindi vi prego di rispettare il mio lavoro e di non usare nulla.
-
-
Se ricordo bene ho modificato la classe game_player per spostare le coordinate del centro del giocatore, e la classe Game map per spostare il bordo della mappa.
Ma tutto quello che ho fatto è stato aggiungere un paio di operatori qua e la, non ho stravolto così tanto lo script.
Non ricordo se quello sopra postato è lo script così come l'ho scaricato o quello preso dal progetto già modificato, in ogni caso li riscrivo entrambi.
Script modificato
#=============================================================================== # Custom Resolution # Author: ForeverZer0 # Version: 0.93 # Date: 12.18.2010 #=============================================================================== # # Introduction: # # My goal in creating this script was to create a system that allowed the user # to set the screen size to something other than 640 x 480, but not have make # huge sacrifices in compatibility and performance. Although the script is # not simply Plug-and-Play, it is about as close as one can achieve with a # script of this nature. # # Instructions: # # - Place the "screenshot.dll" from Fantasist's Transition Pack script, which # can be found here: http://www.sendspace.com/file/yjd54h in your game folder # - Place this script above main, below default scripts. # - In my experience, unchecking "Reduce Screen Flickering" actually helps the # screen not to flicker. Open menu with F1 while playing and set this to what # you get the best results with. # # Features: # # - Totally re-written Tilemap and Plane class. Both classes were written to # display the map across any screen size automatically. The Tilemap class # is probably even more efficient than the original, which will help offset # any increased lag due to using a larger screen size with more sprites # being displayed. # - Every possible autotile graphic (48 per autotile) will be cached for the # next time that tile is used. # - Autotile animation has been made as efficient as possible, with a system # that stores their coodinates, but only if they change. This greatly reduces # the number of iterations at each update. # - System creates an external file to save pre-cached data priorities and # autotiles. This will decrease any loading times even more, and only takes a # second, depending on the number of maps you have. # - User defined autotile animation speed. Can change with script calls. # - Automatic re-sizing of Bitmaps and Viewports that are 640 x 480 to the # defined resolution, unless explicitely over-ridden in the method call. # The graphics themselves will not be resized, but any existing scripts that # use the normal screen size will already be configured to display different # sizes of graphics for transitions, battlebacks, pictures, fogs, etc. # - Option to have a log file ouput each time the game is ran, which can alert # you to possible errors with map sizes, etc. # # Issues/Bugs/Possible Bugs: # # - Graphic related scripts and your graphics will need to be customized to # fit the new screen size, so this script is not for everyone. # - The Z-axis for the Plane class, which is used for Fogs and Panoramas has # been altered. It is now multiplied by 1000. This will likely be a minor # issue for most, since this class is very rarely used except for Fogs and # Panoramas, which are already far above and below respectfully. # - Normal transitions using graphics cannot be used. With the exception of # a standard fade, like that used when no graphic is defined will be used. # Aside from that, only special transitions from Transition Pack can be # used. # # Credits/Thanks: # - ForeverZer0, for script. # - Creators of the Transition Pack and Screenshot.dll # - Selwyn, for base resolution script # #=============================================================================== # CONFIGURATION #=============================================================================== SCREEN = [384, 480] # Define the resolution of the game screen. These values can be anything # within reason. Centering, viewports, etc. will all be taken care of, but it # is recommended that you use values divisible by 32 for best results. UPDATE_COUNT = 8 # Define the number of frames between autotile updates. The lower the number, # the faster the animations cycle. This can be changed in-game with the # following script call: $game_map.autotile_speed = SPEED PRE_CACHE_DATA = true # The pre-cached file is mandatory for the script to work. As long as this is # true, the data will be created each time the game is test-played. This is # not always neccessary, only when maps are altered, so you can disable it to # help speed up game start-up, and it will use the last created file. RESOLUTION_LOG = true # This will create a log in the Game directory each time the game is ran in # DEBUG mode, which will list possible errors with map sizes, etc. #=============================================================================== # ** Resolution #=============================================================================== class Resolution attr_reader :version def initialize # Define version. @version = 0.93 # Set instance variables for calling basic Win32 functions. ini = Win32API.new('kernel32', 'GetPrivateProfileString','PPPPLP', 'L') title = "\0" * 256 ini.call('Game', 'Title', '', title, 256, '.\\Game.ini') title.delete!("\0") @window = Win32API.new('user32', 'FindWindow', 'PP', 'I').call('RGSS Player', title) set_window_long = Win32API.new('user32', 'SetWindowLong', 'LIL', 'L') set_window_pos = Win32API.new('user32', 'SetWindowPos', 'LLIIIII', 'I') @metrics = Win32API.new('user32', 'GetSystemMetrics', 'I', 'I') # Set default size, displaying error if size is larger than the hardware. default_size = self.size if default_size[0] < SCREEN[0] || default_size[1] < SCREEN[1] print("\"#{title}\" requires a minimum screen resolution of [#{SCREEN[0]} x #{SCREEN[1]}]\r\n\r\n" + "\tYour Resolution: [#{default_size[0]} x #{default_size[1]}]") exit end # Apply resolution change. x = (@metrics.call(0) - SCREEN[0]) / 2 y = (@metrics.call(1) - SCREEN[1]) / 2 set_window_long.call(@window, -16, 0x14CA0000) set_window_pos.call(@window, 0, x, y, SCREEN[0] + 6, SCREEN[1] + 26, 0) @window = Win32API.new('user32', 'FindWindow', 'PP', 'I').call('RGSS Player', title) end #-------------------------------------------------------------------------- def size # Returns the screen size of the machine. return [@metrics.call(0), @metrics.call(1)] end #-------------------------------------------------------------------------- def snapshot(filename = 'Data/snap', quality = 0) # FILENAME = Filename that the picture will be saved as. # FILETYPE = 0 = High Quality 1 = Low Quality @screen = Win32API.new('screenshot.dll', 'Screenshot', 'LLLLPLL', '') @screen.call(0, 0, SCREEN[0], SCREEN[1], filename, @window, quality) end #-------------------------------------------------------------------------- end #=============================================================================== # ** Integer #=============================================================================== class Integer def gcd(num) # Returns the greatest common denominator of self and num. min, max = self.abs, num.abs while min > 0 tmp = min min = max % min max = tmp end return max end def lcm(num) # Returns the lowest common multiple of self and num. return [self, num].include?(0) ? 0 : (self / self.gcd(num) * num).abs end end #=============================================================================== # ** Graphics #=============================================================================== module Graphics class << self alias zer0_graphics_transition transition end def self.transition(duration = 8, *args) # Call default transition if no instance of the resolution is defined. if $resolution == nil zer0_graphics_transition(duration, *args) else # Skip this section and instantly transition graphics if duration is 0. if duration > 0 # Take a snapshot of the the screen, overlaying screen with graphic. $resolution.snapshot zer0_graphics_transition(0) # Create screen instance sprite = Sprite.new(Viewport.new(0, 0, SCREEN[0], SCREEN[1])) sprite.bitmap = Bitmap.new('Data/snap') # Use a simple fade if transition is not defined. fade = 255 / duration duration.times { sprite.opacity -= fade ; update } # Dispose sprite and delete snapshot file. [sprite, sprite.bitmap].each {|obj| obj.dispose } File.delete('Data/snap') end zer0_graphics_transition(0) end end end #=============================================================================== # ** RPG::Cache #=============================================================================== module RPG::Cache AUTO_INDEX = [ [27,28,33,34], [5,28,33,34], [27,6,33,34], [5,6,33,34], [27,28,33,12], [5,28,33,12], [27,6,33,12], [5,6,33,12], [27,28,11,34], [5,28,11,34], [27,6,11,34], [5,6,11,34], [27,28,11,12], [5,28,11,12], [27,6,11,12], [5,6,11,12], [25,26,31,32], [25,6,31,32], [25,26,31,12], [25,6,31,12], [15,16,21,22], [15,16,21,12], [15,16,11,22], [15,16,11,12], [29,30,35,36], [29,30,11,36], [5,30,35,36], [5,30,11,36], [39,40,45,46], [5,40,45,46], [39,6,45,46], [5,6,45,46], [25,30,31,36], [15,16,45,46], [13,14,19,20], [13,14,19,12], [17,18,23,24], [17,18,11,24], [41,42,47,48], [5,42,47,48], [37,38,43,44], [37,6,43,44], [13,18,19,24], [13,14,43,44], [37,42,43,48], [17,18,47,48], [13,18,43,48], [13,18,43,48] ] def self.autotile(filename) key = "Graphics/Autotiles/#{filename}" if !@cache.include?(key) || @cache[key].disposed? # Cache the autotile graphic. @cache[key] = (filename == '') ? Bitmap.new(128, 96) : Bitmap.new(key) # Cache each configuration of this autotile. self.format_autotiles(@cache[key], filename) end return @cache[key] end def self.format_autotiles(bitmap, filename) # Iterate all 48 combinations using the INDEX, and save copy to cache. (0...(bitmap.width / 96)).each {|frame| # Iterate for each frame in the autotile. (Only for animated ones) template = Bitmap.new(256, 192) # Create a bitmap to use as a template for creation. (0...6).each {|i| (0...8).each {|j| AUTO_INDEX[8*i+j].each {|number| number -= 1 x, y = 16 * (number % 6), 16 * (number / 6) rect = Rect.new(x + (frame * 96), y, 16, 16) template.blt(32 * j + x % 32, 32 * i + y % 32, bitmap, rect) } # Use the above created template to create individual tiles. index = 8*i+j tile = Bitmap.new(32, 32) sx, sy = 32 * (index % 8), 32 * (index / 8) rect = Rect.new(sx, sy, 32, 32) tile.blt(0, 0, template, rect) @cache[[filename, index, frame]] = tile }} # Dispose the template since it will not be used again. template.dispose } end def self.load_autotile(name, tile_id, frame = 0) # Returns the autotile for the current map with TILE_ID and FRAME. return @cache[[name, tile_id % 48, frame]] end end #=============================================================================== # ** Tilemap #=============================================================================== class Tilemap attr_reader :map_data, :ox, :oy, :viewport attr_accessor :tileset, :autotiles, :priorities def initialize(viewport) # Initialize instance variables to store required data. @viewport, @autotiles, @layers, @ox, @oy = viewport, [], [], 0, 0 # Get priority and autotile data for this tileset from instance of Game_Map. @priorities, @animated = $game_map.priorities, $game_map.autotile_data # Create a sprite and viewport to use for each priority level. (0..5).each {|i| @layers[i] = Sprite.new(viewport) @layers[i].z = i * 32 } end def ox=(ox) # Set the origin of the X-axis for all the sprites. @ox = ox @layers.each {|sprite| sprite.ox = @ox } end def oy=(oy) # Set the origin of the y-axis for all the sprites. @oy = oy @layers.each {|sprite| sprite.oy = @oy } end def dispose # Dispose all of the sprites and viewports. @layers.each {|layer| layer.dispose } end def map_data=(data) # Set the map data to an instance variable. @map_data = data # Clear any sprites' bitmaps if it exists, or create new ones. @layers.each_index {|i| if @layers[i].bitmap != nil # Dispose bitmap and set to nil. @layers[i].bitmap = @layers[i].bitmap.dispose end # Create new bitmap, whose size is the same as the game map. @layers[i].bitmap = Bitmap.new($game_map.width*32, $game_map.height*32) } # Draw bitmaps accordingly. refresh end def refresh # Set the animation data from the file if it exists, or create it now. @animated = $game_map.autotile_data # Iterate through all map layers, starting with the bottom. [0,1,2].each {|z| (0...@map_data.ysize).each {|y| (0...@map_data.xsize).each {|x| tile_id = @map_data[x, y, z] # Go to the next iteration if no bitmap is defined for this tile. if tile_id == 0 # No tile next elsif tile_id < 384 # Autotile name = $game_map.autotile_names[(tile_id / 48) - 1] bitmap = RPG::Cache.load_autotile(name, tile_id) else # Normal Tile bitmap = RPG::Cache.tile($game_map.tileset_name, tile_id, 0) end # Determine what the layer to draw tile, based off priority. layer = @priorities[tile_id] # Perform a block transfer from the created bitmap to the sprite bitmap. @layers[layer].bitmap.blt(x*32, y*32, bitmap, Rect.new(0, 0, 32, 32)) }}} end def update # Update the sprites. if Graphics.frame_count % $game_map.autotile_speed == 0 # Increase current frame of tile by one, looping by width. @animated[0].each_index {|i| @animated[2][i] = (@animated[2][i] + 1) % @animated[1][i] @animated[3][i].each {|data| # Gather data using the stored coordinates from the map data. tile_id, x, y = @map_data[data[0], data[1], data[2]], data[0], data[1] name, layer = @animated[0][i], @priorities[tile_id] # Load the next frame of the autotile and set it to the map. bitmap = RPG::Cache.load_autotile(name, tile_id, @animated[2][i]) @layers[layer].bitmap.blt(x*32, y*32, bitmap, Rect.new(0, 0, 32, 32)) } } end end end #=============================================================================== # Game_Map #=============================================================================== class Game_Map attr_reader :tile_size, :autotile_speed, :autotile_data, :priority_data alias zer0_load_autotile_data_init initialize def initialize # Load pre-cached data hashes. They will be referenced during setup. file = File.open('Data/PreCacheMapData.rxdata', 'rb') @cached_priorities = Marshal.load(file) @cached_autotiles = Marshal.load(file) file.close # Call original method. zer0_load_autotile_data_init # Store the screen dimensions in tiles to save on calculations later. @tile_size = [SCREEN[0], (SCREEN[1]-32)/2].collect {|n| (n / 32.0).ceil } @autotile_speed = UPDATE_COUNT end alias zer0_map_edge_setup setup def setup(map_id) @priority_data = @cached_priorities[map_id] @autotile_data = @cached_autotiles[map_id] # Call original method. zer0_map_edge_setup(map_id) # Find the displayed area of the map in tiles. No calcualting every step. @map_edge = [self.width - @tile_size[0], self.height - @tile_size[1]] @map_edge.collect! {|size| size * 128 } end def scroll_down(distance) # Find point that the map edge meets the screen edge, using custom size. @display_y = [@display_y + distance, @map_edge[1]-64].min end def scroll_right(distance) # Find point that the map edge meets the screen edge, using custom size. @display_x = [@display_x + distance, @map_edge[0]].min end def autotile_speed=(speed) # Keep the speed above 0 to prevent the ZeroDivision Error. @autotile_speed = speed @autotile_speed = 1 if @autotile_speed < 1 end end #=============================================================================== # ** Game_Character #=============================================================================== class Game_Character def screen_z(height = 0) if @always_on_top # Return high Z value if always on top flag is present. return 999 elsif height != nil && height > 32 # Iterate through map characters to their positions relative to this one. characters = $game_map.events.values characters += [$game_player] unless self.is_a?(Game_Player) # Find and set any character that is one tile above this one. above, z = characters.find {|chr| chr.x == @x && chr.y == @y - 1 }, 0 if above != nil # If found, adjust value by this one's Z, and the other's. z = (above.screen_z(48) >= 32 ? 33 : 31) end # Check for Blizz-ABS and adjust coordinates for the pixel-rate. if $BlizzABS x = ((@x / $game_system.pixel_rate) / 2.0).to_i y = ((@y / $game_system.pixel_rate) / 2.0).to_i return $game_map.priority_data[x, y] + z else return $game_map.priority_data[@x, @y] + z end end return 0 end end #=============================================================================== # ** Game_Player #=============================================================================== class Game_Player CENTER_X = ((SCREEN[0] / 2) - 16) * 4 # Center screen x-coordinate * 4 CENTER_Y = ((SCREEN[1] / 2) - 128) * 4 # Center screen y-coordinate * 4 def center(x, y) # Recalculate the screen center based on the new resolution. max_x = ($game_map.width - $game_map.tile_size[0]) * 128 max_y = ($game_map.height - $game_map.tile_size[1]) * 128 $game_map.display_x = [0, [x * 128 - CENTER_X, max_x].min].max $game_map.display_y = [0, [y * 128 - CENTER_Y, max_y].min].max end end #=============================================================================== # ** Sprite #=============================================================================== class Sprite alias zer0_sprite_resize_init initialize def initialize(view = nil) # Unless viewport is defined, use the new default viewport size. view = Viewport.new(0, 0, SCREEN[0], SCREEN[1]) if view == nil # Call original method. zer0_sprite_resize_init(view) end end #=============================================================================== # ** Viewport #=============================================================================== class Viewport alias zer0_viewport_resize_init initialize def initialize(x=0, y=0, width=SCREEN[0], height=SCREEN[1], override=false) if x.is_a?(Rect) # If first argument is a Rectangle, just use it as the argument. zer0_viewport_resize_init(x) elsif [x, y, width, height] == [0, 0, 640, 480] && !override # Resize fullscreen viewport, unless explicitly overridden. zer0_viewport_resize_init(Rect.new(0, 0, SCREEN[0], SCREEN[1]/2)) else # Call method normally. zer0_viewport_resize_init(Rect.new(x, y, width, height)) end end def resize(*args) # Resize the viewport. Can call with (X, Y, WIDTH, HEIGHT) or (RECT). self.rect = args[0].is_a?(Rect) ? args[0] : Rect.new(*args) end end #=============================================================================== # ** Bitmap #=============================================================================== class Bitmap alias zer0_resolution_resize_init initialize def initialize(width = 32, height = 32, override = false) if width.is_a?(String) # Call the filename if the first argument is a String. zer0_resolution_resize_init(width) elsif [width, height] == [640, 480] && !override # Resize fullscreen bitmap unless explicitly overridden. zer0_resolution_resize_init(SCREEN[0], SCREEN[1]) else # Call method normally. zer0_resolution_resize_init(width, height) end end end #=============================================================================== # ** Plane #=============================================================================== class Plane < Sprite def z=(z) # Change the Z value of the viewport, not the sprite. super(z * 1000) end def ox=(ox) return if @bitmap == nil # Have viewport stay in loop on X-axis. super(ox % @bitmap.width) end def oy=(oy) return if @bitmap == nil # Have viewport stay in loop on Y-axis. super(oy % @bitmap.height) end def bitmap # Return the single bitmap, before it was tiled. return @bitmap end def bitmap=(tile) @bitmap = tile # Calculate the number of tiles it takes to span screen in both directions. xx = 1 + (SCREEN[0].to_f / tile.width).ceil yy = 1 + (SCREEN[1].to_f / tile.height).ceil # Create appropriately sized bitmap, then tile across it with source image. plane = Bitmap.new(@bitmap.width * xx, @bitmap.height * yy) (0..xx).each {|x| (0..yy).each {|y| plane.blt(x * @bitmap.width, y * @bitmap.height, @bitmap, @bitmap.rect) }} # Set the bitmap to the sprite through its super class (Sprite). super(plane) end # Redefine methods dealing with coordinates (defined in super) to do nothing. def x; end def y; end def x=(x); end def y=(y); end end #=============================================================================== # DEBUG Mode #=============================================================================== if $DEBUG if PRE_CACHE_DATA tilesets = load_data('Data/Tilesets.rxdata') maps, priority_data, autotile_data = load_data('Data/MapInfos.rxdata'), {}, {} maps.each_key {|map_id| map = load_data(sprintf("Data/Map%03d.rxdata", map_id)) data = map.data tileset = tilesets[map.tileset_id] priorities = tileset.priorities autotiles = tileset.autotile_names.collect {|name| RPG::Cache.autotile(name) } animated = [[], [], [], []] autotiles.each_index {|i| width = autotiles[i].width next unless width > 96 parameters = [tileset.autotile_names[i], width / 96, 0, []] [0, 1, 2, 3].each {|j| animated[j].push(parameters[j]) } } [0, 1, 2].each {|z| (0...data.ysize).each {|y| (0...data.xsize).each {|x| tile_id = data[x, y, z] next if tile_id == 0 if tile_id < 384 name = tileset.autotile_names[(tile_id / 48) - 1] index = animated[0].index(name) next if index == nil above = [] ((z+1)...data.zsize).each {|zz| above.push(data[x, y, zz]) } animated[3][index].push([x, y, z]) if above.all? {|id| id == 0 } end }}} table = Table.new(data.xsize, data.ysize) (0...table.xsize).each {|x| (0...table.ysize).each {|y| above = [0, 1, 2].collect {|z| data[x, y-1, z] } above = above.compact.collect {|p| priorities[p] } table[x, y] = above.include?(1) ? 32 : 0 }} priority_data[map_id], autotile_data[map_id] = table, animated } file = File.open('Data/PreCacheMapData.rxdata', 'wb') Marshal.dump(priority_data, file) Marshal.dump(autotile_data, file) file.close RPG::Cache.clear end if RESOLUTION_LOG undersize, mapinfo = [], load_data('Data/MapInfos.rxdata') file = File.open('Data/PreCacheMapData.rxdata', 'rb') cached_data = Marshal.load(file) file.close # Create a text file and write the header. file = File.open('Resolution Log.txt', 'wb') file.write("[RESOLUTION LOG]\r\n\r\n") time = Time.now.strftime("%x at %I:%M:%S %p") file.write(" Logged on #{time}\r\n\r\n") lcm = SCREEN[0].lcm(SCREEN[1]).to_f aspect = [(lcm / SCREEN[1]), (lcm / SCREEN[0])].collect {|num| num.round } file.write("RESOLUTION:\r\n #{SCREEN[0].to_i} x #{SCREEN[1].to_i}\r\n") file.write("ASPECT RATIO:\r\n #{aspect[0]}:#{aspect[1]}\r\n") file.write("MINIMUM MAP SIZE:\r\n #{(SCREEN[0] / 32).ceil} x #{(SCREEN[1] / 32).ceil}\r\n\r\n") file.write("UNDERSIZED MAPS:\r\n") mapinfo.keys.each {|key| map = load_data(sprintf("Data/Map%03d.rxdata", key)) next if map.width*32 >= SCREEN[0] && map.height*32 >= SCREEN[1] undersize.push(key) } unless undersize.empty? file.write("The following maps are too small for the defined resolution. They should be adjusted to prevent graphical errors.\r\n\r\n") undersize.sort.each {|id| file.write(" MAP[#{id}]: #{mapinfo[id].name}\r\n") } file.write("\r\n") else file.write(' All maps are sized correctly.') end file.close end end # Call the resolution, setting it to a global variable for plug-ins. $resolution = Resolution.newScript originale
#=============================================================================== # Custom Resolution # Author: ForeverZer0 # Version: 0.93 # Date: 12.18.2010 #=============================================================================== # # Introduction: # # My goal in creating this script was to create a system that allowed the user # to set the screen size to something other than 640 x 480, but not have make # huge sacrifices in compatibility and performance. Although the script is # not simply Plug-and-Play, it is about as close as one can achieve with a # script of this nature. # # Instructions: # # - Place the "screenshot.dll" from Fantasist's Transition Pack script, which # can be found here: http://www.sendspace.com/file/yjd54h in your game folder # - Place this script above main, below default scripts. # - In my experience, unchecking "Reduce Screen Flickering" actually helps the # screen not to flicker. Open menu with F1 while playing and set this to what # you get the best results with. # # Features: # # - Totally re-written Tilemap and Plane class. Both classes were written to # display the map across any screen size automatically. The Tilemap class # is probably even more efficient than the original, which will help offset # any increased lag due to using a larger screen size with more sprites # being displayed. # - Every possible autotile graphic (48 per autotile) will be cached for the # next time that tile is used. # - Autotile animation has been made as efficient as possible, with a system # that stores their coodinates, but only if they change. This greatly reduces # the number of iterations at each update. # - System creates an external file to save pre-cached data priorities and # autotiles. This will decrease any loading times even more, and only takes a # second, depending on the number of maps you have. # - User defined autotile animation speed. Can change with script calls. # - Automatic re-sizing of Bitmaps and Viewports that are 640 x 480 to the # defined resolution, unless explicitely over-ridden in the method call. # The graphics themselves will not be resized, but any existing scripts that # use the normal screen size will already be configured to display different # sizes of graphics for transitions, battlebacks, pictures, fogs, etc. # - Option to have a log file ouput each time the game is ran, which can alert # you to possible errors with map sizes, etc. # # Issues/Bugs/Possible Bugs: # # - Graphic related scripts and your graphics will need to be customized to # fit the new screen size, so this script is not for everyone. # - The Z-axis for the Plane class, which is used for Fogs and Panoramas has # been altered. It is now multiplied by 1000. This will likely be a minor # issue for most, since this class is very rarely used except for Fogs and # Panoramas, which are already far above and below respectfully. # - Normal transitions using graphics cannot be used. With the exception of # a standard fade, like that used when no graphic is defined will be used. # Aside from that, only special transitions from Transition Pack can be # used. # # Credits/Thanks: # - ForeverZer0, for script. # - Creators of the Transition Pack and Screenshot.dll # - Selwyn, for base resolution script # #=============================================================================== # CONFIGURATION #=============================================================================== SCREEN = [1024, 576] # Define the resolution of the game screen. These values can be anything # within reason. Centering, viewports, etc. will all be taken care of, but it # is recommended that you use values divisible by 32 for best results. UPDATE_COUNT = 8 # Define the number of frames between autotile updates. The lower the number, # the faster the animations cycle. This can be changed in-game with the # following script call: $game_map.autotile_speed = SPEED PRE_CACHE_DATA = true # The pre-cached file is mandatory for the script to work. As long as this is # true, the data will be created each time the game is test-played. This is # not always neccessary, only when maps are altered, so you can disable it to # help speed up game start-up, and it will use the last created file. RESOLUTION_LOG = true # This will create a log in the Game directory each time the game is ran in # DEBUG mode, which will list possible errors with map sizes, etc. #=============================================================================== # ** Resolution #=============================================================================== class Resolution attr_reader :version def initialize # Define version. @version = 0.93 # Set instance variables for calling basic Win32 functions. ini = Win32API.new('kernel32', 'GetPrivateProfileString','PPPPLP', 'L') title = "\0" * 256 ini.call('Game', 'Title', '', title, 256, '.\\Game.ini') title.delete!("\0") @window = Win32API.new('user32', 'FindWindow', 'PP', 'I').call('RGSS Player', title) set_window_long = Win32API.new('user32', 'SetWindowLong', 'LIL', 'L') set_window_pos = Win32API.new('user32', 'SetWindowPos', 'LLIIIII', 'I') @metrics = Win32API.new('user32', 'GetSystemMetrics', 'I', 'I') # Set default size, displaying error if size is larger than the hardware. default_size = self.size if default_size[0] < SCREEN[0] || default_size[1] < SCREEN[1] print("\"#{title}\" requires a minimum screen resolution of [#{SCREEN[0]} x #{SCREEN[1]}]\r\n\r\n" + "\tYour Resolution: [#{default_size[0]} x #{default_size[1]}]") exit end # Apply resolution change. x = (@metrics.call(0) - SCREEN[0]) / 2 y = (@metrics.call(1) - SCREEN[1]) / 2 set_window_long.call(@window, -16, 0x14CA0000) set_window_pos.call(@window, 0, x, y, SCREEN[0] + 6, SCREEN[1] + 26, 0) @window = Win32API.new('user32', 'FindWindow', 'PP', 'I').call('RGSS Player', title) end #-------------------------------------------------------------------------- def size # Returns the screen size of the machine. return [@metrics.call(0), @metrics.call(1)] end #-------------------------------------------------------------------------- def snapshot(filename = 'Data/snap', quality = 0) # FILENAME = Filename that the picture will be saved as. # FILETYPE = 0 = High Quality 1 = Low Quality @screen = Win32API.new('screenshot.dll', 'Screenshot', 'LLLLPLL', '') @screen.call(0, 0, SCREEN[0], SCREEN[1], filename, @window, quality) end #-------------------------------------------------------------------------- end #=============================================================================== # ** Integer #=============================================================================== class Integer def gcd(num) # Returns the greatest common denominator of self and num. min, max = self.abs, num.abs while min > 0 tmp = min min = max % min max = tmp end return max end def lcm(num) # Returns the lowest common multiple of self and num. return [self, num].include?(0) ? 0 : (self / self.gcd(num) * num).abs end end #=============================================================================== # ** Graphics #=============================================================================== module Graphics class << self alias zer0_graphics_transition transition end def self.transition(duration = 8, *args) # Call default transition if no instance of the resolution is defined. if $resolution == nil zer0_graphics_transition(duration, *args) else # Skip this section and instantly transition graphics if duration is 0. if duration > 0 # Take a snapshot of the the screen, overlaying screen with graphic. $resolution.snapshot zer0_graphics_transition(0) # Create screen instance sprite = Sprite.new(Viewport.new(0, 0, SCREEN[0], SCREEN[1])) sprite.bitmap = Bitmap.new('Data/snap') # Use a simple fade if transition is not defined. fade = 255 / duration duration.times { sprite.opacity -= fade ; update } # Dispose sprite and delete snapshot file. [sprite, sprite.bitmap].each {|obj| obj.dispose } File.delete('Data/snap') end zer0_graphics_transition(0) end end end #=============================================================================== # ** RPG::Cache #=============================================================================== module RPG::Cache AUTO_INDEX = [ [27,28,33,34], [5,28,33,34], [27,6,33,34], [5,6,33,34], [27,28,33,12], [5,28,33,12], [27,6,33,12], [5,6,33,12], [27,28,11,34], [5,28,11,34], [27,6,11,34], [5,6,11,34], [27,28,11,12], [5,28,11,12], [27,6,11,12], [5,6,11,12], [25,26,31,32], [25,6,31,32], [25,26,31,12], [25,6,31,12], [15,16,21,22], [15,16,21,12], [15,16,11,22], [15,16,11,12], [29,30,35,36], [29,30,11,36], [5,30,35,36], [5,30,11,36], [39,40,45,46], [5,40,45,46], [39,6,45,46], [5,6,45,46], [25,30,31,36], [15,16,45,46], [13,14,19,20], [13,14,19,12], [17,18,23,24], [17,18,11,24], [41,42,47,48], [5,42,47,48], [37,38,43,44], [37,6,43,44], [13,18,19,24], [13,14,43,44], [37,42,43,48], [17,18,47,48], [13,18,43,48], [13,18,43,48] ] def self.autotile(filename) key = "Graphics/Autotiles/#{filename}" if !@cache.include?(key) || @cache[key].disposed? # Cache the autotile graphic. @cache[key] = (filename == '') ? Bitmap.new(128, 96) : Bitmap.new(key) # Cache each configuration of this autotile. self.format_autotiles(@cache[key], filename) end return @cache[key] end def self.format_autotiles(bitmap, filename) # Iterate all 48 combinations using the INDEX, and save copy to cache. (0...(bitmap.width / 96)).each {|frame| # Iterate for each frame in the autotile. (Only for animated ones) template = Bitmap.new(256, 192) # Create a bitmap to use as a template for creation. (0...6).each {|i| (0...8).each {|j| AUTO_INDEX[8*i+j].each {|number| number -= 1 x, y = 16 * (number % 6), 16 * (number / 6) rect = Rect.new(x + (frame * 96), y, 16, 16) template.blt(32 * j + x % 32, 32 * i + y % 32, bitmap, rect) } # Use the above created template to create individual tiles. index = 8*i+j tile = Bitmap.new(32, 32) sx, sy = 32 * (index % 8), 32 * (index / 8) rect = Rect.new(sx, sy, 32, 32) tile.blt(0, 0, template, rect) @cache[[filename, index, frame]] = tile }} # Dispose the template since it will not be used again. template.dispose } end def self.load_autotile(name, tile_id, frame = 0) # Returns the autotile for the current map with TILE_ID and FRAME. return @cache[[name, tile_id % 48, frame]] end end #=============================================================================== # ** Tilemap #=============================================================================== class Tilemap attr_reader :map_data, :ox, :oy, :viewport attr_accessor :tileset, :autotiles, :priorities def initialize(viewport) # Initialize instance variables to store required data. @viewport, @autotiles, @layers, @ox, @oy = viewport, [], [], 0, 0 # Get priority and autotile data for this tileset from instance of Game_Map. @priorities, @animated = $game_map.priorities, $game_map.autotile_data # Create a sprite and viewport to use for each priority level. (0..5).each {|i| @layers[i] = Sprite.new(viewport) @layers[i].z = i * 32 } end def ox=(ox) # Set the origin of the X-axis for all the sprites. @ox = ox @layers.each {|sprite| sprite.ox = @ox } end def oy=(oy) # Set the origin of the y-axis for all the sprites. @oy = oy @layers.each {|sprite| sprite.oy = @oy } end def dispose # Dispose all of the sprites and viewports. @layers.each {|layer| layer.dispose } end def map_data=(data) # Set the map data to an instance variable. @map_data = data # Clear any sprites' bitmaps if it exists, or create new ones. @layers.each_index {|i| if @layers[i].bitmap != nil # Dispose bitmap and set to nil. @layers[i].bitmap = @layers[i].bitmap.dispose end # Create new bitmap, whose size is the same as the game map. @layers[i].bitmap = Bitmap.new($game_map.width*32, $game_map.height*32) } # Draw bitmaps accordingly. refresh end def refresh # Set the animation data from the file if it exists, or create it now. @animated = $game_map.autotile_data # Iterate through all map layers, starting with the bottom. [0,1,2].each {|z| (0...@map_data.ysize).each {|y| (0...@map_data.xsize).each {|x| tile_id = @map_data[x, y, z] # Go to the next iteration if no bitmap is defined for this tile. if tile_id == 0 # No tile next elsif tile_id < 384 # Autotile name = $game_map.autotile_names[(tile_id / 48) - 1] bitmap = RPG::Cache.load_autotile(name, tile_id) else # Normal Tile bitmap = RPG::Cache.tile($game_map.tileset_name, tile_id, 0) end # Determine what the layer to draw tile, based off priority. layer = @priorities[tile_id] # Perform a block transfer from the created bitmap to the sprite bitmap. @layers[layer].bitmap.blt(x*32, y*32, bitmap, Rect.new(0, 0, 32, 32)) }}} end def update # Update the sprites. if Graphics.frame_count % $game_map.autotile_speed == 0 # Increase current frame of tile by one, looping by width. @animated[0].each_index {|i| @animated[2][i] = (@animated[2][i] + 1) % @animated[1][i] @animated[3][i].each {|data| # Gather data using the stored coordinates from the map data. tile_id, x, y = @map_data[data[0], data[1], data[2]], data[0], data[1] name, layer = @animated[0][i], @priorities[tile_id] # Load the next frame of the autotile and set it to the map. bitmap = RPG::Cache.load_autotile(name, tile_id, @animated[2][i]) @layers[layer].bitmap.blt(x*32, y*32, bitmap, Rect.new(0, 0, 32, 32)) } } end end end #=============================================================================== # Game_Map #=============================================================================== class Game_Map attr_reader :tile_size, :autotile_speed, :autotile_data, :priority_data alias zer0_load_autotile_data_init initialize def initialize # Load pre-cached data hashes. They will be referenced during setup. file = File.open('Data/PreCacheMapData.rxdata', 'rb') @cached_priorities = Marshal.load(file) @cached_autotiles = Marshal.load(file) file.close # Call original method. zer0_load_autotile_data_init # Store the screen dimensions in tiles to save on calculations later. @tile_size = [SCREEN[0], SCREEN[1]].collect {|n| (n / 32.0).ceil } @autotile_speed = UPDATE_COUNT end alias zer0_map_edge_setup setup def setup(map_id) @priority_data = @cached_priorities[map_id] @autotile_data = @cached_autotiles[map_id] # Call original method. zer0_map_edge_setup(map_id) # Find the displayed area of the map in tiles. No calcualting every step. @map_edge = [self.width - @tile_size[0], self.height - @tile_size[1]] @map_edge.collect! {|size| size * 128 } end def scroll_down(distance) # Find point that the map edge meets the screen edge, using custom size. @display_y = [@display_y + distance, @map_edge[1]].min end def scroll_right(distance) # Find point that the map edge meets the screen edge, using custom size. @display_x = [@display_x + distance, @map_edge[0]].min end def autotile_speed=(speed) # Keep the speed above 0 to prevent the ZeroDivision Error. @autotile_speed = speed @autotile_speed = 1 if @autotile_speed < 1 end end #=============================================================================== # ** Game_Character #=============================================================================== class Game_Character def screen_z(height = 0) if @always_on_top # Return high Z value if always on top flag is present. return 999 elsif height != nil && height > 32 # Iterate through map characters to their positions relative to this one. characters = $game_map.events.values characters += [$game_player] unless self.is_a?(Game_Player) # Find and set any character that is one tile above this one. above, z = characters.find {|chr| chr.x == @x && chr.y == @y - 1 }, 0 if above != nil # If found, adjust value by this one's Z, and the other's. z = (above.screen_z(48) >= 32 ? 33 : 31) end # Check for Blizz-ABS and adjust coordinates for the pixel-rate. if $BlizzABS x = ((@x / $game_system.pixel_rate) / 2.0).to_i y = ((@y / $game_system.pixel_rate) / 2.0).to_i return $game_map.priority_data[x, y] + z else return $game_map.priority_data[@x, @y] + z end end return 0 end end #=============================================================================== # ** Game_Player #=============================================================================== class Game_Player CENTER_X = ((SCREEN[0] / 2) - 16) * 4 # Center screen x-coordinate * 4 CENTER_Y = ((SCREEN[1] / 2) - 16) * 4 # Center screen y-coordinate * 4 def center(x, y) # Recalculate the screen center based on the new resolution. max_x = ($game_map.width - $game_map.tile_size[0]) * 128 max_y = ($game_map.height - $game_map.tile_size[1]) * 128 $game_map.display_x = [0, [x * 128 - CENTER_X, max_x].min].max $game_map.display_y = [0, [y * 128 - CENTER_Y, max_y].min].max end end #=============================================================================== # ** Sprite #=============================================================================== class Sprite alias zer0_sprite_resize_init initialize def initialize(view = nil) # Unless viewport is defined, use the new default viewport size. view = Viewport.new(0, 0, SCREEN[0], SCREEN[1]) if view == nil # Call original method. zer0_sprite_resize_init(view) end end #=============================================================================== # ** Viewport #=============================================================================== class Viewport alias zer0_viewport_resize_init initialize def initialize(x=0, y=0, width=SCREEN[0], height=SCREEN[1], override=false) if x.is_a?(Rect) # If first argument is a Rectangle, just use it as the argument. zer0_viewport_resize_init(x) elsif [x, y, width, height] == [0, 0, 640, 480] && !override # Resize fullscreen viewport, unless explicitly overridden. zer0_viewport_resize_init(Rect.new(0, 0, SCREEN[0], SCREEN[1])) else # Call method normally. zer0_viewport_resize_init(Rect.new(x, y, width, height)) end end def resize(*args) # Resize the viewport. Can call with (X, Y, WIDTH, HEIGHT) or (RECT). self.rect = args[0].is_a?(Rect) ? args[0] : Rect.new(*args) end end #=============================================================================== # ** Bitmap #=============================================================================== class Bitmap alias zer0_resolution_resize_init initialize def initialize(width = 32, height = 32, override = false) if width.is_a?(String) # Call the filename if the first argument is a String. zer0_resolution_resize_init(width) elsif [width, height] == [640, 480] && !override # Resize fullscreen bitmap unless explicitly overridden. zer0_resolution_resize_init(SCREEN[0], SCREEN[1]) else # Call method normally. zer0_resolution_resize_init(width, height) end end end #=============================================================================== # ** Plane #=============================================================================== class Plane < Sprite def z=(z) # Change the Z value of the viewport, not the sprite. super(z * 1000) end def ox=(ox) return if @bitmap == nil # Have viewport stay in loop on X-axis. super(ox % @bitmap.width) end def oy=(oy) return if @bitmap == nil # Have viewport stay in loop on Y-axis. super(oy % @bitmap.height) end def bitmap # Return the single bitmap, before it was tiled. return @bitmap end def bitmap=(tile) @bitmap = tile # Calculate the number of tiles it takes to span screen in both directions. xx = 1 + (SCREEN[0].to_f / tile.width).ceil yy = 1 + (SCREEN[1].to_f / tile.height).ceil # Create appropriately sized bitmap, then tile across it with source image. plane = Bitmap.new(@bitmap.width * xx, @bitmap.height * yy) (0..xx).each {|x| (0..yy).each {|y| plane.blt(x * @bitmap.width, y * @bitmap.height, @bitmap, @bitmap.rect) }} # Set the bitmap to the sprite through its super class (Sprite). super(plane) end # Redefine methods dealing with coordinates (defined in super) to do nothing. def x; end def y; end def x=(x); end def y=(y); end end #=============================================================================== # DEBUG Mode #=============================================================================== if $DEBUG if PRE_CACHE_DATA tilesets = load_data('Data/Tilesets.rxdata') maps, priority_data, autotile_data = load_data('Data/MapInfos.rxdata'), {}, {} maps.each_key {|map_id| map = load_data(sprintf("Data/Map%03d.rxdata", map_id)) data = map.data tileset = tilesets[map.tileset_id] priorities = tileset.priorities autotiles = tileset.autotile_names.collect {|name| RPG::Cache.autotile(name) } animated = [[], [], [], []] autotiles.each_index {|i| width = autotiles[i].width next unless width > 96 parameters = [tileset.autotile_names[i], width / 96, 0, []] [0, 1, 2, 3].each {|j| animated[j].push(parameters[j]) } } [0, 1, 2].each {|z| (0...data.ysize).each {|y| (0...data.xsize).each {|x| tile_id = data[x, y, z] next if tile_id == 0 if tile_id < 384 name = tileset.autotile_names[(tile_id / 48) - 1] index = animated[0].index(name) next if index == nil above = [] ((z+1)...data.zsize).each {|zz| above.push(data[x, y, zz]) } animated[3][index].push([x, y, z]) if above.all? {|id| id == 0 } end }}} table = Table.new(data.xsize, data.ysize) (0...table.xsize).each {|x| (0...table.ysize).each {|y| above = [0, 1, 2].collect {|z| data[x, y-1, z] } above = above.compact.collect {|p| priorities[p] } table[x, y] = above.include?(1) ? 32 : 0 }} priority_data[map_id], autotile_data[map_id] = table, animated } file = File.open('Data/PreCacheMapData.rxdata', 'wb') Marshal.dump(priority_data, file) Marshal.dump(autotile_data, file) file.close RPG::Cache.clear end if RESOLUTION_LOG undersize, mapinfo = [], load_data('Data/MapInfos.rxdata') file = File.open('Data/PreCacheMapData.rxdata', 'rb') cached_data = Marshal.load(file) file.close # Create a text file and write the header. file = File.open('Resolution Log.txt', 'wb') file.write("[RESOLUTION LOG]\r\n\r\n") time = Time.now.strftime("%x at %I:%M:%S %p") file.write(" Logged on #{time}\r\n\r\n") lcm = SCREEN[0].lcm(SCREEN[1]).to_f aspect = [(lcm / SCREEN[1]), (lcm / SCREEN[0])].collect {|num| num.round } file.write("RESOLUTION:\r\n #{SCREEN[0].to_i} x #{SCREEN[1].to_i}\r\n") file.write("ASPECT RATIO:\r\n #{aspect[0]}:#{aspect[1]}\r\n") file.write("MINIMUM MAP SIZE:\r\n #{(SCREEN[0] / 32).ceil} x #{(SCREEN[1] / 32).ceil}\r\n\r\n") file.write("UNDERSIZED MAPS:\r\n") mapinfo.keys.each {|key| map = load_data(sprintf("Data/Map%03d.rxdata", key)) next if map.width*32 >= SCREEN[0] && map.height*32 >= SCREEN[1] undersize.push(key) } unless undersize.empty? file.write("The following maps are too small for the defined resolution. They should be adjusted to prevent graphical errors.\r\n\r\n") undersize.sort.each {|id| file.write(" MAP[#{id}]: #{mapinfo[id].name}\r\n") } file.write("\r\n") else file.write(' All maps are sized correctly.') end file.close end end # Call the resolution, setting it to a global variable for plug-ins. $resolution = Resolution.new -
@Haru: Si, potrei fare anche così, grazie ;D
Bene ragazzi, altri aggiornamenti.
In questi giorni sto scrivendo molto, story-line, eventi e altro.
Vi introduco alle classi e ai poteri dei membri del team.
Come ben saprete i nostri quattro amici sono capaci di usare particolari poteri spirituali, questi variano in base al livello ma soprattutto in base alla classe.
Le classi cambiano da giocatore a giocatore in base alla virtù che li caratterizza.
Le quattro virtù sono: Intelletto, Controllo, Forza, Umiltà.
Il perché di queste virtù sarà rivelato nel corso dell'avventura, vi do un esempio del loro funzionamento.
Tutte le classi di queste quattro virtù saranno offensive in modo da non avere anelli deboli in squadra, ma il vantaggio in battaglia deriva proprio dal corretto uso delle capacità particolari che le virtù conferiscono ad ogni membro del team.
Intelletto: Il membro con questa virtù avrà la capacità di incrementare le statistiche della squadra.
Controllo: il membro possessore di questa virtù ha la capacità di manipolare nemici in battaglia.
Forza: Con questa virtù gli attacchi bruti causeranno maggior danno rispetto agli altri membri. (A questa virtù appartiene Akeros, il protagonista, il giovane che potete vedere negli screen)
Umiltà: Il membro che appartiene a questa virtù è in grado di utilizzare poteri curativi.
Spero di aver attirato il vostro interesse :)

*MapleStory Monster - Charset by Me
in Donazione risorse grafiche VX
Posted
Accidenti non ci avevo fatto caso, grazie :)