A simple ability that changes the BGM that's played when a specific player becomes a specific boss.
This checks the boss client's Steam ID (via checking SteamID32), and if it matches whatever is defined on the CFG config, it will play the BGM set that's specified on the boss's CFG.
Ability Config:
Code:
"abilityX" // Replace X with the next available number.
{
"name" "special_changebgm_onclientmatch"
"arg1" "<steamID32> ; <steamID32>" // Add as many Steam ID's as desired, separated by semicolons, make sure "sound_bgm_<steamID32>" is also present for that particular Steam ID.
"plugin_name" "ff2_client_musicmod"
}
BGM config:
Code:
"sound_bgm_<steamID32>" // Each Steam ID specified on arg1 must have its own "sound_bgm_<steamID32>" section. Replace <steamID32> with the specified SteamID
{
"path1" "<path to BGM>" // path to BGM file
"time1" "<BGM duration (float)>" // duration for BGM (seconds)
}
If running FF2 v1.10.8 or older, the sound *MAY* be unable to be stopped correctly. There is a workaround included to overcome this issue. This bug is NOT present on v1.10.9
FF2 versions prior to v1.10.9 may sometimes throw a corrupted string which would prevent the new BGM from playing correctly.
During first round ONLY, it may or may not throw an invalid handle error
TO-DO:
Allow minutes & seconds to be specified for timeX, instead of having to specify seconds only.
A formally private plugin of mine now made public.