So say you have a song in your pack, and you want it to be used for more than one situation. Making a duplicate of the file is an option, but it's rather heavy-handed. No need to waste that hard disk space on something so trivial, instead you can make a redirection file!
In this example, we'll say that (for whatever reason) you want the snowy biome type song to be the same as the sandy biome type song. First, you get our song in here and name it one or the other. Let's call it BiomeType(Sandy). Then, you need to make a new text file and name it BiomeType(Snowy). You should have something like this:
Open BiomeType(Snowy) and write the following:
Save and close. Now when ActualMusic tries to play BiomeTypeSnowy, it will find that file, and redirect it to the filename provided so long as it's in the same folder.
Although this was originally the only function for redirection files ( hence their name ), this now just scratches the surface of what they can do. Below is a list of redirect commands and how they can be used.
List of Redirect Commands
|<filename, without .mp3/.ogg>|| Instructs the mod to load the mp3 with that name instead.|
Allows two triggers to share the same song.
It must redirect to a song, NOT another redirect file!
redirectFile is for versions before 3.0. 3.0 can use both, but redirectFile is depreciated and will be removed in later versions, so please use redirectSong.
|redirectFolder:||<folder name, relative to the main music dir>|| Instructs the mod to load from the specified folder instead.|
Allows two AltDay folders to share a song.
|priority:||<a number other than 0>|| The song will have its priority increased or decreased.|
Every 10 points added to priority will move it up one row in the priority ordering.
( Refer to the ActualMusic Reference Guide ).
|playOnce||(None)|| The affected song will only play one time.|
It won't try to play again until the trigger is unset for long enough.
|playThrough||(None)||The affected song will play through entirely before any other song is allowed to play.|
|lifetime:||<maximum song lifetime in seconds>|| Defines the maximum allowed time the song is allowed to remain idle before being purged.|
Set this low for songs you would prefer to start from the beginning each time they're played.
|leadIn:||<song lead-in time in ticks>||See the 'timing' section for details.|
|leadOut:||<song lead-out time in ticks>||See the 'timing' section for details.|
|fade:||<song fade time in ticks>||See the 'timing' section for details.|
|chances:||<a number equal to or greater than 1>|| For songs with random variants, this specifies the number of chances it has to be chosen.|
For example, setting chances to 19 for Bed and leaving Bed alone, Bed only has a 1 in 20 chance to play.
Rows marked red are upcoming features.
Every trigger has a built-in time set for lead-in/out and fading. Together, these three values determine how long of a pause there is when switching from one song to another.
Lead time is the delay between a new song being decided and the current song fading out. It's calculated from the lead-out time of the current song and the lead-in time of the next song accordingly:
- If both lead-in and lead-out are positive, the longer of the two takes priority.
- If one is negative but the other is positive, the negative value is made positive and takes priority.
- If both lead-in and lead-out are negative, the shorter of the two takes priority.
Fade time is the duration that the currently playing song fades out for. It's decided by the new song's fade time.
Here are a few examples of this in practice, using the default values.
- Underground has a lead-out time of 0, and BiomeType has a lead-in time of 60 and a fade of 60. When changing from Underground to BiomeType(Forest), there will be a 3 second delay before fading out Underground for 3 more seconds, and then BiomeType(Forest) will begin playing.
- Title has a lead-out time of 60, and Snow has a lead-in time of 20 and a fade of 60. When changing from Title to Snow, there will be a 3 second delay before fading out Title for 3 more seconds, and then Snow will begin playing.
- NetherFort has a lead-out time of 0, and LowHP has a lead-in time of 0 and a fade of 0. When changing from NetherFort to LowHP, there will be no delay or fade out before switching to LowHP.
- LowHP has a lead-out of -20, and Village has a lead-in time of 60 and a fade of 60. When changing from LowHP to Village, there will be a 1 second delay before fading out LowHP for 3 seconds, and then Village will begin playing.
If you place a file in a music folder called "All.txt" and inside it write a single path to any directory on your computer, all attempts to locate music made by the song loader will happen in the folder specified. This functionality exists for when you have multiple profiles that all use ActualMusic, so you don't need to have multiple copies of all your song packs eating up space on your hard disk.