SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > Kart Releases & Mods > Miscellaneous

Reply
 
Thread Tools
Encore Mode Music Details »»
Encore Mode Music
Version: 1.1, by Steel Titanium Steel Titanium is offline
Developer Last Online: Mar 2019

Category: Version: SRB2 Kart Rating: (1 votes - 3.00 average)
Released: 12-29-2018 Last Update: Never Installs: 1
Scripts Re-Useable Content

So I bet you're wondering... "What the heck is this? How do I use it?" well I'm going to tell you now

It's a framework which lets you use per-map encore specific level theme. In order to keep the file size to a reasonable size, only two tracks are supported, Daytona Speedwway and Plesure Castle, but you can support for other maps if you want.

Documention:

Spoiler:

Lua Functions:
EMM_MapIsSupported(int mapnum) - Checks if the map specified already exists within the table containing all the supported maps.
EMM_AddMusic(int mapnum) - Adds the specified map number to the table containing all the supported maps. It's important you know the extended map number of your map before using this. So you'd use 183 instead of CB. For a list of extended map numbers, see https://wiki.srb2.org/wiki/List_of_extended_map_numbers.

===Adding support for your map===
This framework was designed so adding support for your map is easy to understand. For both of the example songs in the wad, I used Audacity to lower the speed by -10%. But you can use a different song entirely if you want.

Prerequisites:
Make sure your music lump is named correctly and imported to your WAD file. The music lump should be named O_KR**EM, ** being your map number.

Coding support for the map:
Code:
if emm_maps // first check to see if its added at the time of this wads addition
 end
 addHook("MapLoad", function() // else check whenever the map loads
     if not emm_maps then return end
 end)
From there it's as simple as using the function listed above to add your map to the list of supported maps.

Code:
// Support for KL_EncoreModeMusic
 if emm_maps // First check to see if its added at the time of this wads addition
     EMM_AddMusic(gamemap)
 end

 addHook("MapLoad", function() // Else check whenever the map loads
     if not emm_maps then return end
     EMM_AddMusic(gamemap)
 end)
But for map packs you could use a for loop and add maps in a range:
Code:
// support for KL_EncoreModeMusic
 if emm_maps // first check to see if its added at the time of this wads addition
     for i = 1, 5
         EMM_AddMusic(i)
     end
 end

 addHook("MapLoad", function() //else check whenever the map loads
     if not emm_maps then return end

     for i = 1, 5
         EMM_AddMusic(i)
     end
 end)
Just be sure to remember to use map numbers for the function, this is important or things will go horribly wrong.
Also there should be the first code block example included as a Lua file below as well, if you cant copypaste for whatever reason.

Once that's done, give yourself a pat on the back, as your map is now supported. If there's any questions you are free to contact me here on the MB or Discord.

Download Now

File Type: lua LUA_EMM.lua (225 Bytes, 81 views)
File Type: zip KL_EncoreModeMusic_v1.1.zip (2.32 MB, 94 views)

Supporters / CoAuthors

Show Your Support

  • The author of this addon has given explicit permission for its content to be re-used and/or reproduced.

Comments
Old 12-29-2018   #2
D00D64
Worst Ranked 'Kart Player
Moderator
 
D00D64's Avatar
Default

Man, just... slowing down the music? Not even like, picking one of the many possible Daytona USA tunes, or an Initial D track or something? That's disappointing. Oh well, the focus of the wad is clearly on Encore Mode music support for custom levels, and as a resource for that, it does the job right. Welcome to releases!
D00D64 is offline   Reply With Quote
Old 12-29-2018   #3
Steel Titanium
 
Steel Titanium's Avatar
Default Version 1.1

Updated the script to fix an small issue found.
Steel Titanium is offline   Reply With Quote
Old 02-08-2019   #4
JetHog
Flyster's Buddy
 
JetHog's Avatar
Default How Can You Do The Change Music Button

How Can You Do The Change Music Button
__________________
I got jetpacks on my backs!
JetHog is offline   Reply With Quote
Old 02-08-2019   #5
MK.exe
The one and only!
 
MK.exe's Avatar
Default

Well d00d, slowing down music is actually a genre of music Called Vaporwave.

Funny how it has its own genre :S
__________________
Considered Milestones:
Hit a 180 Rail shot
1st person to have a map in releases with Slopes
MK.exe is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:41 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.