-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[WIP] add snippet expand to items #38251
[WIP] add snippet expand to items #38251
Conversation
IIRC snippet expansion selects from a tag randomly every time it expands a snippet, so this would cause you too see different text every time you view an item's description? |
As I understood it would allow for snippets to be referred to in item descriptions. So an item description could use things like <full_name> or < city> |
It would, but Also, tags like |
Well excuse my ignorance then, I do not have any coding knowledge myself, I received some help with this by someone else. Seems signs and graffiti use:
Would it be as simple as including this string in the dynamic description? |
Sign and graffiti text are saved as static text once generated, but item descriptions are translated and displayed on spot, so you'll need to save the city name and random name in an item and replace them on spot in the item info function. As for other tags, their replacement probably need to be saved as snippet ids, but that brings the problem of how to handle it when the tags in the description change in a later version. One simpler but imperfect solution would be saving the generated dynamic description in another member of item and display that when it's present. I believe artifact description does this so you can probably check out the artifact code to do this. Description generated this way won't update when switching the language, but would allow using tags in them. You'll need to make sure it's specified in a separate json entry though, to ensure it doesn't mess with normal item descriptions. |
I'm gonna attempt to look at this and/or outsource help again but since this is a bit 'above my pay grade' and I'm currently a bit busy I put it as WIP and will come back to it at some point, hopefully soon. |
Summary
SUMMARY: Content "Adds snippet expansion to item descriptions."
Purpose of change
Adds the ability to reference name and city tags in item descriptions.
Testing
I have not tested this, as I'm still trying to learn how to build the game :/
Additional context
I also plan to use this feature in the near future on my upcoming packages for more immersive descriptions.
Credit goes to @anothersimulacrum. (Thanks boss!)