-
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
Basecamp: fix issues with basecamp recipes #35262
Conversation
The code that calculates the resource cost for faction camp activities needs to scribble on a tiny map. The tiny map is not supposed to be saved, but it is, leading to weird, half-built buildings at overmap position (0,0,0). Move the fake map to (0,0,-9) where it is much less likely that anyone will ever encounter it.
I'm not in a position to look closely at the actual c++ code right now, but as a stop-gap measure to fix the user-facing bug on the way to 0.E, this makes sense (given that it'd basically require a max depth lab to happen to spawn at Hopefully the actual problem can be tracked down at some point, after we're past the release. |
7e79bbc
to
75d4d68
Compare
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.
I've forgotten a lot of faction camp code, but I'll try and dig in a bit more later.
I don't want to know about how a recipe is storing the skills internally, I just want to print out what skills are needed to do something.
Fixes CleverRaven#32643 Adjust how skill requirements are reported and handled: multiple skills are reported both in the mission description and the companion selection menu, legacy "skill_used" requirements are reported and honored, and the player cannot select a companion who doesn't have the skills to do a job. The legacy " COMBAT : SURVIVAL : INDUSTRY " header is only used for jobs that don't require any skills.
75d4d68
to
6cc7e7b
Compare
Summary
SUMMARY: Bugfixes "Basecamp: fix issues with basecamp recipes"
Purpose of change
Fixes #34776
Fixes #32643
The basecamp construction requirement autocalc code is not supposed to save the tinymap at 0,0,0 used to determine construction requirements, but does. Work around the issue by creating the tinymap at 0,0,-9 where most players are unlikely to find it.
Basecamp recipes that use "skill_used" and "difficulty" did not correctly report the skill requirements during mission selection, even though the requirements showed up during companion selection. Fix that issue and generally clean up handling of skill requirements during companion selection.
Describe the solution
Create the fake_map used to set up construction requirements at 0,0,-9 instead of 0,0,0.
Print recipe requirements that use "skill_used" and "difficulty" instead of the the skills_required map. For recipes that use skills_required, print each skill and whether the NPC meets the requirements in the companion selection menu. Confirm that NPCs meet the requirements and don't let them be selected if they do not.
Describe alternatives you've considered
skill_used and difficulty should be just rolled into skills_required, possibly, but I'm not sure about the additional effects in other part of the code.
Testing
Started a new game and teleported to 0,0,0 and confirmed that it was a normal field like the fields all around it. Then teleported to 0,0,-9 and confirmed there was the remnants of the fake map.
Created a faction camp, and verified that complex buildings like wattle-and-daub displayed both skills (Fabrication 4, Survival 3) in both the mission description and companion selection menu. Confirmed that single skill recipes like the Garage showed correctly in both menus. Confirmed that I couldn't select an NPC that didn't have the required skills and that I could select an NPC that could.