Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

2 Pages V   1 2 >  
Reply to this topicStart new topic
> [RMVX] Lomexi's Battle Theme Adjuster *Updated* *DEMO*
CaptainWinky
post Mar 15 2008, 01:43 PM
Post #1


Level 5
Group Icon

Group: Member
Posts: 65
Type: None
RM Skill: Masterful




Lomexi's Battle Theme Adjuster



Version 1.10
by Dean 'Lomexi' Lynch [mroan_brolli@hotmail.com]
Release Date: 6th April 2008

Version History

1.10
- Fixed a problem where the user was unable to continue new Map BGM after
a Boss Type Battle. (See: Possibilties)
- Fixed minor problem where the Battle Test window would not close after
the battle had ended.
- Fixed a problem where if the player escaped during a Boss Type Battle,
the BGM would continue. This was likely to be undesirable.
(See: Possibilties)


1.00
- Initial Release.

Features:
- Turn Battle BGM and Victory ME ON or OFF.
- Able to continue with current (usually map) BGM throughout battles.
- Support for long Victory ME's. (Think Final Fantasy 7, 8, 9 and 10).
- If Battle BGM is off, yet Victory ME is on, the current BGM will continue
from where it paused after the Victory ME has finished.
- With a little imagination, you can give your battles a more atmospheric feel.



Possibilities:
1. Regular Battles
- These are battles; event processed or random encounters where both Battle
BGM and Victory ME play and continue back to map BGM.
Battle BGM Switch ON
Victory ME Switch ON
Map BGM Switch ON

2. Hurry! Battles
- These battles will have no Battle BGM or Victory ME. Instead, if the
user wishes, a bgm can be played and go un-disturbed until it needs to
end.
Battle BGM Switch OFF
Victory ME Switch OFF
Map BGM Switch OFF

3. Hurry! Battles #2
- These battles will play Victory ME but have no Battle BGM. The Hurry BGM
will play up untill Victory ME, then resume when the battle ends.
Battle BGM Switch OFF
Victory ME Switch ON
Map BGM Switch OFF

4. Boss Type Battle
- These are battles where the enemy BGM is played before the battle
processing event. This BGM will play all the way up untill the enemy
is defeated (Victory ME) or the player escapes.
Battle BGM Switch OFF
Victory ME Switch ON
Map BGM Switch ON

There are several other possibilities, these are just the ones that stick
out.


Important:
- BY DEFAULT BOTH BATTLE BMG AND VICTORY ME ARE OFF. THIS IS TO AVOID
CONFUSION WHEN USING GAME SWITCHES.
- Changing default Battle BGM or Victory ME using game events will NOT
disrupt this script.

Instructions:
- Place above main.
- Edit the config module to select which switches control the script.
- Switches are edited using game events.
- Please, play the demo and study the events for a clearer view on how this
script works.

Authors Notes:
- This is my very first script. I consider myself a novice.

Demo:
Demo!

Script:
CODE

