Files
Bubberstation/code/__DEFINES/~~bubber_defines/say.dm
gavla 2bcb423aae Ports Bloopers (Vocal Barks) from FluffySTG (#987)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

Ports this: https://github.com/Fluffy-Frontier/FluffySTG/pull/106
Allows for characters to bloop and bark. You can choose a bark for your
character and adjust its pitch, range, and speed.
You can preview your blooper under Character Preferences.
The preference is toggled off by default in Game Preferences.
Allows for admins to disable global bloopers
Includes Goon assets, which are properly attributed.

## Why It's Good For The Game

This isn't a 100% of what I envisioned my original bounty was supposed
to do ( https://github.com/Bubberstation/Bubberstation/issues/688 ).
Although, I believe the players will enjoy having something like it
while I tune and adjust this in upcoming changes.

This is good for the game because audio cues coming from characters
bring a quality of life on the station. This can bring attention to a
character if they need attention from others. This allows for more
optional customization for a character.

## Proof Of Testing

Tested locally with no errors. This may cause errors on live.


https://github.com/Bubberstation/Bubberstation/assets/96078776/af28a732-276b-4d0b-8be1-f45b710856b1


## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and it's effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

🆑 Shayoki
add: Players can now choose a voice for their characters.
sound: Added a lot of 'borrowed' sounds to use as voices.
admin: Admins can globally disable Bloopers
/🆑 

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

<!-- By opening a pull request. You have read and understood the
repository rules located on the main README.md on this project. -->

---------

Co-authored-by: nevimer <77420409+nevimer@users.noreply.github.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
Co-authored-by: Waterpig <49160555+Majkl-J@users.noreply.github.com>
2024-02-19 21:48:52 +01:00

20 lines
1.3 KiB
Plaintext

//BLOOPER defines
#define BLOOPER_DEFAULT_MINPITCH 0.4
#define BLOOPER_DEFAULT_MAXPITCH 2
#define BLOOPER_DEFAULT_MINVARY 0.1
#define BLOOPER_DEFAULT_MAXVARY 0.8
#define BLOOPER_DEFAULT_MINSPEED 2
#define BLOOPER_DEFAULT_MAXSPEED 16
#define BLOOPER_SPEED_BASELINE 4 //Used to calculate delay between BLOOPERs, any BLOOPER speeds below this feature higher BLOOPER density, any speeds above feature lower BLOOPER density. Keeps BLOOPERing length consistent
#define BLOOPER_MAX_BLOOPERS 24
#define BLOOPER_MAX_TIME (1.5 SECONDS) // More or less the amount of time the above takes to process through with a BLOOPER speed of 2.
#define BLOOPER_PITCH_RAND(gend) ((gend == MALE ? rand(60, 120) : (gend == FEMALE ? rand(80, 140) : rand(60,140))) / 100) //Macro for determining random pitch based off gender
#define BLOOPER_VARIANCE_RAND (rand(BLOOPER_DEFAULT_MINVARY * 100, BLOOPER_DEFAULT_MAXVARY * 100) / 100) //Macro for randomizing BLOOPER variance to reduce the amount of copy-pasta necessary for that
#define BLOOPER_DO_VARY(pitch, variance) (rand(((pitch * 100) - (variance*50)), ((pitch*100) + (variance*50))) / 100)
#define BLOOPER_SOUND_FALLOFF_EXPONENT 0.5 //At lower ranges, we want the exponent to be below 1 so that whispers don't sound too awkward. At higher ranges, we want the exponent fairly high to make yelling less obnoxious