Help with Blizz-ABS battle music common event.

Started by Phasedscar, August 06, 2008, 10:17:32 pm

Previous topic - Next topic

Phasedscar

Ok, I'm trying to make a common event that will switch the backround music depending if I'm in the Blizz-ABS ABSEAL range.

"Disable ABS controls: when no  enemies are within ABSEAL range"

Basically I'm trying to set up battle music for use with Blizz-ABS.  Blizzard already mentioned that "$game_temp.in_battle" should set up the condition if the ABSEAL range is on.  So I've made the following eventing script.


@>Conditional Branch: script: $game_temp.in_battle
  @>Conditional Branch: Variable [0009]battle music == 0
      @>Memorize BGM/BGS
      @>Change Variable: [0009]battle music = 1
      @>
    :  branch end
  @>Fade out BGM: 4 sec
  @>wait 20 frames
  @>Play BGM: '005-boss01', 85, 100
  @>Label: battle
  @>Conditional Branch: script $game_temp.in_battle
      @>Wait 20 frames
      @>Jump to Label: battle
      @>
    :  Else
      @>Jump to Label: BGM
      @>
    :  Branch End
  @>
:  Else
  @>Label: BGM
  @>Fade out BGM: 4 sec
  @>wait 20 frames
  @>Restore BGM/BGS
  @>Control Variable: [0009]battle music = 0
  @>Label: BGM2
  @>Conditional Branch: script: $game_temp.in_battle
     @>
    :  Else
     @>Wait: 20 Frames
     @>Jump to Label: BGM2
    :  Branch End
  @>
:  Branch End
@>


It works in changing the battle music however it wont reset to the memorized BGM, meaning it's probably looping somewhere I don't want it to.  I've double checked the event pathing and I just can't quite figure out what's wrong.  Also it starts playing the battle music whenever I activate an event such as teleports.

Also, in case you're wondering why I have conditionals with Jump to Labels, it's so that the music will keep playing unless the condition (in this case being in battle) are met, and then it should change.  Or vice versa.
Spoiler: ShowHide
My own game project & My resource workshop! (respectively)
http://forum.chaos-project.com/index.php?topic=608.0 http://forum.chaos-project.com/index.php?topic=682.0



What that is? Affection area for flails. - Blizz-ABS, the ultimate ABS

The pictures in your signature may altogether be no more than 200kB. The height must not exceed 200 px and the width must not exceed 800 px. Altogether they may take up an area of 160000 px2. Every signature not matching this criteria is a subject of the moderator team to remove and leave this rule as message in your signature.

Blizzard

August 07, 2008, 07:05:16 am #1 Last Edit: August 07, 2008, 07:08:12 am by Blizzard
Hm... I just remembered that you need something more than just the in_battle flag since it's turned off during events. Try this

@>Conditional Branch: script: $game_temp.in_battle && !$game_system.map_interpreter.running? && !$game_temp.message_window_showing
  @>Conditional Branch: Switch [0009]battle music == OFF
    @>Memorize BGM/BGS
    @>Fade out BGM: 4 sec
    @>wait 20 frames
    @>Play BGM: '005-boss01', 85, 100
    @>Change Switch: [0009]battle music = ON
    @>
  :  branch end
:  Else
  @>Conditional Branch: Switch [0009]battle music == ON
    @>Fade out BGM: 4 sec
    @>wait 20 frames
    @>Restore BGM/BGS
    @>Control Switch: [0009]battle music = OFF
    @>
   :  Branch End
  @>
:  Branch End
@>


Don't forget: In events 20 frames = 1 second so you might wanna change the fade out time or the wait time. You have to keep in mind that parallel processes iterate over and over meaning they start from the beginning and are interrupted only at wait commands.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Phasedscar

I'll try that out Blizz, thanks  :)

The reason it's 20 frames instead of 80 is because it allows for a nice blend of music.  You don't even notice the switch up.

The only problem I see with what's set up is that once it loops back through the Memorized BGM/BGS will be that of the battle music and not the original backround music that was there before.  That's why I had those odd Conditional Branches with the  go to labels and wait commands (so that it checks the condition every second without rewriting the Memorized BGM, ensuring that I have the right music play again when needed)