#==============================================================================
# ¦ [RMVX] Lomexi's Battle Theme Adjuster
#------------------------------------------------------------------------------
# Version 1.10
# by Dean 'Lomexi' Lynch [mroan_brolli@hotmail.com]
# Release Date: 6th April 2008
#
# Version History:
# 1.10
# - Fixed a problem where the user was unable to continue new Map BGM after
# a Boss Type Battle. (See: Possibilties)
# - Fixed minor problem where the Battle Test window would not close after
# the battle had ended.
# - Fixed a problem where if the player escaped during a Boss Type Battle,
# the BGM would continue. This was likely to be undesirable.
# (See: Possibilties)
#
#
# 1.00
# - Initial Release.
#
# Features:
# - Turn Battle BGM and Victory ME ON or OFF.
# - Able to continue with current (usually map) BGM throughout battles.
# - Support for long Victory ME's. (Think Final Fantasy 7, 8, 9 and 10)
# - With a little imagination, can give your battles a more atmospheric feel.
# - If Battle BGM is off, yet Victory ME is on, the current BGM will continue
# from where it stopped after the Victory ME has finished.
#
# Possibilities:
# 1. Regular Battles
# - These are battles; event processed or random encounters where both Battle
# BGM and Victory ME play and continue back to map BGM.
# Battle BGM Switch ON
# Victory ME Switch ON
# Map BGM Switch ON
#
# 2. Hurry! Battles
# - These battles will have no Battle BGM or Victory ME. Instead, if the
# user wishes, a bgm can be played and go un-disturbed until it needs to
# end.
# Battle BGM Switch OFF
# Victory ME Switch OFF
# Map BGM Switch OFF
#
# 3. Hurry! Battles #2
# - These battles will play Victory ME but have no Battle BGM. The Hurry BGM
# will play up untill Victory ME, then resume when the battle ends.
# Battle BGM Switch OFF
# Victory ME Switch ON
# Map BGM Switch OFF
#
# 4. Boss Type Battle
# - These are battles where the enemy BGM is played before the battle
# processing event. This BGM will play all the way up untill the enemy
# is defeated (Victory ME) or the player escapes.
# Battle BGM Switch OFF
# Victory ME Switch ON
# Map BGM Switch ON
#
# There are several other possibilities, these are just the ones that stick
# out.
#
#
# Important:
# - BY DEFAULT BOTH BATTLE BMG AND VICTORY ME ARE OFF. THIS IS TO AVOID
# CONFUSION WHEN USING GAME SWITCHES.
# - Changing default Battle BGM or Victory ME using game events will NOT
# disrupt this script.
#
# Instructions:
# - Edit the config module to select which switches control the script.
# - Switches are edited using game events.
# - Please, play the demo and study the events for a clearer view on how this
# script works.
#
# Authors Notes:
# - This is my very first script. I consider myself a novice.
#==============================================================================

#==============================================================================
# Config Module
#==============================================================================

module THEME_CONFIG

BATTLE_BGM_SWITCH = 1 #Game switch to configure Battle BGM.
# Setting game switch ON plays Battle BGM defined under system in the Database.

VICTORY_ME_SWITCH = 2 #Game switch to configure Victory ME.
# Setting game switch ON plays Victory ME defined under system in the Database.

CONT_DEFAULT_MAP_BGM_SWITCH = 3 #Game switch to configure "New BGM".
# Setting game switch ON plays default Map BGM after a battle where the BGM was
# changed before the battle had started.

end

