Skip to content

Parroting rework #81049

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
Draft

Conversation

Procyonae
Copy link
Contributor

@Procyonae Procyonae commented May 24, 2025

Summary

Infrastructure "Snippetise monster parroting"

Purpose of change

Closes #70645

Describe the solution

Parroting is no longer a special attack and instead happens independently
Speech type removed in favour snippets
Speech snippets are specified in the monster type definition within a new parrot object
Currently parroting no longer takes moves off the monster (can be easily added back if desired) bc a monster screeching at you shouldn't stop them clawing your face
Individual speech entries can be active always, when in danger (with the existing logic used by PARROT_AT_DANGER) or when not in danger

Describe alternatives you've considered

Speech snippets for human speech want working into or mixing with existing snippets to make both civ monsters and ferals sound more human and Mi-go mimicry to be more convincing in a future PR. Also needs deduplication/nesting existing snippets where appropriate.

I might allow a bool for fixed cooldowns for robotic type stuff where wanted
Storing trigger condition results and triggering special speech on changes for stuff like battle cries but that seemed awkward and overkill
There are probably some niche circumstances where parse_tags() would be preferable to just expanding snippets but I couldn't think of any immediately, easy enough to add later if someone has a cool idea though
Storing all the creature_sound in a vector/set and only using pointers to them in the weighted_int_list s but that seemed like it would be messier
Having frequency not be static per monster type but I couldn't think of a better non ugly way to do it, could potentially have a multiplier when specific active_when conditions are true or something (or even let it use math and make in_danger exposed to that)
Adding more active_when conditions now

Testing

None yet

Additional context

Todo before undraft:
Convert all existing speech to snippets incl mods
Non-fixed cooldown
Inheritence handling
Transform handling
Serialise/deserialise cooldown (unless I give up on non fixed cooldowns being possible in which case probably just use calendar so there's no need)
Testing

@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. NPC / Factions NPCs, AI, Speech, Factions, Ownership [JSON] Changes (can be) made in JSON [C++] Changes (can be) made in C++. Previously named `Code` Monsters Monsters both friendly and unfriendly. [Markdown] Markdown issues and PRs <Bugfix> This is a fix for a bug (or closes open issue) Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels May 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style <Documentation> Design documents, internal info, guides and help. [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions [Markdown] Markdown issues and PRs Monsters Monsters both friendly and unfriendly. NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parroting format rework
1 participant