Xcheater 9 Posted January 16, 2012 (edited) Unchange Map to Battle BGM made by chicheater (a.k.a Xcheater) Introduction: Hey there everyone, I bring today an epic script: Unchange Map to Battle BGM. Description: For those who don´t understand or who don´t know want this script does here it goes... When your in a cutscene and then u change to a battle but you dont want to change the BGM, or even in a sequence of battles that you don´t want the BGM to stop (the victory SE doesn't play) Well you can do it with this new script. Updates: [1/17/2012 5:45 PM] Saving problem resolved Instructions: REMEMBER -- Paste this code above Main To activate the script use this: $game_system.map_bgm_continue = true To determinate if the battle final ME will be played use this: $game_system.last_battle = true To stop this script in battle use this: $game_system.stop_bgm_unchange = true To deactivate the script out of a battle use this: $game_system.map_bgm_continue = false Script: =begin Unchange Map to Battle BGM made by: Chicheater version : 1.2 #--------------------Instructions--------------------# To activate the script use this: $game_system.map_bgm_continue = true To determinate if the battle final ME will be played use this: $game_system.last_battle = true To stop this script in battle use this: $game_system.stop_bgm_unchange = true To deactivate the script out of a battle use this: $game_system.map_bgm_continue = false =end class Game_System attr_accessor :map_bgm_continue attr_accessor :last_battle attr_accessor :stop_bgm_unchange alias chicheater0001_initialize initialize def initialize chicheater0001_initialize @map_bgm_continue = false @last_battle = false @stop_bgm_unchange = false end end class Scene_Map < Scene_Base def pre_battle_scene Graphics.update Graphics.freeze @spriteset.dispose_characters if $game_system.map_bgm_continue == false BattleManager.save_bgm_and_bgs BattleManager.play_battle_bgm Sound.play_battle_start end end end module BattleManager def self.save_bgm_and_bgs @map_bgm = RPG::BGM.last @map_bgs = RPG::BGS.last end def self.play_battle_bgm $game_system.battle_bgm.play RPG::BGS.stop end def self.play_battle_end_me if $game_system.map_bgm_continue if $game_system.last_battle $game_system.battle_end_me.play end else $game_system.battle_end_me.play end end def self.replay_bgm_and_bgs if $game_system.map_bgm_continue == false @map_bgm.replay unless $BTEST @map_bgs.replay unless $BTEST end if $game_system.stop_bgm_unchange $game_system.map_bgm_continue = false end end end Edited January 17, 2012 by Xcheater (aka Chicheater) 1 Share this post Link to post Share on other sites
Victor Sant 273 Posted January 16, 2012 There is a problem with you script: the settings ins't carried over the save file. i don't get why you did a whole class and a new global variable for that: class UnchangeBGM attr_accessor :map_bgm_continue attr_accessor :last_battle attr_accessor :stop_bgm_unchange def initialize @map_bgm_continue = false @last_battle = false @stop_bgm_unchange = false end end $unchange_bgm = UnchangeBGM.new You can use Game_Temp (for temporary info) or Game_System (for system info, that will be carried on saves) in you case you can add the new variables on game_system and call $game_system.you_new_variable. Share this post Link to post Share on other sites
Xcheater 9 Posted January 16, 2012 (edited) i know that it doesnt save; if i wanted it to save i'd make it to save... are you having any problem with the script? it doesn't work or something? Edited January 16, 2012 by Xcheater (aka Chicheater) Share this post Link to post Share on other sites
+ FenixFyreX 18 Posted January 16, 2012 (edited) Xcheater, if you don't save the variables, then say the maker changes the map bgm into battle variable to true for the upcoming boss. Then, the player saves right after ward, and shuts down. Then, upon reload, that variable is created as false, thus ruining the effect ingame when the player goes to fight said boss. So yes, you do need to save the info, and yes, it does not work 100% like you hoped . I'd suggest using $game_system like Victor suggested. Edited January 16, 2012 by FenixFyreX Share this post Link to post Share on other sites
Nohta 15 Posted January 17, 2012 Regardless of the saving thing, you just made my day, man. This is exactly what I need! I was getting worried that no one was understanding my request or had no interest in fulfilling it! Share this post Link to post Share on other sites
Xcheater 9 Posted January 17, 2012 (edited) this script its to use IN THE MOMENT like: u run this code and then comes a battle like a cutscene; unnabiliting the player to save during this . . . but ok i'll make it in game system as u ask Xcheater, if you don't save the variables, then say the maker changes the map bgm into battle variable to true for the upcoming boss. Then, the player saves right after ward, and shuts down. Then, upon reload, that variable is created as false, thus ruining the effect ingame when the player goes to fight said boss. So yes, you do need to save the info, and yes, it does not work 100% like you hoped . I'd suggest using $game_system like Victor suggested. why it doesent work 100%? what's missing? (unless of the saving thing) [EDIT] Script updated Edited January 17, 2012 by Xcheater (aka Chicheater) Share this post Link to post Share on other sites
Victor Sant 273 Posted January 17, 2012 I didn't really get why you were so reluctant to make such a simple edit that would only bring advantage for you script. At last it's good for the users that you changed your mind. Share this post Link to post Share on other sites
JmT 0 Posted September 2, 2012 Can you add an option to play the Transition sound? Thanks. Share this post Link to post Share on other sites
bastian 2 Posted November 28, 2012 Heya, just checking if the transition sound is intentionally disabled? I'd like the option of always having the transition sound, but also always leaving your script on so that battle BGM doesn't come on and instead the regular BGM keeps playing. Is that possible? Share this post Link to post Share on other sites
Coolie 148 Posted November 28, 2012 I had no problem achieving this script's exact effect with no scripting whatsoever. You can do all of this stuff by default. I'm sure some will find it easier to just do a script call, though. Share this post Link to post Share on other sites