#==============================================================================
# Scene Map
#==============================================================================
class Scene_Map < Scene_Base
#============================================================================
# Call Battle
#============================================================================
def call_battle
@spriteset.update
Graphics.update
$game_player.make_encounter_count
$game_player.straighten
if $game_switches[THEME_CONFIG::BATTLE_BGM_SWITCH] == true
$game_temp.map_bgm = RPG::BGM.last
$game_temp.map_bgs = RPG::BGS.last
RPG::BGM.stop
RPG::BGS.stop
$game_system.battle_bgm.play
Sound.play_battle_start
$game_temp.next_scene = nil
$scene = Scene_Battle.new
else
$game_temp.map_bgm = RPG::BGM.last
$game_temp.map_bgs = RPG::BGS.last
Sound.play_battle_start
$game_temp.next_scene = nil
$scene = Scene_Battle.new
end
end
end
#==============================================================================
# Scene Battle
#==============================================================================
class Scene_Battle < Scene_Base
#============================================================================
# Battle End
#============================================================================
def battle_end(result)
if result == 2 and not $game_troop.can_lose
call_gameover
else
$game_party.clear_actions
$game_party.remove_states_battle
$game_troop.clear
if $game_temp.battle_proc != nil
$game_temp.battle_proc.call(result)
$game_temp.battle_proc = nil
end
unless $BTEST
$game_temp.map_bgm.play
$game_temp.map_bgs.play
end
if $game_switches[THEME_CONFIG::BATTLE_BGM_SWITCH] == true
$game_temp.map_bgm.play
$game_temp.map_bgs.play
end
RPG::ME.fade(800)
$scene = Scene_Map.new
@message_window.clear
Graphics.fadeout(60)
RPG::ME.stop
end
$game_temp.in_battle = false
end
#============================================================================
# Battle Victory
#============================================================================
def process_victory
@info_viewport.visible = false
@message_window.visible = true
if $game_switches[THEME_CONFIG::VICTORY_ME_SWITCH] == true
if $game_switches[THEME_CONFIG::CONT_DEFAULT_MAP_BGM_SWITCH] == true
$game_map.autoplay
end
$game_temp.map_bgm = RPG::BGM.last
$game_system.battle_end_me.play
$game_temp.map_bgm.play
$game_temp.map_bgs.play
display_exp_and_gold
display_drop_items
display_level_up
battle_end(0)
else
display_exp_and_gold
display_drop_items
display_level_up
battle_end(0)
end
end
#============================================================================
# Process Escape
#============================================================================
def process_escape
@info_viewport.visible = false
@message_window.visible = true
text = sprintf(Vocab::EscapeStart, $game_party.name)
$game_message.texts.push(text)
if $game_troop.preemptive
success = true
else
success = (rand(100) < @escape_ratio)
end
Sound.play_escape
if success
wait_for_message
battle_end(1)
if $game_switches[THEME_CONFIG::CONT_DEFAULT_MAP_BGM_SWITCH] == true
$game_map.autoplay
end
else
@escape_ratio += 10
$game_message.texts.push('\.' + Vocab::EscapeFailure)
wait_for_message
$game_party.clear_actions
start_main
end
end

end


This post has been edited by CaptainWinky: Apr 6 2008, 08:41 AM
Go to the top of the page
 
+Quote Post
   
Mikano
post Mar 15 2008, 02:56 PM
Post #2


Level 2
Group Icon

Group: Member
Posts: 28
Type: Developer
RM Skill: Skilled




Sweet as a nut man, I need this kind of script, Now I can do an FF7 type intro with music undisturbed in my battles biggrin.gif


__________________________


Current Project: Lupin - 5% Completed
Go to the top of the page
 
+Quote Post
   
darkkyros
post Mar 15 2008, 11:01 PM
Post #3


Level 4
Group Icon

Group: Member
Posts: 50
Type: Artist
RM Skill: Intermediate




This is Freaking Sweet! Thanks, this will greatly help out. Great on this as your first script.

EDIT: Oh, is there any way you could make it so when the BGM is running through battle that the ME will still play when the battle is finished? When I try to have both of them on, It changes back to original Battle music. I hope that made sense. =/

This post has been edited by darkkyros: Mar 15 2008, 11:04 PM
Go to the top of the page
 
+Quote Post
   
Cain La Croix
post Mar 15 2008, 11:09 PM
Post #4


Level 6
Group Icon

Group: Member
Posts: 86
Type: Event Designer
RM Skill: Advanced




Nice! Great work, for your first script smile.gif


__________________________
Current Projects:
Eternal Chaos-World of Ruin-VX Project:
Mapping: 32%
Database: 70%
Story/Events: 30%
Side Quests: 2%



[Show/Hide] Scripts in Progress
Golden Sun Weapon Unleashing-2%
Go to the top of the page
 
+Quote Post
   
Mech-Ah
post Mar 16 2008, 12:01 AM
Post #5


Level 2
Group Icon

Group: Member
Posts: 25
Type: None
RM Skill: Undisclosed




I don't understand how to change the musik on and off. Can you clear the fog a bit?
What kind of script I should call, and what number?
Go to the top of the page
 
+Quote Post
   
onimusuko
post Mar 16 2008, 12:20 AM
Post #6


