Changing auto BGM after switch

Discussion in 'RPG Maker MV' started by Bryan Rael, Mar 23, 2017.

  1. Bryan Rael

    Bryan Rael Villager Member

    Messages:
    7
    Likes Received:
    2
    First Language:
    English
    Primarily Uses:
    RMMV
    Does anybody know if you can change the background music that automatically plays once you set it in a map?
    In my game there's a night switch which triggers many changes across the entire game, basically the second half of the game. One of the things I'd like to change with that switch is the bgm for most maps. I know how to do that, but I'd like it so that it continues playing across maps with the same bgm, instead of resetting every time you change map just like it does when you have the automatic bgm.
     
    #1
  2. Kyoku

    Kyoku Veteran Veteran

    Messages:
    282
    Likes Received:
    649
    Location:
    inside a blanket
    First Language:
    English
    Primarily Uses:
    RMMV
    Never tried doing this, but try making a common event start up in the beginning and continue on forever that'll check if the night switch is on or off. For off change the BMG for not night. If on, just do the same except with night BMG. Problem being that you probably wouldn't be able to change the BMG for events in which case you should have a variable linked to the common event in the beginning and let's say if it's 0, do the switchy thing and is 1 then don't play BMG. Probably won't work, never tried, but let's hope...
     
    #2
    byronclaude and Bryan Rael like this.
  3. Bryan Rael

    Bryan Rael Villager Member

    Messages:
    7
    Likes Received:
    2
    First Language:
    English
    Primarily Uses:
    RMMV
    I tried what you said on a couple of maps using a common event that checks the map ID, then, using the common even you suggested to check for the map ID and setting the song accordingly. Seems to work quite fine, but its rather inefficient because of the way my map IDs are ordered. Thanks for the help, I'll try looking more into it to see if I can improve on what I have.
    Capture.PNG
    the common event
     
    #3
  4. byronclaude

    byronclaude Master of all things... (except the things I am no Veteran

    Messages:
    394
    Likes Received:
    181
    Location:
    Saint Louis MO, USA
    First Language:
    English
    I actually am fascinated with Kyoku's idea... I have yet to try something like that. In fact, Kyoku's post has me thinking of all kinds of possibilities involving parallel processing that would be fun to try. :smile:

    Depending on the game you are making, I have one consideration that I have used for seamless game play in projects involving day and night. Simply copy/paste the map to make a duplicate "night" map. And then alter the transfer event so that if the night switch is set to 0... it transfers you into the original "day map"... but if the night switch is on one, it instead transfers you into the "night map". I have used this in projects in cases when I wanted to alter music at night... to light torches at night... and in some cases, easily embed stories that only happen at night.

    (I of course alter any Inn so that it uses a custom event designed not only for recovery, but to transfer them to their waking point on the day map.)

    I admit it is my easy way out, and costs an extra map... ...but it is effective.
     
    #4
  5. Bryan Rael

    Bryan Rael Villager Member

    Messages:
    7
    Likes Received:
    2
    First Language:
    English
    Primarily Uses:
    RMMV
    I thought about making new maps but I'll have to almost double the number of maps that way, which didn't seem like the best idea
     
    #5
    byronclaude likes this.
  6. mogwai

    mogwai 1984 Veteran

    Messages:
    876
    Likes Received:
    576
    Location:
    Bassett Nebraska
    First Language:
    English
    Primarily Uses:
    RMMV
    You could squeeze many of those conditions into a smaller script conditional branch like...
    PHP:
    $gameMap._mapId && $gameMap._mapId 6
    or
    PHP:
    [3,4,5,7].indexOf($gameMap._mapId) !== -1
    The first example covers maps 4 and 5.
    The second example covers maps 3,4,5,7, but no 6.
    For example.
     
    Last edited: Mar 23, 2017
    #6
    Reapergurl likes this.
  7. Reapergurl

    Reapergurl Drummer Extraordinaire! xD Veteran

    Messages:
    534
    Likes Received:
    552
    Location:
    Mordhaus, Germany
    First Language:
    British English
    Primarily Uses:
    Other
    I personally use parallel processing common events, or place the parallel process event on the map if it's not a massive effect I'm looking for.

    For BGM shift, BGS shift, movement of Deus Ex Machina, you name it.

    For shifting of screen shading, it's better to not make duplicates of maps, but to use a common event.

    Unfortunately, 100% smooth transitions are really difficult to manage without external scripts/plugins.
     
    #7
  8. Diretooth

    Diretooth Lv. 23 Werewolf Veteran

    Messages:
    1,195
    Likes Received:
    435
    Location:
    Earth
    First Language:
    English
    Primarily Uses:
    RMMV
    It is much simpler and easier to change the BGM in transfer events that lead to certain maps. Say you're going from a town to a world map. Just change to the world map BGM in the event. Say you return to that town, but something happens immediately that's very serious. Just have the event change the BGM to something appropriate. You have to make sure that you didn't set the default NGM to anything. You have to leave it unchecked.
     
    #8
    Reapergurl likes this.

Share This Page