-
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
[WIP] Update Tacoma ranch missions #55690
Conversation
I think Bombasticslacks added a way for EOCs to delete items from the game. |
@Maleclypse I'd rather not delete the items as there are potentially useful items in the barn or could be player placed items that should not get deleted. For now, I've chosen to allow the items to stay, but I'd much prefer a solution that takes all of the items within an area and puts them on or near a specific tile. Basically, sorting the items out of the way or moving them to a storage shed. |
I’m not sure how his method does it and whether it recognizes what the items are before it deletes them because it’s designed mimic sale of goods. Though if you only want to move things you could possibly use zone creation effects and then setup a fake NPC to complete the move. If I were doing it it would be a specific NPC class that has debug invisibility, and somehow uses eoc commands to get it to sort the zones. But that’s probably pretty hacky. |
I'd certainly prefer a less hacky implementation and can look into implementing it myself after I've fixed everything else, unless someone wants to volunteer to implement something before then. |
The handling of dialog missions seems to be more primitive than the camp ones in that the camp missions highlight finished missions, which does not seem to be the case for dialog ones. The caravan mission seems to be partially broken in that each companion caravan member is brought back individually, and each companion brought back seems to trigger the simulation of a new caravan when it comes to danger, but not when it comes to payment... I believe all remaining caravan members are involved in each fight up until they're recalled. |
I haven't gotten to the dialog missions yet, so I'm not yet sure on the scope here. Is there any possibility of re-using the faction menu logic here or is this just going to need a complete rewrite? My next focus is going to be jsonizing the scavenger missions if I can and auditing the other npc missions, so I probably won't get to this for a bit. If you or someone else has some free time between all the other work going on, I wouldn't turn down assistance looking at the menu logic. |
Yes, you've gotten to the dialog missions... It's just that my description is poor. In my eyes there are two types of missions in the game, namely base camp missions, gotten via base camp bulletin board "dialog", and dialog missions, reached by talking to NPCs, and all of the Tacoma missions (such as the scavenger missions) fall into the latter group. Note that the division and naming is mine: I haven't seen anyone describe them in any terms. Code wise the "top" of the mission logic resides in mission_companion.cpp, where the dialog missions are, and the base camp missions appear in faction_camp.cpp (with glorious C stupidity having the definitions in basecamp.h to confuse the unweary). I can do the changes, at least for the UI only part, because they're fairly easy (just using a boolean or two to keep track of aggregated state when iterating over NPCs), while the caravan one requires more logic. However, I'm always weary of having multiple people modifying the same files at the same time, especially when the train wreck called git is used, as it will find "conflicts" everywhere, including a way do drop parts that happen to be the same when you actually want to merge things. |
I'm focusing on converting the regular missions for now which are in mission_start.cpp. If you feel comfortable with the ui work, I'd vote for you to go ahead with it and leave any potential git conflicts to me. (I am comfortable enough with git that it shouldn't be an issue, but may end up splitting this PR into more sizeable chunks anyway for easier review, which would avoid the issue entirely) |
Ah, OK, a quick look at mission_start.cpp gives me the impression it deals with "normal" missions where the PC is given a mission, not the missions where you send a companion off (base camp and what I call dialog missions, probably better called dialog companion missions). Edit: #55746 provides the promised changes. The cause for the caravan issue was actually very easy to find and fix. |
Thanks for the improvements @PatrikLundell. I think the only major thing left will be figuring out how to jsonify the companion missions map updates, but I'll look into that once I've gotten a few other things updated. |
None of the "actual" companion missions (i.e. those that involves sending off companions) include map updates. The buy/plant/harvest missions don't actually send off any companions anywhere, but it would certainly be good if they could be jsonified. I'd suggest considering (as in carefully weighing it as an option, not as a suggestion to immediately go ahead) moving these missions to the "normal" interaction level where you're currently improving things. |
That's all good to know. If there's no companion interaction, then they should be easy to move to normal interaction, which solves most of my concern over jsonifying them. I think they are the only blockers for allowing the map to be rotatable as I have done in this branch. I'll take a closer look once your PR gets merged and see what makes the most sense. I can always reconfigure the menus to make it all make sense. |
I would suggest splitting the crop overseer missions into two dialog entries rather than one, as me using them for labor isn't exactly the same as me providing them with labor. Thus, there would be one entry for investing in agriculture (or something along those lines) and one for providing labor (where a standardized phrase is useful to help players recognize what the topic is about). |
I believe that's what I'm already working towards, but let me know if there's something I'm missing, but do note that it's not in a complete state yet as I still have to figure out how to handle "Plant Field" and "Harvest Crops" from the regular dialogue. I've already switched the language up so that the companion missions are under For all of the field purchase/work, I've set it up so that you see
I still have to figure out how I can make these last two functional in dialogue before I'm going to remove them from the companion one. I don't think these can be entirely done with dialogue though, so I mainly need to figure out how to replace the legacy cash with actual merch in these transactions. I should be able to move the construction check over to the dialogue, but may still need to figure out how to access dialogue variables if we want to keep the "fence provides better yields" effect for the new field layout, which I would. I've been looking at the crop overseer dialogue/variables for two days already, so I'm going to switch over to the doctor for a bit and see what I can improve there, possibly implementing a new questline and then revisit the crop overseer later. |
My comment was based on seeing that the single dialog was changed, but I'm happy to see we're thinking along the same lines. I suspect you need code to plant fields with an arbitrary crop, and probably to harvest it as well. It can be noted that both of these actions exist for faction camps, and it might be available as zone activities as well, but I'm not sure about that,. Switching to something else for a while and letting this brew in the background is probably a good idea. If there was functionality to supply a blueprint with either a missing or overriding palette it might be possible to reduce the code part to take the seed provided by the UI and insert it into the overriding palette for use with a planting blueprint. |
@haveric Is this still intended to be in Draft? |
Sorry, didn't think I'd be away from cdda development this long. All development has been done in other PRs for the existing work and this is purely a progress tracker for longer term goals at this point. I think I'm ok with this being closed at this point and I'll create a new issue/PR once I get to the next iteration of updates. |
Summary
Bugfixes "Update Tacoma ranch missions"
Purpose of change
At this point, this is just a progress tracker with the initial goals being mostly completed in other PRs.
General Fixes:
Allow ranch to be rotated(Moved to Allow Tacoma to rotate #57548)Grammar cleanup(Moved to Tacoma grammar updates. Change knife spear to simple knife spear #56188)Update MISSION_RANCH_FOREMAN_13 mission that references North to general area descriptionConvert broken window constructions to empty window framesDone through all the other PRsImprove companion mission UI(improved dialog companion mission UI #55746)Woodcutter 1 was being spawned twice instead of spawning woodcutter 2 in the sawmill(Moved to Tacoma - Fix Woodworker not spawning #56196)Update shop zones for Scavenger Boss and Bartender once merged:Rework NPC shop restocking #56720 Tacoma - Add loot zones for bartender and scavenger boss #57449Misc. Fixes(Moved to Tacoma - misc fixes #57481)Fix western vehicle barricade spawnsFix dirt appearing below makeshift beds in the barnAssign ownership to all items/vehicles that are spawned in missions so the player can't just steal with no repercussions.(Assign faction to (some) item and vehicle placement #56110)Replace sidewalk with concreteMissions: (COMPLETE!)
BarberFix listed prices(Consistently show merch cost in conversation #55737)Bartender- (Moved to Tacoma - Bartender improvements #57338)Optimize nested chunksAdd a shot glass and have the shots be placed in them onto the counter instead of selling glass bottles for individual shots (I think this was intentionally implemented as a way to get glass bottles, but it makes very little sense)Give the player a drink token that can be traded back with the shot glasses for a merch. (Slight Fallout reference. Feel free to hoard your worthless bottle caps!)Add other spawn locations for shot glassesAdd other spawns for drink tokens (probably just on tables in the bar or nearby as these would be fairly new)Add clutter (drinks behind the bar, empty drinks out on tables, something for the racks in the storage room)Add farm plots for the sugar beet seeds?Add end placement after final quest (More clutter items?)Crop Overseer(Moved to Tacoma - Convert crop overseer field planting to json #56510)Jsonify Purchase and UpgradeCreate new, bigger field and allow conversionMove plant seeds/harvest plants to the new dialogue and out of companion missions.Handle new farm dialogue variables in code as well as traitsDoctor- (Moved to Tacoma - Doctor improvements #57387)Added 3 quests (so far) for office supplies, medical gloves, and anesthetic/medical equipmentMove regular aid here and gate it behind quests.Gate bionics behind multi goal questlineAcquire 3000 anestheticTalk to scavengers to send a companion mission to raid a hospital to get parts for an anesthetic machine (and maybe more medical equipment)Talk to scrappers for metal parts (which will send you on a quest for an angle grinder and a hacksaw)Prevent hospital raid from being able to run twice at the same timeFixu_has_item
andu_sell_item
with anesthetic not being recognized in an anesthetic kit (u_has_items and u_sell_item do not recognize anesthetic in an anesthesia kit #55918)Figure out how to prevent the doctor from dropping the binders (Give them more storage capacity?)Nurse/Clinic(Moved to Tacoma - Convert clinic and nurse to json #56205)Jsonify nurse missionsFix placement of clinicMove aid to doctor. Possibly implement a lesser aid variant to the nurseFix/Rebalance lesser aid / aid times and currently busy times after.Figure out how to spawn less aspirin after MISSION_RANCH_NURSE_1 (currently spawning 200 per bottle, should be 20)Add end placement after final mission (probably add some medical items/furniture around the clinic)Add the missing entrance from the house to the new buildings.Scavenger(Moved to Tacoma - Convert scavenger to json and update companion missions #56403)Jsonify scavenger missions and fix fence placement in the wallMolotov quest should not be repeatableRe-add looted_building pseudo terrainReplace 12 knife spears with simple knife spears(Moved to Tacoma grammar updates. Change knife spear to simple knife spear #56188) (Mentioned in Refugee center dialogue project #30579)Implement loot retrieval from companion raid missions. This was intended to work, but left as a TODO.Increase spawns from "place_items"Add end placement after Molotov quest (More scrap items?)Woodcutter 1(Mostly moved to Tacoma - Convert buying logs to json #56192)Jsonify log placement (buy_10_logs and buy_100_logs)Replace [NPC NAME] once Add <u_name> and <npc_name> to tag parsing. Update docs for others #56066 is mergedCan purchase logs without paying by hitting escape in the trade window / Verify payment before placing logs(Fixed by: Allow true or false effects of talk effects #56932)Mission Tree Audit:
Bonus:
Describe the solution
Allow the tacoma ranch to be rotatable and audit everything to make sure it works. Update what doesn't.
Describe alternatives you've considered
None
Testing
In Progress
Additional context
Creating this draft early to get my initial thoughts out and show that this is being worked on.