Level 4
Group Icon

Group: Member
Posts: 45
Type: Artist
RM Skill: Beginner




cool script! what i wanna ask is it is possible to play individual BGS and Battle music at the same time, cuz i want an eerie howl playing through the battle where the heroes fight the werewolves.


__________________________
Go to the top of the page
 
+Quote Post
   
CaptainWinky
post Mar 16 2008, 05:24 PM
Post #7


Level 5
Group Icon

Group: Member
Posts: 65
Type: None
RM Skill: Masterful




QUOTE (darkkyros @ Mar 15 2008, 10:08 PM) *
This is Freaking Sweet! Thanks, this will greatly help out. Great on this as your first script.

EDIT: Oh, is there any way you could make it so when the BGM is running through battle that the ME will still play when the battle is finished? When I try to have both of them on, It changes back to original Battle music. I hope that made sense. =/


You want ME to continue or the new BGM? With the new version I have added support for continuing new BGMs started before battle.

QUOTE (Mech-Ah @ Mar 15 2008, 11:08 PM) *
I don't understand how to change the musik on and off. Can you clear the fog a bit?
What kind of script I should call, and what number?


There is no call scripts. Edit this section of the script:

module THEME_CONFIG
#Game switch to configure Battle BGM:
BATTLE_BGM_SWITCH = 1
#Game switch to configure Victory ME:
VICTORY_ME_SWITCH = 2
end

Change 1 and 2 to the switches you desire. Then simply turn the swiches on or off using events. Hope that makes sense.

QUOTE (onimusuko @ Mar 15 2008, 11:27 PM) *
cool script! what i wanna ask is it is possible to play individual BGS and Battle music at the same time, cuz i want an eerie howl playing through the battle where the heroes fight the werewolves.


Are the werewolves random encounters or battle processed? Either way there is no support for BGS atm. If you can explain in detail what you mean, maybe I will add BGS support with future versions.

This post has been edited by CaptainWinky: Mar 16 2008, 05:25 PM
Go to the top of the page
 
+Quote Post
   
onimusuko
post Mar 17 2008, 12:25 AM
Post #8


Level 4
Group Icon

Group: Member
Posts: 45
Type: Artist
RM Skill: Beginner




QUOTE (CaptainWinky @ Mar 17 2008, 07:31 AM) *
QUOTE (darkkyros @ Mar 15 2008, 10:08 PM) *
This is Freaking Sweet! Thanks, this will greatly help out. Great on this as your first script.

EDIT: Oh, is there any way you could make it so when the BGM is running through battle that the ME will still play when the battle is finished? When I try to have both of them on, It changes back to original Battle music. I hope that made sense. =/


You want ME to continue or the new BGM? With the new version I have added support for continuing new BGMs started before battle.

QUOTE (Mech-Ah @ Mar 15 2008, 11:08 PM) *
I don't understand how to change the musik on and off. Can you clear the fog a bit?
What kind of script I should call, and what number?


There is no call scripts. Edit this section of the script:

module THEME_CONFIG
#Game switch to configure Battle BGM:
BATTLE_BGM_SWITCH = 1
#Game switch to configure Victory ME:
VICTORY_ME_SWITCH = 2
end

Change 1 and 2 to the switches you desire. Then simply turn the swiches on or off using events. Hope that makes sense.

QUOTE (onimusuko @ Mar 15 2008, 11:27 PM) *
cool script! what i wanna ask is it is possible to play individual BGS and Battle music at the same time, cuz i want an eerie howl playing through the battle where the heroes fight the werewolves.


Are the werewolves random encounters or battle processed? Either way there is no support for BGS atm. If you can explain in detail what you mean, maybe I will add BGS support with future versions.

ah yes, it is for boss battle


__________________________
Go to the top of the page
 
+Quote Post
   
lahandi
post Mar 17 2008, 01:42 AM
Post #9


Level 8
Group Icon

