Skip to content
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

fix schizo weapon talk #78354

Merged
merged 1 commit into from
Dec 5, 2024
Merged

Conversation

marilynias
Copy link
Contributor

Summary

None

Purpose of change

fix #78349
For some reason #74360 renamed removed "<>" from some snippet category names, which are apparently needed when being called from inside of strings.
(eg "u_message": "Your <npc_name> says "<schizo_weapon_talk_damaged>"" from item_talks_to_you EOC)

Describe the solution

restore "<>" in category names in category names being used in the way described above.

Testing

Create char with Kaluptic Psychosis, trigger weapon_talk_hallucination a couple of times. Messages appear as expected.

Additional context

I don't think its intended that the name must contain must be <> enclosed, but that is for another topic.

@github-actions github-actions bot added [JSON] Changes (can be) made in JSON <Bugfix> This is a fix for a bug (or closes open issue) astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Dec 5, 2024
@GuardianDll
Copy link
Member

must be <> enclosed

That's the way for game to understand it is a snippet, and it should pull it from the snippet with such name, including the snippet bracket

@marilynias
Copy link
Contributor Author

must be <> enclosed

That's the way for game to understand it is a snippet, and it should pull it from the snippet with such name, including the snippet bracket

other snippets like "schizo_delusion_grandiose" are not enclosed and are called with "u_message": "schizo_delusion_grandiose", which works.
Should I enclose all snippets for consistency?

@GuardianDll
Copy link
Member

GuardianDll commented Dec 5, 2024

i put it wrong, angle brackets <> are used in snippets that are specifically used in the middle of another message or snippet
schizo_delusion_grandiose is used as

{ "u_message": "schizo_delusion_grandiose", "snippet": true }

so the game understand whatever is inside u_message is a snippet. Opposite of it is schizo_weapon_talk_bleeding, that is used as

{ "u_message": "Your <npc_name> says \"<schizo_weapon_talk_bleeding>\"" }

the game need to understand that schizo_weapon_talk_bleeding is not part of the natural text, therefore angle brackets are used
(using "snippet": true would not work because Your <npc_name> says \"<schizo_weapon_talk_bleeding>\" is not a snippet id)
(and removing square brackets from the message itself would result in message like Your pipe mace says "schizo_weapon_talk_bleeding")

It generally doesn't matter is snippet id is enclosed in brackets if "snippet": true is used, but if it's not, then it is mandatory to use brackets properly

@marilynias
Copy link
Contributor Author

Alright thanks for explaining, what I and probably the original pr author thought is the thing inside the <> to be the name. Kinda like

f"yadayada {varname}"

works in python

@Night-Pryanik Night-Pryanik merged commit 9017e19 into CleverRaven:master Dec 5, 2024
25 of 26 checks passed
@marilynias marilynias deleted the fix-schizo branch December 5, 2024 15:07
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Dec 5, 2024
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) [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error with Kaluptic Psychosis
3 participants