-
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
Spell activated EoCs are passed the target as a context val #77656
Spell activated EoCs are passed the target as a context val #77656
Conversation
… variable "spell_location"
…s of a var being provided
Will this allow running spell-based EoCs on arbitrary areas of ground (currently they throw a talker error)? |
They shouldn't be throwing an error rn, the caster should be beta talker and there only needs to be one talker for EoCs to work (unless you were running into 2ea0280 causing problems where it was being called with the nullptr talker despite not being necessarily needed) |
The case I'm thinking of is that right now if you're trying to apply some kind of AoE that applies an EoC to everyone in its area, right now you need to target a creature to kick the whole thing off. Will that still be true? |
(Resolved in the devcord, this isn't an issue) |
* get rid of npctalk_var_ prefix for eoc variables * cleanup after #77055 * deprecate more of type and context * migrate item vars, make migration happen only once * doc updates * migrate u/npc/monster variables * fix context var migration * remove `substr( 12 )` in math parser * move migration to a single function where possible * no auto * please clang * Please clang more * fix submap load test * clean up after #77656 * cleanups after #77520
Summary
Infrastructure "Spell activated EoCs are passed the target as a context val location variable spell_location"
Purpose of change
Provides a solution for #70873 (Up to @Standing-Storm whether this should close it given this isn't what the issue is directly asking for but autoroofs are ew and should be avoided where possible and adding infra to the spell transform field feels somewhat redundant when EoCs have much more powerful transform infra)
Describe the solution
Spell activated EoCs are passed the target location as a context val location variable
"spell_location"
for use primarily when the target isn't a creatureDescribe alternatives you've considered
This can probably be applied to more in repo spells that rely on autoroofs or spell EoCs that use less ideal ways to attempt to obtain ground targets, I'll have a look to see what I can find
Giving the context val a more obviously not manually defined name but I couldn't think of anything non clunky (I checked spell_location isn't used as a var anywhere in repo)
Testing
Tested using the included spell and the save from #70873 with expected results
Additional context