-
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
NPC faction camps #73372
NPC faction camps #73372
Conversation
Fix abandoning camps (remove them from player known list)
So is this ready for merge? |
Should be, unless there are any objections. |
Blerg looks like I broke something when I resolved conflicts. Sorry |
No worries, that was a messy rebase. Issue was actually some of the previous code. Also fixed u_has_camp while I was here. Forgot that existed! |
Hmmm yes it is now correctly failing the text changes analyzer. I will have to get some help on that one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully this is everything needed to make it work with translation
You want a overmap_special.py in Cataclysm-DDA\lang\string_extractor\parsers that looks something like from ..write_text import write_text
def parse_overmap_special(json, origin):
for overmap in json["overmaps"]:
if "camp_name" in overmap:
write_text(overmap["camp_name"], origin,
comment="Name of NPC faction camp") unless you want to extract them in the C++ instead and then to change Cataclysm-DDA\lang\string_extractor\parser.py like this except alphabetical still like - "overmap_special": dummy_parser,
+ "camp_migration": dummy_parser,
+ "overmap_special": overmap_special, |
55ecada
to
d995a1f
Compare
The text changes test passed now 👀 I hope that means the translation stuff works properly! |
Co-authored-by: Procyonae <[email protected]>
Summary
Content "Static NPC factions have their own camps and food stores"
Purpose of change
(Ruin the game by) Continuing to expand our NPCs and NPC factions
Describe the solution
Add a new
camp
andcamp_name
field to map specials which capture the desired OMT placement, faction, and camp name for the resulting camp.✅ Spawns a camp and assigns those values as expected.
✅ Make sure players and NPCs can't interact improperly with camps they don't own (e.g. can't eat out of their food stores)
✅ Define camps for our existing vanilla and in-repo mods
✅ Define reasonable food stores for our factions that they eat out of
✅ Handle lone wolf factions, somehow. (I have decided this is out of scope)
✅ Handle water needs for camps, by editing existing mapgen and otherwise giving camps access to the
water_well
provides✅ Save compatibility by inserting new camps into existing versions of these specials
✅ For the basic implementation, the food stores will regenerate or otherwise gain food over time, and they'll never eat themselves out of a home. But...
(Future PR) Implement refugee center's questline of them actually being starving.
Describe alternatives you've considered
IDK, like ten billion EOCs?
Testing
Additional context
Big thanks to @Procyonae for some very good suggestions regarding the save migration issues
See next message for some known issues