Skip to content
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

Vending machine inventories reorganised #34200

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

Alpaccalypse
Copy link
Contributor

@Alpaccalypse Alpaccalypse commented Jan 3, 2025

About the PR

Vending machines now have a more interesting distribution of drinks between them.

Why / Balance

Some drinks were missing, or very unevenly distributed. Most branded drinks could only be purchased individually at each specific vendor.

  • Each of the Robust Softdrink vendors now have a different selection of cans available, independent of any implied brand rivalries.
  • "Robust Softdrinks [Soda]" have all branded drinks in one place.
  • Dr. Gibb & Space Cola now have disparate inventories and implied brand loyalties/susidiary brands. This was already implicit in the game, as highlighted in Added distinct ad and bye chatter to Dr. Gibb vending #34182
  • Inventories have been reordered alphabetically, by brand, after the "title" brands already used by each machine.
  • Boda vending machines that are hacked now give equal shares of Space Cola and Dr. Gibb.

This created a lot of head-canon for soft drink companies in the game, but in-short, the changes align along notional corporation rivalries between the currently established soft drink brands.

This PR addresses related inconsistencies noticed on #34178

Will probably have conflicts with #32934 which has already been approved, but those should be easy to rectify when that is merged.

This was made with awareness of ##12462. Despite appearances, there are less drinks available in any given machine. It does make a few drinks that were very unevenly distributed more widely available, but at the same time, it stops many drinks being available in every machine, that were before.

Planned follow-ups to this:

  • Adding the few missing branded vending machines
  • Adding more unique advertising between branded machines

Technical details

  • Adds two new vendingMachineInventory files.
  • Adds those inventories to the generic RobustSoftdrinks vending machines.
  • Edits the inventories of all the soft drink can vending machines.
  • Adds new entries in vending_machine_restock.yml

Media

All current machine inventories:
image

A spreadsheet I made to keep track of multiple inventory edits (added fluff is purely my head-canon):
image

Requirements

Breaking changes

I don't think so; two new inventory IDs and related files added as references in vending_machines.yml.

Changelog
No. Nothing that dramatically alters gameplay.

@github-actions github-actions bot added size/M Denotes a PR that changes 100-999 lines. S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. Changes: No C# Changes: Requires no C# knowledge to review or fix this item. labels Jan 3, 2025
@Alpaccalypse Alpaccalypse marked this pull request as ready for review January 3, 2025 16:45
@AgentSmithRadio
Copy link

I want to say, I'm seeing your work here with the vending machines, and especially with the soda machines here. What you're doing is really smart. I love seeing underutilized content rehashed, more obscure "common" items made more accessible, and world-building occur through everyday interactions. Creating two rival soda corporations akin to Coke vs. Pepsi with Dr. Gibb vs. Space Cola is smart, especially if one can be linked to NanoTrasen, and another to a Syndicate corporation, such as Donk. Co. or Waffle Co.. This is a flavour update, and it's basically approvable as it is as far as I can read.

I will say that we're in a competing design space here. I've been in a months-long triage stasis with my contrabandInventory PR for a while now, and if you get approved or if I get approved first, we're stuck doing entire code-rebases over a huge slew of .yml files or completely redoing our PRs to adapt to the other person's. At the same time, I think we're of the same mind, and we'd be useful for checking over each other's work (I've spent 4+ months of my life buried in the vending machine .yml files trying to make them more interesting), and with our power's combined, we could probably do some really interesting stuff for SS14's vending machines. If we felt bothered, maybe we could even deal with their EMAG menus, something the maintainers have told me they've wanted to have dealt with for a while now.

Take a look at what I got, and tell me what you think. I'm AgentSmithRadio on Discord, should you want to chat.

@Alpaccalypse
Copy link
Contributor Author

Alpaccalypse commented Jan 3, 2025

Thanks for dropping a line here. It's always encouraging to get some positive feedback. Especially to hear someone else is interested in these little things, that are relatively incosequential to gameplay, but can add a lot to the atmosphere and sense of immersion (in my opinion anyway).

I'll have a look at your linked PR and get back to you. It certainly sounds like it makes sense to coordinate a bit, especially as it seems as if we're both on the same page here.

@beck-thompson beck-thompson added P3: Standard Priority: Default priority for repository items. T: Cleanup Type: Code clean-up, without being a full refactor or feature S: Needs Review Status: Requires additional reviews before being fully accepted DB: Beginner Friendly Difficulty: Great for beginners. Unambiguous in scope, and explains how to achieve the result. A: General Interactions Area: General in-game interactions that don't relate to another area. and removed S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Jan 4, 2025
@AgentSmithRadio
Copy link

