vocal barks - Fully customizable noises for talking!
This commit is contained in:
@@ -0,0 +1,98 @@
|
||||
//Datums for barks and bark accessories
|
||||
|
||||
/datum/bark
|
||||
var/name = "Default"
|
||||
var/id = "Default"
|
||||
var/soundpath //Path for the actual sound file used for the bark
|
||||
|
||||
// Pitch vars. The actual range for a bark is [(pitch - (maxvariance*0.5)) to (pitch + (maxvariance*0.5))]
|
||||
// Make absolutely sure to take variance into account when curating a sound for bark purposes.
|
||||
var/minpitch = 0.6
|
||||
var/maxpitch = 1.4
|
||||
var/minvariance = 0.1
|
||||
var/maxvariance = 0.4
|
||||
|
||||
// Speed vars. Speed determines the number of characters required for each bark, with lower speeds being faster with higher bark density
|
||||
var/minspeed = 2
|
||||
var/maxspeed = 8
|
||||
|
||||
// Visibility vars. Regardless of what's set below, these can still be obtained via adminbus and genetics. Rule of fun.
|
||||
var/list/ckeys_allowed
|
||||
var/ignore = FALSE //Controls whether or not this can be chosen in chargen
|
||||
|
||||
|
||||
// So the basic jist of the sound design here: We make use primarily of shorter instrument samples for barks. We would've went with animalese instead, but doing so would've involved quite a bit of overhead to saycode.
|
||||
// Short instrument samples tend to sound surprisingly nice for barks, being able to be played in rapid succession without being outright obnoxious.
|
||||
// It isn't just instruments that work well here, however. Anything that works well as a stab? Short attack, no sustain, a decent amount of release? Also works extremely well for barks.
|
||||
|
||||
/datum/bark/mutedc2
|
||||
name = "Muted String (Low)"
|
||||
id = "mutedc2"
|
||||
soundpath = 'sound/instruments/synthesis_samples/guitar/crisis_muted/C2.ogg'
|
||||
|
||||
/datum/bark/mutedc3
|
||||
name = "Muted String (Medium)"
|
||||
id = "mutedc3"
|
||||
soundpath = 'sound/instruments/synthesis_samples/guitar/crisis_muted/C3.ogg'
|
||||
|
||||
/datum/bark/mutedc4
|
||||
name = "Muted String (High)"
|
||||
id = "mutedc4"
|
||||
soundpath = 'sound/instruments/synthesis_samples/guitar/crisis_muted/C4.ogg'
|
||||
|
||||
/datum/bark/banjoc3
|
||||
name = "Banjo (Medium)"
|
||||
id = "banjoc3"
|
||||
soundpath = 'sound/instruments/banjo/Cn3.ogg'
|
||||
|
||||
/datum/bark/banjoc4
|
||||
name = "Banjo (High)"
|
||||
id = "banjoc4"
|
||||
soundpath = 'sound/instruments/banjo/Cn4.ogg'
|
||||
|
||||
/datum/bark/bikehorn
|
||||
name = "Bikehorn"
|
||||
id = "horn"
|
||||
soundpath = 'sound/instruments/bikehorn/Cn4.ogg'
|
||||
ignore = TRUE // Genetics only. This is an unusually quiet sound, but genetics should be allowed to have some !!fun!!
|
||||
|
||||
/datum/bark/bwoink
|
||||
name = "Bwoink"
|
||||
id = "bwoink"
|
||||
soundpath = 'sound/effects/adminhelp.ogg'
|
||||
ignore = TRUE // Also genetics only. Emergent heart attack generation
|
||||
|
||||
/datum/bark/squeaky
|
||||
name = "Squeaky"
|
||||
id = "squeak"
|
||||
soundpath = 'sound/items/toysqueak1.ogg'
|
||||
maxspeed = 4
|
||||
|
||||
/datum/bark/beep
|
||||
name = "Beepy"
|
||||
id = "beep"
|
||||
soundpath = 'sound/machines/terminal_select.ogg'
|
||||
maxpitch = 1 //Bringing the pitch higher just hurts your ears :<
|
||||
maxspeed = 4 //This soundbyte's too short for larger speeds to not sound awkward
|
||||
|
||||
/datum/bark/chitter
|
||||
name = "Chittery"
|
||||
id = "chitter"
|
||||
minspeed = 6 //This is a pretty long sound
|
||||
soundpath = 'sound/items/Ratchet.ogg'
|
||||
|
||||
/datum/bark/synthetic_grunt
|
||||
name = "Synthetic (Grunt)"
|
||||
id = "synthgrunt"
|
||||
soundpath = 'sound/misc/bloop.ogg'
|
||||
|
||||
/datum/bark/synthetic
|
||||
name = "Synthetic (Normal)"
|
||||
id = "synth"
|
||||
soundpath = 'sound/machines/uplinkerror.ogg'
|
||||
|
||||
/datum/bark/bullet
|
||||
name = "Windy"
|
||||
id = "bullet"
|
||||
maxpitch = 1.6 //This works well with higher pitches!
|
||||
soundpath = 'sound/weapons/bulletflyby.ogg' //This works... Surprisingly well as a bark? It's neat!
|
||||
+23
-7
@@ -153,6 +153,10 @@
|
||||
if(!GLOB.taur_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/taur, GLOB.taur_list)
|
||||
L[DNA_TAUR_BLOCK] = construct_block(GLOB.taur_list.Find(features["taur"]), GLOB.taur_list.len)
|
||||
L[DNA_BARK_SOUND_BLOCK] = construct_block(GLOB.bark_list.Find(H.vocal_bark_id), GLOB.bark_list.len)
|
||||
L[DNA_BARK_SPEED_BLOCK] = construct_block(H.vocal_speed * 4, 16)
|
||||
L[DNA_BARK_PITCH_BLOCK] = construct_block(H.vocal_pitch * 30, 48)
|
||||
L[DNA_BARK_VARIANCE_BLOCK] = construct_block(H.vocal_pitch_range * 48, 48)
|
||||
|
||||
for(var/i=1, i<=DNA_UNI_IDENTITY_BLOCKS, i++)
|
||||
if(L[i])
|
||||
@@ -248,19 +252,19 @@
|
||||
if(DNA_HAIR_STYLE_BLOCK)
|
||||
setblock(uni_identity, blocknumber, construct_block(GLOB.hair_styles_list.Find(H.hair_style), GLOB.hair_styles_list.len))
|
||||
if(DNA_COLOR_ONE_BLOCK)
|
||||
sanitize_hexcolor(features["mcolor"], 6)
|
||||
setblock(uni_identity, blocknumber, sanitize_hexcolor(features["mcolor"], 6))
|
||||
if(DNA_COLOR_TWO_BLOCK)
|
||||
sanitize_hexcolor(features["mcolor2"], 6)
|
||||
setblock(uni_identity, blocknumber, sanitize_hexcolor(features["mcolor2"], 6))
|
||||
if(DNA_COLOR_THREE_BLOCK)
|
||||
sanitize_hexcolor(features["mcolor3"], 6)
|
||||
setblock(uni_identity, blocknumber, sanitize_hexcolor(features["mcolor3"], 6))
|
||||
if(DNA_MUTANTTAIL_BLOCK)
|
||||
construct_block(GLOB.mam_tails_list.Find(features["mam_tail"]), GLOB.mam_tails_list.len)
|
||||
setblock(uni_identity, blocknumber, construct_block(GLOB.mam_tails_list.Find(features["mam_tail"]), GLOB.mam_tails_list.len))
|
||||
if(DNA_MUTANTEAR_BLOCK)
|
||||
construct_block(GLOB.mam_ears_list.Find(features["mam_ears"]), GLOB.mam_ears_list.len)
|
||||
setblock(uni_identity, blocknumber, construct_block(GLOB.mam_ears_list.Find(features["mam_ears"]), GLOB.mam_ears_list.len))
|
||||
if(DNA_MUTANTMARKING_BLOCK)
|
||||
construct_block(GLOB.mam_body_markings_list.Find(features["mam_body_markings"]), GLOB.mam_body_markings_list.len)
|
||||
setblock(uni_identity, blocknumber, construct_block(GLOB.mam_body_markings_list.Find(features["mam_body_markings"]), GLOB.mam_body_markings_list.len))
|
||||
if(DNA_TAUR_BLOCK)
|
||||
construct_block(GLOB.taur_list.Find(features["taur"]), GLOB.taur_list.len)
|
||||
setblock(uni_identity, blocknumber, construct_block(GLOB.taur_list.Find(features["taur"]), GLOB.taur_list.len))
|
||||
if(species.mutant_bodyparts["taur"] && ishuman(holder))
|
||||
var/datum/sprite_accessory/taur/T = GLOB.taur_list[features["taur"]]
|
||||
switch(T?.taur_mode)
|
||||
@@ -272,6 +276,14 @@
|
||||
H.physiology.footstep_type = FOOTSTEP_MOB_CRAWL
|
||||
else
|
||||
H.physiology.footstep_type = null
|
||||
if(DNA_BARK_SOUND_BLOCK)
|
||||
setblock(uni_identity, blocknumber, construct_block(GLOB.bark_list.Find(H.vocal_bark_id), GLOB.bark_list.len))
|
||||
if(DNA_BARK_SPEED_BLOCK)
|
||||
setblock(uni_identity, blocknumber, construct_block(H.vocal_speed * 4, 16))
|
||||
if(DNA_BARK_PITCH_BLOCK)
|
||||
setblock(uni_identity, blocknumber, construct_block(H.vocal_pitch * 30, 48))
|
||||
if(DNA_BARK_VARIANCE_BLOCK)
|
||||
setblock(uni_identity, blocknumber, construct_block(H.vocal_pitch_range * 48, 48))
|
||||
|
||||
//Please use add_mutation or activate_mutation instead
|
||||
/datum/dna/proc/force_give(datum/mutation/human/HM)
|
||||
@@ -491,6 +503,10 @@
|
||||
update_body_parts()
|
||||
if(mutations_overlay_update)
|
||||
update_mutations_overlay()
|
||||
set_bark(GLOB.bark_list[deconstruct_block(getblock(structure, DNA_BARK_SOUND_BLOCK), GLOB.bark_list.len)])
|
||||
vocal_speed = (deconstruct_block(getblock(structure, DNA_BARK_PITCH_BLOCK), 16) / 16)
|
||||
vocal_pitch = (deconstruct_block(getblock(structure, DNA_BARK_PITCH_BLOCK), 48) / 30)
|
||||
vocal_pitch_range = (deconstruct_block(getblock(structure, DNA_BARK_VARIANCE_BLOCK), 48) / 48)
|
||||
|
||||
|
||||
/mob/proc/domutcheck()
|
||||
|
||||
Reference in New Issue
Block a user