- What permissions do you give others to modify and/or maintain your submission?
- Modify: YES - Maintain: YES - I give permission for my entire submission to be modified by others or used in their own work. I give permission for my entire submission to be maintained by others as well.
- I made sure my file(s) follow the Submissions Guidelines
- Yes
- I named my file(s) correctly (see Filename Conventions)
- Yes
Ever wanted to add multiple character voiceline variations without creating two separate skins? This addon allows to do so! You don't even need to modify character's wad/pk3 (which may not even be an option if character is not reusable).
Console commands:
dub_list - simply list all characters that have additional dubs avaible
dub <skin> [dub] - Get list of avaible dubs for specified skin, or set a dub to skin. Use dub <skin> default if you want to return to default dub
Console variables:
dub_enabled - local variable, default value: On. If you don't want to hear custom dubs, set it to Off
dub_soundoffhack - local variable, default value: On. You see, srb2, and srb2kart lua api does not have function to stop sound that plays unattached to mobj, so in order to replace winning/losing line (which plays unattached when you win/lose), addon disables and enables ALL sounds in game to stop it and replace. If it works too bad for you, you can set it to Off, but then winning/losing lines will always be default.
If you want to add dub for existing character you'll need to create wad/pk3 with sound files, and also you'll need to add a lua file with contents:
It is possible to use DUB_XRegisterDub which supports more entries:
For adding multiple sounds for one skin sound (for example, multiple win quotes), use array of sound names instead of single name, Like so:
After that, when you are in game load KL_CharDub.lua, and then your addon with dub itself. You can load character addon before or after dub, it would work either way.
See KL_CaveStoryDubs.pk3 if you need example.
If you're creating character and want to add multiple dubs, you can add it same way, or you can bundle KL_CharDub and dub config with your character (although, i think its better to leave it as two separate addons so players can time attack, but thats just my personal opinion)
LUA_DUBS:
DUB_RegisterDub("skin_name", "dub_name", {
[SKSKWIN] = "sfx_", -- Win
[SKSKLOSE] = "sfx_", -- Lose
[SKSKPAN1] = "sfx_", -- Hurt 1
[SKSKPAN2] = "sfx_", -- Hurt 2
[SKSKATK1] = "sfx_", -- Attack 1
[SKSKATK2] = "sfx_", -- Attack 2
[SKSKBST1] = "sfx_", -- Boost 1
[SKSKBST2] = "sfx_", -- Boost 2
[SKSKSLOW] = "sfx_", -- "You are too slow!"
[SKSKHITM] = "sfx_", -- Hit 'em
[SKSKPOWR] = "sfx_", -- Gloat
})
It is possible to use DUB_XRegisterDub which supports more entries:
LUA_DUBS:
DUB_XRegisterDub("skin_name", "dub_name", {
win = "sfx_", -- Win
lose = "sfx_", -- Lose
hurt = {"sfx_", "sfx_"}, -- Hurt sounds, add as much as you want
attack = {"sfx_", "sfx_"}, -- Attack sounds
boost = {"sfx_", "sfx_"}, -- Boost 1
overtake = "sfx_", -- "You are too slow!"
hitem = "sfx_", -- Hit 'em
gloat = "sfx_", -- Gloat
spb = "sfx_", -- Chased by spb
steal = "sfx_", -- Steal item
stolen = "sfx_", -- Item got stolen
})
For adding multiple sounds for one skin sound (for example, multiple win quotes), use array of sound names instead of single name, Like so:
LUA_DUBS:
...
[SKSKWIN] = {"sfx_mydub1", "sfx_mydub2"},
...
After that, when you are in game load KL_CharDub.lua, and then your addon with dub itself. You can load character addon before or after dub, it would work either way.
See KL_CaveStoryDubs.pk3 if you need example.
If you're creating character and want to add multiple dubs, you can add it same way, or you can bundle KL_CharDub and dub config with your character (although, i think its better to leave it as two separate addons so players can time attack, but thats just my personal opinion)
Console commands:
dub_list - simply list all characters that have additional dubs avaible
dub <skin> [dub] - Get list of avaible dubs for specified skin, or set a dub to skin. Use dub <skin> default if you want to return to default dub
Console variables:
dub_enabled - local variable, default value: On. If you don't want to hear custom dubs, set it to Off
dub_soundoffhack - local variable, default value: On. You see, srb2, and srb2kart lua api does not have function to stop sound that plays unattached to mobj, so in order to replace winning/losing line (which plays unattached when you win/lose), addon disables and enables ALL sounds in game to stop it and replace. If it works too bad for you, you can set it to Off, but then winning/losing lines will always be default.