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
base: master
Are you sure you want to change the base?
NPC faction camps #73372
Conversation
Fix abandoning camps (remove them from player known list)
Known issues: Some minor factions (old guard, fisherman family, dinomod's uh... somebody) don't have camps for various reasons, detailed in their comments. Camp names are probably not extracted for translation, and probably need to be. Exodii camp is always placed on z=0 though it needs to be on z=1 to be in range of Luliya, so she can eat and drink out of it. I don't know of a solution to that. Old wizard has the same problem, they're on Z=3 but the camp will be placed on Z=0, out of food range. Savegame compatibility (putting camps into old games) is here but boy is it ugly. |
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.
Auto-requesting reviews from non-collaborators: @LyleSY
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Nice! I'm happy to try and fix the issues with DinoMod if you can point me in the right direction. The DinoMod Swamper base has needed work for a long time. I believe that can be addressed by me in a separate PR without blocking this. |
What about lumberjacks at the lumber mill and kindred? Are they not considered a faction? |
They're spawned as a single OMT building, not as a special, so this implementation doesn't have any way to add a camp to them. Making them a one-tile special(if that's possible?) would be sufficient. |
Huh ok, somehow I missed these. Let me push a fix for that. |
I had skipped over most the wasteland_scavengers faction, but I went through and re-checked them all now. The only question mark is that their homeless camp spawn is only a 1/3 chance to actually spawn them. Cataclysm-DDA/data/json/mapgen/homeless_camp.json Lines 197 to 202 in b32d3d6
The other 2/3 of the time it's either empty, or occupied by a single no_faction npc. Therefore I haven't given them a camp on this special, but all their other locations got one. |
Swamp Shack is a vanilla special DinoMod just adds a variant with an NPC, which doesn't work with this due to it being a % thing but idk how you think it's being placed not as a special that's not how mapgen works |
With lots of help from Procyonae (again), we've determined that the church is a special - it spawns as such in vanilla. Dinomod adds a variant church which ends up being a % chance to spawn. @LyleSY Proc believes they have a better solution in the works at #72529 so no action should be needed by you. But please feel free to comment if you see a mistake or something wrong! |
I think the solution here will be to ignore z-level for the purposes of determining if camp is in range. The bubble and camp placement already works this way. I'd still like to be able to place the camp on a different z-level, but that's mostly an aesthetic issue. ...though this means port augustmoon's display is gonna be reeeally weird, it'll still just be aesthetic. Right now my plan is to bump all that out into a follow-up PR, but mergers if it needs to go into this one please let me know. |
UICA gets INTMAX food Clang gets silenced
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