Group: Revolutionary
Posts: 111
Type: Artist
RM Skill: Skilled




This is great script mate!

Anyway, is there a way if we want to 'modified' something like, for the 1st Boss we use 'Song1' , for the 2nd Boss we use 'Song2', and so on?

Thanks smile.gif


__________________________
Go to the top of the page
 
+Quote Post
   
Mikano
post Mar 17 2008, 06:07 AM
Post #10


Level 2
Group Icon

Group: Member
Posts: 28
Type: Developer
RM Skill: Skilled




QUOTE (lahandi @ Mar 17 2008, 08:49 AM) *
This is great script mate!

Anyway, is there a way if we want to 'modified' something like, for the 1st Boss we use 'Song1' , for the 2nd Boss we use 'Song2', and so on?

Thanks smile.gif



Just use change battle bgm in the event before you start the events for the battle tongue.gif


__________________________


Current Project: Lupin - 5% Completed
Go to the top of the page
 
+Quote Post
   
TheBloodRed
post Mar 27 2008, 09:50 PM
Post #11



Group Icon

Group: Banned
Posts: 0
Type: None
RM Skill: Undisclosed




QUOTE (onimusuko @ Mar 16 2008, 03:34 AM) *
cool script! what i wanna ask is it is possible to play individual BGS and Battle music at the same time, cuz i want an eerie howl playing through the battle where the heroes fight the werewolves.


I used an ambient with them built in. It is quite creepy though. xD

Try Purgatory's Pond by Manheim Streamroller.


__________________________
Don't post porn like I did!


This Public Safety Announcement is brought to you by the leadership team of RRR.
Go to the top of the page
 
+Quote Post
   
Ratty524
post Mar 27 2008, 11:18 PM
Post #12


Level NINE-THOUSAAAAND!
Group Icon

Group: Local Mod
Posts: 1,633
Type: Artist
RM Skill: Skilled
Rev Points: 5




I was waiting for this type of script. Nice job.


__________________________
The userbar links to the right thread this time. :P



Click here for other crap

QUOTE (gamezerstudios @ Jan 18 2010, 03:29 AM) *
i don't like blogs last time i got one my desktop blew up!

ROFL!!

Dragons and Eggs! Please click :3

Weird Dragon is weird.Pretty Dragon is pretty.
Midjet Dragon is a midget.Cool Dragon is cool.
Awesome Dragon is AWESOMEOkay Dragon is... Meh
UGLY DRAGON IS UGLY! >_<... Ok seriously WTF!?
Another Pretty DragonPrettier Dragon
WOAH BADASS!Woah... Same as before. >_>
Ooh it's a godly looking dragon!Ooh, it's a dragon prettier than the other two!
... Okay seriously what the hell is this thing?


thank you Holder for the card!


Feast your eyes on the failure!


Best Thread Ever Made
Go to the top of the page
 
+Quote Post
   
Ember
post Mar 28 2008, 12:46 AM
Post #13


Level 68
Group Icon

Group: Revolutionary
Posts: 2,799
Type: Artist
RM Skill: Advanced




QUOTE (Mikano @ Mar 16 2008, 08:40 AM) *
Sweet as a nut man,

..Aren't nuts usually savoury?

This is a useful script. At first I thought "Apsh I'd never use it".. Then I read the examples. Yay biggrin.gif


__________________________
Go to the top of the page
 
+Quote Post
   
aevonhaldy
post Mar 28 2008, 07:10 PM
Post #14


Level 4
Group Icon

Group: Member
Posts: 58
Type: Developer
RM Skill: Beginner




This seems pretty dang neat; I'd like to try it. ...--But is there any way someone could post it as a TXT file for those of us who have trouble with code boxes?

Thanks.

----EDIT----

Never mind. I got it too work for me. ...Although, there still may be other unfortunate souls out there who need a text download...

--I look forward to making my battles more atmospheric! Thanks!