Thanks again Blizzard, I'll try this out tomorrow when I have time to play with it.
Spoiler: ShowHide
My own game project & My resource workshop! (respectively)
http://forum.chaos-project.com/index.php?topic=608.0 http://forum.chaos-project.com/index.php?topic=682.0



What that is? Affection area for flails. - Blizz-ABS, the ultimate ABS

The pictures in your signature may altogether be no more than 200kB. The height must not exceed 200 px and the width must not exceed 800 px. Altogether they may take up an area of 160000 px2. Every signature not matching this criteria is a subject of the moderator team to remove and leave this rule as message in your signature.

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Shadonking

some one should make a demo with an working event in it becuase iv tryied to get it to work but the battle bgm plays even when there is not a battle or enemy in the map.





Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Shadonking

How, do i do this in the abs script or in the events.





Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Aqua

Quote from: Blizz-ABS Manual: 2.1. Basic Configuration
2.1.5. Disable ABS
Determines when the ABS controls should be disabled. There are 4 different options:
never; Blizz-ABS controls are always active
disable in maps without enemies; disables Blizz-ABS controls in maps where no enemies have been added
when all enemies dead; disables Blizz-ABS controls as soon as the map has no more enemies (i.e. when all enemies are killed)
when no enemies within ABSEAL range; disables Blizz-ABS if no enemies are within the updating range of ABSEAL
Note that disabling Blizz-ABSEAL will also affect the last option.

Shadonking

September 02, 2008, 12:59:42 pm #8 Last Edit: November 26, 2008, 08:25:40 am by Shadonking
ok.

what number should it be becuase iv tried 0-4 but non seem to have the affect i need.

edit

here is the event i done, is this ok

Spoiler: ShowHide


i cant get it to play when in range, does it need the extra bit of code on the enemy events to work becuase all i did was the enemy ID.






Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Blizzard

If you use number 3, the battle music will start playing when enemies are within the range of ABSEAL which is the screen + "the Factor option" square beyond. -_-
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Shadonking

iv done that but when the common event trigger is on then is plays the battle music anyway.  :???:

i dont think the conditional branch is correct with the script becuase it never seems to work. at always lets the procces past it.





Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Blizzard

You have to turn off the switch at the end of ANY auto-starting event and/or erase it or it will freeze your game.
-_-
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Shadonking

i know this,  :<_<:

i have it on parralel procces.

i was talking about this conditional brach

@>Conditional Branch: script: $game_temp.in_battle && !$game_system.map_interpreter.running? && !$game_temp.message_window_showing

it always seems to be on so it never goes to the else part of it. so no matter what ,it plays the the battle music.





Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Blizzard

September 04, 2008, 10:06:39 am #13 Last Edit: September 04, 2008, 10:14:15 am by Blizzard
It's on as long as no event is running, no message window is showing and as long as you are "in battle". "in battle" is determined by "Disable ABS Mode". Have you disabled Blizz-ABSEAL in those maps by any chance? And are you using a normal value for the ABSEAL Factor (i.e. 2 or 3)?
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Shadonking

all iv done is put disable abs mode as 3 and thats it.

what do i have to do to abseal or is that all that needs to be done.





Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Blizzard

Try this in a parallel process event:

$game_system.hud = $game_temp.in_battle


It will remove the HUD when you not "in battle". Use it to test whether the "in battle" flag is set right. It should disappear when enemies are outside of the screen and a bit beyond.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Aqua

Blizz, I tried doing that... and the HUD went away completely even if I'm in Arshes' face, pwning him and after he's dead.

Blizzard

Aqua, that happens because the "in battle" flag is turned off during event execution. I forgot about that. -_- In any case I found the bug. Line 5052-5055 should be

  def battlers_in_range
    return ($game_map.battlers.find_all {|battler|
        !battler.dead? && battler.update?}).size
  end


The .size should be removed:

  def battlers_in_range
    return ($game_map.battlers.find_all {|battler|
        !battler.dead? && battler.update?})
  end


-_-

Between line 6014 and 6015 should a line like this be added:

    $game_switches[ID] = $game_temp.in_battle