With [32934] now approved, you'll need to think about the contrabandInventory menus of these machines. Please don't treat what I decided for them as sacrosanct, but I have some things to consider.

There are currently 4 bottled Sodas. Soda Water (which probably just belongs in BODA, and has a really plain sprite), Space Cola, Space Up and Space Mountain Wind. This leaves you with 3, 2 of which belong to the Space Cola side of your separation, 1 belongs to Dr. Gibb.

A choice you have to balance this out is Changeling Sting. Aside from the cool sprite which changes what can it looks like, it doesn't really belong in the EMAG menu as it is because functionally, it's just like any other non-alcoholic drink. In my PR, I have it as the manager wire menu for Shambler's Juice, mostly on the basis that I figure they're the most likely company that made it, but there's nothing stopping you from making it a Dr. Gibb product, swap out the Shambler's Juice Changeling Sting for something elese, and using it to populate your Dr. Gibb inventories.

The other choice is to go sprite hunting, make a Dr. Gibb bottle entity, and use that to balance out the machines.

@Alpaccalypse
Copy link
Contributor Author

I've been thinking about this. I can't fault in your contraband additions, they all seem like great additions, if I do change any of those, it would most likely be to avoid a contraband inventory getting too large. I've a few ideas, and am trying to base them on things that are already in the game, even if it is a new variation of that prototype, like a bottle.

Where there isn't anything that fits well, or I think I have an even better idea, I think i'll definitely make a new sprite and item, if it feels justified enough. I need to look up changeling sting in a bit more detail, but as it was approved for your PR, it sounds like it is fine to have in contrand inventory. I'd still like to keep it as a sort of grey market product, rather than affiliated with one of the conceptual brand families, but we will see. Nothing's set in stone yet.

Nuclear cola seems like a good choice to add to Space Cola contraband in some form, the nuclear cola "glass" sprite is a large bottle, and I'd like to make an actual glass sprite for the mixed bar drink, and use the bottle for a new contrabandInventory bottle item.

icon

If I end up actually adding more sprites and new items, just for contraband inventory, I'm wondering if that wouldn't be better moved to a new PR, and keep the scope of this PR strictly within the bounds of shuffling inventories with already existing prototypes. It can make it quicker and less daunting to get reviewed.

@Alpaccalypse Alpaccalypse mentioned this pull request Jan 14, 2025
2 tasks
@metalgearsloth
Copy link
Contributor

This looks like it's going in the opposite direction of #12462

@Alpaccalypse
Copy link
Contributor Author

Alpaccalypse commented Jan 14, 2025

This looks like it's going in the opposite direction of #12462

Quite the opposite actually, there are less overall drinks throughout all the machines. The generic soda machine is the one machine you can get all branded drinks at, the two types of cola machines have totally different drinks in them. The branded vendors are split into two camps, each with almost completely distinct inventories.

If this looks like I have added drinks, it might be because I alphebetised the inventories, before nearly all drinks were available in every machine, but in random orders, which might have made it look like they were more varied, when they weren't. I have lowered the overall number of drinks that are stocked in the inventories, most of the time you will find at least 4 drink types completely out of stock due to RNG, though usually, but not always, you will be able to find the branded drink to match the machine available.

You will very likely have to shop around if you want to find a particular drink, there is not much point to this yet, but I plan to address that in a later PR.

P.s. You can see the ammount of drink available in the screenshot. That was unaltered from spawn. I might swap out the generic drinks too, as I was thinking of doing that, and may as well, because until there is more reason to go after one drink, I doubt anyone will be too upset they can't get root beer or iced tea in every machine.

P.p.s Upon further inspection, I could do more to reduce the total overall drinks available, and it is not as good at this as I had initially aimed for. Thanks for pointing this out, been waiting for some feedback on application of this.

@Alpaccalypse
Copy link
Contributor Author

I think I was reluctant to reduce can availability even more because going below 3 often sees machines with half their stock empty. I got around this by making only one type of each generic softdrink vailabe at any branded machine, removing one branded drink from any given "brand family" inventory, and making each limited edition can only available at one single vendor type. I might go back through and be more ruthless, but I do want to keep some sort of order and theme to vendor inventories.

The good news is, that despite adding new inventory types there are definitely far less drinks available overall between machines, and still a good chance that they could be at least half out of stock. It's a shame there isn't a way of making sure there is a minimum number of drinks available of a given type, that would make it much easier to reduce the number of cans and can types between machines. I have seen a vendor spawn in with only one can before; if I see one with 0, it's probably time to review inventories again.

@Alpaccalypse
Copy link
Contributor Author

I think this might have been a particularly bad roll, but this should keep worries about that issue at bay, I'd expect. I've left the branded drink for each vendor at four, because you should have a decent chance of at least finding that drink at that machine, though it's not guaranteed, as you can see:

image

@Alpaccalypse
Copy link
Contributor Author

Also, because these inventories are split into 5 relatively distinct categories it should be possible to organise distribution more rationally by spawners. The categories are:

  • 2 general "Robust" soda vendors with can types split between them, weighted towards unbranded cans
  • 1 branded general "Robust" soda vendor, with only branded cans
  • 1 brand "family" with Dr. Gibb, Space Up! Starkist, Red Bool* and Fourteen Loko*, not every drink availalbe in every vendor
  • 1 brand "family" with Space Cola, Shambler's Juice, PWR Game, Smite* and Sol Dry*, not every drink availalbe in every vendor
    *No machines for these yet

If these were split into spawners correctly, it should be possible to make sure that only a limited number of the same category are likely to spawn. This would at least give a bit more control over availability and make having different brands available at least a tiny bit more meaningful. It would also make more practical to have machines with even more specialised and limited inventories, as well as giving them a bit more character as background content that will be there anyway.

If combined with giving soda cans some unique properties and/or adding reasons to seek out a particular type it could actually make the varieties available a lot more interesting to the game. Red bool is at least one example of this, even if relatively minor. There's much more you could do with reagents/missions/species specific bonuses etc.

This was partly made as a stepping stone to working on this sort of thing in the future, although the seemingly arbitrary inventory organisation did aslo play a factor for this PR.

@metalgearsloth
Copy link
Contributor

That looks better though would have to see what vending machine distribution looks like on maps these days.

@Alpaccalypse
Copy link
Contributor Author

Alpaccalypse commented Jan 14, 2025

I've been testing, and tried something with the vending machine spawner, that seems to be working okay too. Problem is that robust toolbox always crashes the game for me after about 10 mins when loading in an actual map other than the dev startup one. Always been a problem and don't know why.

-I've noticed some maps have loads of vending machines all over and others seem to be really lacking, which makes balancing this tricky. It's a nice idea that people would restock vending machines, but even if they run out, I don't know how likely that is for soft drinks, especially when there is a bartender with a large supply of everything.

This actually seems to make for a slightly more interesitng and varied selection, and keeps the ones with large or specialist inventories a bit rarer:

- type: entity
id: RandomVendingDrinks
name: random vending machine spawner
suffix: Drinks
parent: MarkerBase
components:
- type: Sprite
layers:
- state: red
- sprite: Structures/Machines/VendingMachines/random.rsi
state: drink
- type: RandomSpawner
rarePrototypes:
- VendingMachineCoffee
- VendingMachineSovietSoda
- VendingMachineSoda
rareChance: 0.2
prototypes:
- VendingMachineCola
- VendingMachineColaBlack
- VendingMachineColaRed
- VendingMachineShamblersJuice
- VendingMachinePwrGame
- VendingMachineDrGibb
- VendingMachineStarkist
- VendingMachineSpaceUp
chance: 0.8

Looking up how EntityTableSpawner and nested selectors work, in the hopes something better could be done. First time I've really looked into spawners in detail.

@Alpaccalypse
Copy link
Contributor Author

Made an entityTable for soda vendors, that certainly seems to be working. Probably needs feedback on balance from contributers with better knowledge of vender distribution on maps. Right now it seems reasonably logical to me, and seems to be giving a more balanced distributions of the different inventory groups.

@Alpaccalypse
Copy link
Contributor Author

From a suggestion, I decided to make Boda vendors only stock Space Cola in the contraband inventory again, to maintain the implicit Coke vs Soviet Russia reference, as well as the 1 item to choose from joke.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: General Interactions Area: General in-game interactions that don't relate to another area. Changes: No C# Changes: Requires no C# knowledge to review or fix this item. DB: Beginner Friendly Difficulty: Great for beginners. Unambiguous in scope, and explains how to achieve the result. P3: Standard Priority: Default priority for repository items. S: Needs Review Status: Requires additional reviews before being fully accepted size/M Denotes a PR that changes 100-999 lines. T: Cleanup Type: Code clean-up, without being a full refactor or feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants