alegasta92 Posted December 14, 2012 Share Posted December 14, 2012 Codici Globali per Testi"Global Text Codes"http://imageshack.us/a/img594/8559/gtc.pngAutore: Modern Algebra Per: Rpg maker VX-ace(RGSS3) Utilità:Questo script permette di inserire i codici testo applicabili nei messaggi (/C[n] e compagnia bella) in qualsiasi casella di testo. Questo comporta quindi: -Possibilità di avere icono vicino ai comandi di gioco (Per esempio nel menù principale) -Possibilità di cambiare il colore degli oggetti, delle armi e delle armature a proprio piacimento. -Possibilità di inserire numeri di variabili in qualsiasi casella di testo, -Possibilità di ingrandire o rimpicciolire il carattere a piacimento. Installazione: Da inserire sotto materiali e,una volta finito il gioco, dare parte dei crediti anche al lavoro di Modern Algebra. IMPORTANTE:se volete che lo script faccia il suo lavoro, dovete mettere dove c'è qualche codice testuale da mettere "\*" ESEMPIO: Voglio colorare di verde la scritta "ascia comune" Non faccio" \C[5] ascia comune\C[0]", ma piuttosto" \*\C[5] ascia comune\C[0]" DEMO: Non vi è alcuna demo Script: #==============================================================================# Global Text Codes [VXA]# Version: 1.0a# Author: modern algebra (rmrk.net)# Date: April 5, 2012#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# Descrizione:## Questo script permette l'uso di codici dei messaggi in ogni finestra e non # solo in quella dei messaggi. Puoi colorare la scritta, aggiungere icone, ingrandirla# a tuo piacimento.##++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# Instructions:## Copia lo script sotto materiali e sopra Main.# # Ci sono due opsioni di funzionamento dello script:# - AUTOMATICA(automatic): Tutto ciò che dovrai fare sarà inserire i codici nei messaggi e tutto funzionerà.# - MANUALE(manual): Prima di inserire il codice bisognerà inserire \*# # Puoi utilizzare:## \c[n] - Cambia il colore. Il colore dipende da n.# \i[n] - Inserisce l'icona con ID=n.# \p[n] - Scrive il nome del personaggio in posizione n nel party: se 1 è il party leader, se 2 il secondo membro.# \n[n] -Scrive il nome del personaggio con ID=n# \v[n] - Mostra il contenuto della variabile con ID= n.# \g - Mostra l'unità di scambio (la moneta corrente).## Se si stà usando uno script di personalizzazione del messaggio, potresti avere codici # aggiuntivi a tua disposizione. Lo script è compatibile con L'ATS di modern algebra e # molti codici, tranne \x e quelli per il controllo del messaggio, funzioneranno.# #==============================================================================$imported = {} unless $imported$imported[:MAGlobalTextCodes] = true#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\# Editable Region#||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||# MAGTC_MANUAL_CODES - If this is true, then you must put a \* code in any# field that you want to have codes interpreted in. Otherwise, codes will# always automatically be interpreted. The recommended value for this is true,# as the process for drawing text with codes is much slower than the process# for drawing text without codes.MAGTC_MANUAL_CODES = true# MAGTC RCODES - This feature is designed to overcome the space limitations in# much of the database - since codes take so much of that space, it might be# difficult to write everything you want into one of those fields. This feature# permits you to write the term you want in to the following array, and then# access it in the database with the code \r[n], where n is the ID you assign# to the phrase in the following way:## n => "replacement",## Please note that: it is =>, not =; the replacement must be within quotation# marks; and there must be a comma after every line. If using double quotation# marks ("", not ''), then you need to use two backslashes to access codes# instead of one (\\c[1], not \c[1]).## EXAMPLE:# 0 => "\\i[112]\\c[14]New Game\\c[0]",## Under the New Game field in the Terms of the Database, all I would then need# to put is:# \*\r[0]# and it would be the same as if I had put:# \*\i[112]\c[14]New Game\c[0]MAGTC_RCODES = { # <- Do not touch 0 => "\\i[112]\\c[14]New Game\\c[0]", # Example 1 => "", # You can make as many of these as you want 2 => "\\i[40]Blood Hound",#||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||# END Editable Region#//////////////////////////////////////////////////////////////////////////////}MAGTC_RCODES.default = ""#==============================================================================# ** Window_Base#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# Summary of Changes:# aliased methods - draw_text; convert_escape_characters; process_new_line;# reset_font_settings# new methods - magtc_align_x; magtc_test_process_escape_character;# magtc_calc_line_width#==============================================================================class Window_Base #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Scrivi testo #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ alias ma_gtc_drwtxt_3fs1 draw_text def draw_text(*args, &block) # Get the arguments if args[0].is_a?(Rect) x, y, w, h = args[0].x, args[0].y, args[0].width, args[0].height text, align = *args[1, 2] else x, y, w, h, text, align = *args[0, 6] end align = 0 unless align # Draw normally if text is not a string, draw normally if the text is not # long enough to hold a code, and draw normally when the script is set to # manual and \* is included in the text if !text.is_a?(String) || text.size < 2 || (MAGTC_MANUAL_CODES && text[/\\\*/].nil?) ma_gtc_drwtxt_3fs1(*args, &block) # Run Original Method else @magtc_reset_font = contents.font.dup # Do not automatically reset font @magtc_rect, @magtc_align = Rect.new(x, y, w, h), align # Get first line of the text to test for alignment @magtc_test_line = convert_escape_characters(text[/.*/]) y += [(h - calc_line_height(@magtc_test_line)) / 2, 0].max # Draw text with message codes draw_text_ex(magtc_align_x(x), y, text) @magtc_reset_font = nil # Do not automatically reset font @magtc_rect, @magtc_align = nil, nil # Reset Rect and Alignment end end #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Convert Escape Characters #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ alias ma_gtc_convescchar_5tk9 convert_escape_characters def convert_escape_characters(text, *args, &block) # Remove \* codes new_text = text.gsub(/\\\*/, "") # Substitute for the R Codes new_text.gsub!(/\\[Rr]\[(\d+)\]/) { MAGTC_RCODES[$1.to_i].to_s } ma_gtc_convescchar_5tk9(new_text, *args, &block) # Call Original Method end #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Reset Font Settings #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ alias magtc_resetfonts_4ga5 reset_font_settings def reset_font_settings(*args, &block) magtc_resetfonts_4ga5(*args, &block) # Call Original Method contents.font = @magtc_reset_font if @magtc_reset_font end #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Process New Line #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ alias magtc_prcsnewl_5gn9 process_new_line def process_new_line(text, pos, *args, &block) magtc_prcsnewl_5gn9(text, pos, *args, &block) # Run Original Method if @magtc_align && @magtc_rext @magtc_test_line = text[/.*/] # Get new line pos[:x] = magtc_align_x # Get the correct x, depending on alignment end end #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Get Alignment X #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ def magtc_align_x(start_x = @magtc_rect.x) return start_x unless (@magtc_rect && @magtc_align && @magtc_test_line) || @magtc_align != 0 tw = magtc_calc_line_width(@magtc_test_line) case @magtc_align when 1 then return start_x + ((@magtc_rect.width - tw) / 2) when 2 then return start_x + (@magtc_rect.width - tw) end start_x end #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Calc Line Width #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ def magtc_calc_line_width(line) # Remove all escape codes line = line.clone line.gsub!(/[\n\r\f]/, "") real_contents = contents # Preserve Real Contents # Create a dummy contents self.contents = Bitmap.new(@magtc_rect.width, @magtc_rect.height) reset_font_settings pos = {x: 0, y: 0, new_x: 0, height: calc_line_height(line)} tw = 0 while line[/^(.*?)\e(.*)/] tw += text_size($1).width line = $2 # Remove all ancillaries to the code, like parameters code = obtain_escape_code(line) magtc_test_process_escape_character(code, line, pos) end # Add width of remaining text, as well as the value of pos[:x] under the # assumption that any additions to it are because the special code is # replaced by something which requires space (like icons) tw += text_size(line).width + pos[:x] self.contents.dispose # Dispose dummy contents self.contents = real_contents # Restore real contents return tw end #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # * Test Process Escape Character #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ def magtc_test_process_escape_character(code, text, pos) if $imported[:ATS_SpecialMessageCodes] && ['X', 'HL'].include?(code.upcase) obtain_escape_param(text) return end process_escape_character(code, text, pos) endend Link al sito di Modern Algebra:http://rmrk.net/index.php/topic,44810.0.html http://imageshack.us/a/img28/750/logoteame.pngVisita il progetto:http://www.rpg2s.net/forum/index.php?showtopic=16180 http://imageshack.us/a/img35/7336/senzatitolo2ui.pnghttp://imageshack.us/a/img842/2346/copertinal.png Link to comment Share on other sites More sharing options...
Punk Posted December 14, 2012 Share Posted December 14, 2012 Davvero utile, non conoscevo proprio questo script, bravo :) Link to comment Share on other sites More sharing options...
alegasta92 Posted December 14, 2012 Author Share Posted December 14, 2012 L'ho appena scoperto! Se qualcuno vuole comunque vedere se ci sono altri script utili vada sul link che ho postato. Mi sono dimenticato di scrivere una cosa: Dato che a volte le scritte fuoriescono dalla finestra (mettete icone, colore eccetura sulla finestra del nuovo gioco) lo script da la possibilità di usare il codice \r[n], o meglio il codice di replace. Nello script, infatti, vi è la possibilità di assegnare a degli ID numerici delle scritte lunghe. in modo che compaia al posto di \r[n] dove n è l'ID numerico della parola. Inoltre ogni codice dovrà avere due slash per funzionare (\\i[n], \\G, \\c[n]).Ad esempio: 0 => "\\i[112]\\c[14]Tua Mamma\\c[0]"in questa array si vede infatti che: - L'ID dell'array è 0 -viene messa l'icona 112 tramite il codice \\i[112]- il tutto è colorato in pattern 14 da \\c[14] e riportato a colore base da \\c[0] http://imageshack.us/a/img28/750/logoteame.pngVisita il progetto:http://www.rpg2s.net/forum/index.php?showtopic=16180 http://imageshack.us/a/img35/7336/senzatitolo2ui.pnghttp://imageshack.us/a/img842/2346/copertinal.png Link to comment Share on other sites More sharing options...
Guardian of Irael Posted December 14, 2012 Share Posted December 14, 2012 Te lo sei rivenduto subito insomma! XDBravo, buona cosa, è utile sotto vari aspetti come script! ^ ^ (\_/)(^ ^) <----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...
alegasta92 Posted December 14, 2012 Author Share Posted December 14, 2012 Io direi che è cosa buona e giusta!XD http://imageshack.us/a/img28/750/logoteame.pngVisita il progetto:http://www.rpg2s.net/forum/index.php?showtopic=16180 http://imageshack.us/a/img35/7336/senzatitolo2ui.pnghttp://imageshack.us/a/img842/2346/copertinal.png Link to comment Share on other sites More sharing options...
Yoshi91 Posted December 21, 2012 Share Posted December 21, 2012 Utile, già inserito nel progetto mio!!Potrebbe anche servire per indicare le potenzialità delle armi, tipo nomi rossi per armi potenti...Ci sono tante possibilità!PS. Grazie per averlo postato e tradotto. Gioco in costruzione: Yoshi Party #Link al topic# % completamento: 2% (Userò il VX Ace e non più il VX) La mia bottega, dove potreste chiedermi di tradurvi scripts per VX e VX-Ace in italiano o di programmarvi eventi in cambio di rens! BOTTEGA QUI Sei un grafico e vuoi essere reclutato per Yoshi Party? Vai qui! Scripts, Tutorial e Risorse postate qui da me per VX e VX Ace! Risorse postate qui da me per VX e per il VX Ace: [Varie] Materiali dalla Enterbrain per VX [Chara+Face] Personaggi vari fatti con il generatore di VX Ace [icon-Set] Mega-Iconset da 4 MB Scripts Vx e Vx-Ace tradotti in ITA (e anche no XD): Script postati e tradotti in italiano (e anche non tradotti XD) da me per VX: Musica di battaglia casuale Tradotto Mini Box Messaggio sopra gli eventi Tradotto Sistema Movimento Mappa Avanzato Tradotto Menù Game Over Tradotto Game.exe crash fix Non Tradotto Determinare se il giocatore è in battaglia Tradotto Riproduci SE quando accade un colpo critico Tradotto Script postati e tradotti in italiano (e anche non tradotti XD) da me per VX Ace: Menù ad anello Tradotto Chiama Script lunghi senza intoppi Tradotto Cambia Prezzo Tradotto Anti-Lag Events VE Tradotto Suono allo scorrere dei messaggi Tradotto Riproduci BGM alla schermata di caricamento file Tradotto Nomi Personalizzati per i Salvataggi Tradotto Tutorial: [VX Ace] Personalizzare il menù di default al massimo http://www.mariowiki.com/images/6/60/Yoshiii.gif *wahuu!* 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