This will trigger a switch when you are in battle and you can use it instead of the condition "$game_temp.in_battle" in the scripted condition. That should work.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Shadonking

iv tried what you just sayed but now the music wont play.

will you make these changes in the blizz-abs update just in case i did it wrong.(i dont think i did)

the only problem is that the switch i chose wont turn on. where you put [ID] i put [003]






Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Blizzard

Not [003], only [3] without the leading zeroes. And I actually did upload a fixed version.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Shadonking

ok i just downloaded the blizz-abs agian and iv tried looking where about the $game_switches[ID] = $game_temp.in_battle needs to be.

because between line 6014 and 6015 is a comment section.





Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Aqua

Part 3 Lines 5993-6015

  #----------------------------------------------------------------------------
  # test_in_battle
  #  Sets the in_battle flag to control game flow.
  #----------------------------------------------------------------------------
  def test_in_battle
    # if master override is being used
    if $game_system.blizzabs != nil
      # enforce user's setting
      $game_temp.in_battle = $game_system.blizzabs
    # if event code is being executed or message window is being displayed
    elsif $game_system.map_interpreter.running? || $game_temp.message_window_showing
      # disable Blizz-ABS controls
      $game_temp.in_battle = false
    else
      # depending on chosen DISABLE_ABS_MODE in battle or not in battle
      $game_temp.in_battle = case BlizzABS::Config::DISABLE_ABS_MODE
      when 0 then true
      when 1 then ($game_system.battlers_number > 0)
      when 2 then ($game_map.battlers.size > 0)
      when 3 then ($game_system.battlers_in_range.size > 0)
      end
    end
  end


I don't see how that is a comment section...

Blizzard

Yeah, it should be between the last two ends in that piece of script.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Shadonking

i was looking in part 2  :^_^':

ok iv got it working now yepeeee  :D

it plays when you enter the map with enemyies but just stops all music when there all dead and i have it on disable abs mode 3





Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Shadonking

iv tryied it on a 50 by 100 map and i put the enemy at one side of the map and the starting position at the other but it still plays. :huh:





Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Blizzard

And you are sure that you have either downloaded the fixed version or applied the fix yourself and added the code with the switch which you then use instead of $game_temp.in_battle in that scripted condition?
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Shadonking

yep im sure, i'll send screen shots if you want of the battle music common event.

i have updated the abs script and iv placed the code to make the swicth work. (and it does)

iv put the disable abs mode as 3.

by the way the game keeps freezing now after i kill all the enemyies in a map, wierd.





Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Aqua

Do you have the common event on Autorun?

That's why it's freezing...
Use Parallel Process

Shadonking

September 04, 2008, 07:24:53 pm #29 Last Edit: September 04, 2008, 07:34:58 pm by shadonking
nope its on Parallel Process.

it only freezes after all the enemyies are dead, i dont think the events effect it by freezeing.

i'll disbale them and teel you if it stops freezing

edit

i deleted and disable all my events and it still froze (dont worry about the loss of events i made backups).

it was working yesterday and i havent had any new scripts added for a week so they cant be the problem and it was still freezing before i got the update of the abs script today.





Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Blizzard

Put a demo together with the problem, upload it on sendspace and post the download link here. You're starting to get more and more weird errors. -_-
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Shadonking

September 04, 2008, 08:47:54 pm #31 Last Edit: September 05, 2008, 04:05:51 pm by shadonking
i know, trust it to happen to me.

i'll pm you the demo in a few secs

edit

it may take a bit longer, i'll send it tommorow

edit

all done and working great





Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Shadonking

sorry about the necro post but it is needed.

i just got v2.01 and iv lost the condition that turns the switch on '$game_switches[ID] = $game_temp.in_battle' which means my battle music isnt working. where in your abs do you put the switch to get it working.






Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Shadonking






Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Blizzard

I just want to add that Blizz-ABS now supports extra condition checks where you can check if any enemy can actually perceive the player. It's an interesting alternative.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Shadonking

that would atcualy be much better, thanks blizz.

sorry for asking before checking but is the condition to check for in the manual





Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Blizzard

Oh, no, no. When this thread was started, there were no conditions. I added them just recently.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Shadonking

cool, cant wait to update to set it up for that condition





Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0