-
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
Traps can directly trigger EoCs as their action #77464
Open
Procyonae
wants to merge
11
commits into
CleverRaven:master
Choose a base branch
from
Procyonae:EoCTraps
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Mods
Issues related to mods or modding
Map / Mapgen
Overmap, Mapgen, Map extras, Map display
[C++]
Changes (can be) made in C++. Previously named `Code`
Monsters
Monsters both friendly and unfriendly.
Fields / Furniture / Terrain / Traps
Objects that are part of the map or its features.
[Markdown]
Markdown issues and PRs
Lore
Game lore, in-game communication. Also the Lore tab.
Code: Tooling
Tooling that is not part of the main game but is part of the repo.
Code: Infrastructure / Style / Static Analysis
Code internal infrastructure and style
astyled
astyled PR, label is assigned by github actions
json-styled
JSON lint passed, label assigned by github actions
Mechanics: Enchantments / Spells
Enchantments and spells
Mods: Aftershock
Anything to do with the Aftershock mod
Mods: Mind Over Matter
labels
Oct 30, 2024
github-actions
bot
added
EOC: Effects On Condition
Anything concerning Effects On Condition
Mods: Sky Island
Anything about the Sky Island mod
labels
Nov 7, 2024
github-actions
bot
added
the
BasicBuildPassed
This PR builds correctly, label assigned by github actions
label
Nov 8, 2024
Procyonae
commented
Nov 9, 2024
github-actions
bot
removed
the
BasicBuildPassed
This PR builds correctly, label assigned by github actions
label
Nov 9, 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
[C++]
Changes (can be) made in C++. Previously named `Code`
Code: Infrastructure / Style / Static Analysis
Code internal infrastructure and style
Code: Tooling
Tooling that is not part of the main game but is part of the repo.
<Documentation>
Design documents, internal info, guides and help.
EOC: Effects On Condition
Anything concerning Effects On Condition
Fields / Furniture / Terrain / Traps
Objects that are part of the map or its features.
[JSON]
Changes (can be) made in JSON
json-styled
JSON lint passed, label assigned by github actions
Lore
Game lore, in-game communication. Also the Lore tab.
Map / Mapgen
Overmap, Mapgen, Map extras, Map display
[Markdown]
Markdown issues and PRs
Mechanics: Enchantments / Spells
Enchantments and spells
Mods: Aftershock
Anything to do with the Aftershock mod
Mods: Mind Over Matter
Mods: Sky Island
Anything about the Sky Island mod
Mods
Issues related to mods or modding
Monsters
Monsters both friendly and unfriendly.
NPC / Factions
NPCs, AI, Speech, Factions, Ownership
Tutorial
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Infrastructure "Traps can directly trigger EoCs as their action"
Purpose of change
Triggering simple EoCs via spells is ugly and cumbersome
Describe the solution
Traps can trigger EoCs directly with the creature that triggers it as the alpha talker
Passes the trap's location as a context variable
trap_location
for use primarily with ranged trapsIf triggered by an item passes the item's id as a context variabletrap_item_trigger
, so you can do cool silly stuff like puzzle switches where putting different key items on a trap does different things and you need to figure out the solution, with incorrect placement potentially having bad consequences (Erk posited something like this for nether dungeons before)Documents the above
Unhardcodes the trap action "telepad" (and "portal" which was just an alias) bc I needed to write an EoC to test it anyway
Changes trap->spell->eoc to trap->eoc across the repo
Describe alternatives you've considered
Doing this in #77455 but it's not required for those changes and could do with a repo wide sweep up of existing pseudo EoC traps
I attempted items that trigger traps to be passed as talkers but couldn't get that to work, I considered falling back on passing a
trap_item_trigger
context var with the id of the item (and maybe another for it's translated name) but that would require passing an irrelevant talker like the player as you can't have 0 talker dialogues which seems very hacky. Will attempt to try this again if I think of anythingTesting
The tr_telepad works as expected with the player and Liam
Additional context
Firing EoCs via spells can still make sense if you want something complicated