Log in
Location: Home  Community Forums  Help  Tutorial | Dynamic Dropbox 
Tutorial | Dynamic Dropbox
Page: 1 of 1
Post Reply  0 Observer
Tutorial | Dynamic Dropbox  

+ comprehensive custom music tutorial


As of 1st March 2017, a Dropbox Pro or Business account is necessary in order to continue using the Public folder until September. Free accounts don't have access to the Public folder any more and thus can't share files for use with ManiaPlanet.




I think most of you have faced the same situations as I do lately.
What to do when there's multiple choices of music to your newest map ?
Start a poll which ends up with new suggestions that you dislike ?

And what the hell is Voyager006 talking about with his new dynamic music technique which is implemented in his new maps ?

Fear not !

In this tutorial, I will show you the basic idea behind a technique that allows multiple instances of media to be available.

(It will also explain in detail how to import songs for ManiaPlanet)

That being said, you may skip some parts if you already know how to import a single song.

____________________________________________________________________________________________


How it works

Instead of having a single file for your map, upload a set of files into a pool.

The locator used in the map will point towards one of the files in the pool.

A script will shift all files so that the locator points towards a new file instead.

The result is a dynamic song pool !

Tip says:
ManiaPlanet won't search after individual updates.
Therefore, file changes will only apply when players clears the cache and the mapper deletes relevant files.

This script should do the job as good as the Launcher does.


____________________________________________________________________________________________


What you need

| ManiaPlanet with Canyon / Stadium title installed
| Dropbox locally installed
| An audio converter
| A tag editor
| Songs you would like to use

Currently for Windows only.

____________________________________________________________________________________________


1 : Choice
Alright, you better have your selection of songs ready for use in ManiaPlanet.
If not, this part will let you convert your music so they're supported by the game.
Repeat Step 1 for all songs.


- First step is to convert the songs into .ogg format.
There are plenty of programs that lets you do this, some of them being dbpoweramp (trialware) and Audacity (freeware).

The tutorial will explain how to use Audacity 2.0.3 to convert the songs.
Open one of your songs - File => Open...



o If you are experienced at editing audio, you may crop a specific part of the song to loop. NinjAstar is known for introducing this technology to custom TM music. Looping gives a nonstop, seamless feeling to the music.
o You may also turn stereo tracks into mono (don't split it, use Tracks => Stereo Track to Mono). This has a positive effect on file size, negative effect on quality.

When done, look up the File tab, and choose Export...



Change file type to Ogg Vorbis-files
Selecting Preferences will allow you to define the quality of the exported song.
The table to the lower right shows the .ogg equivalent to .mp3 CBR bitrate.




The higher quality, the bigger file you end up with, and the longer time a player need to wait for the song to download.

You may be present with tagging before exporting. More about that is explained below.

Tip says:
Never upscale bitrate or sample rate if the source audio is not high quality.
Upscaling will only take more space - the audio quality will hardly get any better.



- Edit the Vorbis Comment tag information.
Do this in Audacity, or by using tag editors such as Mp3Tag and Foobar2000. Winamp works too, but be sure to check the Advanced tab.

ManiaPlanet will use the information of 3 tags only:
TITLE
ARTIST
COMMENT

o ManiaPlanet reads the tags TITLES, ARTISTS and COMMENTS too.
However, using these causes a = character to appear in front of the tags themselves in-game.
o You are free to insert formatting into the tags
(such as $o, $w, $i, $s + colour combinations $000-$fff, the same kind you use in track names and nicks).
o If a tag is missing, ManiaPlanet will show "???" instead.
In order to leave it blank, you have to insert a space in the tag as a workaround.

Tag slot information can be accessed in Mp3Tag through View => Extended Tags...




- This step is optional, but do so if you want to avoid legal issues to some degree.
Convert the newly edited .ogg files to .mux, one of Nadeo's native formats.
It is one-way transcoded - you can't convert it back.
Perform this task using the ManiaPlanet Launcher, by entering Help => Custom data => Convert music



The .mux files can be grabbed at %userprofile%\Documents\ManiaPlanet\Media\Musics

Tip says:
Let the tags reflect the music information only !
The songs have nothing to do with your map originally ;)
Keep comments like "good luck" and "have fun" away from the song comments, and use it in a more creative way


____________________________________________________________________________________________


2 : Upload
Now it's time to upload the .mux files to the cloud.
There are several choices, but you need the local Dropbox installer for this particular technique.

When installed, upload them to your Public folder.
You can do this on the webpage or by placing the files in your local Dropbox folder (%userprofile%\Dropbox).
Creating a folder inside the Public folder for the purpose of dynamic music or a specific map isn't a bad idea either.

Delete these .mux files inside %userprofile%\Documents\ManiaPlanet\Media\Musics once they're uploaded.

Tip says:
Ask anyone who uses Dropbox for an invite link. This earns both you and your friend 500 MB of extra space (y)


____________________________________________________________________________________________


3 : Rename
Now the magic begins. Rename all the uploaded files so they appear as

%mapname%.mux
%mapname%1.mux
%mapname%2.mux
%mapname%3.mux
etc.


Replace %mapname% with your own, unique map name (remove spacebars and special characters in the filename)



