Vai al contenuto

Rilevato Ad-Blocker. Per favore disabilita il tuo adblocker quando navighi su makerando.com - Non c'è nessun annuncio invasivo.

Ally

Utente
  • Numero contenuti

    1074
  • Iscritto

  • Ultima visita

  • Days Won

    17

Tutti i contenuti di Ally

  1. Ally

    CBS D&D 3a Edizione

    Nome Script: D&D 3a Edizione Versione: 3.0 Autore/i: Nelderson, Gubid, ???nOBodY???, IceDragon, modern_algebra, Fridgecrisis, iPenguin e Dricc Informazioni: Questa demo vuole raggiungere lo scopo di creare una versione molto simile a D&D. Molto ben fatta e sicuramente da provare per chi ama il genere e vuole farci un tactics. Istruzioni: Script e istruzioni all'interno della demo. Demo: http://www.mediafire.com/?vqpas1a9uxruf2y Note dell'Autore: Per un uso commerciale, contattare tutti gli autori degli script.
  2. Nome Script: Scroll Descrizione Testo Versione: N/D Autore/i: BigEd781 Informazioni: Ora è possibile usare tutto lo spazio che l'editor ti dà per la di abilità e oggetti. In pratica nella finestra di Aiuto se il testo è troppo lungo questo incomincerà a scorrere. E' possibile disattivare questa opzione. Istruzioni: Inserite lo script sopra Main. Per cambiare le impostazioni, fate riferimento a questi codici: @@SCROLL_DELAY = 3 # seconds @@SCROLL_SPEED = 1 # pixels / frame (60 frames / sec) @@SHOW_ICONS = true # display icons for items and skills? Script: class Sprite def draw_icon(icon_index, x, y, enabled = true) bitmap = Cache.system("Iconset") rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24) self.bitmap.blt(x, y, bitmap, rect, enabled ? 255 : 128) end end class Window_Help < Window_Base @@SCROLL_DELAY = 2 # seconds @@SCROLL_SPEED = 1 # pixels / frame (60 frames / sec) @@SHOW_ICONS = true # display icons for items and skills? alias :scroll_init :initialize def initialize(*args) scroll_init(*args) @internal_frame_count = 0 @text_is_long = false @icon_sprite = Sprite.new @icon_sprite.x = self.x + 16 @icon_sprite.y = self.y + 16 @icon_sprite.z = self.z + 1 @icon_sprite.bitmap = Bitmap.new(32, 32) self.windowskin = get_altered_skin end def get_altered_skin default = Cache.system('Window') window = Bitmap.new(default.width, default.height) window.blt(0, 0, default, default.rect) window.fill_rect(80, 16, 32, 32, Color.new(0,0,0,0)) return window end def set_text(text, align = 0) unless (text == @text) && (align == @align) @internal_frame_count = 0 txt_width = self.contents.text_size(text).width @text_is_long = txt_width > (self.width - 32) self.contents.dispose w = @text_is_long ? (txt_width + self.width - 32) : self.width - 32 self.contents = Bitmap.new(w, self.height - 32) self.contents.clear self.ox = 0 self.contents.font.color = normal_color i = get_icon_index(text) unless i.nil? draw_sprite(i, 0, 0) self.contents.draw_text(32, 0, self.contents.width, WLH, text, align) else @icon_sprite.bitmap.clear self.contents.draw_text(4, 0, self.contents.width, WLH, text, align) end @text = text @align = align end end def draw_sprite(icon_index, x, y) @icon_sprite.bitmap.clear # get the background image at 'rect' # so that text does not appear under the icon bitmap = Graphics.snap_to_bitmap rect = Rect.new(@icon_sprite.x, @icon_sprite.x, @icon_sprite.bitmap.width, @icon_sprite.bitmap.height) @icon_sprite.bitmap.blt(x, y, bitmap, rect) @icon_sprite.draw_icon(icon_index, x, y) end def get_icon_index(desc) return nil unless @@SHOW_ICONS $data_items.each do |item| return item.icon_index if !item.nil? && item.description == desc end $data_weapons.each do |weapon| return weapon.icon_index if !weapon.nil? && weapon.description == desc end $data_armors.each do |armor| return armor.icon_index if !armor.nil? && armor.description == desc end $data_skills.each do |skill| return skill.icon_index if !skill.nil? && skill.description == desc end return nil end def update super @internal_frame_count += 1 if ((@internal_frame_count > @@SCROLL_DELAY * 60) && @text_is_long) if self.ox >= (self.contents.width - self.width + 48) self.ox = 0 @internal_frame_count = 0 else self.ox += @@SCROLL_SPEED end end end def dispose super @icon_sprite.dispose end end
  3. Nome Script: Schermo intero automatico Versione: isaacsol Autore/i: N/D Informazioni: Come dice il titolo stesso, una semplice aggiunta per far partire automaticamente il gico a schermo intero. Istruzioni: Inserite il mini script al di sopra di TUTTI quelli dello script editor. Script: begin if not $full $showm = Win32API.new 'user32', 'keybd_event', %w(l l l l), '' $showm.call(18,0,0,0) $showm.call(13,0,0,0) $showm.call(13,0,2,0) $showm.call(18,0,2,0) $full = 1 end end
  4. Nome Script: Extra Movement Frames Versione: modern algebra Autore/i: 1.0 Informazioni: Con questo script si possono usare chara con più di 3 frame di movimento, ottenendo così maggiore fluidità nella camminata del personaggio/i. Si possono importare direttamente anche chara dell'XP rinominando però il file ^^ Istruzioni: Lo script si deve inserire sopra Main. Per utilizzare un chara con più frame, bisogna rinominare il file in questo modo: !$%[<numero di frame>]<Nomefile> Esempio: $% [4]001-Fighter01 Ciò renderebbe la grafica di 001-Fighter01 a 4 frame. Script: #============================================================================== # 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 @char_frames == 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)) && (@[member=Stephenol]_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
  5. Nome Script: VX MOD Series Versione: 1.4 Autore/i: Melosx Informazioni: La VX MOD Series non cambierà il gameplay standard del VX solo migliorerà a livello grafico le window fin troppo spoglie per i miei gusti. Avete già visto parti del VX MOD nella Scene_Shop MOD e nel menu per tre pg che altro non è che il riadattamento per 3 pg del VMS. Il VMS è in continua espansione però non essendo uno scripter abile non aspettatevi una release al giorno. Esiste anche il riadattamento per 3 pg di tutto il VMS finora completato oltre al solo menu. Vi lascio agli screen e alla demo Screenshots: Istruzioni: Copiate gli script della demo nel vostro proj Demo: http://www.mediafire.com/?7274p3oozimd7bn Versione per tre pg: http://www.mediafire.com/?80ccykcvvl0aryz
  6. Nome Script: Ccoa's Weather Script Versione: 1.1 Autore/i: Ccoa Informazioni: Come sapete, questo script era stato originariamente creato per XP. Per chi non lo conoscesse, si tratta di uno script che crea degli effetti atmosferici diversi da quelli di default e leggermente più realistici. In questa versione sono stati aggiunti altri effetti, e se non sbaglio, la possibilità di usare anche proprie immagini. La versione per XP, in un eventuale uso commerciale, si doveva pagare Ccoa con una piccola cifra. Per il momento questo si può usare in progetti non commerciali, in quanto Ccoa non si riesce a rintracciare, e non sappiamo nulla a riguardo per chi volesse utilizzarlo su progetti a scopi commerciali. Features: - 15 differenti tipi di effetti - Possibilità di usare proprie picture - Tempo più forte da quello di default - Controllo della tonalità della picture Istruzioni: Per richiamare un effetto, create un call script con all'interno il seguente codice: screen.weather (type, strength, transition)Dove type è l'effetto che volete ottenere (vedere i vari tipi di effetti all'interno dello script), strengh è la forza che deve avere l'effetto e transition è il numero di fotogrammi, appunto, dell'effetto. Se si vuole creare un effetto diverso dalla tonalità standard, utilizzate questo call script: screen.weather (type, strength, transition, Tone.new(R, G, )o screen.weather (type, strength, transition, Tone.new(R, G, B, Gr)Dove RGB sono corrispettivamente i colori Rosso, Verde e Blu, con valori che vanno -255 a 255, e Gr è il grigio (o la desaturazione dello sprite), ed è un valore da 0-255. Per creare un effetto personalizzato, è necessario utilizzare un call script all'interno di un evento. Per configurarlo, bisogna avere le immagini che si vogliono utilizzare nella cartella Pictures del gioco. Esempio: $WEATHER_IMAGES = ["imagename1", "imagename2", imagename3] $WEATHER_X = -1 $WEATHER_Y = 5 $WEATHER_FADE = 5 $WEATHER_ANIMATED = trueIl codice parla chiaramente. Avremmo 3 immagini che si muoveranno di 1px a sinistra e di 5px in giù, con trasparenza 5 etc etc etc xD Fatto ciò, è necessario richiamare anche questo call script: $WEATHER_UPDATE = trueQuesto permette allo script di sapere che hai cambiato qualcosa nelle immagini... Infine, utilizziamo: screen.weather(15, strength, transition)Se qualcosa non è chiaro, potete far riferimento alla demo di esempio, dove potete reperire gli script. Vi ricordo che quest'ultimi devono essere inseriti sotto Material. Demo: http://www.mediafire.com/?abui19kft0yoa2s Incompatibilità: Dovrebbe essere compatibile con qualsiasi script.
  7. Ally

    HUD HUD Nome Mappa

    Nome Script: HUD Nome Mappa Versione: 1.1 Autore/i: Niclas Informazioni: Semplice script che permette di visualizzare il nome della Mappa come HUD. Si possono modificare posizione e visualizzazione. Istruzioni: Inserite lo script sotto material. Script: #============================================================================== # Simple Map HUD # Author: Nicke # Created: 07/06/2011 # Edited: 20/06/2011 # Version: 1.1 #============================================================================== # Instructions # ----------------------------------------------------------------------------- # To install this script, open up your script editor and copy/paste this script # to an open slot below ▼ Materials but above ▼ Main. Remember to save. #============================================================================== $imported = {} if $imported == nil $imported["NICKE-MAP"] = true module NICKE module MAP_HUD #==============================================================================# # ** Settings #==============================================================================# MAP_HUD_FONT = ["Rockwell"] # Font name. MAP_HUD_SIZE = 18 # Font size. MAP_HUD_COLOR = Color.new(255,215,100) # Font color. MAP_HUD_SHADOW = true # Font shadow. X_MAP_HUD = -12 # X position. Y_MAP_HUD = -20 # Y position. Z_MAP_HUD = 200 # Z order. OPACITY = 0 # Opacity level. SHOW_ICON = true # Icon visibility. ICON_INDEX = 153 # Map icon ID to be displayed. VISIBLE_SWITCH = 8 # Switch ID to turn on/off the map window. SHOW_MAP_ID = nil # Show map for ID(s). nil to turn it off. MAPNAME_REPLACE = { # Map ID => "ReplacedName" } # Don't remove this line! # Method for replacing the map name. def self.replace_mapname(oldname, map_id) return MAPNAME_REPLACE[map_id] if MAPNAME_REPLACE.has_key?(map_id) return oldname end end end # *** Don't edit below unless you know what you are doing. *** #==============================================================================# # ** Game_Map #------------------------------------------------------------------------------ # Method for reading the map id and name. #==============================================================================# class Game_Map attr_reader :name #-------------------------------------------------------------------------- # *setup #-------------------------------------------------------------------------- alias nicke_map_hud_setup setup def setup(map_id) nicke_map_hud_setup(map_id) @map_infos = load_data("Data/MapInfos.rvdata") if @map_infos.nil? @name = NICKE::MAP_HUD.replace_mapname(@map_infos[@map_id].name, @map_id) end end #==============================================================================# # ** Window_Base #------------------------------------------------------------------------------ # Method for drawing the map. #==============================================================================# class Window_Base < Window def draw_map_hud(x, y) self.contents.font.name = NICKE::MAP_HUD::MAP_HUD_FONT self.contents.font.size = NICKE::MAP_HUD::MAP_HUD_SIZE self.contents.font.color = NICKE::MAP_HUD::MAP_HUD_COLOR self.contents.font.shadow = NICKE::MAP_HUD::MAP_HUD_SHADOW self.contents.draw_text(x + 30, y, 260, 32, $game_map.name.to_s, 0) end end #============================================================================== # ** Simple_Map_HUD #------------------------------------------------------------------------------ # This window displays the current location. #============================================================================== class Simple_Map_HUD < Window_Base def initialize(x, y) super(x, y, 260, WLH + 38) @map_id = $game_map.map_id refresh end def refresh self.contents.clear draw_map_hud(0, 0) if NICKE::MAP_HUD::SHOW_ICON != false draw_icon(NICKE::MAP_HUD::ICON_INDEX, 0, 6) end end def update super if @map_id != $game_map.map_id refresh @map_id = $game_map.map_id end end end #============================================================================== # ** Scene_Map #------------------------------------------------------------------------------ # Show a location window on the map. #============================================================================== class Scene_Map < Scene_Base alias nicke_map_hud_start start unless $@ def start(*args) create_map_hud @map_hud.visible = $game_switches[NICKE] if NICKE::MAP_HUD::SHOW_MAP_ID != nil if NICKE::MAP_HUD::SHOW_MAP_ID.include?($game_map.map_id) @map_hud.visible = true else @map_hud.visible = false end end nicke_map_hud_start(*args) end alias nicke_map_hud_terminate terminate unless $@ def terminate nicke_map_hud_terminate dispose_map_hud end def create_map_hud @map_hud = Simple_Map_HUD.new(NICKE::MAP_HUD::X_MAP_HUD, NICKE::MAP_HUD::Y_MAP_HUD) @map_hud.opacity = NICKE::MAP_HUD::OPACITY @map_hud.z = NICKE::MAP_HUD::Z_MAP_HUD end def dispose_map_hud @map_hud.dispose unless @map_hud.nil? @map_hud = nil end alias nicke_map_hud_update update unless $@ def update nicke_map_hud_update @map_hud.update @map_hud.visible = $game_switches[NICKE] if NICKE::MAP_HUD::SHOW_MAP_ID != nil if NICKE::MAP_HUD::SHOW_MAP_ID.include?($game_map.map_id) @map_hud.visible = true else @map_hud.visible = false end end end end # END OF FILE #=*==========================================================================*=# # ** END OF FILE #=*==========================================================================*=#
  8. Nome Script: Incontri in base all'oggetto Versione: N/D Autore/i: Moon Informazioni: In base all'oggetto che abbiamo equipaggiato, gli incontri casuali saranno impostati in base al settaggio dei numeri dei passi inseriti nelle proprietà dell'oggetto. Istruzioni: Inserite lo script sotto material (che trovaerete anche all'interno della demo). Per settare i passi, nelle note dell'oggetto, armi o armature etc, inserite: <encounter [#numero]>Dove #numero va sostituito ovviamente con il numero dei passi. Script: #_______________________________________________________________________________ # $Encounter Items by Moon$ | #_______________________________________________________________________________ # | # How to use it? | # Its quite simple, just add <encounter [#number]> at the "Notes" box and it| # will increase the encounter step by the [#number]. | # Ex. | # <ecnounter 30> will increase the encounter steps by 30. | # Thats all | #_______________________________________________________________________________ module Moon module EI module Regexp module BaseItem EI = /<(?:ENCOUNTER|encounter)[ ]*(d+)>/i end end end end class RPG::BaseItem def encounter_items @__enc = 0 self.note.split(/[rn]+/).each { |line| case line when /<(?:ENCOUNTER|encounter)[ ]*(d+)>/i @__enc = $1.to_i end } end def enc encounter_items if @__enc == nil return @__enc end end class Game_Actor < Game_Battler def enc_inc p = 0 equips.compact.each { |item| next if item.enc == nil next if item.enc == 0 p = p + item.enc } return p if p != nil return 0 end def change_equip(equip_type, item, test = false) last_item = equips[equip_type] unless test return if $game_party.item_number(item) == 0 if item != nil $game_party.gain_item(last_item, 1) $game_party.lose_item(item, 1) end item_id = item == nil ? 0 : item.id case equip_type when 0 # Weapon @weapon_id = item_id unless two_hands_legal? # If two hands is not allowed change_equip(1, nil, test) # Unequip from other hand end when 1 # Shield @armor1_id = item_id unless two_hands_legal? # If two hands is not allowed change_equip(0, nil, test) # Unequip from other hand end when 2 # Head @armor2_id = item_id when 3 # Body @armor3_id = item_id when 4 # Accessory @armor4_id = item_id end $game_player.make_encounter_count end end class Game_Player < Game_Character def make_encounter_count if $game_map.map_id != 0 n = $game_map.encounter_step for member in $game_party.members n += $game_actors[member.id].enc_inc end @encounter_count = rand(n) + rand(n) + 1 # As if rolling 2 dice end end end Demo: http://www.mediafire.com/?sgmex4bidei
  9. Nome Script: Sceneggiatura superba per le variabili local1 Versione: 1 Autore/i: Nuki Informazioni: This script allows you to manipulate variables to a local event Istruzioni: Paste above main Script: #Ajout de la gestion des variables locales aux evenement #Auteur: Nuki #Liste des méthodes utilisables #============================================================= # get(map_id, evt_id, id) -> retourne la variable n°id de l'evenement n°evt_id de la map n°map_id # => Alias : get_by_map(map_id, evt_id, id) # get(evt_id, id) -> retourne la variable n°id de l'evenement n°evt_id de la map courante # => Alias : get_by_event(evt_id, id) # get(id) -> retourne la variable n°id de l'evenement courant # => Alias : get_by_id(id) #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # set(map_id, evt_id, id, valeur) -> attribue valeur à la variable n°id de l'evenement n°evt_id de la map n°map_id # => Alias : set_by_map(map_id, evt_id, id, valeur) # set(evt_id, id, valeur) -> attribue valeur à la variable n°id de l'evenement n°evt_id de la map courante # => Alias : set_by_event(evt_id, id, valeur) # set(id, valeur) -> attribue valeur à la variable n°id de l'evenement courant # => Alias : set_by_id(id, valeur) #============================================================= class Self_Var attr_accessor :map_id attr_accessor :event_id attr_accessor :id attr_accessor :value def initialize(map_id, event_id, id, value) @map_id = map_id @event_id = event_id @id = id @value = value end end class Scene_Title alias var_main main def main var_main $game_self_var = Array.new end end class Game_Interpreter # Récupère une variable en fonction de toute ces données def get_by_map(map_id, event_id, id) local = $game_self_var.find{ |variable| variable.map_id == map_id && variable.event_id == event_id && variable.id == id } return local.value if local.instance_of?(Self_Var) return 0 if local == nil end # Récupère une variable en fonction de son ID d'event et de son idée sur la map courante def get_by_event(event_id, id) return get_by_map(@map_id, event_id, id) end # Récupère la variable de l'evenement courant en fonction d'une ID def get_by_id(id) return get_by_map(@map_id, @event_id, id) end # Attribue une variable en fonction de toutes les données def set_by_map(map_id, event_id, id, value) index = $game_self_var.index( $game_self_var.find{ |variable| variable.map_id == map_id && variable.event_id == event_id && variable.id == id }) if index == nil $game_self_var << Self_Var.new(map_id, event_id, id, value) else $game_self_var[index].value = value end end # Attribue une variable en fonction de l'evenement ID et de l'ID de la variable def set_by_event(event_id, id, value) set_by_map(@map_id, event_id, id, value) end # Attribue une variable en fonction de l'ID de la variable dans l'evenement courant def set_by_id(id, value) set_by_map(@map_id, @event_id, id, value) end #Utilisation GET générique def get(*args) if args.length == 3 return get_by_map(args[0], args[1], args[2]) elsif args.length == 2 return get_by_event(args[0], args[1]) elsif args.length == 1 return get_by_id(args[0]) else return 0 end end #Utilisation SET générique def set(*args) if args.length == 4 set_by_map(args[0], args[1], args[2], args[3]) return true elsif args.length == 3 set_by_event(args[0], args[1], args[2]) return true elsif args.length == 2 set_by_id(args[0], args[1]) return true else return false end end end class Scene_File alias var_write_save_data write_save_data alias var_read_save_data read_save_data def write_save_data(file) var_write_save_data(file) Marshal.dump($game_self_var,file) end def read_save_data(file) var_read_save_data(file) $game_self_var = Marshal.load(file) end end Note dell'Autore: http://funkywork.blogspot.com
  10. Nome Script: Script di configurazione iniziale Versione: 1.0 Autore/i: Melosx Informazioni: Per evitare di far eventi in parallelo o in automatico che assegnino oro e oggetti iniziali lo script permette di impostare i valori iniziali di oro, armi, armature e oggetti non che il font di gioco e la sua grandezza. Istruzioni: Seguire attentamente le istruzioni. Aprite l'editor degli script, trovate in basso lo script Main e sostituite a esso questo script. Per aggiungere altri elementi agli strumenti o alle armi/armature seguite questo semplice template: ID => Quantità ID = ID dell'oggetto nel database. Quantità = la quantità iniziale che si vuole avere dell'oggetto. Script: #============================================================================= # Melosx - Configurazione Iniziale #============================================================================= # Autore: Melosx # Versione: 1.0 # Data di creazione: 10-7-2011 => v 1.0 # #=============================================================================== # * Descrizione # ----------------------------------------------------------------------------- # Lo script permette di impostare i valori iniziali di oro, armi, armature e # oggetti non che il font di gioco e la sua grandezza. # #=============================================================================== # * Istruzioni # ----------------------------------------------------------------------------- # Seguire attentamente le istruzioni. # Aprite l'editor degli script, trovate in basso lo script Main e sostituite a # esso questo script. # Per aggiungere altri elementi agli strumenti o alle armi/armature seguite # questo semplice template: # ID => Quantità # ID = ID dell'oggetto nel database. # Quantità = la quantità iniziale che si vuole avere dell'oggetto. # #=============================================================================== #============================================================================== # ** Modulo di configurazione #============================================================================== module MSX_CONFIG #============================================================================== # ** Quantità oro iniziale #============================================================================== ORO = 500 # <- Quantità di denaro iniziale #============================================================================== # ** Strumenti, armi e armature iniziali. Si troveranno nell'inventario. #============================================================================== STRUMENTI = { # ID => Quantità 1 => 34, # Pozione x 34 10 => 25 # PM Up x 25 } # <- NON cancellare la parentesi. ARMI = { # ID => Quantità 1 => 2, # Bastone di legno x 2 10 => 5 # Spada Bastarda x 5 } # <- NON cancellare la parentesi. ARMATURE = { # ID => Quantità 1 => 3, # Scudo di pelle x 3 10 => 2 # Tiara x 2 } # <- NON cancellare la parentesi #============================================================================== # ** Font del gioco e grandezza. #============================================================================== FONT = "Arial" # <- Nome del font GRANDEZZAFONT = 14 # <- Grandezza del font end #======================FINE MODULO DI CONFIGURAZIONE=========================== #============================================================================== # ** Game_Party #============================================================================== class Game_Party include MSX_CONFIG alias melosx_initialize initialize def initialize super @gold = MSX_CONFIG::ORO #---------------------------------# @steps = 0 @last_item_id = 0 @last_actor_index = 0 @last_target_index = 0 @actors = [] #---------------------------------# @items = MSX_CONFIG::STRUMENTI @weapons = MSX_CONFIG::ARMI @armors = MSX_CONFIG::ARMATURE end end #============================================================================== # ** Main #============================================================================== begin Graphics.freeze Font.default_name = MSX_CONFIG::FONT Font.default_size = MSX_CONFIG::GRANDEZZAFONT $scene = Scene_Title.new $scene.main while $scene != nil Graphics.transition(30) rescue Errno::ENOENT filename = $!.message.sub("File o Directory mancante - ", "") print("Impossibile trovare il file #{filename}.") end Demo: N/D
  11. Nome Script: SRPG2 - tactical battle system Versione: 1.0121 Autore/i: tomoaky Informazioni: Questo battle system, riprende 3 diversi stili di battaglia: - Fire Emblem (per il parlato) - Final Fantasy Tactics (direzione dei face) - Advance Wars (effetti del terreno) Screenshots: Istruzioni: Le istruzioni sono all'interno della demo. Demo: http://www.mediafire.com/?affd1n3on9po96n Demo Tradotta: http://www.mediafire.com/?nswvn9xdb531une Incompatibilita': N/D Note dell'Autore: Il sistema di battaglia non può essere usato per progetti a fini commerciali.
  12. Nome Script: Cambio face in base agli HP Versione: N/D Autore/i: Jet10985 Informazioni: Lo script fa si che i face dei personaggi cambino a seconda di quanti HP hanno. Istruzioni: Inserite lo script sotto Material. Istruzioni all'interno dello script. Script: #=============================================================================== # Dynamic Face Changing # By Jet10985 (Jet) # Request By: Kyriaki #=============================================================================== # This script will allow you to set up conditions for an actors face to be # changed automatically. # This script has: 1 customization option. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_System: initialize #=============================================================================== =begin To lock an actor's face: To lock an actor's face, which means none of the below conditionals will be checked, so the face will appear as whatever was last set by an event, use this in an Event Script... command lock_actor_face(actor_id) actor_id should be the database id of the actor whose face should be locked. -------------------------------------------------------------------------------- To unlock an actor's face: Follow the same instructions as above, but with this command instead: unlock_actor_face(actor_id) =end module JetDynamicFaces #============================================================================= # How to configure: #============================================================================= # Follow this format: actor_id => ["Face Name", index, :type, condition] #----------------------------------------------------------------------------- # actor_id is the database id of the actor in the database. # More than 1 condition can be used per actor, you should NOT use the same # id in the config more than once. #----------------------------------------------------------------------------- # "Face name" is the name of the face file in the Graphic/Faces folder # You may also use :face instead, which will use their currently set face, # as set by the database or event. #----------------------------------------------------------------------------- # index is the index of the face in the picture above #----------------------------------------------------------------------------- # :type is the type of conditional that it will check for. It can be: # :hp which will check if their hp is below a percentage. # :mp which will check if their mp is below a percentage. # :state which will check if a state is applied to the actor. #----------------------------------------------------------------------------- # condition is what should be checked from the :type # If type is :hp or :mp, this should be the percentage to check. # If type is :state, this should be the id of the state to check for. #----------------------------------------------------------------------------- # Please note, the order of the conditionals will determine priority. # The face will be from whichever conditional is matched last, so low # priority conditions should be first. #----------------------------------------------------------------------------- ACTOR_DYNAMIC_FACES_CONDITIONS = { 1 => [["People1", 2, :hp, 75], ["People1", 1, :hp, 50], ["People1", 0, :hp, 25]], 2 => [[:face, 0, :mp, 25], [:face, 1, :state, 1]] } end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_System attr_accessor :locked_actor_faces alias jet1280_initialize initialize unless $@ def initialize(*args, &block) @locked_actor_faces = [] jet1280_initialize(*args, &block) end end class Game_Actor def face_name return @face_name if $game_system.locked_actor_faces.include?(self.id) if JetDynamicFaces::ACTOR_DYNAMIC_FACES_CONDITIONS.keys.include?(self.id) jet_face_name = @face_name for cond in JetDynamicFaces::ACTOR_DYNAMIC_FACES_CONDITIONS[self.id] case cond[2] when :hp if self.hp.to_f / self.maxhp <= cond[3] / 100.0 jet_face_name = cond[0] == :face ? @face_name : cond[0] end when :mp if self.mp.to_f / self.maxmp <= cond[3] / 100.0 jet_face_name = cond[0] == :face ? @face_name : cond[0] end when :state if self.state?(cond[3]) jet_face_name = cond[0] == :face ? @face_name : cond[0] end end end return jet_face_name else return @face_name end end def face_index return @face_index if $game_system.locked_actor_faces.include?(self.id) if JetDynamicFaces::ACTOR_DYNAMIC_FACES_CONDITIONS.keys.include?(self.id) jet_face_index = @face_index for cond in JetDynamicFaces::ACTOR_DYNAMIC_FACES_CONDITIONS[self.id] case cond[2] when :hp if self.hp.to_f / self.maxhp <= cond[3] / 100.0 jet_face_index = cond[1] end when :mp if self.mp.to_f / self.maxmp <= cond[3] / 100.0 jet_face_index = cond[1] end when :state if self.state?(cond[3]) jet_face_index = cond[1] end end end return jet_face_index else return @face_index end end end class Game_Interpreter def lock_actor_face(id) unless $game_system.locked_actor_faces.include?(id) $game_system.locked_actor_faces.push(id) end end def unlock_actor_face(id) if $game_system.locked_actor_faces.include?(id) $game_system.locked_actor_faces.delete(id) end end end
  13. Nome Script: Battaglia Continua Versione: 1.1 Autore/i: FenixFyreX Informazioni: Script a parer mio utilissimo che da la possibilità di far apparire altri nemici dopo la sconfitta di questi. La funziona, per chi non la conoscesse, è presente anche in FFVI. Istruzioni: Inserite lo script sotto Material. Per far apparire un secondo mostro subito dopo la sconfitta del primo, inserite questo call script prima della battaglia: extend_troop(id, id2, id3......)Dove id, id2, id3...... sono gli ID dei gruppi di mostri settati nel Database. Script: class Scene_Battle < Scene_Base def judge_win_loss if $game_temp.in_battle if $game_party.all_dead? process_defeat return true elsif $game_troop.all_dead? and !$troop_ext.extend process_victory return true elsif $game_troop.all_dead? and $troop_ext.extend $game_troop.setup_extension if $troop_ext.display_emerged for name in $game_troop.enemy_names text = sprintf(Vocab::Emerge, name) $game_message.texts.push(text) end end @spriteset.dispose_enemies @spriteset.create_enemies else return false end else return true end end end class Troop_Extensions attr_reader :progression, :extend, :current_troop, :display_emerged def initialize @progression = [] @extend = false @current_troop = nil @display_emerged = true end def setup_extension(prog) @progression = prog.to_a @extend = true @current_troop = nil end def get_next_troop if !@extend return nil end id = @progression.shift if @progression.size == 0 @extend = false end @current_troop = id return $data_troops[id] end def emerge(tf=true) @display_emerged = tf end end $troop_ext = Troop_Extensions.new class Game_Troop < Game_Unit def setup_extension troop = $troop_ext.get_next_troop for member in troop.members next if $data_enemies[member.enemy_id] == nil enemy = Game_Enemy.new(@enemies.size, member.enemy_id) enemy.hidden = member.hidden enemy.immortal = member.immortal enemy.screen_x = member.x enemy.screen_y = member.y @enemies.push(enemy) end make_unique_names end end class Game_Interpreter def extend_troop(*args) $troop_ext.setup_extension(args) return true end end
  14. Nome Script: FenixFyreX's Light FX Versione: 0.8 Autore/i: FenixFyreX Informazioni: Questo script permette di generare effetti di luce attraverso un commento posti in un evento. E' molto semplice e ha un sacco di funzioni. Features: - Configurazione dinamica degli effetti luce con un commento nella pagina di un evento. - Ogni effetto può avere la sua propria grafica! - Aggiunge effetti come il tremolio, il ridimensionamento, effetto onda, compensazione e molto altro ancora. - Preset di configurazione nella configurazione dello script per l'uso facile accesso. - Switch che inverte il sistema (da configurare). Screenshots: Istruzioni: Inserite lo script sotto material. Le istruzioni sono all'interno dello script. Script: # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # # FenixFyreX's Light Effects (FFXLFX) # Version 0.8 # http://www.rpgmakervx.net # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # # To create a light effect via comment, setup the comment like so: # # <lfx args> # # args can be any of the following; fn is required: # # fn # f Flicker effect. Setup like so: f[n,n1] best effect above 100,100. # zx,zy Zoom X and Zoom Y of the effect. # b Blend type of the effect. 0 is normal, 1 is add, 2 is subtract. # os Offset, setup like so: os[x,y] x and/or y can be negative. # clr Color. Setup like so: clr[red,green,blue,alpha] alpha can be omitted. # w Wave effect. Setup like so: w[amp,length,speed,phase] phase can be omitted. # # To use a preset, just setup the comment like so: # # <lfx preset string> # # Where string is the name of the preset below. # # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # module FFXLFX # # # # Set up preset light fx here. the preset can be named anything as long as it # is a string(e.g. within " ") # Options for the preset are as follows; if a * is next to it, its mandatory: # # :filename * The name of the file in Graphics/Lights/ # :flicker Should the light flicker? Must be an array of two numbers. # :zx Zoom X of the effect, 1 is default # :zy Zoom Y of the effect, 1 is default # :blend 0 is normal, 1 is add, 2 is subtract # :color An array of 3-4 numbers, like so: [155,100,0] # Yellow # :wave An array of 3-4 numbers, [amp, length, speed, phase] # # :wave makes the image wiggle, amp's default is Presets = {} #do NOT delete this. Presets["Ground1"] = { :filename => "light1", :flicker => [200,100], :zx => 2, :zy => 2, :blend => 1, :color => [155,100,0], :wave => [1,1,10], } # The switch that turns the whole system on or off. If on, the system will be off. On_Off_Switch = 1 end module Cache def self.lights(filename) load_bitmap("Graphics/Lights/",filename) end end class Sprite def start_wave(amp,speed,length,phase=nil) self.wave_amp = amp self.wave_speed = speed self.wave_length = length self.wave_phase = phase.to_i unless phase.nil? end end class Game_Event < Game_Character def light rgxp = /<lfx[ ]*(::|=)?[ ]*(.*)>/i rgxp2 = /<lfxpreset[ ]*=?[ ]*(.*)>/i return if @page.nil? @page.list.each do |item| if [108,408].include?(item.code) txt = item.parameters[0] index = @page.list.index(item) loop do if [108,408].include?(@page.list[index].code) unless txt =~ (rgxp || rgxp2) txt += @page.list[index+1].parameters[0] else break end index += 1 else return nil end end return txt =~ rgxp2 ? preset_light($1.to_s) : txt =~ rgxp ? new_light(txt) : nil end end return nil end def new_light(txt) filename = txt =~ /fn[ ]*=?[ ]*([w*d*s*]*)/i ? $1.to_s : nil flicker = txt =~ /f[ ]*=?[ ]*[(d+),(d+)]/i ? [$1.to_i,$2.to_i] : nil zx = txt =~ /zx[ ]*=?[ ]*(d*)/i ? $1.to_i : 1 zy = txt =~ /zy[ ]*=?[ ]*(d*)/i ? $1.to_i : 1 blend = txt =~ /b[ ]*=?[ ]*[0|1|2]/i ? $1.to_i : nil offset = txt =~ /os[ ]*=?[ ]*[(d+),(d+)]/i ? [$1.to_i,$2.to_i] : [0,0] wave = txt =~ /w[ ]*=?[ ]*[(d+)[ ]*,[ ]*(d+)[ ]*,[ ]*(d+)[ ]*,?[ ]*(d+)?]/i ? [$1.to_i,$2.to_i,$3.to_i,$4] : nil color = nil if txt =~ /clr[ ]*=?[ ]*[(d+),?[ ]*(d+),?[ ]*,(d+),?[ ]*(d+)?]/i color = Color.new($1.to_f,$2.to_f,$3.to_f,$4.nil? ? 255 : $4.to_f) end if FileTest.exist?(sprintf("Graphics/Lights/%s.png", filename)) s = Sprite_Light.new(self) s.bitmap = Cache.lights(filename).clone s.flicker = flicker s.zoom_x = zx s.zoom_y = zy s.color = color unless color.nil? s.blend_type = blend unless blend.nil? s.offset = offset s.start_wave(*wave) unless wave.nil? return s end return nil end def preset_light(nam) cache = FFXLFX::Presets[nam] return nil if cache[:filename].nil? s = Sprite_Light.new(self) s.bitmap = Cache.lights(cache[:filename]).clone s.flicker = cache[:flicker] unless cache[:flicker].nil? s.zoom_x = cache[:zx] unless cache[:zx].nil? s.zoom_y = cache[:zy] unless cache[:zy].nil? s.color = Color.new(*cache[:color]) unless cache[:color].nil? s.blend_type = cache[:blend] unless cache[:blend].nil? s.offset = cache[:offset] unless cache[:offset].nil? s.start_wave(*cache[:wave]) unless cache[:wave].nil? return s end end class Spriteset_Map attr_accessor :lightfxs alias init_lightfxs initialize unless $@ def initialize(*args, &block) @lightfxs = [] init_lightfxs(*args, &block) setup_lightz update_lightz end def setup_lightz if $game_switches[FFXLFX] return nil end $game_map.events.values.each do |i| @lightfxs[i.id] = i.light end end alias update_lightfxs update unless $@ def update(*args, &block) if $game_switches[FFXLFX] && @lightfxs.empty? setup_lightz elsif !$game_switches[FFXLFX] dispose_lightz end update_lightfxs(*args, &block) update_lightz end alias dispose_lightfxs dispose unless $@ def dispose(*args, &block) dispose_lightz dispose_lightfxs(*args, &block) end def update_lightz @lightfxs.each do |s| s.update unless s.nil? or s.disposed? or s.bitmap.nil? or s.bitmap.disposed? end end def dispose_lightz @lightfxs.each do |s| s.dispose unless s.nil? or s.disposed? end end end class Sprite_Light < Sprite_Base attr_accessor :flicker, :offset def initialize(event) @event = event @flicker = false @offset = [0,0] super(nil) set_xyz end def update set_xyz return if [email protected]?() super if [email protected]? self.visible = (rand(@flicker[0]) != @flicker[0]-1) self.opacity = 255-rand(@flicker[1]) else self.visible = true self.opacity = 150 end end def set_xyz a = (@event.screen_x.to_f) b = (@event.screen_y.to_f) a -= (self.width/2)+((self.zoom_x-1)*self.width/2) b -= self.height+((self.zoom_y-1)*self.height/2) a += @offset[0] b += @offset[1] self.x = a self.y = b self.z = @event.screen_z end end Incompatibilità: N/D
  15. Ally

    System Mod SwapXT

    SwapTX L'applicazione definitiva per cambiare tileset/passaggi più semplicemente!!! Nome Script: SwapXT Versione: 1.0 Autore/i: BulletXT Informazioni: Con questo script e programma,possiamo utilizzare quanti tileset vogliamo troncando nettamente la limitazione impostata sul VX. Dalla versione precedente,questa ha subito una forte miglioria,diventando l'applicazione definitiva =) Screenshots: Istruzioni: - Scaricare ed inserite lo script nel vostro progetto - Scaricare ed installate il programma - Una volta aperto il programma vi verrà chiesto di scegliere il progetto che volete modificare selezionando il file Game.ini - Ora inserite tutti i tileset che volete cambiare creando una cartella in Graphics/System /extra_tiles - Utilizzare le prime due schede del programma per cambiare tileset/passabilità per poi mappare - Utilizzare la terza scheda per applicare lo swap a un'ID mappa e modificare quelle esistenti - Utilizzare la terza scheda per swappare i tile in tempo reale Script: =begin SwapXT Version: 1.0 Author: Marco Di Antonio ([email protected]) Nickname: BulletXt Date: 14/07/2010 This is SwapXT script that must be put in your VX game script section. It's Plug&Play. Use SwapXT application to do swaps once you put this into your VX game. =end ############################# CONFIGURATION #################################### #Switch ID. #If ON, your events will not swap according to tiles and will use default tiles. DISABLE_EVENT_SWAPPING = 100 =begin IGNORE the following two switches IDs unless you are using old 0.4 swapping script found at: http://lodestone2d.svn.sourceforge.net/viewvc/lodestone2d/Scripts-Dev/Swap_TileSet/Swap_tile_new_passage_setting.rb . If you are, set the 2 ID switches to ensure compatibility with your current "old system" swaps. The meaning of these two switches are described on the old 0.4 script, and you should already have confidence with them if you need these. =end SWAP_TILE = 9999 LOAD_PASSAGE_SETTING = 9998 ########################## END CONFIGURATION ################################### #============================================================================== # ** Cache module Cache_Swap_Tiles #error message in case user is swapping tiles #on a map with both old and new system def self.error_message(map_id) $bulletxt_error_message_mixed_swapping_configuration = "BulletXt Message: on this map ID " + map_id.to_s() + " you have a dangerous configuration. You are swapping tilesets from events and from the swapping application. Mixed configuration is not allowed. Please decide which system to use to swap your tiles. I highly suggest to swap tilesets using the swapping application. If you decide to do this, please be sure you turn off the swapping switch ID " + SWAP_TILE.to_s() + " before entering this map. I will close the game for security reasons." #get rid of n array = $bulletxt_error_message_mixed_swapping_configuration.split("n") size = array.length() n = 0 f = "" while n < size do message = array[n] f = f + message n = n + 1 end $bulletxt_error_message_mixed_swapping_configuration = f end #error message in case user is swapping passage settings #on a map with both old and new system def self.error_message_passage(map_id) $bulletxt_error_message_mixed_swapping_configuration = "BulletXt Message: on this map ID " + map_id.to_s() + " you have a dangerous configuration. You are swapping a passage settings from events and from the swapping application. Mixed configuration is not allowed. Please decide which system to use to swap your passage settings. I highly suggest to swap passage settings using the swapping application. If you decide to do this, please be sure you turn off the swapping passage setting switch ID " + LOAD_PASSAGE_SETTING.to_s() + " before entering this map. I will close the game for security reasons." #get rid of n array = $bulletxt_error_message_mixed_swapping_configuration.split("n") size = array.length() n = 0 f = "" while n < size do message = array[n] f = f + message n = n + 1 end $bulletxt_error_message_mixed_swapping_configuration = f end #-------------------------------------------------------------------------- # * Get Character Graphic # filename : Filename #-------------------------------------------------------------------------- def self.swap(filename) load_bitmap("Graphics/System/extra_tiles/", filename) end #-------------------------------------------------------------------------- # * Clear Cache #-------------------------------------------------------------------------- def self.clear @cache = {} if @cache == nil @cache.clear GC.start end #-------------------------------------------------------------------------- # * Load Bitmap #-------------------------------------------------------------------------- def self.load_bitmap(folder_name, filename, hue = 0) @cache = {} if @cache == nil path = folder_name + filename if not @cache.include?(path) or @cache[path].disposed? if filename.empty? @cache[path] = Bitmap.new(32, 32) else @cache[path] = Bitmap.new(path) end end if hue == 0 return @cache[path] else key = [path, hue] if not @cache.include?(key) or @cache[key].disposed? @cache[key] = @cache[path].clone @cache[key].hue_change(hue) end return @cache[key] end end end ################################################################################ ############ CHECK IF THERE ARE SWAPPED TILES AT START PLAY TIME ############### =begin We must ensure user is starting game and there are physically swapped tiles or passage settings, tiles that have been for example swapped from the application =end class Scene_Title < Scene_Base alias swapxt_start start def start swapxt_start check_if_tileset_swapped_exist check_if_passage_swapped_exist end def check_if_tileset_swapped_exist tile = "Graphics/System/swapped_" tileset_swap_loaded_message_error if FileTest.exist?(tile + "A1.png") tileset_swap_loaded_message_error if FileTest.exist?(tile + "A2.png") tileset_swap_loaded_message_error if FileTest.exist?(tile + "A3.png") tileset_swap_loaded_message_error if FileTest.exist?(tile + "A4.png") tileset_swap_loaded_message_error if FileTest.exist?(tile + "A5.png") tileset_swap_loaded_message_error if FileTest.exist?(tile + "B.png") tileset_swap_loaded_message_error if FileTest.exist?(tile + "C.png") tileset_swap_loaded_message_error if FileTest.exist?(tile + "D.png") tileset_swap_loaded_message_error if FileTest.exist?(tile + "E.png") end def tileset_swap_loaded_message_error p sprintf("SwapXT Error: You are not allowed to start your game with swapped tilesets. You must unload your tilesets with SwapXT application first. Open SwapXT, click at top Tools->Restore all Tilesets") exit end def check_if_passage_swapped_exist passage = "swapxt/passage_warning.stx" passage_swap_loaded_message_error if FileTest.exist?(passage) end def passage_swap_loaded_message_error p sprintf("SwapXT Error: You are not allowed to start your game with swapped passage settings. You must unload your passage setting with SwapXT application first. Open SwapXT, go on PassageSetting tab and click on Restore to Default.") exit end end ################################################################################ =begin this class takes care of checking if there is a map id file. this class does not swap tilesets but only prepares the tiles variables(if map id file found). this class handles loading the passage setting file, for both old and new system =end class Game_Map include Cache_Swap_Tiles alias bulletxt_goodbye_vx_limit_tile_setup setup def setup(map_id) #must be false at load time $swapxt_realtime = false #this variable must always be false at runtime. #becomes true only if it finds a map id file $swap_tileset_profile_bulletxt = false #check if it must load a saved profile TILESET for this map id profile_path_tile = "swapxt/tiles/" + map_id.to_s() + ".stx" if FileTest.exist?(profile_path_tile) #we must now check if user isn't fooling around with his configuration. #he must not be swapping tiles on this map with old and new system #at the same time. if this is the case, warn him we don't want issues and #close the game if $game_switches[SWAP_TILE] == true Cache_Swap_Tiles.error_message(map_id) p sprintf($bulletxt_error_message_mixed_swapping_configuration) exit end #set this to true so we know we want to swap with new system $swap_tileset_profile_bulletxt = true #p sprintf(profile_path_tile + " found!") #read the map id file, it has 8 lines with the name of the tileset to swap. #set each tileset global variable with the corresponding found line, in order. $tileA1,$tileA2,$tileA3,$tileA4,$tileA5,$tileB,$tileC,$tileD,$tileE = File.read(profile_path_tile).split("n") end ##################### SWAP PASSSAGE SETTINGS ########################## @swap_passagesetting_bulletxt = false #for how this works, look at the code above profile_path_passages = "swapxt/passages/" + map_id.to_s() + ".stx" if FileTest.exist?(profile_path_passages) #p sprintf("passage exists on map " + map_id.to_s()) if $game_switches[LOAD_PASSAGE_SETTING] == true Cache_Swap_Tiles.error_message_passage(map_id) p sprintf($bulletxt_error_message_mixed_swapping_configuration) exit end @swap_passagesetting_bulletxt = true $swap_passages = (File.read(profile_path_passages).split("n"))[0] end #checks if it should load default passage setting, both for old and new system if $game_switches[LOAD_PASSAGE_SETTING] == false and @swap_passagesetting_bulletxt == false bulletxt_goodbye_vx_limit_tile_setup(map_id) $swap_passages = nil return end path = "Graphics/System/extra_tiles/" + $swap_passages.to_s() + ".rvdata" rescue nil #check if user set $swap_passages to nil cause he wants to load default setting. #if user is loading with new system checks if it's equal to empty::*:: if $swap_passages == nil or $swap_passages == "empty::*::" bulletxt_goodbye_vx_limit_tile_setup(map_id) return end #when here, we are sure user wants to swap passage setting, either #via old system or new system #the file to swap is not default one, he wants to swap to a real new one @map_id = map_id @map = load_data(sprintf("Data/Map%03d.rvdata", @map_id)) @display_x = 0 @display_y = 0 # load system settings from that file new_system_rvdata = load_data(path) # Use passage settings from that file @passages = new_system_rvdata.passages #default vx code referesh_vehicles setup_events setup_scroll setup_parallax @need_refresh = false end ############################# REAL TIME SWAPS ################################## #if here, player has done a $game_map.tileset call. It must reload #map with new passage setting (if it exists) and upate map. #OLD SYSTEM def tileset #if false, we must update and load default passage if $game_switches[LOAD_PASSAGE_SETTING] == false @passages = $data_system.passages else #if nil, must reset passage setting to default if $swap_passages == nil @passages = $data_system.passages $scene = Scene_Map.new return end path = "Graphics/System/extra_tiles/" + $swap_passages + ".rvdata" rescue nil # load system settings from that file new_system_rvdata = load_data(path) # Use passage settings from that file @passages = new_system_rvdata.passages end #this updates the map tiles. it does not modify events or anything else. $scene = Scene_Map.new end #if here, player has done a $game_map.swapxt() call. It must reload #map with new passage setting (if it exists) and upate map. #NEW SWAPXT SYSTEM def swapxt(integer) rtx_path = "swapxt/realtime/" + integer.to_s() + ".rtx" if !FileTest.exist?(rtx_path ) p sprintf("SwapXT Error: You have called $game_map.swapxt(" + integer.to_s() + ") , but that Real-Time swap doesn't exist. Please better check it inside SwapXT app, under the Real-Time section.") exit end $tileA1,$tileA2,$tileA3,$tileA4,$tileA5,$tileB,$tileC,$tileD,$tileE,passage = File.read(rtx_path).split("n") path = "Graphics/System/extra_tiles/" + passage + ".rvdata" rescue nil if !FileTest.exist?(path) p sprintf("SwapXT Error: Unable to find " + path + ". Please go and check your existant passages from SwapXT in the PassageSetting section.") exit end $swapxt_realtime = true #warning,realtime update must occur # load system settings from that file new_system_rvdata = load_data(path) # Use passage settings from that file @passages = new_system_rvdata.passages #this updates the map tiles. it does not modify events or anything else. $scene = Scene_Map.new end end #this class handles loading tilesets class Spriteset_Map include Cache_Swap_Tiles alias bulletxt_lodestone_create_tilemap create_tilemap def create_tilemap #if true, it means the map doesn't have to load tilesets, #neither for old swapping system or new system. #if true, also means no realtime update occured #it must load DEFAULT tilesets if $game_switches[SWAP_TILE] == false and $swap_tileset_profile_bulletxt == false and $swapxt_realtime == false bulletxt_lodestone_create_tilemap $tileA1 = nil $tileA2 = nil $tileA3 = nil $tileA4 = nil $tileA5 = nil $tileB = nil $tileC = nil $tileD = nil $tileE = nil return end =begin calling the original function is a trick. if there are tiles to swap it will just replace them, otherwise if a tile is nil it won't swap anything, but still the tile will be loaded because it has already loaded the original tile when calling this function. in other words, if setting a tile$n = nil will simply make the script load default tile. =end bulletxt_lodestone_create_tilemap =begin when here, some/all tiles must be swapped, either old or with new system. the tile can be equal to "empty::*::" only if it found the file id of the map and line$n is equal to empty::*::. in that case it must load default tileset. there are no chances a user with old system is swapping a tileset named "empty::*::" because you can't name files with ":" characters under Microsoft Windows OS. =end path_to_graphic = "extra_tiles/" #tileA1 if $tileA1 == "empty::*::" @tilemap.bitmaps[0] = Cache.system("TileA1") else tile1 = Cache_Swap_Tiles.swap($tileA1 + ".png") rescue nil @tilemap.bitmaps[0] = tile1 if $tileA1 != nil end #tileA2 if $tileA2 == "empty::*::" @tilemap.bitmaps[1] = Cache.system("TileA2") else tile2 = Cache_Swap_Tiles.swap($tileA2 + ".png") rescue nil @tilemap.bitmaps[1] = tile2 if $tileA2 != nil end #tileA3 if $tileA3 == "empty::*::" @tilemap.bitmaps[2] = Cache.system("TileA3") else tile3 = Cache_Swap_Tiles.swap($tileA3 + ".png") rescue nil @tilemap.bitmaps[2] = tile3 if $tileA3 != nil end #tileA4 if $tileA4 == "empty::*::" @tilemap.bitmaps[3] = Cache.system("TileA4") else tile4 = Cache_Swap_Tiles.swap($tileA4 + ".png") rescue nil @tilemap.bitmaps[3] = tile4 if $tileA4 != nil end #tileA5 if $tileA5 == "empty::*::" @tilemap.bitmaps[4] = Cache.system("TileA5") else tile5 = Cache_Swap_Tiles.swap($tileA5 + ".png") rescue nil @tilemap.bitmaps[4] = tile5 if $tileA5 != nil end #tileB if $tileB == "empty::*::" @tilemap.bitmaps[5] = Cache.system("TileB") else tile6 = Cache_Swap_Tiles.swap($tileB + ".png") rescue nil @tilemap.bitmaps[5] = tile6 if $tileB != nil end #tileC if $tileC == "empty::*::" @tilemap.bitmaps[6] = Cache.system("TileC") else tile7 = Cache_Swap_Tiles.swap($tileC + ".png") rescue nil @tilemap.bitmaps[6] = tile7 if $tileC != nil end #tileD if $tileD == "empty::*::" @tilemap.bitmaps[7] = Cache.system("TileD") else tile8 = Cache_Swap_Tiles.swap($tileD + ".png") rescue nil @tilemap.bitmaps[7] = tile8 if $tileD != nil end #tileE if $tileE == "empty::*::" @tilemap.bitmaps[8] = Cache.system("TileE") else tile9 = Cache_Swap_Tiles.swap($tileE + ".png") rescue nil @tilemap.bitmaps[8] = tile9 if $tileE != nil end #closes def end #closes class end ########################## SWAP EVENT'S GRAPHICS ############################# #the following class handles swapping event's graphics according to the tiles class Sprite_Character < Sprite_Base include Cache_Swap_Tiles alias swap_tileset_bitmap tileset_bitmap def tileset_bitmap(tile_id) #do not swap events if true if $game_switches[DISABLE_EVENT_SWAPPING] set_number = tile_id / 256 return Cache.system("TileB") if set_number == 0 return Cache.system("TileC") if set_number == 1 return Cache.system("TileD") if set_number == 2 return Cache.system("TileE") if set_number == 3 return nil return end if $game_switches[SWAP_TILE] == false and $swap_tileset_profile_bulletxt == false and $swapxt_realtime == false set_number = tile_id / 256 return Cache.system("TileB") if set_number == 0 return Cache.system("TileC") if set_number == 1 return Cache.system("TileD") if set_number == 2 return Cache.system("TileE") if set_number == 3 return nil return end swap_tileset_bitmap(tile_id) set_number = tile_id / 256 if $tileB == "empty::*::" return Cache.system("TileB") if set_number == 0 else return Cache_Swap_Tiles.swap($tileB) if set_number == 0 rescue nil end if $tileC == "empty::*::" return Cache.system("TileC") if set_number == 1 else return Cache_Swap_Tiles.swap($tileC) if set_number == 1 rescue nil end if $tileD == "empty::*::" return Cache.system("TileD") if set_number == 2 else return Cache_Swap_Tiles.swap($tileD) if set_number == 2 rescue nil end if $tileE == "empty::*::" return Cache.system("TileE") if set_number == 3 else return Cache_Swap_Tiles.swap($tileE) if set_number == 3 rescue nil end return nil end end =begin saves tiles and passage setting variables, needed if you save on a map that has swapped stuff. this is only needed when using old system, because new system reads the value from the map id file =end class Scene_File < Scene_Base alias bulletxt_swap_tiles_write_save_data write_save_data def write_save_data(file) bulletxt_swap_tiles_write_save_data(file) Marshal.dump($tileA1, file) Marshal.dump($tileA2, file) Marshal.dump($tileA3, file) Marshal.dump($tileA4, file) Marshal.dump($tileA5, file) Marshal.dump($tileB, file) Marshal.dump($tileC, file) Marshal.dump($tileD, file) Marshal.dump($tileE, file) Marshal.dump($swap_passages.to_s(), file) Marshal.dump($swap_tileset_profile_bulletxt, file) Marshal.dump($swapxt_realtime, file) end alias bulletxt_swap_tiles_read_save_data read_save_data def read_save_data(file) bulletxt_swap_tiles_read_save_data(file) $tileA1 = Marshal.load(file) $tileA2 = Marshal.load(file) $tileA3 = Marshal.load(file) $tileA4 = Marshal.load(file) $tileA5 = Marshal.load(file) $tileB = Marshal.load(file) $tileC = Marshal.load(file) $tileD = Marshal.load(file) $tileE = Marshal.load(file) $swap_passages = Marshal.load(file) $swap_tileset_profile_bulletxt = Marshal.load(file) $swapxt_realtime = Marshal.load(file) end end Demo: http://www.mediafire.com/?g2mg7nkp6fy1nax Incompatibilità: Incompatibile con lo script Wall Tile Extension. Compatibile con la versione precedente di swap.
  16. Ally

    CMS Menù FFIX

    Nome Script: Menù FFIX Versione: N/D Autore/i: BigEd781 Informazioni: Questo script permette di rendere il vostro menu molto simile al menu di Final Fantasy IX. Viene fornito con un windowskin personalizzata e alcune immagini per la corretta visualizzazione del menu. Istruzioni: Inserite lo script sopra Main, e nella cartella Graphics/Pictures inseriteci queste immagini: Script: =begin BigEd781' Final Fantasy IX Menu Credit to PainHurt at rpgmakervx.net for most of the graphics =end module FF9_Config # set this to 'true' if you would like to use a cusotm background image USE_CUSTOM_BACK = false # the name of the custom background image, without the file extension (no .png) BACK_NAME = 'StoneBackground' # if you set this to 'true', you must be using the enhanced # Window class script that I posted: You can get that script here: # http://www.rpgmakervx.net/index.php?showtopic=8042&hl= # this will make the provided FF9 windowskin look really good. USE_TILED_WINDOW = false # When this is set to 'true', the menu cirsor will animate back and forth. # When set to 'false', it will stay in place ANIMATE_CURSOR = false # When set to 'true', four background panels are always drawn. # When set to 'false', a panel is only drawn for each party member DRAW_FOR_ALL = true # the name of the font used in the menu. # use 'Font.default_name' for the default font. Try 'Centaur' for a nice, smaller font. DEFAULT_FONT = Font.default_name # set this to true to enable the font above for all windows. # also sets the back_opacity to 255 for all windows. # I recommend setting this to 'true' to maintain a consistent look. USE_FOR_ALL = true # the icon id for your gold window portion of the menu, 194 by default. GOLD_ICON_ID = 194 end if FF9_Config::USE_FOR_ALL Font.default_name = FF9_Config::DEFAULT_FONT class Window_Base < Window alias :eds_pre_ff9_menu_base_initialize :initialize def initialize(*args) eds_pre_ff9_menu_base_initialize(*args) self.stretch = false if FF9_Config::USE_TILED_WINDOW self.back_opacity = 255 end end end class Window_Base < Window CAPTION_COLOR = Color.new(255,255,255)#(228, 228, 228) CAPTION_HEIGHT = 12 X_OFFSET = 16 Y_OFFSET = -5 alias :eds_pre_window_caption_intialize :initialize def initialize(*args) eds_pre_window_caption_intialize(*args) @caption_sprite = Sprite_Base.new(self.viewport) create_caption_bitmap(1, CAPTION_HEIGHT) @caption_sprite.x = self.x + X_OFFSET @caption_sprite.y = self.y + Y_OFFSET @caption_sprite.z = self.z + 1 end def x=(value) super @caption_sprite.x = value + X_OFFSET unless @caption_sprite.nil? end def y=(value) super @caption_sprite.y = value + Y_OFFSET unless @caption_sprite.nil? end def z=(value) super @caption_sprite.z = value + 1 unless @caption_sprite.nil? end def caption=(text) return unless text.is_a?(String) return if text.empty? @caption = text width = @caption_sprite.bitmap.text_size(@caption).width create_caption_bitmap(width, CAPTION_HEIGHT) draw_caption end def create_caption_bitmap(w, h) @caption_sprite.bitmap = Bitmap.new(w, h) @caption_sprite.bitmap.font.size = 12 @caption_sprite.bitmap.font.color = CAPTION_COLOR @caption_sprite.bitmap.font.bold = true end def draw_caption unless @caption.nil? h = @caption_sprite.bitmap.height w = @caption_sprite.bitmap.width rect = Rect.new( 0, h / 2, w, h / 4 ) @caption_sprite.bitmap.fill_rect(rect, Color.new(0, 0, 0, 96)) @caption_sprite.bitmap.draw_text(@caption_sprite.src_rect, @caption) end end alias :eds_pre_caption_window_dispose :dispose def dispose eds_pre_caption_window_dispose @caption_sprite.dispose end def find_window_width(text) return Bitmap.new(544, 416).text_size(text).width + 32 end end class Window_TimeGold < Window_Base def initialize(x, y) width = find_window_width("9999999") width = 140 if width < 140 super(x, y, width, WLH + 58) self.back_opacity = 255 self.stretch = false if FF9_Config::USE_TILED_WINDOW self.contents.font.name = FF9_Config::DEFAULT_FONT self.caption = "TIME & #{Vocab.gold}" @time_icon = Cache.picture('Timer') @intern_frame_count = 0 refresh end def draw_time sec = (Graphics.frame_count / 60) % 60 min = (Graphics.frame_count / 3600) % 60 hrs = Graphics.frame_count / 216000 self.contents.font.color = Color.new(255, 255, 255) time = "%02d:%02d:%02d" % [hrs, min, sec] self.contents.draw_text(0, 0, self.contents.width, WLH, time, 2) end def refresh self.contents.clear self.contents.blt(0, 0, @time_icon, @time_icon.rect) draw_icon(FF9_Config::GOLD_ICON_ID, 2, WLH) draw_currency_value($game_party.gold, 0, WLH, self.contents.width) draw_time end def draw_currency_value(value, x, y, width) gold_text = Vocab.gold cx = contents.text_size(gold_text[0,1]).width self.contents.font.color = normal_color self.contents.draw_text(x, y, width - cx - 2, WLH, value, 2) self.contents.font.color = system_color # just print the first character of Vocab::gold self.contents.draw_text(x, y, width, WLH, gold_text[0,1], 2) end def update super @intern_frame_count += 1 return if (@intern_frame_count % 60) != 0 refresh end def find_window_width(text) return Bitmap.new(544, 416).text_size(text).width + 80 end end class Window_MenuLocation < Window_Base def initialize(x, y) @map_name = load_data("Data/MapInfos.rvdata")[$game_map.map_id].name width = find_window_width(@map_name) super(x, y, width, WLH + 32) self.stretch = false if FF9_Config::USE_TILED_WINDOW self.contents.font.name = FF9_Config::DEFAULT_FONT self.back_opacity = 255 self.caption = "LOCATION" refresh end def refresh self.contents.clear self.contents.draw_text(0, 0, self.contents.width, WLH, @map_name, 1) end def find_window_width(text) return Bitmap.new(544, 416).text_size(text).width + 48 end end class Window_Command < Window_Selectable alias :eds_pre_ff9_menu_win_command_init :initialize def initialize(*args) @font_name = Font.default_name eds_pre_ff9_menu_win_command_init(*args) end #-------------------------------------------------------------------------- # * OVERWRITTEN #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.name = @font_name for i in 0...@item_max draw_item(i) end end def font_name=(name) @font_name = name end end class Window_Uses < Window_Base def initialize(right, y, item) @remaining_text = "Remaining: #{$game_party.item_number(item)}" w = 160 x = right ? (544 - w) : 0 super(x, y, w, WLH + 32) self.stretch = false if FF9_Config::USE_TILED_WINDOW self.contents.font.name = FF9_Config::DEFAULT_FONT refresh end def item=(item) return unless item.is_a?(RPG::Item) @remaining_text = "Remaining: #{$game_party.item_number(item)}" refresh end def visible=(value) super refresh if value end def refresh self.contents.clear self.contents.draw_text(self.contents.rect, @remaining_text, 1) end end class Window_SkillUses < Window_Base def initialize(right, y, actor, skill) @remaining_text = make_info_string(actor, skill) w = 182 x = right ? (544 - w) : 0 super(x, y, w, WLH + 32) self.stretch = false if FF9_Config::USE_TILED_WINDOW self.contents.font.name = FF9_Config::DEFAULT_FONT refresh end def make_info_string(actor, skill) return if actor.nil? || skill.nil? cost = actor.calc_mp_cost(skill) return "Unlimited" if cost < 1 return "Remaining: #{actor.mp / cost}" end def set_skill(actor, skill) return if actor.nil? || skill.nil? return unless skill.is_a?(RPG::Skill) @remaining_text = make_info_string(actor, skill) refresh end def visible=(value) super refresh if value end def refresh self.contents.clear self.contents.draw_text(self.contents.rect, @remaining_text, 1) end end class Window_MenuStatus < Window_Selectable #-------------------------------------------------------------------------- # * OVERWRITTEN #-------------------------------------------------------------------------- def initialize(x, y) super(x, y, 452, 352) @bg_image = Cache.picture('FF9_MenuBar') @arrow_image = Cache.picture('Pointer') create_arrow_sprites @sprite_last_draw_x = 0 @sprite_inc_x = 1 @intern_frame_count = 0 self.stretch = false if FF9_Config::USE_TILED_WINDOW self.contents.font.name = FF9_Config::DEFAULT_FONT self.opacity = 0 self.z = 99 self.active = false self.index = -1 refresh end #-------------------------------------------------------------------------- # * create_arrow_sprites #-------------------------------------------------------------------------- def create_arrow_sprites @arrow_sprites = [] for i in 0..3 @arrow_sprites << Sprite.new @arrow_sprites[i].bitmap = Bitmap.new(@arrow_image.width + 7, @arrow_image.height) @arrow_sprites[i].x = self.x @arrow_sprites[i].y = (i * 80) + self.y + 40 @arrow_sprites[i].z = 999 end end #-------------------------------------------------------------------------- # * OVERWRITTEN #-------------------------------------------------------------------------- def refresh self.contents.clear @item_max = $game_party.members.size draw_background_windows if FF9_Config::DRAW_FOR_ALL for actor in $game_party.members x = 104 y = actor.index * 80 y_offset = 6 draw_background_window(0, y) unless FF9_Config::DRAW_FOR_ALL draw_actor_face(actor, 19, y + 4, 73) draw_actor_name(actor, x, y + y_offset) draw_actor_class(actor, x + 125, y + y_offset) if actor.states.empty? draw_actor_level(actor, x, y + WLH * 1) draw_actor_state(actor, x + 125, y + y_offset) draw_actor_hp(actor, x, ( + (WLH * 2) - 5)) draw_actor_mp(actor, x + 125, ( + (WLH * 2) - 5)) end end #-------------------------------------------------------------------------- # * OVERWRITTEN #-------------------------------------------------------------------------- def update_cursor if @index < 0 #refactor into update arrow method @arrow_sprites.each { |sprite| sprite.bitmap.clear } return end @intern_frame_count += 1 return unless (@intern_frame_count % 5) == 0 if @sprite_last_draw_x >= 7 @sprite_inc_x = -1 elsif @sprite_last_draw_x <= 0 @sprite_inc_x = 1 end update_arrow_sprites end #-------------------------------------------------------------------------- # * update_arrow_sprites #-------------------------------------------------------------------------- def update_arrow_sprites @arrow_sprites.each { |sprite| sprite.bitmap.clear } if @index == 99 # all selected return unless (@intern_frame_count % 10) == 0 draw_arrow_sprites(@arrow_sprites, false) else draw_arrow_sprites([@arrow_sprites[@index]], FF9_Config::ANIMATE_CURSOR) end end #-------------------------------------------------------------------------- # * draw_arrow_sprites #-------------------------------------------------------------------------- def draw_arrow_sprites(sprites, animated=true) for sprite in sprites image_x = animated ? @sprite_last_draw_x + @sprite_inc_x : 0 @sprite_last_draw_x = image_x sprite.bitmap.blt(image_x, 0, @arrow_image, @arrow_image.rect) end end #-------------------------------------------------------------------------- # * y= #-------------------------------------------------------------------------- def y=(value) super unless @arrow_sprites.nil? for i in 0..3 @arrow_sprites[i].y = (i * 80) + value + 40 end end end #-------------------------------------------------------------------------- # * x= #-------------------------------------------------------------------------- def x=(value) super unless @arrow_sprites.nil? @arrow_sprites.each { |sprite| sprite.x = value } end end #-------------------------------------------------------------------------- # * draw_background_windows #-------------------------------------------------------------------------- def draw_background_windows self.contents.blt(0, 0, @bg_image, @bg_image.rect) self.contents.blt(0, 80, @bg_image, @bg_image.rect) self.contents.blt(0, 160, @bg_image, @bg_image.rect) self.contents.blt(0, 240, @bg_image, @bg_image.rect) end #-------------------------------------------------------------------------- # * draw_background_window (single) #-------------------------------------------------------------------------- def draw_background_window(x, y) self.contents.blt(x, y, @bg_image, @bg_image.rect) end #-------------------------------------------------------------------------- # * visible #-------------------------------------------------------------------------- def visible=(value) super @arrow_sprites.each { |sprite| sprite.visible = value } end #-------------------------------------------------------------------------- # * dispose #-------------------------------------------------------------------------- alias :eds_pre_ff9_win_stat_dispose :dispose def dispose eds_pre_ff9_win_stat_dispose @arrow_sprites.each { |sprite| sprite.dispose } end def enable_cursor?(rect=nil) # for compatibility with the improved command window return false end end class Scene_Menu #-------------------------------------------------------------------------- # * create_menu_background (only if USE_CUSTOM_BACK == true) #-------------------------------------------------------------------------- if FF9_Config::USE_CUSTOM_BACK def create_menu_background @menuback_sprite = Sprite.new @menuback_sprite.bitmap = Cache.picture(FF9_Config::BACK_NAME) @menuback_sprite.color.set(16, 16, 16, 128) update_menu_background end end #-------------------------------------------------------------------------- # * OVERWRITTEN #-------------------------------------------------------------------------- def create_command_window s1 = Vocab::item s2 = Vocab::skill s3 = Vocab::equip s4 = Vocab::status s5 = Vocab::save s6 = Vocab::game_end # just changed the width of the window here @command_window = Window_Command.new(132, [s1, s2, s3, s4, s5, s6]) @command_window.index = @menu_index @command_window.stretch = false if FF9_Config::USE_TILED_WINDOW if $game_party.members.size == 0 # If number of party members is 0 @command_window.draw_item(0, false) # Disable item @command_window.draw_item(1, false) # Disable skill @command_window.draw_item(2, false) # Disable equipment @command_window.draw_item(3, false) # Disable status end if $game_system.save_disabled # If save is forbidden @command_window.draw_item(4, false) # Disable save end # new stuff here @command_window.font_name = FF9_Config::DEFAULT_FONT @command_window.x = 528 - @command_window.width @command_window.y = 16 @command_window.back_opacity = 255 end #-------------------------------------------------------------------------- # * This method is intended to fix some compatibility problems # that scripts run into when they change the command window # in some way. So, we let them override "create_command_window" # and we simply don't call it from the "start" method. # Instead, we call this method which does some extra checking. #-------------------------------------------------------------------------- def eds_create_command_window create_command_window old_commands = @command_window.commands return if old_commands == [ Vocab::item, Vocab::skill, Vocab::equip, Vocab::status, Vocab::save, Vocab::game_end ] # so we know that the default command window is not being used # we don't want to create another window, so we manually resize it # before the player can see. long = '' # dynamically size the width based on the longest command old_commands.each { |command| long = command if command.length > long.length } # set the index to -1 so that the rectangle disappears. # if we don't do this, you can see the selection rectangle resize. @command_window.index = -1 @command_window.width = @command_window.contents.text_size(long).width + 42 @command_window.contents = Bitmap.new( @command_window.width - 32, @command_window.height - 32 ) @command_window.font_name = FF9_Config::DEFAULT_FONT @command_window.x = 528 - @command_window.width @command_window.y = 16 @command_window.back_opacity = 255 @command_window.refresh @command_window.index = @menu_index end #-------------------------------------------------------------------------- # * OVERWRITTEN #-------------------------------------------------------------------------- def start super create_menu_background #call this method for compatibility eds_create_command_window @gold_window = Window_TimeGold.new(372, 342) @gold_window.y -= @gold_window.height @gold_window.x = 528 - @gold_window.width @status_window = Window_MenuStatus.new(0, 12) @location_window = Window_MenuLocation.new(0, 0) @location_window.x = 528 - @location_window.width @location_window.y = 398 - @location_window.height end #-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- alias :eds_pre_ff9_menu_scene_menu_terminate :terminate def terminate eds_pre_ff9_menu_scene_menu_terminate @location_window.dispose end end class Scene_Item < Scene_Base #-------------------------------------------------------------------------- # * start #-------------------------------------------------------------------------- alias :eds_pre_ff9_menu_scene_item_start :start def start eds_pre_ff9_menu_scene_item_start @target_window.y = 58 @uses_window = Window_Uses.new(true, @help_window.height, nil) @uses_window.visible = false end #-------------------------------------------------------------------------- # * OVERWRITTEN # - right-align flag ignored #-------------------------------------------------------------------------- alias :eds_pre_ff9_menu_win_stat_show_target_window :show_target_window def show_target_window(right) @uses_window.item = @item_window.item @uses_window.visible = true @item_window.visible = false @item_window.active = false @target_window.visible = true @target_window.active = true @viewport.rect.set(0, 0, 544, 416) @viewport.ox = 0 end #-------------------------------------------------------------------------- # * hide_target_window #-------------------------------------------------------------------------- alias :eds_pre_ff9_menu_scene_item_hide_target_window :hide_target_window def hide_target_window eds_pre_ff9_menu_scene_item_hide_target_window @uses_window.visible = false unless @uses_window.nil? @item_window.visible = true end #-------------------------------------------------------------------------- # * determine_target #-------------------------------------------------------------------------- alias :eds_pre_ff9_menu_scene_item_determine_target :determine_target def determine_target eds_pre_ff9_menu_scene_item_determine_target @uses_window.item = @item_window.item end #-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- alias :eds_pre_ff9_menu_scene_item_terminate :terminate def terminate eds_pre_ff9_menu_scene_item_terminate @uses_window.dispose end end class Scene_Skill < Scene_Base #-------------------------------------------------------------------------- # * start #-------------------------------------------------------------------------- alias :eds_pre_ff9_menu_scene_skill_start :start def start eds_pre_ff9_menu_scene_skill_start @target_window.y = 58 @uses_window = Window_SkillUses.new(true, @help_window.height, nil, nil) @uses_window.visible = false end #-------------------------------------------------------------------------- # * OVERWRITTEN # - right-align flag ignored #-------------------------------------------------------------------------- def show_target_window(right) @uses_window.set_skill($game_party.members[@actor_index], @skill_window.skill) @uses_window.visible = true @status_window.visible = false @skill_window.visible = false @skill_window.active = false @target_window.visible = true @target_window.active = true @viewport.rect.set(0, 0, 544, 416) @viewport.ox = 0 end #-------------------------------------------------------------------------- # * hide_target_window #-------------------------------------------------------------------------- alias :eds_pre_ff9_menu_scene_skill_hide_target_window :hide_target_window def hide_target_window eds_pre_ff9_menu_scene_skill_hide_target_window @uses_window.visible = false unless @uses_window.nil? @skill_window.visible = true @status_window.visible = true end #-------------------------------------------------------------------------- # * determine_target #-------------------------------------------------------------------------- alias :eds_pre_ff9_menu_scene_skill_determine_target :determine_target def determine_target eds_pre_ff9_menu_scene_skill_determine_target @uses_window.set_skill($game_party.members[@actor_index], @skill_window.skill) end #-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- alias :eds_pre_ff9_menu_scene_item_terminate :terminate def terminate eds_pre_ff9_menu_scene_item_terminate @uses_window.dispose end end
  17. Nome Script: Finestra Salva - Carica Versione: 1.1 Autore/i: Melosx Informazioni: Aggiunge la possibilità di scegliere se Salvare o caricare la partita sostituendo il comando salva del menu. Istruzioni: Mettetelo sopra main e sotto Materials. Script: #============================================================================== # ** Salva/Carica #============================================================================= # Autore: Melosx # Versione: 1.1 # Data di creazione: 23-5-2011 => v1.0 # 23-5-2011 => v1.1 # # # Quando si va sul comando Salva/Carica del menù questo script fa apparire una # finestra di selezione dove si sceglie se salvare o caricare una partita. # E' possibile cambiare il nome al comando modificando il valore a NOMECOMANDO. # Se l'opzione di salvataggio viene disabilitata sarà possibile solo caricare. # # v1.1 - Feature: # - Possibilità di cambiare con facilità il nome al comando. # - Se salvataggio disabilitato si può solo caricare. # - Corretti un paio di bug. #============================================================================= module SC NOMECOMANDO = "Salva/Carica" end class Scene_Salva_Carica < Scene_Base def start super create_menu_background create_command_window end def post_start super open_command_window end def pre_terminate super close_command_window end def terminate super dispose_menu_background dispose_command_window end def update super update_menu_background @command_window.update if Input.trigger?(Input::C) if $game_system.save_disabled and @command_window.index == 0 Sound.play_buzzer return end case @command_window.index when 0 #Salva comando_salva when 1 # Carica comando_carica end elsif Input.trigger?(Input:: Sound.play_cancel $scene = Scene_Menu.new end end def create_command_window s1 = "Salva" s2 = "Carica" @command_window = Window_Command.new(172, [s1, s2]) @command_window.x = (544 - @command_window.width) / 2 @command_window.y = 208 @command_window.openness = 0 @command_window.open if $game_system.save_disabled @command_window.draw_item(0, false) end end def dispose_command_window @command_window.dispose end def open_command_window @command_window.open begin @command_window.update Graphics.update end until @command_window.openness == 255 end def close_command_window @command_window.close begin @command_window.update Graphics.update end until @command_window.openness == 0 end #-------------------------------------------------------------------------- # * Salva #-------------------------------------------------------------------------- def comando_salva Sound.play_decision $scene = Scene_File.new(true, false, false) end #-------------------------------------------------------------------------- # * Carica #-------------------------------------------------------------------------- def comando_carica Sound.play_decision $scene = Scene_File.new(false, false, false) end end #============================================================================== # ** Scene_Menu #------------------------------------------------------------------------------ # * alias #============================================================================== class Scene_Menu < Scene_Base include SC alias melosx_update_command_selection update_command_selection alias melosx_create_command_window create_command_window def create_command_window s1 = Vocab::item s2 = Vocab::skill s3 = Vocab::equip s4 = Vocab::status s5 = SC::NOMECOMANDO s6 = Vocab::game_end @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6]) @command_window.index = @menu_index if $game_party.members.size == 0 # se non ci sono giocatori in party @command_window.draw_item(0, false) # Disabilita oggetti @command_window.draw_item(1, false) # Disabilita poteri @command_window.draw_item(2, false) # Disabilita equipaggiamenti @command_window.draw_item(3, false) # Disabilita stato end end def update_command_selection if Input.trigger?(Input:: Sound.play_cancel $scene = Scene_Map.new elsif Input.trigger?(Input::C) if $game_party.members.size == 0 and @command_window.index < 4 Sound.play_buzzer return end Sound.play_decision case @command_window.index when 0 $scene = Scene_Item.new when 1,2,3 start_actor_selection when 4 $scene = Scene_Salva_Carica.new when 5 $scene = Scene_End.new end end end end
  18. Nome Script: Scene_Shop MOD Versione: 1.0 Autore/i: Melosx Informazioni: Cambia la disposizione e la visualizzazione della Scene_Shop e dele Window annesse Istruzioni: Copiate o script sopra Main e sotto Maerials come al solito. Script: #============================================================================= # Scene_Shop MOD #============================================================================= # Autore: Melosx # Versione: 1.0 # Data di creazione: 4-6-2011 => v1.0 # #============================================================================= #============================================================================== # ** Scene_Shop #============================================================================== class Scene_Shop < Scene_Base def start super create_menu_background create_command_window @help_window = Window_HelpMOD.new @gold_window = Window_GoldMOD.new(384, 0) @dummy_window = Window_Base.new(0, 56, 222, 360) @buy_window = Window_ShopBuy.new(0, 56) @buy_window.active = false @buy_window.visible = false @buy_window.help_window = @help_window @sell_window = Window_ShopSell.new(0, 56, 222, 360) @sell_window.active = false @sell_window.visible = false @sell_window.help_window = @help_window @number_window = Window_ShopNumber.new(0, 56, 999) @number_window.active = false @number_window.visible = false @status_window = Window_ShopStatus.new(322, 56, 0) @status_window.visible = true @status_window.active = true end def terminate super dispose_menu_background dispose_command_window @help_window.dispose @gold_window.dispose @dummy_window.dispose @buy_window.dispose @sell_window.dispose @number_window.dispose @status_window.dispose end def update super update_menu_background @help_window.update @command_window.update @gold_window.update @dummy_window.update @buy_window.update @sell_window.update @number_window.update @status_window.update if @command_window.active update_command_selection elsif @buy_window.active update_buy_selection elsif @sell_window.active update_sell_selection elsif @number_window.active update_number_input end end def create_command_window s1 = Vocab::ShopBuy s2 = Vocab::ShopSell s3 = Vocab::ShopCancel @command_window = Window_Command.new(100, [s1, s2, s3], 1) @command_window.x = 222 @command_window.y = 56 if $game_temp.shop_purchase_only @command_window.draw_item(1, false) end end def dispose_command_window @command_window.dispose end def update_command_selection if Input.trigger?(Input:: Sound.play_cancel $scene = Scene_Map.new elsif Input.trigger?(Input::C) case @command_window.index when 0 Sound.play_decision @command_window.active = false @command_window.visible = false @dummy_window.visible = false @buy_window.width = 322 @buy_window.active = true @buy_window.visible = true @buy_window.refresh @status_window.visible = true when 1 if $game_temp.shop_purchase_only Sound.play_buzzer else Sound.play_decision @command_window.active = false @command_window.visible = false @dummy_window.visible = false @status_window.visible = true @status_window.active = true @status_window.refresh @sell_window.width = 322 @sell_window.active = true @sell_window.visible = true @sell_window.refresh end when 2 Sound.play_decision $scene = Scene_Map.new end end end def update_buy_selection @status_window.item = @buy_window.item if Input.trigger?(Input:: Sound.play_cancel @command_window.active = true @command_window.visible = true @dummy_window.visible = true @buy_window.active = false @buy_window.visible = false @status_window.visible = true @status_window.item = nil @help_window.set_text("") return end if Input.trigger?(Input::C) @item = @buy_window.item number = $game_party.item_number(@item) if @item == nil or @item.price > $game_party.gold or number == 99 Sound.play_buzzer else Sound.play_decision max = @item.price == 0 ? 99 : $game_party.gold / @item.price max = [max, 99 - number].min @buy_window.active = false @buy_window.visible = true @number_window.set(@item, max, @item.price) @number_window.active = true @number_window.visible = true @status_window.z = 0 end end end def update_sell_selection if Input.trigger?(Input:: Sound.play_cancel @command_window.active = true @command_window.visible = true @dummy_window.visible = true @sell_window.active = false @sell_window.visible = false @status_window.item = nil @help_window.set_text("") elsif Input.trigger?(Input::C) @item = @sell_window.item @status_window.item = @item if @item == nil or @item.price == 0 Sound.play_buzzer else Sound.play_decision max = $game_party.item_number(@item) @sell_window.active = false @sell_window.visible = true @number_window.set(@item, max, @item.price / 2) @number_window.active = true @number_window.visible = true end end end def update_number_input if Input.trigger?(Input:: cancel_number_input elsif Input.trigger?(Input::C) decide_number_input end end def cancel_number_input Sound.play_cancel @number_window.active = false @number_window.visible = false case @command_window.index when 0 @buy_window.active = true @buy_window.visible = true when 1 @sell_window.active = true @sell_window.visible = true @status_window.visible = true @status_window.active = true end end def decide_number_input Sound.play_shop @number_window.active = false @number_window.visible = false case @command_window.index when 0 $game_party.lose_gold(@number_window.number * @item.price) $game_party.gain_item(@item, @number_window.number) @gold_window.refresh @buy_window.refresh @status_window.refresh @buy_window.active = true @buy_window.visible = true when 1 $game_party.gain_gold(@number_window.number * (@item.price / 2)) $game_party.lose_item(@item, @number_window.number) @gold_window.refresh @sell_window.refresh @status_window.refresh @sell_window.active = true @sell_window.visible = true @status_window.visible = true @status_window.active = true end end end #============================================================================== # ** Window_HelpMOD #============================================================================== class Window_HelpMOD < Window_Base def initialize super(0, 0, 384, WLH + 32) end def set_text(text, align = 0) if text != @text or align != @align self.contents.clear self.contents.font.color = normal_color self.contents.draw_text(4, 0, self.width - 10, WLH, text, align) @text = text @align = align end end end #============================================================================== # ** Window_GoldMOD #============================================================================== class Window_GoldMOD < Window_Base def initialize(x, y) super(x, y, 160, WLH + 32) refresh end def refresh self.contents.clear draw_currency_value($game_party.gold, 4, 0, 120) draw_icon(147, 0, 0) end end #============================================================================== # ** Window_ShopBuy #============================================================================== class Window_ShopBuy < Window_Selectable def initialize(x, y) super(x, y, 222, 360) @shop_goods = $game_temp.shop_goods refresh self.index = 0 end def item return @data[self.index] end def refresh @data = [] for goods_item in @shop_goods case goods_item[0] when 0 item = $data_items[goods_item[1]] when 1 item = $data_weapons[goods_item[1]] when 2 item = $data_armors[goods_item[1]] end if item != nil @data.push(item) end end @item_max = @data.size create_contents for i in 0...@item_max draw_item(i) end end def draw_item(index) item = @data[index] number = $game_party.item_number(item) enabled = (item.price <= $game_party.gold and number < 99) rect = item_rect(index) self.contents.clear_rect(rect) draw_item_name(item, rect.x, rect.y, enabled) rect.width -= 4 self.contents.draw_text(rect, item.price, 2) draw_icon(4721, rect.x + 220, rect.y) end def update_help @help_window.set_text(item == nil ? "" : item.description) end end #============================================================================== # ** Window_ShopSell #============================================================================== class Window_ShopSell < Window_Item def initialize(x, y, width, height) super(x, y, 222, 360) @column_max = 1 end def include?(item) return item != nil end def enable?(item) return (item.price > 0) end def draw_item(index) rect = item_rect(index) self.contents.clear_rect(rect) item = @data[index] if item != nil number = $game_party.item_number(item) enabled = enable?(item) rect.width -= 4 draw_item_name(item, rect.x, rect.y, enabled) self.contents.draw_text(rect, sprintf("Q.tà:%2d", number), 2) end end =begin def update_cursor if @index < 0 # カーソルなし self.cursor_rect.empty elsif @index < @item_max # 通常 self.cursor_rect.set( 0, @index * 32, 190, 32) elsif @index >= 100 # 自分 self.cursor_rect.set(0, @index * 32, 190, 32) else # 全体 self.cursor_rect.set(0, 0, 190, @item_max * 32) end end =end end #============================================================================== # ** Window_ShopStatus #============================================================================== class Window_ShopStatus < Window_Base def initialize(x, y, z) super(x, y, 222, 360) @item = nil self.contents.font.size = 16 refresh end def refresh self.contents.clear if @item != nil number = $game_party.item_number(@item) self.contents.font.color = system_color self.contents.draw_text(4, 0, 200, WLH, Vocab::Possession) self.contents.font.color = normal_color self.contents.draw_text(4, 0, 180, WLH, number, 2) for actor in $game_party.members x = 3 y = WLH * (2 + actor.index * 3) + 12 draw_actor_parameter_change(actor, x, y) end end end def draw_actor_parameter_change(actor, x, y) return if @item.is_a?(RPG::Item) enabled = actor.equippable?(@item) self.contents.font.color = normal_color self.contents.font.color.alpha = enabled ? 255 : 128 self.contents.draw_text(x + 35, y - 15, 180, WLH, actor.name) draw_actor_graphic(actor, x + 15, y + 10) if @item.is_a?(RPG::Weapon) item1 = weaker_weapon(actor) elsif actor.two_swords_style and @item.kind == 0 item1 = nil else item1 = actor.equips[1 + @item.kind] end if enabled if @item.is_a?(RPG::Weapon) atk1 = item1 == nil ? 0 : item1.atk atk2 = @item == nil ? 0 : @item.atk change = atk2 - atk1 self.contents.draw_text(x, y, 150, WLH, "Attacco", 2) else def1 = item1 == nil ? 0 : item1.def def2 = @item == nil ? 0 : @item.def change = def2 - def1 self.contents.draw_text(x, y, 150, WLH, "Difesa", 2) end end self.contents.font.color = text_color(0) if change.to_i < -1 self.contents.font.color = text_color(10) self.contents.draw_text(x, y, 180, WLH, sprintf("%+d", change), 2) else change.to_i > 1 self.contents.font.color = text_color(11) self.contents.draw_text(x, y, 180, WLH, sprintf("%+d", change), 2) end if enabled == false self.contents.font.color = text_color(10) self.contents.draw_text(x, y, 150, WLH, "Non Equip.", 2) end draw_item_name(item1, x, y + WLH - 6, enabled) end def weaker_weapon(actor) if actor.two_swords_style weapon1 = actor.weapons[0] weapon2 = actor.weapons[1] if weapon1 == nil or weapon2 == nil return nil elsif weapon1.atk < weapon2.atk return weapon1 else return weapon2 end else return actor.weapons[0] end end def item=(item) if @item != item @item = item refresh end end end #============================================================================== # ** Window_ShopNumber #============================================================================== class Window_ShopNumber < Window_Base def initialize(x, y, z) super(152, 118, 240, 180) @item = nil @max = 1 @price = 0 @number = 1 end def set(item, max, price) @item = item @max = max @price = price @number = 1 refresh end def number return @number end def refresh y = 40 self.contents.clear draw_item_name(@item, 0, 10) self.contents.font.color = normal_color self.contents.draw_text(150, y, 20, WLH, "x") self.contents.draw_text(160, y, 20, WLH, @number, 2) self.cursor_rect.set(0, y, 208, WLH) draw_currency_value(@price * @number, 4, y + WLH * 2, 190)#210 self.contents.draw_text(0, y + WLH * 2, 70, WLH, "Prezzo:", 0) draw_icon(147, 80, y + WLH * 2) end def update super if self.active last_number = @number if Input.repeat?(Input::RIGHT) and @number < @max @number = [@number + 10, @max].min end if Input.repeat?(Input::LEFT) and @number > 1 @number = [@number - 10, 1].max end if Input.repeat?(Input::UP) and @number < @max @number += 1 end if Input.repeat?(Input::DOWN) and @number > 1 @number -= 1 end if @number != last_number Sound.play_cursor refresh end end end end Demo: N/D
  19. Nome Script: Slot Machine Versione: N/D Autore/i: Jet Informazioni: Semplice script che permette di avere una semplice slot machine da usare ad esempio per un minigame. Istruzioni: Inserite lo script sopra Main. Per essere richiamato, dovete inserire un call script con questo codice: [c]$scene = Scene_Slots.new[/c] Script: #=============================================================================== # Slot Machine # By Jet10985 (Jet) #=============================================================================== # This snippet will add a slot machine mini-game, which can be called anytime. # It has 3 rows, and counts every row and diagonal wins. # This script has: 7 customization options. #=============================================================================== =begin How to call slot machine: In an event Script... command, use this; $scene = Scene_Slots.new =end module SlotMachine # If this switch is off, they will win money. If it is on, it will add to a # variable if they win. WINNINGS_CONFIG_SWITCH = 99 # This variable will record the results, in a true/false form. # This means, the variable will be an array of true/false, # top row being the 0 values, middle being the 1 value, bottom being the 2 value # downward diagonal being the 3 value, and upward diagonal being the 4 value. # EX: The top row gets a win, and the downward diagonal gets a win, but the # other three are loses. The variable would now be # [true, false, false, true, false] # You can check these values in a conditional branch by checking the value in # the Script condition like: $game_variables[below_id][value] # EX: $game_variables[5][0] means i set 5 as the variable below, and i am # checking the value of the top row of the last game they played. RESULTS_VARIABLE = 102 # If this switch is off, they must pay money to play. If this switch is on, # an amount will be taken from the variable to play. PLAY_COST_SWITCH = 100 # If you are using a variable for cost/winnings, this is the id of that variable. SLOTS_WINNINGS_VARIABLE = 99 # This is how much gold is required to play the game if gold is used. GOLD_TAKEN_AWAY_PER_TRY = 50 # This is how much of the variable is needed to play the game, if variable is # being used. VARIABLE_TAKEN_AWAY_PER_TRY = 10 # This is what cost/winnings will be called if you use a variable. VARIABLE_WINNINGS_NAME = "Tokens" # This variable determines how many frames is waited before the slots # change icons again. SLOT_SPEED_VARIABLE = 101 # This variable determines which slots will be used. Whatever the variable # equals, is what slots are used, as determined below. SLOTS_USED_VARIABLE = 100 SLOT_ICONS = [] # Don't touch # These are the icons in every slot. Each slot will have these icons, but # in a shuffled order. You may repeat icons so they are more common to appear. SLOT_ICONS[0] = [1, 2, 3, 4, 5, 6, 7, 8, 9] SLOT_ICONS[1] = [10, 11, 12, 13, 14, 15, 16, 17, 30, 31] SLOT_ICONS[2] = [32, 21, 22, 23, 24, 25, 26, 27, 28, 29] # This sound effect will play every change. CHANGE_SE = "Book" # This sound effect will play if you lose. LOSER_SE = "Buzzer2" # This sound effect will play if you win. WINNER_SE = "Applause" SLOT_WIN = [] # Don't Touch # Below are configurations for win possibilities. The script will check if the # middle three icons are the same as the ids you put in below. The fourth # number is how much gold they will win for this, if gold is used. # The fifth number is how much is added to the variable is they wins, and # a variable is being used. SLOT_WIN[0] = [6, 6, 6, 7000, 70] # SLOT_WIN[id] = [icon, icon, icon, gold, var] SLOT_WIN[1] = [8, 8, 8, 901, 50] # SLOT_WIN[id] = [icon, icon, icon, gold, var] SLOT_WIN[2] = [1, 1, 1, 80000, 40] # SLOT_WIN[id] = [icon, icon, icon, gold, var] SLOT_WIN[3] = [2, 2, 2, 7000, 21] SLOT_WIN[4] = [3, 3, 3, 7000, 98] SLOT_WIN[5] = [4, 4, 4, 7000, 90] SLOT_WIN[6] = [5, 5, 5, 7000, 34] SLOT_WIN[7] = [7, 7, 7, 7000, 11] SLOT_WIN[8] = [9, 9, 9, 7000, 5] end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Array def shuffle na = self.dup (na.length-1).downto(1) do |i| s = rand(i) na[i], na[s] = na[s], na[i] end return na end end class Window_Slots < Window_Base include SlotMachine def initialize super(180, 100, 184, 184) @slot1 = SLOT_ICONS[$game_variables[SLOTS_USED_VARIABLE]].shuffle @slot2 = @slot1.shuffle @slot3 = @slot2.shuffle refresh end def refresh draw_icon(@slot1[0], 10, 10) draw_icon(@slot1[1], 10, 65) draw_icon(@slot1[2], 10, 120) draw_icon(@slot2[0], 60, 10) draw_icon(@slot2[1], 60, 65) draw_icon(@slot2[2], 60, 120) draw_icon(@slot3[0], 110, 10) draw_icon(@slot3[1], 110, 65) draw_icon(@slot3[2], 110, 120) end def roll $game_variables[RESULTS_VARIABLE] = [false, false, false, false, false] slot1roll, slot2roll, slot3roll = rand(15) + 5, rand(15) + 5, rand(15) + 5 slot1moves, slot2moves, slot3moves = 0, 0, 0 loop do self.contents.clear slot1moves += 1 unless slot1moves == slot1roll slot2moves += 1 unless slot2moves == slot2roll slot3moves += 1 unless slot3moves == slot3roll draw_icon(@slot1[0], 10, 10) draw_icon(@slot1[1], 10, 65) draw_icon(@slot1[2], 10, 120) draw_icon(@slot2[0], 60, 10) draw_icon(@slot2[1], 60, 65) draw_icon(@slot2[2], 60, 120) draw_icon(@slot3[0], 110, 10) draw_icon(@slot3[1], 110, 65) draw_icon(@slot3[2], 110, 120) stuff1 = @slot1[@slot1.size - 1] stuff2 = @slot2[@slot2.size - 1] stuff3 = @slot3[@slot3.size - 1] unless slot1moves == slot1roll @slot1.delete_at(@slot1.size - 1) @slot1.insert(0, stuff1) RPG::SE.new(CHANGE_SE, 80, 100).play end unless slot2moves == slot2roll @slot2.delete_at(@slot2.size - 1) @slot2.insert(0, stuff2) RPG::SE.new(CHANGE_SE, 80, 100).play end unless slot3moves == slot3roll @slot3.delete_at(@slot3.size - 1) @slot3.insert(0, stuff3) RPG::SE.new(CHANGE_SE, 80, 100).play end $game_variables[SLOT_SPEED_VARIABLE] = 5 if $game_variables[SLOT_SPEED_VARIABLE] < 5 Graphics.wait($game_variables[SLOT_SPEED_VARIABLE]) break if slot1moves == slot1roll && slot2moves == slot2roll && slot3moves == slot3roll end $won_gold = 0 for i in 0...(SLOT_WIN.size - 1) next unless SLOT_WIN[i][0] == @slot1[0] and SLOT_WIN[i][1] == @slot2[0] and SLOT_WIN[i][2] == @slot3[0] $game_party.gain_gold(SLOT_WIN[i][3]) unless $game_switches[WINNINGS_CONFIG_SWITCH] $game_variables[SLOT_WINNINGS_VARIABLE] += SLOT_WIN[i][4] if $game_switches[WINNINGS_CONFIG_SWITCH] $won_gold += SLOT_WIN[i][3] unless $game_switches[WINNINGS_CONFIG_SWITCH] $won_gold += SLOT_WIN[I][4] if $game_switches[WINNINGS_CONFIG_SWITCH] $game_variables[RESULTS_VARIABLE][0] = true self.contents.clear draw_icon(@slot1[0], 10, 10) draw_icon(@slot1[1], 10, 65, false) draw_icon(@slot1[2], 10, 120, false) draw_icon(@slot2[0], 60, 10) draw_icon(@slot2[1], 60, 65, false) draw_icon(@slot2[2], 60, 120, false) draw_icon(@slot3[0], 110, 10) draw_icon(@slot3[1], 110, 65, false) draw_icon(@slot3[2], 110, 120, false) $resultslot = true end for i in 0...(SLOT_WIN.size - 1) next unless SLOT_WIN[i][0] == @slot1[1] and SLOT_WIN[i][1] == @slot2[1] and SLOT_WIN[i][2] == @slot3[1] $game_party.gain_gold(SLOT_WIN[i][3]) unless $game_switches[WINNINGS_CONFIG_SWITCH] $game_variables[SLOT_WINNINGS_VARIABLE] += SLOT_WIN[i][4] if $game_switches[WINNINGS_CONFIG_SWITCH] $won_gold += SLOT_WIN[i][3] unless $game_switches[WINNINGS_CONFIG_SWITCH] $won_gold += SLOT_WIN[I][4] if $game_switches[WINNINGS_CONFIG_SWITCH] $game_variables[RESULTS_VARIABLE][1] = true self.contents.clear draw_icon(@slot1[0], 10, 10, false) draw_icon(@slot1[1], 10, 65) draw_icon(@slot1[2], 10, 120, false) draw_icon(@slot2[0], 60, 10, false) draw_icon(@slot2[1], 60, 65) draw_icon(@slot2[2], 60, 120, false) draw_icon(@slot3[0], 110, 10, false) draw_icon(@slot3[1], 110, 65) draw_icon(@slot3[2], 110, 120, false) $resultslot = true end for i in 0...(SLOT_WIN.size - 1) next unless SLOT_WIN[i][0] == @slot1[2] and SLOT_WIN[i][1] == @slot2[2] and SLOT_WIN[i][2] == @slot3[2] $game_party.gain_gold(SLOT_WIN[i][3]) unless $game_switches[WINNINGS_CONFIG_SWITCH] $game_variables[SLOT_WINNINGS_VARIABLE] += SLOT_WIN[i][4] if $game_switches[WINNINGS_CONFIG_SWITCH] $won_gold += SLOT_WIN[i][3] unless $game_switches[WINNINGS_CONFIG_SWITCH] $won_gold += SLOT_WIN[I][4] if $game_switches[WINNINGS_CONFIG_SWITCH] $game_variables[RESULTS_VARIABLE][2] = true self.contents.clear draw_icon(@slot1[0], 10, 10, false) draw_icon(@slot1[1], 10, 65, false) draw_icon(@slot1[2], 10, 120) draw_icon(@slot2[0], 60, 10, false) draw_icon(@slot2[1], 60, 65, false) draw_icon(@slot2[2], 60, 120) draw_icon(@slot3[0], 110, 10, false) draw_icon(@slot3[1], 110, 65, false) draw_icon(@slot3[2], 110, 120) $resultslot = true end for i in 0...(SLOT_WIN.size - 1) next unless SLOT_WIN[i][0] == @slot1[0] and SLOT_WIN[i][1] == @slot2[1] and SLOT_WIN[i][2] == @slot3[2] $game_party.gain_gold(SLOT_WIN[i][3]) unless $game_switches[WINNINGS_CONFIG_SWITCH] $game_variables[SLOT_WINNINGS_VARIABLE] += SLOT_WIN[i][4] if $game_switches[WINNINGS_CONFIG_SWITCH] $won_gold += SLOT_WIN[i][3] unless $game_switches[WINNINGS_CONFIG_SWITCH] $won_gold += SLOT_WIN[I][4] if $game_switches[WINNINGS_CONFIG_SWITCH] $game_variables[RESULTS_VARIABLE][3] = true self.contents.clear draw_icon(@slot1[0], 10, 10) draw_icon(@slot1[1], 10, 65, false) draw_icon(@slot1[2], 10, 120, false) draw_icon(@slot2[0], 60, 10, false) draw_icon(@slot2[1], 60, 65) draw_icon(@slot2[2], 60, 120, false) draw_icon(@slot3[0], 110, 10, false) draw_icon(@slot3[1], 110, 65, false) draw_icon(@slot3[2], 110, 120) $resultslot = true end for i in 0...(SLOT_WIN.size - 1) next unless SLOT_WIN[i][0] == @slot1[2] and SLOT_WIN[i][1] == @slot2[1] and SLOT_WIN[i][2] == @slot3[0] $game_party.gain_gold(SLOT_WIN[i][3]) unless $game_switches[WINNINGS_CONFIG_SWITCH] $game_variables[SLOT_WINNINGS_VARIABLE] += SLOT_WIN[i][4] if $game_switches[WINNINGS_CONFIG_SWITCH] $won_gold += SLOT_WIN[i][3] unless $game_switches[WINNINGS_CONFIG_SWITCH] $won_gold += SLOT_WIN[I][4] if $game_switches[WINNINGS_CONFIG_SWITCH] $game_variables[RESULTS_VARIABLE][4] = true self.contents.clear draw_icon(@slot1[0], 10, 10, false) draw_icon(@slot1[1], 10, 65, false) draw_icon(@slot1[2], 10, 120) draw_icon(@slot2[0], 60, 10, false) draw_icon(@slot2[1], 60, 65) draw_icon(@slot2[2], 60, 120, false) draw_icon(@slot3[0], 110, 10) draw_icon(@slot3[1], 110, 65, false) draw_icon(@slot3[2], 110, 120, false) $resultslot = true end $resultslot = false if $result.nil? && $resultslot != true end end class Window_Variable < Window_Base include SlotMachine def initialize(x, y) super(x, y, 160, WLH + 32) refresh end def refresh self.contents.clear self.contents.font.color = normal_color self.contents.draw_text(115, 0, 160, WLH, $game_variables[SLOTS_WINNINGS_VARIABLE]) self.contents.font.color = system_color self.contents.draw_text(0, 0, 120, WLH, VARIABLE_WINNINGS_NAME) end end class Scene_Slots < Scene_Base include SlotMachine def start super create_menu_background @slot_window = Window_Slots.new @help_window = Window_Help.new if !$game_switches[PLAY_COST_SWITCH] @help_window.set_text("Press your luck on the slots and win big! Just " + GOLD_TAKEN_AWAY_PER_TRY.to_s + Vocab.gold + "!", 1) else @help_window.set_text("Press your luck on the slots and win big! Just " + VARIABLE_TAKEN_AWAY_PER_TRY.to_s + " " + VARIABLE_WINNINGS_NAME + "!", 1) end @play_again = Window_Command.new(150, ["Play", "Quit"]) @play_again.active = true @play_again.x = 196 @play_again.y = 300 if $game_switches[PLAY_COST_SWITCH] @gold_window = Window_Variable.new(0, 360) else @gold_window = Window_Gold.new(0, 360) end end def terminate super dispose_menu_background @slot_window.dispose @help_window.dispose @play_again.dispose @gold_window.dispose end def update super @play_again.update if @play_again.active if Input.trigger?(Input::C) if @play_again.active case @play_again.index when 0 if !$game_switches[PLAY_COST_SWITCH] if $game_party.gold >= GOLD_TAKEN_AWAY_PER_TRY $game_party.lose_gold(GOLD_TAKEN_AWAY_PER_TRY) @gold_window.refresh @play_again.active = false @slot_window.roll case $resultslot when true @help_window.set_text("Congratulations, you won " + $won_gold.to_s + Vocab.gold + "!", 1) @gold_window.refresh RPG::SE.new(WINNER_SE, 80, 100).play $resultslot = false when false @help_window.set_text("Sorry, but you lost!", 1) RPG::SE.new(LOSER_SE, 80, 100).play end else @help_window.set_text("You don't have enough " + Vocab.gold + " to play the game!", 1) end else if $game_variables[SLOTS_WINNINGS_VARIABLE] >= VARIABLE_TAKEN_AWAY_PER_TRY $game_variables[SLOTS_WINNINGS_VARIABLE] -= VARIABLE_TAKEN_AWAY_PER_TRY @gold_window.refresh @play_again.active = false @slot_window.roll case $resultslot when true @help_window.set_text("Congratulations, you won " + $won_gold.to_s + " " + VARIABLE_WINNINGS_NAME + "!", 1) @gold_window.refresh RPG::SE.new(WINNER_SE, 80, 100).play $resultslot = false when false @help_window.set_text("Sorry, but you lost!", 1) RPG::SE.new(LOSER_SE, 80, 100).play end else @help_window.set_text("You don't have enough " + VARIABLE_WINNINGS_NAME + " to play the game!", 1) end end when 1 $scene = Scene_Map.new end else if !$game_switches[WINNINGS_CONFIG_SWITCH] @help_window.set_text("Press your luck on the slots and win big! Just " + GOLD_TAKEN_AWAY_PER_TRY.to_s + Vocab.gold + "!", 1) else @help_window.set_text("Press your luck on the slots and win big! Just " + VARIABLE_TAKEN_AWAY_PER_TRY.to_s + " " + VARIABLE_WINNINGS_NAME + "!", 1) end @play_again.active = true end elsif Input.trigger?(Input:: $scene = Scene_Map.new end end end unless $engine_scripts.nil? JetEngine.active("Slot Machine", 2) end
  20. Nome Script: Icone nel Titolo Versione: N/D Autore/i: Gab! Informazioni: Un semplice script che inserisce le icone affianco ai comandi del titolo. Istruzioni: Inserite lo script sopra main. Script: #==============================================================================# # Title Icons # #------------------------------------------------------------------------------# # Autor: Gab! # # Data: 16/06/2011 # #------------------------------------------------------------------------------# # Feito para: glorenconi # # Fábrica: PRO Coders # # # # DEMONSTRAÇÃO JÁ CONFIGURADA # #------------------------------------------------------------------------------# # VOCÊ TEM TOTAL LIBERDADE PARA MODIFICAR, DISTRIBUIR E USAR O SCRIPT, DESDE # # QUE ESSE CABEÇALHO, SEJA MANTIDO INTÁCTO. SEM NENHUMA ALTERAÇÃO. # #==============================================================================# #==============================================================================# # * CONFIGURAÇÃO # #==============================================================================# module Gab module TitleIcons ICONS = [ # ID dos ícones para a mudança # Separados por virgula [1,20,34], # Novo Jogo [2,33,31], # Continuar [3,16,25] # Sair ] CTIME = 3 # Tempo, em segundos, da troca dos ícones end end #==============================================================================# # * FIM DA CONFIGURAÇÃO # #==============================================================================# class Scene_Title alias old_st_ccw create_command_window unless $@ alias old_st_upd update unless $@ def create_command_window(*args) old_st_ccw(*args) @window_icon_index = [0]*3 tmp = -1 @window_icon_index.map!{|i| (i + 1) % Gab::TitleIcons::ICONS[tmp += 1].size} tmp = -1 @command_window.icon = @window_icon_index.map{|i| Gab::TitleIcons::ICONS[tmp += 1][i]} @command_window.refresh end def update(*args) old_st_upd(*args) if (Graphics.frame_count % (Graphics.frame_rate * Gab::TitleIcons::CTIME)) == 0 tmp = -1 @window_icon_index.map!{|i| (i + 1) % Gab::TitleIcons::ICONS[tmp += 1].size} tmp = -1 @command_window.icon = @window_icon_index.map{|i| Gab::TitleIcons::ICONS[tmp += 1][i]} @command_window.refresh end end end class Window_Command attr_accessor :icon def initialize(width, commands, column_max = 1, row_max = 0, spacing = 32, icon = []) row_max = (commands.size + column_max - 1) / column_max if row_max == 0 super(0, 0, width, row_max * WLH + 32, spacing) @commands, @item_max, @column_max, @icon = commands, commands.size, column_max, icon refresh self.index = 0 end def draw_item(index, enabled = true) rect = item_rect(index) rect.x += 4 rect.width -= 8 if [email protected]? && defined?(@icon[index]) draw_icon(@icon[index], rect.x, rect.y, enabled) rect.x += 24 end self.contents.clear_rect(rect) self.contents.font.color = normal_color self.contents.font.color.alpha = enabled ? 255 : 128 self.contents.draw_text(rect, @commands[index]) end end Incompatibilita': N/D
  21. Nome Script: Multiple Fogs Versione: 1.0 Autore/i: Woratana Informazioni: Con questo script, è possibile utilizzare le Fog come nei tool precedenti (opzione eliminata in RMVX). Istruzioni: Inserite lo script sopra Main. Le istruzioni sono all'interno dello script. Script: #=============================================================== # ● [VX] ◦ Multiple Fogs ◦ □ # * Use unlimited layers of fog * #-------------------------------------------------------------- # ◦ by Woratana [[email protected]] # ◦ Thaiware RPG Maker Community # ◦ Released on: 13/05/2008 # ◦ Version: 1.0 #-------------------------------------------------------------- #================================================================== # ** HOW TO USE ** # * use event command 'Script...' for the any script line below~ #----------------------------------------------------------------- # #--------------------------------------------------------------- # ** SETUP FOG PROPERTIES & SHOW FOG ** # * You have to setup fog properties, before show fog~ #------------------------------------------------------------- # * There are 3 ways to setup fog properties: # >> Setup Fog [Custom]: # $fog.name = 'image_name' # Image file name, must be in fog image path (setup path below). # $fog.hue = (integer) # Fog's hue. 0 - 360, 0 for no hue. # $fog.tone = [red, green, blue, gray] # Fog's tone color. # $fog.opacity = (integer) # Fog's opacity. 0 - 255, you will not see fog in 0. # $fog.blend = (0, 1, or 2) # Fog's blend type. 0 for Normal, 1 for Add, 2 for Subtract. # $fog.zoom = (integer) # Fog's size (in %). 100 for normal size. # $fog.sx = (+ or - integer) # Fog's horizontal move speed. # $fog.sy = (+ or - integer) # Fog's vertical move speed. # # >> Setup Fog [From Preset]: # (You can setup fog presets, in part FOG PRESET SETUP below) # $fog.load_preset(preset_id) # # >> Setup Fog [From Fog that showing]: # $fog.load_fog(fog_id) # #-------------------------------------------------------------- # ** SHOW FOG ** #------------------------------------------------------------- # After setup the fog, show fog by call script: # $fog.show(fog_id) # # In case you want to show new fog on same ox, oy, tone as old fog. Call Script: # $fog.show(old_fog_id, false) # # * fog_id: the ID number you want to put this fog in. # (It can be any positive number or zero) # # After you show fog, the fog properties you've set will replace with default setting. # (You can setup default setting, in part FOG DEFAULT SETTING below) # #-------------------------------------------------------------- # ** DELETE FOG ** #------------------------------------------------------------- # You can delete 1 or more fog(s) at a time by call script: # $fog.delete(fog_id, fog_id, fog_id, ...) # #--------------------------------------------------------------- # ** OLD FOG CONTROL EVENT COMMANDS ** #------------------------------------------------------------- # Change Fog Tone: # $game_map.fogtone(fog_id, [red, green, blue, gray], duration) # e.g. $game_map.fogtone(1, [100,200,-100,0], 10) # Change Fog Opacity: # $game_map.fogopac(fog_id, new_opacity, duration) # e.g. $game_map.fogopac(2, 200, 10) # #--------------------------------------------------------------- # ** ADDITIONAL SETTINGS ** #------------------------------------------------------------- # Change Fog Image's Path: # $game_map.fog_path = 'image_path' # e.g. $game_map.fog_path = 'Graphics/Pictures/' # Turn ON/OFF [Automatically clear all fogs when transfer player]: # $game_map.fog_reset = (true / false) # #=============================================================== #================================================================== # START ** MULTIPLE FOG SETUP ** #================================================================== class Game_Map alias wora_mulfog_gammap_ini initialize def initialize wora_mulfog_gammap_ini #================================================================== # ** MULTIPLE FOG SETUP ** SETTINGS #-------------------------------------------------------------- @fog_path = 'Graphics/Pictures/' # Fog image's path @fog_reset = true # (true or false) # Automatically clear all multiple fogs when transfer player #================================================================== @mulfog_name = [] @mulfog_hue = [] @mulfog_opacity = [] @mulfog_blend_type = [] @mulfog_zoom = [] @mulfog_sx = [] @mulfog_sy = [] @mulfog_ox = [] @mulfog_oy = [] @mulfog_tone = [] @mulfog_tone_target = [] @mulfog_tone_duration = [] @mulfog_opacity_duration = [] @mulfog_opacity_target = [] end end class Wora_Multiple_Fog def set_default #================================================================== # ** MULTIPLE FOG SETUP ** FOG DEFAULT SETTING #-------------------------------------------------------------- @name = '' @hue = 0 @opacity = 64 @blend = 0 @zoom = 200 @sx = 0 @sy = 0 @tone = [0,0,0,0] #================================================================== end def load_preset(preset_id) case preset_id #================================================================== # ** MULTIPLE FOG SETUP ** FOG PRESET SETUP #-------------------------------------------------------------- when 1 # Preset ID 1 @name = '001-Fog01' @hue = 0 @tone = [100,-255,20,0] @opacity = 60 @blend = 0 @zoom = 200 @sx = 10 @sy = 0 when 2 # Preset ID 2 @name = '002-Clouds01' @hue = 0 @tone = [0,0,0,0] @opacity = 200 @blend = 1 @zoom = 200 @sx = -2 @sy = -2 #================================================================== end end #================================================================== # END ** MULTIPLE FOG SETUP ** # * Don't change anything below unless you know what you're doing. #================================================================== attr_accessor :name, :hue, :opacity, :blend, :zoom, :sx, :sy, :tone def initialize set_default end def load_fog(id) @name = $game_map.mulfog_name[id].sub($game_map.fog_path, '') @hue = $game_map.mulfog_hue[id] @opacity = $game_map.mulfog_opacity[id] @blend = $game_map.mulfog_blend_type[id] @zoom = $game_map.mulfog_zoom[id] @sx = $game_map.mulfog_sx[id] @sy = $game_map.mulfog_sy[id] tn = $game_map.mulfog_tone[id] @tone = [tn.red, tn.blue, tn.green, tn.gray] end def show(id, reset_all = true) $game_map.mulfog_name[id] = $game_map.fog_path + @name $game_map.mulfog_hue[id] = @hue $game_map.mulfog_opacity[id] = @opacity $game_map.mulfog_blend_type[id] = @blend $game_map.mulfog_zoom[id] = @zoom $game_map.mulfog_sx[id] = @sx $game_map.mulfog_sy[id] = @sy $game_map.mulfog_tone[id] = Tone.new(@tone[0], @tone[1], @tone[2], @tone[3]) if $game_map.mulfog_ox[id].nil? or reset_all $game_map.mulfog_ox[id] = 0 $game_map.mulfog_oy[id] = 0 $game_map.mulfog_tone_target[id] = Tone.new(0, 0, 0, 0) $game_map.mulfog_tone_duration[id] = 0 $game_map.mulfog_opacity_duration[id] = 0 $game_map.mulfog_opacity_target[id] = 0 end set_default end def delete(*args) args.each do |id| $game_map.mulfog_name[id] = '' end end end class Game_Interpreter alias wora_mulfog_interpret_com201 command_201 #-------------------------------------------------------------------------- # * Transfer Player #-------------------------------------------------------------------------- def command_201 if $game_map.fog_reset if @params[0] == 0; id_map = @params[1] else; id_map = $game_variables[@params[1]] end $game_map.clear_mulfog if id_map != @map_id end wora_mulfog_interpret_com201 end end class Game_Map attr_accessor :mulfog_name, :mulfog_hue, :mulfog_opacity, :mulfog_blend_type, :mulfog_zoom, :mulfog_sx, :mulfog_sy, :mulfog_ox, :mulfog_oy, :mulfog_tone, :mulfog_tone_target, :mulfog_tone_duration, :mulfog_opacity_duration, :mulfog_opacity_target, :fog_reset, :fog_path alias wora_mulfog_gammap_upd update def update wora_mulfog_gammap_upd @mulfog_name.each_index do |i| next if @mulfog_name[i].nil? or @mulfog_name[i] == '' # Manage fog scrolling @mulfog_ox[i] -= @mulfog_sx[i] / 8.0 @mulfog_oy[i] -= @mulfog_sy[i] / 8.0 # Manage change in fog color tone if @mulfog_tone_duration[i] >= 1 d = @mulfog_tone_duration[i] target = @mulfog_tone_target[i] @mulfog_tone[i].red = (@mulfog_tone[i].red * (d - 1) + target.red) / d @mulfog_tone[i].green = (@mulfog_tone[i].green * (d - 1) + target.green) / d @mulfog_tone[i].blue = (@mulfog_tone[i].blue * (d - 1) + target.blue) / d @mulfog_tone[i].gray = (@mulfog_tone[i].gray * (d - 1) + target.gray) / d @mulfog_tone_duration[i] -= 1 end # Manage change in fog opacity level if @mulfog_opacity_duration[i] >= 1 d = @mulfog_opacity_duration[i] @mulfog_opacity[i] = (@mulfog_opacity[i] * (d - 1) + @mulfog_opacity_target[i]) / d @mulfog_opacity_duration[i] -= 1 end end end #-------------------------------------------------------------------------- # * Start Changing Fog Color Tone #-------------------------------------------------------------------------- def fogtone(i, tone, duration) duration = duration * 2 tone = Tone.new(tone[0], tone[1], tone[2], tone[3]) @mulfog_tone_target[i] = tone.clone @mulfog_tone_duration[i] = duration if @mulfog_tone_duration[i] == 0 @mulfog_tone[i] = @mulfog_tone_target[i].clone end end #-------------------------------------------------------------------------- # * Start Changing Fog Opacity Level #-------------------------------------------------------------------------- def fogopac(i, opacity, duration) duration = duration * 2 @mulfog_opacity_target[i] = opacity * 1.0 @mulfog_opacity_duration[i] = duration if @mulfog_opacity_duration[i] == 0 @mulfog_opacity[i] = @mulfog_opacity_target[i] end end def clear_mulfog @mulfog_name.each_index {|i| @mulfog_name[i] = '' } end end $worale = {} if !$worale $worale['MutipleFog'] = true $fog = Wora_Multiple_Fog.new class Spriteset_Map alias wora_mulfog_sprmap_crepal create_parallax alias wora_mulfog_sprmap_updpal update_parallax alias wora_mulfog_sprmap_dispal dispose_parallax def create_parallax @mulfog = [] @mulfog_name = [] @mulfog_hue = [] wora_mulfog_sprmap_crepal end def update_parallax wora_mulfog_sprmap_updpal $game_map.mulfog_name.each_index do |i| next if $game_map.mulfog_name[i].nil? # If fog is different than current fog if @mulfog_name[i] != $game_map.mulfog_name[i] or @mulfog_hue[i] != $game_map.mulfog_hue[i] @mulfog_name[i] = $game_map.mulfog_name[i] @mulfog_hue[i] = $game_map.mulfog_hue[i] if @mulfog[i].nil? @mulfog[i] = Plane.new(@viewport1) @mulfog[i].z = 3000 end if @mulfog[i].bitmap != nil @mulfog[i].bitmap.dispose @mulfog[i].bitmap = nil end if @mulfog_name[i] != '' @mulfog[i].bitmap = Cache.load_bitmap('', @mulfog_name[i], @mulfog_hue[i]) end Graphics.frame_reset end next if @mulfog[i].bitmap.nil? # Update fog plane @mulfog[i].zoom_x = ($game_map.mulfog_zoom[i] / 100.0) if @mulfog[i].zoom_x != ($game_map.mulfog_zoom[i] / 100.0) @mulfog[i].zoom_y = ($game_map.mulfog_zoom[i] / 100.0) if @mulfog[i].zoom_y != ($game_map.mulfog_zoom[i] / 100.0) @mulfog[i].opacity = $game_map.mulfog_opacity[i] if @mulfog[i].opacity != $game_map.mulfog_opacity[i] @mulfog[i].blend_type = $game_map.mulfog_blend_type[i] if @mulfog[i].blend_type != $game_map.mulfog_blend_type[i] @mulfog[i].ox = ($game_map.display_x / 8.0 + $game_map.mulfog_ox[i]) if @mulfog[i].ox != ($game_map.display_x / 8.0 + $game_map.mulfog_ox[i]) @mulfog[i].oy = ($game_map.display_y / 8.0 + $game_map.mulfog_oy[i]) if @mulfog[i].oy != ($game_map.display_y / 8.0 + $game_map.mulfog_oy[i]) @mulfog[i].tone = $game_map.mulfog_tone[i] if @mulfog[i].tone != $game_map.mulfog_tone[i] end end def dispose_parallax @mulfog.each_index do |i| next if @mulfog[i].nil? @mulfog[i].bitmap.dispose if !@mulfog[i].bitmap.nil? @mulfog[i].dispose end wora_mulfog_sprmap_dispal end end #================================================================== # [END] VX Multiple Fog by Woratana [[email protected]] #================================================================== Incompatibilità: N/D
  22. Ally

    RGSS3 opzioni nella scermata titolo ?

    Si, è giusto. Attenzione ai doppi post consecutivi
  23. Ally

    bug riscontrati

    Prova a cambiarlo dal profilo, probabilmente lo hai come gravatar... EDIT: Non avevo letto la risposta di @@Oji ^^ @@kaine controlla se riesci ad accedere adesso al resources e al makshack...
  24. Ally

    Chi non muore,non muore

    Benvenuto ^^
  25. Ally

    bug riscontrati

    @ in che modo hai uppato l'avatar nel profilo?
×