-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Snippets can now call EOC effects #54139
Conversation
So this works but it might be simpler and more powerful if you just supplied an EOC id and then activated that EOC. it would give you access to conditions and I think mean less new code. |
Can an EOC add a variable based on the invoking item/id? I thought about that option but if 30 snippets have 30 EOCs that is each just u_add_var: has_read_snippet_x context: world_knowlege that seems really cumbersome and bloated |
So you could make it able to read inline EOCs so it wouldn't be separate entries but you're not wrong that it is kinda bloated. Another though is to take a look at the message function in npctalk.cpp and the same_snippet argument. I think all I-am-erk wants is to set a variable and you could make a message argument that causes it to set a variable. Not sure if that would mean changing all the newspapers or not though. Or just ignore me and leave it alone as it does whats needed at the moment. |
Erk seems content with just effects access. If it needs to be expanded I can worry about that in the future. |
Spell checker encountered unrecognized words in the in-game text added in this pull request. See below for details. Click to expand
This alert is automatically generated. You can simply disregard if this is inaccurate, or (optionally) you can also add the new words to |
Summary
Features "Snippets can now call EOC effects"
Purpose of change
Something Erk wanted so the game can track what the player does and doesn't have knowledge of for convos with NPCs
Describe the solution
Added the infrastructure to attach an "effect_on_examine" to any snippet with an ID.
the effect is invoked the first time you query the info on the snippet (so on examine). The snippet is stored as being seen and won't call again.
I've added example snippets of "engineer scribbles" to Cody the Artisan Blacksmiths house which after looking at you can ask her about. She'll brush you off currently but in the future there may be followup.
Describe alternatives you've considered
Testing
Spawn the isolated road OMs
talk to Cody
examine the papers in front of her
talk to her again and note the new dialogue.
Additional context
Currently the game crashes if you attempt to give the player an item as an effect while they see a snippet from the look menu.
As well if you open an item from the inventory and it adds an item you can drop the item you were going to examine and get the item info for the spawned item.
In reality no piece of paper should be spawning an item so this shouldn't come up and I imagine would require some heavy reworking of the menus in question to fix.