-
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
NPCs: support faction tagged zones #30150
Merged
kevingranade
merged 5 commits into
CleverRaven:master
from
mlangsdorf:faction_zones_take_2
May 12, 2019
Merged
NPCs: support faction tagged zones #30150
kevingranade
merged 5 commits into
CleverRaven:master
from
mlangsdorf:faction_zones_take_2
May 12, 2019
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
78106cd
to
85c82db
Compare
jenkins rebuild |
ab1dc0e
to
151438a
Compare
151438a
to
abe9a09
Compare
The lobby beggars need to have different behavior than other people in the Evac Center, and should be in their own faction.
Zones can be tagged by faction ID (defaulting to your_followers) and different factions cannot retrieve each other's zones.
abe9a09
to
6935faf
Compare
Now that zones are tagged by faction, let all NPCs, not just the player's allies, use no investigate, investigate limits, and retreat zones. NPCs will also stop investigating a sound if they spend 10 turns trying to reach it without moving.
NPC zones can be added by faction id and zone type.
6935faf
to
5507a63
Compare
Okay, another pass through it and I'm pretty sure everything is working. |
Add investigate limit and no investigate zones to the Evac Center: - Most NPCs won't investigate noises coming from beyond the center's sidewalks - No NPC will investigate noises coming from the zombie infested back bay. - The beggars in the lobby won't investigate noises coming from outside the lobby.
5507a63
to
add93c3
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[C++]
Changes (can be) made in C++. Previously named `Code`
<Enhancement / Feature>
New features, or enhancements on existing
Inventory / AIM / Zones
Inventory, Advanced Inventory Management or Zones
Map / Mapgen
Overmap, Mapgen, Map extras, Map display
NPC / Factions
NPCs, AI, Speech, Factions, Ownership
Sound Events
Sound events handling in the game
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
SUMMARY: Features "NPCs: support faction tagged zones"
Purpose of change
Fixes #29333
Fixes #30047
#29867 added player defined zones to tell allied NPCs where to retreat to and where to avoid investigating noises. Expand that functionality to include non-alliedNPCs to prevent NPCs from doing stupid stuff like investigating a zombie infested back room.
Describe the solution
Change the map of zone_type_ids to zone_data to a map of a hashed string made of up of the zone_type_id and the faction_id to zone_data. Retrieve zones by that hash, defaulting the faction_id to "your_followers".
Add a new jmapgen object to handle zones, and a zone_manager function to rotate zones on a map.
Change npcmove and npctalk so that sound investigation happens using absolute positions instead of map local positions, and slightly change the investigate only zones so that NPCs only heed them if the NPC started in the zone.
Make the beggars in the lobby of the Evac Center into their own faction. Limit the investigation of most factions in the Evac Center to the area within the sidewalks, ignoring the back bay entirely, but limit the beggars to the lobby itself.
Additional context