This post has been edited by aevonhaldy: Mar 29 2008, 11:59 AM


__________________________
[Show/Hide] VX Project

Story - 85%
Database - 55%
Scripts - 90%
Maps - 8%
Graphics - 38%
Original Music - 20%
Go to the top of the page
 
+Quote Post
   
icecold49
post Mar 30 2008, 07:30 AM
Post #15


My rmvx project is taking longer than I expected...
Group Icon

Group: Revolutionary
Posts: 116
Type: Developer
RM Skill: Advanced




Very useful script. However, did anyone else have a problem where after you copied the script and pasted it in your game the code would appear going horizontally across the script page (instead of vertically in each line)? Please help me.


__________________________
Go to the top of the page
 
+Quote Post
   
Mikano
post Mar 30 2008, 12:36 PM
Post #16


Level 2
Group Icon

Group: Member
Posts: 28
Type: Developer
RM Skill: Skilled




QUOTE (icecold49 @ Mar 30 2008, 03:44 PM) *
Very useful script. However, did anyone else have a problem where after you copied the script and pasted it in your game the code would appear going horizontally across the script page (instead of vertically in each line)? Please help me.



Open the thread in firefox, THEN copy the script, you'll find it will paste perfectly.


__________________________


Current Project: Lupin - 5% Completed
Go to the top of the page
 
+Quote Post
   
aevonhaldy
post Mar 30 2008, 02:54 PM
Post #17


Level 4
Group Icon

Group: Member
Posts: 58
Type: Developer
RM Skill: Beginner




QUOTE (icecold49 @ Mar 30 2008, 09:44 AM) *
Very useful script. However, did anyone else have a problem where after you copied the script and pasted it in your game the code would appear going horizontally across the script page (instead of vertically in each line)? Please help me.


Another way to do it is to paste it into a word DOC and then copy and paste it into your scripts page.


__________________________
[Show/Hide] VX Project

Story - 85%
Database - 55%
Scripts - 90%
Maps - 8%
Graphics - 38%
Original Music - 20%
Go to the top of the page
 
+Quote Post
   
sillypieman
post Apr 4 2008, 02:09 PM
Post #18


I's Pac Manz!
Group Icon

Group: Revolutionary
Posts: 2,418
Type: Developer
RM Skill: Advanced




Thank you SO much for this script happy.gif.


__________________________
Lucid Awakening 2 Demo released!

===================

Momiji's Gamer Blog
Get exclusive information about my RPG Maker projects, downloads to my games and demos, and other gamer reviews, opinions, rants, and whatever else is on my mind. Get inside the head of Sillypieman.
Go to the top of the page
 
+Quote Post
   
fantasy
post Apr 5 2008, 08:42 AM
Post #19


Level 2
Group Icon

Group: Member
Posts: 21
Type: Event Designer
RM Skill: Skilled




Nice script, I had to add a stop BGM event for when the victory plays, as i got an error
when my victory plays, my battle music then continued to play, not my map music, so i had to correct that, it might not be a problem for most,
but i use a side view battle and it might conflict with ur script,
nice script, as this will help me out lots smile.gif

ps, add

RPG::BGM.stop

to the line in the victory part, if you victory music switch is on, as this sorts out my above error smile.gif

please don't credit me for this fix as i don't wanna steal the spotlight of Dean, as he has done a good job!!!
I need this as am doing my 1st boss scene now smile.gif

This post has been edited by fantasy: Apr 5 2008, 08:45 AM


__________________________
Go to the top of the page
 
+Quote Post
   
steve09424
post Apr 5 2008, 07:46 PM
Post #20


Level 4
Group Icon

Group: Member
Posts: 52
Type: None
RM Skill: Undisclosed




Awesome! I need this for my game... can it work for RGSS though? I need this script for RPGXP XD

Thanks smile.gif
Go to the top of the page
 
+Quote Post
   

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 22nd May 2013 - 05:36 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker