-
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
[CR] Free Merchants shop inventory revamp #55488
Conversation
Great change |
I think it makes more sense to set selling of equipped items to false as the default. I believe one abuse in games is to buy the weapon and armor an NPC is wearing, and then kill them when unprotected and unarmed. Thus, the selling of these things ought to be enabled explicitly when desired. |
I'm ok with that! I like to keep PRs super atomized, though, so I'd probably want to do it in a different PR if this one gets merged, just so that it can have discussion and such independently. |
I'm not sure if I'm doing this quiiite right, but the code in here should be final. I'd still like to get input on what they're stocking in terms of sold goods, though. |
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.
The json looks great on this. I am not comfortable reviewing c++ so this isn't saying there's something wrong with that part.
Co-authored-by: Anton Burmistrov <[email protected]>
I feel like this is a pretty solid item list for the merchants to sell. It gives you the option to get some weapons especially if you need a weapon to go back into back bay but won't let you go after a bandit safehouse. |
Summary
Content "Reworked the goods that Smokes in the refugee center will buy and sell."
Purpose of change
#52374 took the first step of revamping the refugee center NPCs by replacing the shopkeeper with a unique character named Smokes. The PR focused almost entirely on dialogue, with things like quests and the actual shop being unchanged. This PR aims to lay further groundwork to continue what that PR started, as those other parts of the faction remain very old.
This draws from the design steps set out in #51320, but it doesn't close the issue outright, since this is just one NPC in a larger faction.
Describe the solution
I performed a full revamp of the stuff that Smokes offers, with the goal of keeping it consistent with what he tells the player and is laid out in existing issues. The shop now contains:
SUS_welding_gear
item group.The goal here is to establish the Free Merchants as a supplier for common crafting materials, since they're a hub for scavengers and trade for the materials those scavengers gather, in addition to having a surplus when they came into the center. It also gives players a genuine reason to want to visit the refugee center, as large quantities of things like welding rods can be very desirable. It also incentivizes the economy that the Free Merchants themselves are trying to cultivate: selling them food in order to get a lot of cheap goods in bulk.
I'd like to get some feedback on the inventory selection in particular, since DDA is a complicated game and it's very possible I've missed something that these guys might have (or, for that matter, things they actually shouldn't have that are currently included in the PR.)
Finally, I've created a file called
FREE_MERCHANTS_INFO.md
where I've written down info about their economy and things they want and don't want, to help with future work on them. I'm fine removing this, though - it stemmed from a document I made internally to track my thoughts, but I ended up making it into a file since I thought it might be helpful, too.On the C++ side of things, I have made several changes:
sells_belongings
, defaulting to true. If a class's JSON entry has this set to false, the NPC will not be willing to sell items they're wearing or wielding, meaning they won't sell their outfits. Items inside of their bags are still fair game.rigid
. Normally, shopkeeper groups will be processed endlessly until the NPC's inventory is full or a target value has been reached, dependent on their faction. Rigid groups will be handled much more like mapgen item placement - they'll be fully processed a single time per restock, then not run again. This allows a much finer degree of control over what items an NPC should stock in their inventory (although this is already possible by doing things like placing the stock in nearby containers via chat events instead of using the built-in restocking system.)Describe alternatives you've considered
Testing
Throughout the course of making this, I created worlds, jumped to the refugee center, and spoke to Smokes to get a sense of his inventory generation. I also tested to make sure that normal item groups spawned correctly by talking to the starting NPC, Rubik, and the intercom at Hub 01, which they seem to.
Additional context
Here's a sample inventory from Smokes, with some caveats: