• The Eevee Expo Game Jam #10 has concluded, congratulations to all participants! Now it's time for the judges to play through the games, and you can play along to vote who deserves the community choice spotlight.
    You can check out the submitted games here!
    Play through the games and provide some feedback to the devs while you're at it!
  • Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
Resource icon

Resource BGM Memory (Resume After Battle) 1.0

boonzeet

Developer of Pokemon: Secrets of the Ages
Member
Joined
Mar 13, 2019
Posts
70
boonzeet submitted a new resource:

BGM Memory (Resume After Battle) - Allow pausing BGM and resuming from the spot it was paused at, like the main series games.

Simple script that allows remembering a BGM's position so the next time it's played it plays from that spot.

This REQUIRES FMod and will not work without it. FMod can be set up by following these instructions.

Unfortunately this means this mod is not yet compatible with MKXP, due to a bug within MKXP itself. This is being worked on.

Place this script after FMod & RGSS Linker and above Main:

Ruby:
Expand Collapse Copy
...

Read more about this resource...
 

boonzeet

Developer of Pokemon: Secrets of the Ages
Member
Joined
Mar 13, 2019
Posts
70

thepsynergist

Rookie
Member
Joined
Mar 20, 2018
Posts
5
Can confirm the above still is present. It happens when the music changes too quickly. Another bug occurs if you start a save file on a map with an undefined BGM.
 

thepsynergist

Rookie
Member
Joined
Mar 20, 2018
Posts
5
Vendily helped me resolve this one:

Code:
Expand Collapse Copy
  def bgm_fade(time) # :nodoc:
#    self.bgm_setpos(@playing_bgm.name, 0) if !@bgm_paused
  if !@bgm_paused && @playing_bgm
    @playing_bgm = nil
    Audio.bgm_fade((time*1000).floor) if !@defaultBGM
  end
  Audio.bgm_fade((time*1000).floor) if !@defaultBGM   # otherwise music will not fade back in smoothly
end

Would just need to replace the def bgm_fade(time) section with the above.
 

boonzeet

Developer of Pokemon: Secrets of the Ages
Member
Joined
Mar 13, 2019
Posts
70
Vendily helped me resolve this one:

Code:
Expand Collapse Copy
  def bgm_fade(time) # :nodoc:
#    self.bgm_setpos(@playing_bgm.name, 0) if !@bgm_paused
  if !@bgm_paused && @playing_bgm
    @playing_bgm = nil
    Audio.bgm_fade((time*1000).floor) if !@defaultBGM
  end
  Audio.bgm_fade((time*1000).floor) if !@defaultBGM   # otherwise music will not fade back in smoothly
end

Would just need to replace the def bgm_fade(time) section with the above.
Thank you to you and Vendily for noticing this and fixing it! I'll update the script now
 

SethLikesCombusken

Novice
Member
Joined
Apr 12, 2021
Posts
15
Will this work in v19.1?
apparently not, i get the following error:

[Pokémon Essentials version 19.1]
[Generation 8 Project v1.1.0]
[EBDX v1.2.3]

Exception: TypeError
Message: nil can't be coerced into Integer

Backtrace:
374:BGM Pause and Resume:14:in `*'
374:BGM Pause and Resume:14:in `bgm_play'
040:Game_System:56:in `bgm_play_internal2'
374:BGM Pause and Resume:122:in `bgm_play_internal'
040:Game_System:47:in `bgm_play'
094:Audio_Play:57:in `pbBGMPlay'
042:Game_Map:129:in `autoplay'
215:Overworld:426:in `pbAutoplayOnSave'
031:StartGame:65:in `load'
281:UI_Load:309:in `block in pbStartLoadScreen'
 

Golisopod User

Elite Trainer
Member
Joined
May 11, 2020
Posts
319
I wouldn't be surprised. Not only does the script not mention anywhere that it's compatible with v19, it also says "Unfortunately this means this mod is not yet compatible with MKXP, due to a bug within MKXP itself." and Essentials v19 uses MKXP.
Moreover, this script doesn't need to be installed in v19 because v19 already has this functionality built into the engine.
 
Back
Top