Tip says:
Spacebars appears in addresses as %20 (because it's lined 20 in HEX in the ASCII table).
Such strings used to make links invalid back in the old days.


____________________________________________________________________________________________


4 : Locator
Right click on the primary file (%mapname%.mux) and select Copy public link

Open NotePad and paste the link.

The following bolded parts can be removed and the link will still work: https://dl.dropboxusercontent.com/
Sometimes links won't work with a secure connection, so use http if the other option fails.

Once done, proceed to the saving process by directing yourself to File => Save as...



Note that you need to change File type from Text files (*.txt) to All (*.*) and then set the .loc extension in the file name.
The file name should look like %mapname%.mux.loc
When ready, save it to %userprofile%\Documents\ManiaPlanet\Media\Musics




If you joined Dropbox after 4th October 2012, your Public folder rights may be restricted.
In order to make your files supported by ManiaPlanet, share and copy the download link - which may look like this

www.dropbox.com/s/v6ml2bpq9i2wt2t/%mapname%.mux

change it to

dl.dropbox.com/s/v6ml2bpq9i2wt2t/%mapname%.mux

Copy the link, and continue the steps above.

Tip says:
Keep file names and folder directories simple, clean and organized -
makes it a lot easier to edit and replace uploaded files (y)
Remember that you can't edit uploaded file names or folder names when the songs are in use.


____________________________________________________________________________________________


5 : Cycle
Copy the content of this template script into Notepad.

Now, open Explorer and locate the uploaded files in your local Dropbox folder (%userprofile%\Dropbox\Public)
Copy the folder destination by clicking at the address bar and do CTRL + C



Back in Notepad, overwrite this part of the script with the link in your clipboard:



Do so with all the other links too.
Overwrite %mapname% with the actual file name.
Replace .mux with .ogg if you didn't transcode your music in Step 1.

Tip says:
You can test if the links work by pasting the final link in the address menu in Explorer.
Then you should be prompted to open %mapname%.mux


The example works with 10 songs in the pool.
In case you want to use fewer/more songs, you may need to edit the script a little.

To increase number of songs:
- Copy line 12 (second last) and paste it below on a new line (Carriage Return).
- Shift both numbers one unit up.
- Shift the last number of the bottom line one unit up.
- Repeat process until you reach the number of songs wanted

To decrease number of songs:
- Delete line 12.
- Shift the last number of the bottom line one unit down.
- Repeat process until you reach the number of songs wanted

You may duplicate the rename commands to include more song pools to use in other maps simultaneously.

Example:


Now the script is ready (y)

Repeat the saving process in Step 4, but change the file name extention to .bat



Tip says:
A shortcut will still work if it points to a deleted, moved or renamed file in Dropbox.
It simply directs you to the cached file.


____________________________________________________________________________________________


6 : Routine
You can also determinate how frequent the songs change.
It can be done manually by making a shortcut to the batch-script at your Desktop, or automatically - sort of.

If you want the script to be run each time you power up your computer, put the script in the Startup folder:
User specific: %appdata%\Microsoft\Windows\Start Menu\Programs\Startup
Independent: %programdata%\Microsoft\Windows\Start Menu\Programs\Startup

Tip says:
You can deactivate it temporarily by typing msconfig into the Start Menu search bar, press Enter and look up the Startup tab.


Scheduled Tasks offer a more specific routine job.
Type taskschd.msc into the Start Menu search bar, press Enter and create a New Basic Task.
This wizard will let you chose which time of the day and how frequent the script should be run.

[1] Name the task
and eventually describe it


[2] Set the trigger
by selecting how or when the script should be run (set to your own liking)


[2a] Specify the trigger
as you set the exact date and time for the trigger (set to your own liking)


[3] Set the action
tell what the task should do


[3a] Specify the action
mount the script to the task


[4] Complete
simply verify your details


You may add more triggers / actions and modify conditions in the Properties dialog.

____________________________________________________________________________________________


7 : Discard
Letting players discard the technique is made possible by an alternative method. It can be run individually or together with Dynamic Dropbox.

You don't need Dropbox specifically for this, either.

To make it possible, you should:
o duplicate the music files, or
o upload them to a secondary host

If using Dropbox, allign the new files like this:
Dropbox\Public\...\%mapname%.mux

e.g.
Dropbox\Public\Dynamic\LoveisAnOcean\Malacca.mux
Dropbox\Public\Dynamic\TakeMyTime\Malacca.mux


Shortly said, each file name must be equal to the one stated in the locator.

Put a link to each song in the Author Comment, and let players download one of them to
%userprofile%\ManiaPlanet\Media\Musics

This will leave a player with a static song choice, even after clearing the cache.

____________________________________________________________________________________________


All that remains now is to restart the game and select the %mapname%.mux file in your map:
Advanced Customization Tools => Choose Custom Music



Or, if you're sneaky, the files are already set up to work in a previously released map.

You can do this with other things such as images, sounds, signs and mods too ! :cool:

Tip says:
Shadow computings will remain, even if signs and mods change externally


____________________________________________________________________________________________


Sourced from

eyebo | A word about Locators + Dropbox Links
Hans Holo | Custom Music Tutorial

Dropbox logo © the Dropbox Team

____________________________________________________________________________________________


Although it's not 100 % supported, my bet is that the functionality will still be good enough for a try.
Maybe such a feature will be implemented in the future ? (y)



Happy mapping
Last edited by Voyager006,
Moped Racer
Location: NO
 
Great idea! Great tutorial! (y)
Beetle Racer
Location: DE
 
Cool idea!!! Well written tutorial! Thanks Voyager!
Site Leader
Location: US
Page: 1 of 1 Post Reply
© ManiaExchange (mania-exchange.com, mania.exchange) 2024. • Terms and ConditionsPrivacy Policy Top  •  Report a Problem