-
Posts
257 -
Joined
-
Last visited
Content Type
Profiles
Forums
Calendar
Posts posted by Super015
-
-
Eh il problema è che nel gioco ci sono in totale 7 eroi, il discorso che dici tu è valido nel caso ne avessi solo 4.
Se li togliessi tutti e li dovessi rimettere ci sarebbe la possibilità che mi metta nel bel mezzo del combattimento un personaggio che ho deciso di tenere in "panchina".
Per questo chiedo se c'è la possibilità di impostare in una variabile l'ordine degli eroi nel gruppo, così potrei decidere che l'opzione è valida solo per i primi 4.
-
I personaggi da trasformare sarebbero 2, in ogni caso non saprei proprio come fare!
Mi sa tanto che c'è da modificare qualche script, io però sono negato per queste cose o.o
Sarebbe d'aiuto sapere se esiste un metodo per far capire al programma in che ordine sono suddivisi gli eroi...
Magari potrei settare qualche variabile o non so...
-
Allora, faccio il resoconto della situazione:
Per funzionare funziona, l'unico difetto è che mi cambia la disposizione di tutti gli eroi durante la battaglia! o.o
(Intanto ti ringrazio di cuore per il suggerimento :3)
-
Ciao ragazzi!
Il titolo dice tutto!
E' possibile creare un'abilità che faccia trasformare per tot turni il personaggio?
Per ora ho provato ad impostare l'abilità in modo tale che vada a chiamare un evento comune, poi nell'evento ho deciso che mi deve cambiare grafica all'eroe.
La grafica non la cambia, ho provato a mettere un semplice testo (per vedere se il problema era relativo alla chiamata dell'evento comune) ma durante la battaglia, all'uso delll'abilità me lo visualizza.
Premetto che uso i seguenti script in combattimento:
- Yanfly Engine Ace - Ace Battle Engine v1.22
- Yanfly Engine Ace - Visual Battlers v1.01
A questo punto immagino che sia un problema dello script in quanto il VX ACE, di per se, non permette la visualizzazione degli eroi nella battaglia.
Esiste una soluzione?
-
Per quanto mi riguarda sarebbe utile:
- Un sistema che permetta di settare la tonalità di un elemento indipendentemente dalla tonalità dello schermo.
- La possibilità di dare, come grafica di un evento, l'aspetto di un tile A.
- Un BS laterale con tanto di generatore grafico.
-
Il titolo dice tutto!
Se dovessero fare un nuovo tool dopo il VX ace cosa vorreste che includesse?
Quale funzionalità dovrebbe introdurre?
Dovrebbe cambiare la grafica delle RTP?
-
Scusate non ho specificato bene, intendevo sapere se è possibile rallentare i testi relativi alla battaglia, i testi del tipo:
Moostro 1 attacca, Eroe è avvelenato.
Insomma, i testi predefiniti che compaiono durante il combattimento! Non si fa in tempo a leggere niente!
-
E' possibile rallentare i testi durante la battaglia?
Sono talmente veloci che non si riesce a leggere niente :\
-
Ho un problema! Appena finisce una battaglia visualizzo questo errore:
Script 'Correct Sprite Display' line 101: NoMethodError occurred.
undefined method height' for nil:NilClass
Cosa significa? :(
-
Comunque ho fatto una prova e i valori esatti sarebbero 5+7 e infine 7+7 o.o
Scusate ho fatto doppio post...
-
Ah si che stupido, ero convinto che ad ogni trasformazione si resettasse il contatore dei turni, ripartendo sempre da 0 .-.
-
Ok grazie quindi nel mio caso dovrei impostare un 5+0 poi un 2+0!
Ora ho un dubbio, mettiamo questo caso:
Mostro 1:
25/100 PV (25% di vita)
Mostro 1 con 100 PV si trasforma in Mostro 2 con 200 PV:
La vita del Mostro 2 terrà conto della precedente vita (25/200) o della precedente percentuale (50/200)?
-
Domanda: Come faccio a fare in modo che un personaggio dopo tot turni si trasformi e (sempre dopo tot turni) torni come prima, per poi continuare il ciclo?
Premetto che il sistema per decidere i turni non l'ho capito molto bene :(
Se imposto 1 e 3 l'azione verrà eseguita nei turni 1, 4, 7 e così via, quindi se volessi fare che ogni 5 turni il nemico si trasformi e torni normale dopo 2 turni dovrei:
- Impostare l'azione a 0 e 5? Poi..
- Impostare l'azione del mostro trasformato a 0 e 2?
Ho provato in diversi modi ma nessuno di questi da il risultato sperato :(
-
mmm no, sono circa 11 minuti, tenendo conto che ci sono stati dei combattimenti in mezzo è normale?
-
Ok grazie ora testo e ti dico se funziona ^^
Tutto funzionante! Grazie mille! :)
-
Spiego meglio il mio problema, ogni 10 minuti deve accadere una cosa, in qualunque mappa io sia, quindi ho messo un timer negli eventi comuni di 10 minuti.
Ho provato a usare una serie di "Aspetta" da 999 frame fino ad arrivare a 10 minuti in diversi modi ma i risultati sono pessimi, non funziona, il gioco rallenta a manetta oppure ssi blocca proprio.
Ho risolto impostando un timer solo che viene mostrato nella parte superiore dello schermo, è possibile tramite script nasconderlo?
-
D: È possibile nascondere il timer durante il gioco?
È possibile impostare più timer contemporaneamente?
-
Ciao a tutti!
Ho letto in giro su internet che con questo script è possibile animare anche i nemici!
Purtoppo non ho capito come :(
Inoltre quando un eroe muore continua ad essere animato, continua a stare in piedi e a muoversi anche da morto!
#============================================================================== # # ¥ Yanfly Engine Ace - Visual Battlers v1.01 # -- Last Updated: 2012.07.24 # -- Level: Easy # -- Requires: n/a # # ¥ Modified by: # -- Yami # -- Kread-Ex # -- Archeia_Nessiah #============================================================================== $imported = {} if $imported.nil? $imported["YEA-VisualBattlers"] = true #============================================================================== # ¥ Updates # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # 2012.12.18 - Added preset views and able to change direction in-game. # 2012.07.24 - Finished Script. # 2012.01.05 - Started Script. # #============================================================================== # ¥ Introduction # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # This script provides a visual for all actors by default charsets. The actions # and movements are alike Final Fantasy 1, only move forward and backward when # start and finish actions. # #============================================================================== # ¥ Instructions # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # To change the player direction in-game, use the snippet below in a script # call: # # $game_system.party_direction = n # # 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. # #============================================================================== # ¥ Compatibility # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that # it will run with RPG Maker VX without adjusting. # #============================================================================== module YEA module VISUAL_BATTLERS #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # - Party Location Setting - #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # These settings are adjusted for Party Location. Each Actor will have # coordinates calculated by below formula. There are two samples coordinates # below, change PARTY_DIRECTION to the base index you want to use. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- PARTY_DIRECTION = 6 # This direction is opposite from actual direction. PARTY_LOCATION_BASE_COORDINATES ={ # Index => [base_x, base_y, mod_x, mod_y], 2 => [ 250, 290, 40, 0], #UP 4 => [ 150, 280, 20, -20], #LEFT 3 => [ 460, 280, 30, -10], #RIGHT 6 => [ 490, 294, 20, 20], #DEFAULT RIGHT 8 => [ 260, 230, 40, 0], #DOWN } # Do not remove this. PARTY_LOCATION_FORMULA_X = "base_x + index * mod_x" PARTY_LOCATION_FORMULA_Y = "base_y + index * mod_y" end # VISUAL_BATTLERS end # YEA #============================================================================== # ¥ Editting anything past this point may potentially result in causing # computer damage, incontinence, explosion of user's head, coma, death, and/or # halitosis so edit at your own risk. #============================================================================== #============================================================================== # ? ¥ Direction #============================================================================== module Direction #-------------------------------------------------------------------------- # self.correct #-------------------------------------------------------------------------- def self.correct(direction) case direction when 1; return 4 when 3; return 6 when 7; return 4 when 9; return 6 else; return direction end end #-------------------------------------------------------------------------- # self.opposite #-------------------------------------------------------------------------- def self.opposite(direction) case direction when 1; return 6 when 2; return 8 when 3; return 4 when 4; return 6 when 6; return 4 when 7; return 6 when 8; return 2 when 9; return 4 else; return direction end end end # Direction #============================================================================== # ? ¥ Game_System #============================================================================== class Game_System; attr_accessor :party_direction; end #============================================================================== # ? ¥ Game_BattleCharacter #============================================================================== class Game_BattleCharacter < Game_Character #-------------------------------------------------------------------------- # initialize #-------------------------------------------------------------------------- def initialize(actor) super() setup_actor(actor) @move_x_rate = 0 @move_y_rate = 0 end #-------------------------------------------------------------------------- # setup_actor #-------------------------------------------------------------------------- def setup_actor(actor) @actor = actor @step_anime = true set_graphic(@actor.character_name, @actor.character_index) setup_coordinates dr = $game_system.party_direction || YEA::VISUAL_BATTLERS::PARTY_DIRECTION direction = Direction.opposite(dr) set_direction(Direction.correct(direction)) end #-------------------------------------------------------------------------- # sprite= #-------------------------------------------------------------------------- def sprite=(sprite) @sprite = sprite end #-------------------------------------------------------------------------- # setup_coordinates #-------------------------------------------------------------------------- def setup_coordinates location = ($game_system.party_direction || YEA::VISUAL_BATTLERS::PARTY_DIRECTION) base_x = YEA::VISUAL_BATTLERS::PARTY_LOCATION_BASE_COORDINATES[location][0] base_y = YEA::VISUAL_BATTLERS::PARTY_LOCATION_BASE_COORDINATES[location][1] mod_x = YEA::VISUAL_BATTLERS::PARTY_LOCATION_BASE_COORDINATES[location][2] mod_y = YEA::VISUAL_BATTLERS::PARTY_LOCATION_BASE_COORDINATES[location][3] @actor.screen_x = eval(YEA::VISUAL_BATTLERS::PARTY_LOCATION_FORMULA_X) @actor.screen_y = eval(YEA::VISUAL_BATTLERS::PARTY_LOCATION_FORMULA_Y) @actor.origin_x = @actor.screen_x @actor.origin_y = @actor.screen_y @actor.create_move_to(screen_x, screen_y, 1) end #-------------------------------------------------------------------------- # index #-------------------------------------------------------------------------- def index return @actor.index end #-------------------------------------------------------------------------- # screen_x #-------------------------------------------------------------------------- def screen_x return @actor.screen_x end #-------------------------------------------------------------------------- # screen_y #-------------------------------------------------------------------------- def screen_y return @actor.screen_y end #-------------------------------------------------------------------------- # screen_z #-------------------------------------------------------------------------- def screen_z return @actor.screen_z end end # Game_BattleCharacter #============================================================================== # ? ¥ Game_Battler #============================================================================== class Game_Battler < Game_BattlerBase #-------------------------------------------------------------------------- # public instance variables #-------------------------------------------------------------------------- attr_accessor :moved_back attr_accessor :origin_x attr_accessor :origin_y attr_accessor :screen_x attr_accessor :screen_y attr_accessor :started_turn #-------------------------------------------------------------------------- # alias method: execute_damage #-------------------------------------------------------------------------- alias game_battler_execute_damage_vb execute_damage def execute_damage(user) game_battler_execute_damage_vb(user) if @result.hp_damage > 0 move_backward(24, 6) unless @moved_back @moved_back = true end end #-------------------------------------------------------------------------- # face_opposing_party #-------------------------------------------------------------------------- def face_opposing_party direction = ($game_system.party_direction || YEA::VISUAL_BATTLERS::PARTY_DIRECTION) character.set_direction(Direction.correct(direction)) rescue 0 end #-------------------------------------------------------------------------- # new method: face_coordinate #-------------------------------------------------------------------------- def face_coordinate(destination_x, destination_y) x1 = Integer(@screen_x) x2 = Integer(destination_x) y1 = Graphics.height - Integer(@screen_y) y2 = Graphics.height - Integer(destination_y) return if x1 == x2 and y1 == y2 #--- angle = Integer(Math.atan2((y2-y1),(x2-x1)) * 1800 / Math::PI) if (0..225) === angle or (-225..0) === angle direction = 6 elsif (226..675) === angle direction = 9 elsif (676..1125) === angle direction = 8 elsif (1126..1575) === angle direction = 7 elsif (1576..1800) === angle or (-1800..-1576) === angle direction = 4 elsif (-1575..-1126) === angle direction = 1 elsif (-1125..-676) === angle direction = 2 elsif (-675..-226) === angle direction = 3 end #--- character.set_direction(Direction.correct(direction)) rescue 0 end #-------------------------------------------------------------------------- # create_move_to #-------------------------------------------------------------------------- def create_move_to(destination_x, destination_y, frames = 12) @destination_x = destination_x @destination_y = destination_y frames = [frames, 1].max @move_x_rate = [(@screen_x - @destination_x).abs / frames, 2].max @move_y_rate = [(@screen_y - @destination_y).abs / frames, 2].max end #-------------------------------------------------------------------------- # update_move_to #-------------------------------------------------------------------------- def update_move_to @move_x_rate = 0 if @screen_x == @destination_x || @move_x_rate.nil? @move_y_rate = 0 if @screen_y == @destination_y || @move_y_rate.nil? value = [(@screen_x - @destination_x).abs, @move_x_rate].min @screen_x += (@destination_x > @screen_x) ? value : -value value = [(@screen_y - @destination_y).abs, @move_y_rate].min @screen_y += (@destination_y > @screen_y) ? value : -value end #-------------------------------------------------------------------------- # move_forward #-------------------------------------------------------------------------- def move_forward(distance = 24, frames = 12) direction = forward_direction move_direction(direction, distance, frames) end #-------------------------------------------------------------------------- # move_backward #-------------------------------------------------------------------------- def move_backward(distance = 24, frames = 12) direction = Direction.opposite(forward_direction) move_direction(direction, distance, frames) end #-------------------------------------------------------------------------- # move_direction #-------------------------------------------------------------------------- def move_direction(direction, distance = 24, frames = 12) case direction when 1; move_x = distance / -2; move_y = distance / 2 when 2; move_x = distance * 0; move_y = distance * 1 when 3; move_x = distance / -2; move_y = distance / 2 when 4; move_x = distance * -1; move_y = distance * 0 when 6; move_x = distance * 1; move_y = distance * 0 when 7; move_x = distance / -2; move_y = distance / -2 when 8; move_x = distance * 0; move_y = distance * -1 when 9; move_x = distance / 2; move_y = distance / -2 else; return end destination_x = @screen_x + move_x destination_y = @screen_y + move_y create_move_to(destination_x, destination_y, frames) end #-------------------------------------------------------------------------- # forward_direction #-------------------------------------------------------------------------- def forward_direction return ($game_system.party_direction || YEA::VISUAL_BATTLERS::PARTY_DIRECTION) end #-------------------------------------------------------------------------- # move_origin #-------------------------------------------------------------------------- def move_origin create_move_to(@origin_x, @origin_y) face_coordinate(@origin_x, @origin_y) @moved_back = false end #-------------------------------------------------------------------------- # moving? #-------------------------------------------------------------------------- def moving? return false if dead? || !exist? return @move_x_rate != 0 || @move_y_rate != 0 end end # Game_Battler #============================================================================== # ? ¥ Game_Actor #============================================================================== class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # overwrite method: use_sprite? #-------------------------------------------------------------------------- def use_sprite? return true end #-------------------------------------------------------------------------- # new method: screen_x #-------------------------------------------------------------------------- def screen_x return @screen_x rescue 0 end #-------------------------------------------------------------------------- # new method: screen_y #-------------------------------------------------------------------------- def screen_y return @screen_y rescue 0 end #-------------------------------------------------------------------------- # new method: screen_z #-------------------------------------------------------------------------- def screen_z return 100 end #-------------------------------------------------------------------------- # new method: sprite #-------------------------------------------------------------------------- def sprite index = $game_party.battle_members.index(self) return SceneManager.scene.spriteset.actor_sprites[index] end #-------------------------------------------------------------------------- # new method: character #-------------------------------------------------------------------------- def character return sprite.character_base end #-------------------------------------------------------------------------- # face_opposing_party #-------------------------------------------------------------------------- def face_opposing_party dr = $game_system.party_direction || YEA::VISUAL_BATTLERS::PARTY_DIRECTION direction = Direction.opposite(dr) character.set_direction(Direction.correct(direction)) rescue 0 end #-------------------------------------------------------------------------- # forward_direction #-------------------------------------------------------------------------- def forward_direction return Direction.opposite(($game_system.party_direction || YEA::VISUAL_BATTLERS::PARTY_DIRECTION)) end end # Game_Actor #============================================================================== # ? ¥ Game_Enemy #============================================================================== class Game_Enemy < Game_Battler #-------------------------------------------------------------------------- # new method: sprite #-------------------------------------------------------------------------- def sprite return SceneManager.scene.spriteset.enemy_sprites.reverse[self.index] end #-------------------------------------------------------------------------- # new method: character #-------------------------------------------------------------------------- def character return sprite end end # Game_Enemy #============================================================================== # ? ¥ Game_Troop #============================================================================== class Game_Troop < Game_Unit #-------------------------------------------------------------------------- # alias method: setup #-------------------------------------------------------------------------- alias game_troop_setup_vb setup def setup(troop_id) game_troop_setup_vb(troop_id) set_coordinates end #-------------------------------------------------------------------------- # new method: set_coordinates #-------------------------------------------------------------------------- def set_coordinates for member in members member.origin_x = member.screen_x member.origin_y = member.screen_y member.create_move_to(member.screen_x, member.screen_y, 1) end end end # Game_Troop #============================================================================== # ? ¥ Sprite_Battler #============================================================================== class Sprite_Battler < Sprite_Base #-------------------------------------------------------------------------- # public instance_variable #-------------------------------------------------------------------------- attr_accessor :character_base attr_accessor :character_sprite #-------------------------------------------------------------------------- # alias method: dispose #-------------------------------------------------------------------------- alias sprite_battler_dispose_vb dispose def dispose dispose_character_sprite sprite_battler_dispose_vb end #-------------------------------------------------------------------------- # new method: dispose_character_sprite #-------------------------------------------------------------------------- def dispose_character_sprite @character_sprite.dispose unless @character_sprite.nil? end #-------------------------------------------------------------------------- # alias method: update #-------------------------------------------------------------------------- alias sprite_battler_update_vb update def update sprite_battler_update_vb return if @battler.nil? update_move_to update_character_base update_character_sprite end #-------------------------------------------------------------------------- # new method: update_character_base #-------------------------------------------------------------------------- def update_character_base return if @character_base.nil? @character_base.update end #-------------------------------------------------------------------------- # new method: update_character_sprite #-------------------------------------------------------------------------- def update_character_sprite return if @character_sprite.nil? @character_sprite.update end #-------------------------------------------------------------------------- # new method: update_move_to #-------------------------------------------------------------------------- def update_move_to @battler.update_move_to end #-------------------------------------------------------------------------- # new method: moving? #-------------------------------------------------------------------------- def moving? return false if @battler.nil? return @battler.moving? end end # Sprite_Battler #============================================================================== # ? ¥ Sprite_BattleCharacter #============================================================================== class Sprite_BattleCharacter < Sprite_Character #-------------------------------------------------------------------------- # initialize #-------------------------------------------------------------------------- def initialize(viewport, character = nil) super(viewport, character) character.sprite = self end end # Sprite_BattleCharacter #============================================================================== # ? ¥ Spriteset_Battle #============================================================================== class Spriteset_Battle #-------------------------------------------------------------------------- # public instance_variable #-------------------------------------------------------------------------- attr_accessor :actor_sprites attr_accessor :enemy_sprites #-------------------------------------------------------------------------- # overwrite method: create_actors #-------------------------------------------------------------------------- def create_actors total = $game_party.max_battle_members @current_party = $game_party.battle_members.clone @actor_sprites = Array.new(total) { Sprite_Battler.new(@viewport1) } for actor in $game_party.battle_members @actor_sprites[actor.index].battler = actor create_actor_sprite(actor) end end #-------------------------------------------------------------------------- # new method: create_actor_sprite #-------------------------------------------------------------------------- def create_actor_sprite(actor) character = Game_BattleCharacter.new(actor) character_sprite = Sprite_BattleCharacter.new(@viewport1, character) @actor_sprites[actor.index].character_base = character @actor_sprites[actor.index].character_sprite = character_sprite actor.face_opposing_party end #-------------------------------------------------------------------------- # alias method: update_actors #-------------------------------------------------------------------------- alias spriteset_battle_update_actors_vb update_actors def update_actors if @current_party != $game_party.battle_members dispose_actors create_actors end spriteset_battle_update_actors_vb end #-------------------------------------------------------------------------- # new method: moving? #-------------------------------------------------------------------------- def moving? return battler_sprites.any? {|sprite| sprite.moving? } end end # Spriteset_Battle #============================================================================== # ? ¥ Scene_Battle #============================================================================== class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # public instance variables #-------------------------------------------------------------------------- attr_accessor :spriteset #-------------------------------------------------------------------------- # alias method: process_action_end #-------------------------------------------------------------------------- alias scene_battle_process_action_end_vb process_action_end def process_action_end start_battler_move_origin scene_battle_process_action_end_vb end #-------------------------------------------------------------------------- # alias method: execute_action #-------------------------------------------------------------------------- alias scene_battle_execute_action_vb execute_action def execute_action start_battler_move_forward scene_battle_execute_action_vb end #-------------------------------------------------------------------------- # new method: start_battler_move_forward #-------------------------------------------------------------------------- def start_battler_move_forward return if @subject.started_turn @subject.started_turn = true @subject.move_forward wait_for_moving end #-------------------------------------------------------------------------- # new method: start_battler_move_origin #-------------------------------------------------------------------------- def start_battler_move_origin @subject.started_turn = nil move_battlers_origin wait_for_moving @subject.face_opposing_party rescue 0 end #-------------------------------------------------------------------------- # new method: move_battlers_origin #-------------------------------------------------------------------------- def move_battlers_origin for member in all_battle_members next if member.dead? next unless member.exist? member.move_origin end end #-------------------------------------------------------------------------- # new method: wait_for_moving #-------------------------------------------------------------------------- def wait_for_moving update_for_wait update_for_wait while @spriteset.moving? end end # Scene_Battle #============================================================================== # # ¥ End of File # #==============================================================================
Quindi:1) Come animo i nemici? E' dunque fattibile?
2) Come faccio a far morire i miei eroi morti? (che frase contorta...)
-
Grandissimo!!!
Grazie è proprio come volevo io, sei un genio!
Finalmente posso andare avanti con lo sviluppo del gioco! :smile:
-
Pardòn, ecco qui lo script:
#============================================================================== # # ▼ Yanfly Engine Ace - Victory Aftermath v1.03 # -- Last Updated: 2012.01.07 # -- Level: Easy, Normal, Hard # -- Requires: n/a # #============================================================================== $imported = {} if $imported.nil? $imported["YEA-VictoryAftermath"] = true #============================================================================== # ▼ Updates # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # 2012.01.07 - Compatibility Update: JP Manager # 2012.01.01 - Bug Fixed: Quote tags were mislabeled. # 2011.12.26 - Compatibility Update: Command Autobattle # 2011.12.16 - Started Script and Finished. # #============================================================================== # ▼ Introduction # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # At the end of each battle, RPG Maker VX Ace by default shows text saying that # the party has gained so-and-so EXP while this person leveled up and your # party happened to find these drops. This script changes that text into # something more visual for your players to see. Active battle members will be # seen gaining EXP, any kind of level up changes, and a list of the items # obtained through drops. # #============================================================================== # ▼ 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. # # ----------------------------------------------------------------------------- # Actor Notetags - These notetags go in the actors notebox in the database. # ----------------------------------------------------------------------------- # <win quotes> # string # string # </win quotes> # Sets the win quote for the actor. The strings are continuous and can use # text codes. Use \n for a line break. Type in what you want the actor to say # for the particular win quote. Use [New Quote] in between the two tags to # start up a new quote. # # <level quotes> # string # string # </level quotes> # Sets the level up quote for the actor. The strings are continuous and can use # text codes. Use \n for a line break. Type in what you want the actor to say # for the particular win quote. Use [New Quote] in between the two tags to # start up a new quote. # # <drops quotes> # string # string # </drops quotes> # Sets the drops quote for the actor. The strings are continuous and can use # text codes. Use \n for a line break. Type in what you want the actor to say # for the particular win quote. Use [New Quote] in between the two tags to # start up a new quote. # # ----------------------------------------------------------------------------- # Class Notetags - These notetags go in the class notebox in the database. # ----------------------------------------------------------------------------- # <win quotes> # string # string # </win quotes> # Sets the win quote for the class. The strings are continuous and can use # text codes. Use \n for a line break. Type in what you want the actor to say # for the particular win quote. Use [New Quote] in between the two tags to # start up a new quote. # # <level quotes> # string # string # </level quotes> # Sets the level up quote for the class. The strings are continuous and can use # text codes. Use \n for a line break. Type in what you want the actor to say # for the particular win quote. Use [New Quote] in between the two tags to # start up a new quote. # # <drops quotes> # string # string # </drops quotes> # Sets the drops quote for the class. The strings are continuous and can use # text codes. Use \n for a line break. Type in what you want the actor to say # for the particular win quote. Use [New Quote] in between the two tags to # start up a new quote. # #============================================================================== # ▼ Compatibility # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that # it will run with RPG Maker VX without adjusting. # #============================================================================== module YEA module VICTORY_AFTERMATH #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # - General Settings - #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # These are various settings that are used throughout the Victory Aftermath # portion of a battle. Adjust them as you see fit. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- VICTORY_BGM = RPG::BGM.new("Field1", 100, 100) # Victory BGM VICTORY_TICK = RPG::SE.new("Decision1", 100, 150) # EXP ticking SFX LEVEL_SOUND = RPG::SE.new("Up4", 80, 150) # Level Up SFX SKILLS_TEXT = "Nuove abilità!" # New skills text title. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # - Important Settings - #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # These are some important settings so please set them up properly. This # section includes a switch that allows you to skip the victory aftermath # phase (for those back to back battles and making them seamless) and it # also allows you to declare a common event to run after each battle. If # you do not wish to use either of these features, set them to 0. The # common event will run regardless of win or escape. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- SKIP_AFTERMATH_SWITCH = 0 # If switch on, skip aftermath. 0 to disable. SKIP_MUSIC_SWITCH = 0 # If switch on, skip music. 0 to disable. AFTERMATH_COMMON_EVENT = 0 # Runs common event after battle. 0 to disable. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # - Top Text Settings - #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # Here, you can adjust the various text that appears in the window that # appears at the top of the screen. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- TOP_TEAM = "Il gruppo di Caio" # Team name used. TOP_VICTORY_TEXT = "%s ha vinto!" # Text used to display victory. TOP_LEVEL_UP = "%s è salito di livello!" # Text used to display level up. TOP_SPOILS = "Bottino!" # Text used for spoils. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # - EXP Gauge Settings - #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # Adjust how the EXP Gauge appears for the Victory Aftermath here. This # includes the text display, the font size, the colour of the gauges, and # more. Adjust it all here. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- VICTORY_EXP = "+%sEXP" # Text used to display EXP. EXP_PERCENT = "%1.2f%%" # The way EXP percentage will be displayed. LEVELUP_TEXT = "NUOVO LIVELLO!" # Text to replace percentage when leveled. MAX_LVL_TEXT = "LIVELLO MASSIMO" # Text to replace percentage when max level. FONTSIZE_EXP = 20 # Font size used for EXP. EXP_TICKS = 15 # Ticks to full EXP EXP_GAUGE1 = 12 # "Window" skin text colour for gauge. EXP_GAUGE2 = 4 # "Window" skin text colour for gauge. LEVEL_GAUGE1 = 13 # "Window" skin text colour for leveling. LEVEL_GAUGE2 = 5 # "Window" skin text colour for leveling. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # - Victory Messages - #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # In the Victory Aftermath, actors can say unique things. This is the pool # of quotes used for actors without any custom victory quotes. Note that # actors with custom quotes will take priority over classes with custom # quotes, which will take priority over these default quotes. Use \n for # a line break in the quotes. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- HEADER_TEXT = "\e>\eC[6]%s\eC[0]\e<\n" # Always at start of messages. FOOTER_TEXT = "" # Always at end of messages. # Win Quotes are what the actors say when a battle is won. VICTORY_QUOTES ={ # :type => Quotes #------------------------------------------------------------------------ :win => [ # Occurs as initial victory quote. '"frase."', '"frase."', '"frase."', '"frase."', ],# Do not remove this. #------------------------------------------------------------------------ :level => [ # Occurs as initial victory quote. '"frase."', '"frase."', '"frase."', '"frase."', ],# Do not remove this. #------------------------------------------------------------------------ :drops => [ # Occurs as initial victory quote. '"frase."', '"frase."', '"frase."', '"frase."', ],# Do not remove this. #------------------------------------------------------------------------ } # Do not remove this. end # VICTORY_AFTERMATH end # YEA #============================================================================== # ▼ Editting anything past this point may potentially result in causing # computer damage, incontinence, explosion of user's head, coma, death, and/or # halitosis so edit at your own risk. #============================================================================== module YEA module REGEXP module BASEITEM NEW_QUOTE = /\[(?:NEW_QUOTE|new quote)\]/i WIN_QUOTE_ON = /<(?:WIN_QUOTES|win quote|win quotes)>/i WIN_QUOTE_OFF = /<\/(?:WIN_QUOTES|win quote|win quotes)>/i LEVEL_QUOTE_ON = /<(?:LEVEL_QUOTES|level quote|level quotes)>/i LEVEL_QUOTE_OFF = /<\/(?:LEVEL_QUOTES|level quote|level quotes)>/i DROPS_QUOTE_ON = /<(?:DROPS_QUOTES|drops quote|drops quotes)>/i DROPS_QUOTE_OFF = /<\/(?:DROPS_QUOTES|drops quote|drops quotes)>/i end # BASEITEM end # REGEXP end # YEA #============================================================================== # ■ Switch #============================================================================== module Switch #-------------------------------------------------------------------------- # self.skip_aftermath #-------------------------------------------------------------------------- def self.skip_aftermath return false if YEA::VICTORY_AFTERMATH::SKIP_AFTERMATH_SWITCH <= 0 return $game_switches[YEA::VICTORY_AFTERMATH::SKIP_AFTERMATH_SWITCH] end #-------------------------------------------------------------------------- # self.skip_aftermath_music #-------------------------------------------------------------------------- def self.skip_aftermath_music return false if YEA::VICTORY_AFTERMATH::SKIP_MUSIC_SWITCH <=0 return $game_switches[YEA::VICTORY_AFTERMATH::SKIP_MUSIC_SWITCH] end end # Switch #============================================================================== # ■ Numeric #============================================================================== class Numeric #-------------------------------------------------------------------------- # new method: group_digits #-------------------------------------------------------------------------- unless $imported["YEA-CoreEngine"] def group; return self.to_s; end end # $imported["YEA-CoreEngine"] end # Numeric #============================================================================== # ■ DataManager #============================================================================== module DataManager #-------------------------------------------------------------------------- # alias method: load_database #-------------------------------------------------------------------------- class <<self; alias load_database_va load_database; end def self.load_database load_database_va load_notetags_va end #-------------------------------------------------------------------------- # new method: load_notetags_va #-------------------------------------------------------------------------- def self.load_notetags_va groups = [$data_actors, $data_classes] for group in groups for obj in group next if obj.nil? obj.load_notetags_va end end end end # DataManager #============================================================================== # ■ RPG::BaseItem #============================================================================== class RPG::BaseItem #-------------------------------------------------------------------------- # public instance variables #-------------------------------------------------------------------------- attr_accessor :win_quotes attr_accessor :level_quotes attr_accessor :drops_quotes #-------------------------------------------------------------------------- # common cache: load_notetags_va #-------------------------------------------------------------------------- def load_notetags_va @win_quotes = [""] @level_quotes = [""] @drops_quotes = [""] @victory_quote_type = nil #--- self.note.split(/[\r\n]+/).each { |line| case line #--- when YEA::REGEXP::BASEITEM::WIN_QUOTE_ON @victory_quote_type = :win_quote when YEA::REGEXP::BASEITEM::WIN_QUOTE_OFF @victory_quote_type = nil when YEA::REGEXP::BASEITEM::LEVEL_QUOTE_ON @victory_quote_type = :level_quote when YEA::REGEXP::BASEITEM::LEVEL_QUOTE_OFF @victory_quote_type = nil when YEA::REGEXP::BASEITEM::DROPS_QUOTE_ON @victory_quote_type = :drops_quote when YEA::REGEXP::BASEITEM::DROPS_QUOTE_OFF @victory_quote_type = nil #--- when YEA::REGEXP::BASEITEM::NEW_QUOTE case @victory_quote_type when nil; next when :win_quote; @win_quotes.push("") when :level_quote; @level_quotes.push("") when :drops_quote; @drops_quotes.push("") end #--- else case @victory_quote_type when nil; next when :win_quote; @win_quotes[@win_quotes.size-1] += line.to_s when :level_quote; @level_quotes[@level_quotes.size-1] += line.to_s when :drops_quote; @drops_quotes[@drops_quotes.size-1] += line.to_s end end } # self.note.split #--- return unless self.is_a?(RPG::Class) quotes = YEA::VICTORY_AFTERMATH::VICTORY_QUOTES @win_quotes = quotes[:win].clone if @win_quotes == [""] @level_quotes = quotes[:level].clone if @level_quotes == [""] @drops_quotes = quotes[:drops].clone if @drops_quotes == [""] end end # RPG::BaseItem #============================================================================== # ■ BattleManager #============================================================================== module BattleManager #-------------------------------------------------------------------------- # overwrite method: self.process_victory #-------------------------------------------------------------------------- def self.process_victory if $imported["YEA-CommandAutobattle"] SceneManager.scene.close_disable_autobattle_window end return skip_aftermath if Switch.skip_aftermath play_battle_end_me gain_jp if $imported["YEA-JPManager"] display_exp gain_exp gain_gold gain_drop_items close_windows SceneManager.return replay_bgm_and_bgs battle_end(0) return true end #-------------------------------------------------------------------------- # new method: self.skip_aftermath #-------------------------------------------------------------------------- def self.skip_aftermath $game_party.all_members.each do |actor| actor.gain_exp($game_troop.exp_total) end $game_party.gain_gold($game_troop.gold_total) $game_troop.make_drop_items.each do |item| $game_party.gain_item(item, 1) end close_windows SceneManager.return replay_bgm_and_bgs battle_end(0) end #-------------------------------------------------------------------------- # overwrite method: self.play_battle_end_me #-------------------------------------------------------------------------- def self.play_battle_end_me return if Switch.skip_aftermath_music $game_system.battle_end_me.play YEA::VICTORY_AFTERMATH::VICTORY_BGM.play end #-------------------------------------------------------------------------- # new method: self.set_victory_text #-------------------------------------------------------------------------- def self.set_victory_text(actor, type) text = "" + sprintf(YEA::VICTORY_AFTERMATH::HEADER_TEXT, actor.name) text += actor.victory_quotes(type)[rand(actor.victory_quotes(type).size)] text += YEA::VICTORY_AFTERMATH::FOOTER_TEXT $game_message.face_name = actor.face_name $game_message.face_index = actor.face_index $game_message.add(text) wait_for_message end #-------------------------------------------------------------------------- # overwrite method: self.display_exp #-------------------------------------------------------------------------- def self.display_exp SceneManager.scene.show_victory_display_exp actor = $game_party.random_target @victory_actor = actor set_victory_text(@victory_actor, :win) end #-------------------------------------------------------------------------- # overwrite method: self.gain_exp #-------------------------------------------------------------------------- def self.gain_exp $game_party.all_members.each do |actor| temp_actor = Marshal.load(Marshal.dump(actor)) actor.gain_exp($game_troop.exp_total) next if actor.level == temp_actor.level SceneManager.scene.show_victory_level_up(actor, temp_actor) set_victory_text(actor, :level) wait_for_message end end #-------------------------------------------------------------------------- # overwrite method: self.gain_gold #-------------------------------------------------------------------------- def self.gain_gold $game_party.gain_gold($game_troop.gold_total) end #-------------------------------------------------------------------------- # overwrite method: self.gain_drop_items #-------------------------------------------------------------------------- def self.gain_drop_items drops = [] $game_troop.make_drop_items.each do |item| $game_party.gain_item(item, 1) drops.push(item) end SceneManager.scene.show_victory_spoils($game_troop.gold_total, drops) set_victory_text(@victory_actor, :drops) wait_for_message end #-------------------------------------------------------------------------- # new method: self.close_windows #-------------------------------------------------------------------------- def self.close_windows SceneManager.scene.close_victory_windows end #-------------------------------------------------------------------------- # alias method: load_database #-------------------------------------------------------------------------- class <<self; alias battle_end_va battle_end; end def self.battle_end(result) battle_end_va(result) return if result == 2 return if YEA::VICTORY_AFTERMATH::AFTERMATH_COMMON_EVENT <= 0 event_id = YEA::VICTORY_AFTERMATH::AFTERMATH_COMMON_EVENT $game_temp.reserve_common_event(event_id) end end # BattleManager #============================================================================== # ■ Game_Actor #============================================================================== class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # overwrite method: gain_exp #-------------------------------------------------------------------------- def gain_exp(exp) enabled = !SceneManager.scene_is?(Scene_Battle) change_exp(self.exp + (exp * final_exp_rate).to_i, enabled) end #-------------------------------------------------------------------------- # new method: victory_quotes #-------------------------------------------------------------------------- def victory_quotes(type) case type when :win return self.actor.win_quotes if self.actor.win_quotes != [""] return self.class.win_quotes when :level return self.actor.level_quotes if self.actor.level_quotes != [""] return self.class.level_quotes when :drops return self.actor.drops_quotes if self.actor.drops_quotes != [""] return self.class.drops_quotes else return ["NOTEXT"] end end end # Game_Actor #============================================================================== # ■ Window_VictoryTitle #============================================================================== class Window_VictoryTitle < Window_Base #-------------------------------------------------------------------------- # initialize #-------------------------------------------------------------------------- def initialize super(0, 0, Graphics.width, fitting_height(1)) self.z = 200 self.openness = 0 end #-------------------------------------------------------------------------- # refresh #-------------------------------------------------------------------------- def refresh(message = "") contents.clear draw_text(0, 0, contents.width, line_height, message, 1) end end # Window_VictoryTitle #============================================================================== # ■ Window_VictoryEXP_Back #============================================================================== class Window_VictoryEXP_Back < Window_Selectable #-------------------------------------------------------------------------- # initialize #-------------------------------------------------------------------------- def initialize super(0, fitting_height(1), Graphics.width, window_height) self.z = 200 self.openness = 0 end #-------------------------------------------------------------------------- # window_height #-------------------------------------------------------------------------- def window_height return Graphics.height - fitting_height(4) - fitting_height(1) end #-------------------------------------------------------------------------- # col_max #-------------------------------------------------------------------------- def col_max; return item_max; end #-------------------------------------------------------------------------- # spacing #-------------------------------------------------------------------------- def spacing; return 8; end #-------------------------------------------------------------------------- # item_max #-------------------------------------------------------------------------- def item_max; return $game_party.battle_members.size; end #-------------------------------------------------------------------------- # open #-------------------------------------------------------------------------- def open @exp_total = $game_troop.exp_total super end #-------------------------------------------------------------------------- # item_rect #-------------------------------------------------------------------------- def item_rect(index) rect = Rect.new rect.width = item_width rect.height = contents.height rect.x = index % col_max * (item_width + spacing) rect.y = index / col_max * item_height return rect end #-------------------------------------------------------------------------- # draw_item #-------------------------------------------------------------------------- def draw_item(index) actor = $game_party.battle_members[index] return if actor.nil? rect = item_rect(index) reset_font_settings draw_actor_name(actor, rect) draw_exp_gain(actor, rect) draw_jp_gain(actor, rect) draw_actor_face(actor, rect) end #-------------------------------------------------------------------------- # draw_actor_name #-------------------------------------------------------------------------- def draw_actor_name(actor, rect) name = actor.name draw_text(rect.x, rect.y+line_height, rect.width, line_height, name, 1) end #-------------------------------------------------------------------------- # draw_actor_face #-------------------------------------------------------------------------- def draw_actor_face(actor, rect) face_name = actor.face_name face_index = actor.face_index bitmap = Cache.face(face_name) rw = [rect.width, 96].min face_rect = Rect.new(face_index % 4 * 96, face_index / 4 * 96, rw, 96) rx = (rect.width - rw) / 2 + rect.x contents.blt(rx, rect.y + line_height * 2, bitmap, face_rect, 255) end #-------------------------------------------------------------------------- # draw_exp_gain #-------------------------------------------------------------------------- def draw_exp_gain(actor, rect) dw = rect.width - (rect.width - [rect.width, 96].min) / 2 dy = rect.y + line_height * 3 + 96 fmt = YEA::VICTORY_AFTERMATH::VICTORY_EXP text = sprintf(fmt, actor_exp_gain(actor).group) contents.font.size = YEA::VICTORY_AFTERMATH::FONTSIZE_EXP change_color(power_up_color) draw_text(rect.x, dy, dw, line_height, text, 2) end #-------------------------------------------------------------------------- # actor_exp_gain #-------------------------------------------------------------------------- def actor_exp_gain(actor) n = @exp_total * actor.final_exp_rate return n.to_i end #-------------------------------------------------------------------------- # draw_jp_gain #-------------------------------------------------------------------------- def draw_jp_gain(actor, rect) return unless $imported["YEA-JPManager"] dw = rect.width - (rect.width - [rect.width, 96].min) / 2 dy = rect.y + line_height * 4 + 96 fmt = YEA::JP::VICTORY_AFTERMATH text = sprintf(fmt, actor_jp_gain(actor).group, Vocab::jp) contents.font.size = YEA::VICTORY_AFTERMATH::FONTSIZE_EXP change_color(power_up_color) draw_text(rect.x, dy, dw, line_height, text, 2) end #-------------------------------------------------------------------------- # actor_jp_gain #-------------------------------------------------------------------------- def actor_jp_gain(actor) n = actor.battle_jp_earned if actor.exp + actor_exp_gain(actor) > actor.exp_for_level(actor.level + 1) n += YEA::JP::LEVEL_UP unless actor.max_level? end return n end end # Window_VictoryEXP_Back #============================================================================== # ■ Window_VictoryEXP_Front #============================================================================== class Window_VictoryEXP_Front < Window_VictoryEXP_Back #-------------------------------------------------------------------------- # initialize #-------------------------------------------------------------------------- def initialize super self.back_opacity = 0 @ticks = 0 @counter = 30 contents.font.size = YEA::VICTORY_AFTERMATH::FONTSIZE_EXP end #-------------------------------------------------------------------------- # update #-------------------------------------------------------------------------- def update super update_tick end #-------------------------------------------------------------------------- # update_tick #-------------------------------------------------------------------------- def update_tick return unless self.openness >= 255 return unless self.visible return if complete_ticks? @counter -= 1 return unless @counter <= 0 return if @ticks >= YEA::VICTORY_AFTERMATH::EXP_TICKS YEA::VICTORY_AFTERMATH::VICTORY_TICK.play @counter = 4 @ticks += 1 refresh end #-------------------------------------------------------------------------- # complete_ticks? #-------------------------------------------------------------------------- def complete_ticks? for actor in $game_party.battle_members total_ticks = YEA::VICTORY_AFTERMATH::EXP_TICKS bonus_exp = actor_exp_gain(actor) * @ticks / total_ticks now_exp = actor.exp - actor.current_level_exp + bonus_exp next_exp = actor.next_level_exp - actor.current_level_exp rate = now_exp * 1.0 / next_exp return false if rate < 1.0 end return true end #-------------------------------------------------------------------------- # draw_item #-------------------------------------------------------------------------- def draw_item(index) actor = $game_party.battle_members[index] return if actor.nil? rect = item_rect(index) draw_actor_exp(actor, rect) end #-------------------------------------------------------------------------- # exp_gauge1 #-------------------------------------------------------------------------- def exp_gauge1; return text_color(YEA::VICTORY_AFTERMATH::EXP_GAUGE1); end #-------------------------------------------------------------------------- # exp_gauge2 #-------------------------------------------------------------------------- def exp_gauge2; return text_color(YEA::VICTORY_AFTERMATH::EXP_GAUGE2); end #-------------------------------------------------------------------------- # lvl_gauge1 #-------------------------------------------------------------------------- def lvl_gauge1; return text_color(YEA::VICTORY_AFTERMATH::LEVEL_GAUGE1); end #-------------------------------------------------------------------------- # lvl_gauge2 #-------------------------------------------------------------------------- def lvl_gauge2; return text_color(YEA::VICTORY_AFTERMATH::LEVEL_GAUGE2); end #-------------------------------------------------------------------------- # draw_actor_exp #-------------------------------------------------------------------------- def draw_actor_exp(actor, rect) if actor.max_level? draw_exp_gauge(actor, rect, 1.0) return end total_ticks = YEA::VICTORY_AFTERMATH::EXP_TICKS bonus_exp = actor_exp_gain(actor) * @ticks / total_ticks now_exp = actor.exp - actor.current_level_exp + bonus_exp next_exp = actor.next_level_exp - actor.current_level_exp rate = now_exp * 1.0 / next_exp draw_exp_gauge(actor, rect, rate) end #-------------------------------------------------------------------------- # draw_exp_gauge #-------------------------------------------------------------------------- def draw_exp_gauge(actor, rect, rate) rate = [[rate, 1.0].min, 0.0].max dx = (rect.width - [rect.width, 96].min) / 2 + rect.x dy = rect.y + line_height * 2 + 96 dw = [rect.width, 96].min colour1 = rate >= 1.0 ? lvl_gauge1 : exp_gauge1 colour2 = rate >= 1.0 ? lvl_gauge2 : exp_gauge2 draw_gauge(dx, dy, dw, rate, colour1, colour2) fmt = YEA::VICTORY_AFTERMATH::EXP_PERCENT text = sprintf(fmt, [rate * 100, 100.00].min) if [rate * 100, 100.00].min == 100.00 text = YEA::VICTORY_AFTERMATH::LEVELUP_TEXT text = YEA::VICTORY_AFTERMATH::MAX_LVL_TEXT if actor.max_level? end draw_text(dx, dy, dw, line_height, text, 1) end end # Window_VictoryEXP_Front #============================================================================== # ■ Window_VictoryLevelUp #============================================================================== class Window_VictoryLevelUp < Window_Base #-------------------------------------------------------------------------- # initialize #-------------------------------------------------------------------------- def initialize super(0, fitting_height(1), Graphics.width, window_height) self.z = 200 hide end #-------------------------------------------------------------------------- # window_height #-------------------------------------------------------------------------- def window_height return Graphics.height - fitting_height(4) - fitting_height(1) end #-------------------------------------------------------------------------- # refresh #-------------------------------------------------------------------------- def refresh(actor, temp_actor) contents.clear reset_font_settings YEA::VICTORY_AFTERMATH::LEVEL_SOUND.play draw_actor_changes(actor, temp_actor) end #-------------------------------------------------------------------------- # draw_actor_changes #-------------------------------------------------------------------------- def draw_actor_changes(actor, temp_actor) dx = contents.width / 16 draw_actor_image(actor, temp_actor, dx) draw_param_names(actor, dx) draw_former_stats(temp_actor) draw_arrows draw_newer_stats(actor, temp_actor) draw_new_skills(actor, temp_actor) end #-------------------------------------------------------------------------- # draw_actor_image #-------------------------------------------------------------------------- def draw_actor_image(actor, temp_actor, dx) draw_text(dx, line_height, 96, line_height, actor.name, 1) draw_actor_face(actor, dx, line_height * 2) exp = actor.exp - temp_actor.exp text = sprintf(YEA::VICTORY_AFTERMATH::VICTORY_EXP, exp.group) change_color(power_up_color) contents.font.size = YEA::VICTORY_AFTERMATH::FONTSIZE_EXP draw_text(0, line_height * 2 + 96, dx + 96, line_height, text, 2) reset_font_settings end #-------------------------------------------------------------------------- # draw_param_names #-------------------------------------------------------------------------- def draw_param_names(actor, dx) dx += 108 change_color(system_color) text = Vocab.level draw_text(dx, 0, contents.width - dx, line_height, text) dy = 0 for i in 0...8 dy += line_height text = Vocab.param(i) draw_text(dx, dy, contents.width - dx, line_height, text) end end #-------------------------------------------------------------------------- # draw_former_stats #-------------------------------------------------------------------------- def draw_former_stats(actor) dw = contents.width / 2 - 12 dy = 0 change_color(normal_color) draw_text(0, dy, dw, line_height, actor.level.group, 2) for i in 0...8 dy += line_height draw_text(0, dy, dw, line_height, actor.param(i).group, 2) end end #-------------------------------------------------------------------------- # draw_arrows #-------------------------------------------------------------------------- def draw_arrows dx = contents.width / 2 - 12 dy = 0 change_color(system_color) for i in 0..8 draw_text(dx, dy, 24, line_height, "→", 1) dy += line_height end end #-------------------------------------------------------------------------- # draw_newer_stats #-------------------------------------------------------------------------- def draw_newer_stats(actor, temp_actor) dx = contents.width / 2 + 12 dw = contents.width - dx dy = 0 change_color(param_change_color(actor.level - temp_actor.level)) draw_text(dx, dy, dw, line_height, actor.level.group, 0) for i in 0...8 dy += line_height change_color(param_change_color(actor.param(i) - temp_actor.param(i))) draw_text(dx, dy, dw, line_height, actor.param(i).group, 0) end end #-------------------------------------------------------------------------- # draw_new_skills #-------------------------------------------------------------------------- def draw_new_skills(actor, temp_actor) return if temp_actor.skills.size == actor.skills.size dw = 172 + 24 dx = contents.width - dw change_color(system_color) text = YEA::VICTORY_AFTERMATH::SKILLS_TEXT draw_text(dx, 0, dw, line_height, text, 0) end end # Window_VictoryLevelUp #============================================================================== # ■ Window_VictorySkills #============================================================================== class Window_VictorySkills < Window_Selectable #-------------------------------------------------------------------------- # initialize #-------------------------------------------------------------------------- def initialize dy = fitting_height(1) + 24 dw = 172 + 24 + 24 dh = Graphics.height - fitting_height(4) - fitting_height(1) - 24 super(Graphics.width - dw, dy, dw, dh) self.opacity = 0 self.z = 200 hide end #-------------------------------------------------------------------------- # item_max #-------------------------------------------------------------------------- def item_max; return @data.nil? ? 0 : @data.size; end #-------------------------------------------------------------------------- # refresh #-------------------------------------------------------------------------- def refresh(actor, temp_actor) contents.clear if actor.skills.size == temp_actor.skills.size unselect @data = [] create_contents return end @data = actor.skills - temp_actor.skills if @data.size > 8 select(0) activate else unselect deactivate end create_contents draw_all_items end #-------------------------------------------------------------------------- # refresh #-------------------------------------------------------------------------- def draw_item(index) rect = item_rect(index) skill = @data[index] return if skill.nil? rect.width -= 4 draw_item_name(skill, rect.x, rect.y, true) end end # Window_VictorySkills #============================================================================== # ■ Window_VictorySpoils #============================================================================== class Window_VictorySpoils < Window_ItemList #-------------------------------------------------------------------------- # initialize #-------------------------------------------------------------------------- def initialize super(0, fitting_height(1), Graphics.width, window_height) self.z = 200 hide end #-------------------------------------------------------------------------- # window_height #-------------------------------------------------------------------------- def window_height return Graphics.height - fitting_height(4) - fitting_height(1) end #-------------------------------------------------------------------------- # spacing #-------------------------------------------------------------------------- def spacing; return 32; end #-------------------------------------------------------------------------- # make #-------------------------------------------------------------------------- def make(gold, drops) @gold = gold @drops = drops refresh select(0) activate end #-------------------------------------------------------------------------- # make_item_list #-------------------------------------------------------------------------- def make_item_list @data = [nil] items = {} weapons = {} armours = {} @goods = {} for item in @drops case item when RPG::Item items[item] = 0 if items[item].nil? items[item] += 1 when RPG::Weapon weapons[item] = 0 if weapons[item].nil? weapons[item] += 1 when RPG::Armor armours[item] = 0 if armours[item].nil? armours[item] += 1 end end items = items.sort { |a,b| a[0].id <=> b[0].id } weapons = weapons.sort { |a,b| a[0].id <=> b[0].id } armours = armours.sort { |a,b| a[0].id <=> b[0].id } for key in items; @goods[key[0]] = key[1]; @data.push(key[0]); end for key in weapons; @goods[key[0]] = key[1]; @data.push(key[0]); end for key in armours; @goods[key[0]] = key[1]; @data.push(key[0]); end end #-------------------------------------------------------------------------- # draw_item #-------------------------------------------------------------------------- def draw_item(index) item = @data[index] rect = item_rect(index) reset_font_settings if item.nil? draw_gold(rect) return end rect.width -= 4 draw_item_name(item, rect.x, rect.y, true, rect.width - 24) draw_item_number(rect, item) end #-------------------------------------------------------------------------- # draw_gold #-------------------------------------------------------------------------- def draw_gold(rect) text = Vocab.currency_unit draw_currency_value(@gold, text, rect.x, rect.y, rect.width) end #-------------------------------------------------------------------------- # draw_item_number #-------------------------------------------------------------------------- def draw_item_number(rect, item) number = @goods[item].group if $imported["YEA-AdjustLimits"] contents.font.size = YEA::LIMIT::ITEM_FONT text = sprintf(YEA::LIMIT::ITEM_PREFIX, number) draw_text(rect, text, 2) else draw_text(rect, sprintf(":%s", number), 2) end end end # Window_VictorySpoils #============================================================================== # ■ Scene_Battle #============================================================================== class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # alias method: create_all_windows #-------------------------------------------------------------------------- alias scene_battle_create_all_windows_va create_all_windows def create_all_windows scene_battle_create_all_windows_va create_victory_aftermath_windows end #-------------------------------------------------------------------------- # new method: create_victory_aftermath_windows #-------------------------------------------------------------------------- def create_victory_aftermath_windows @victory_title_window = Window_VictoryTitle.new @victory_exp_window_back = Window_VictoryEXP_Back.new @victory_exp_window_front = Window_VictoryEXP_Front.new @victory_level_window = Window_VictoryLevelUp.new @victory_level_skills = Window_VictorySkills.new @victory_spoils_window = Window_VictorySpoils.new end #-------------------------------------------------------------------------- # new method: show_victory_display_exp #-------------------------------------------------------------------------- def show_victory_display_exp @victory_title_window.open name = $game_party.battle_members[0].name fmt = YEA::VICTORY_AFTERMATH::TOP_TEAM name = sprintf(fmt, name) if $game_party.battle_members.size > 1 fmt = YEA::VICTORY_AFTERMATH::TOP_VICTORY_TEXT text = sprintf(fmt, name) @victory_title_window.refresh(text) #--- @victory_exp_window_back.open @victory_exp_window_back.refresh @victory_exp_window_front.open @victory_exp_window_front.refresh end #-------------------------------------------------------------------------- # new method: show_victory_level_up #-------------------------------------------------------------------------- def show_victory_level_up(actor, temp_actor) @victory_exp_window_back.hide @victory_exp_window_front.hide #--- fmt = YEA::VICTORY_AFTERMATH::TOP_LEVEL_UP text = sprintf(fmt, actor.name) @victory_title_window.refresh(text) #--- @victory_level_window.show @victory_level_window.refresh(actor, temp_actor) @victory_level_skills.show @victory_level_skills.refresh(actor, temp_actor) end #-------------------------------------------------------------------------- # new method: show_victory_spoils #-------------------------------------------------------------------------- def show_victory_spoils(gold, drops) @victory_exp_window_back.hide @victory_exp_window_front.hide @victory_level_window.hide @victory_level_skills.hide #--- text = YEA::VICTORY_AFTERMATH::TOP_SPOILS @victory_title_window.refresh(text) #--- @victory_spoils_window.show @victory_spoils_window.make(gold, drops) end #-------------------------------------------------------------------------- # new method: close_victory_windows #-------------------------------------------------------------------------- def close_victory_windows @victory_title_window.close @victory_exp_window_back.close @victory_exp_window_front.close @victory_level_window.close @victory_level_skills.close @victory_spoils_window.close wait(16) end end # Scene_Battle #============================================================================== # # ▼ End of File # #==============================================================================Praticamente alla riga 114 mi da la possibilità di cambiare la canzoncina, io però voglio fare in modo che non ci sia nessuna canzone, o almeno, che rimanga la stessa musichetta che c'era in precedenza durante la battaglia!
Al limite non c'è la possibilità di disattivare lo script, ad un certo punto del gioco, per poi riattivarlo in un secondo momento?
-
Yanfly Victory Aftermath, questo è lo script che uso per visualizzare i dati di fine battaglia (come l'esperienza acquisita o gli oggetti).
In una mappa ho impostato una musichetta continua, anche durante le battaglie che non si interrompe mai, purtoppo ho scoperto che quando parte lo script a fine battaglia parte una canzoncina che fa bloccare la musica di sottofondo che avevo impostato per la mappa, facendola ripetere da capo a fine script.
Come faccio per annullare la canzoncina dello script?
Se provo a cancellare il titolo della canzoncina dagli script mi interrompe in ogni caso la musica di sottofondo (anche se si sente muto) per poi riprenderla a fine script.
Scusate ragazzi ho creato per sbaglio 2 Topic identici

-
Grazie a tutti e chiedo scusa allo stesso tempo

Comunque ho provato ma non funziona :(
Come non detto ho risolto :P
-
Ciao a tutti, come faccio per memorizzare la posizione dell'eroe, prima di un teletrasporto, in modo tale da poter tornare in quella posizione (in un eventuale prossimo teletrasporto)?
-
Grazie di tutto!


Update System
in Richieste scripts RGSS3 (VX-Ace)
Posted
Ciao ragazzi.
Non esiste una sorta di update system per VX ace?