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

More varied and balanced maintenance loot. #26500

Merged
merged 18 commits into from
Aug 26, 2024

Conversation

warriorstar-orion
Copy link
Contributor

@warriorstar-orion warriorstar-orion commented Aug 15, 2024

What Does This PR Do

This PR refactors and expands the maintenance loot spawners and loot tables.

Currently, most spawners spawn one item but some spawn two, three, or eight, depending on what's mapped.
With this PR there is only one maintloot spawner type. It has a 65% chance of proccing, and it can spawn anywhere from 2-4 items. The "empty maintenance" station trait reduces that chance to 30%, and the "filled maintenance" trait increases that chance to 80%.

The loot table has been split up into several tables in rough order of rarity, and a trash tier has been added, which is just literal trash.

Note: The mean spawn count on box has increased from ~420 to ~580, about a 35% increase, BUT there is a commensurate flat 35% chance to spawn trash across the board. So all actual item counts remain reasonable, but there's plenty of slots now for spawning trash. Again, there's 160 new spawn chances (on Box), but they're all literal trash.

Item spawns are now blackboxed, so the spawn rates can be checked after every round.

Incomplete list of added items
  • Literal trash
  • Tier 1 stock parts
  • Machine and first aid kits (rare)
  • Whetstones (very rare)
  • Light bulbs and tubes
  • More assembly bits (prox sensor, timer)
  • Posters
  • Dice
  • Random books
  • Mugs, glasses, beakers, syringes
  • Nanopaste (rare)
  • Robot analyzer (rare)
  • Advanced reagent scanner (rare)
Technical Details
  1. The PR ports and tweaks TG's base random spawner object which provides some useful features.

  2. It adds several new sub-spawners that are part of the main loot table but can also be used by mappers for whatever:

    • Trash item spawner
    • Tool spawner
    • Engineering materials spawner
    • Toolbox spawner
    • Snacks spawner
    • Dice spawner
    • Bureaucracy item spawner
  3. The loot table tiers are several global variables consulted by the maint loot spawners. Several helpers now exist that allow for weight picking recursively from lists of lists, ported from TG.

Why It's Good For The Game

The maint loot table is a mess. It's one giant list of over 100 items, that contains everything from books to guns. Difficult to work with.

Spawn rates are almost meaningless. Toy handcuffs spawn at the same rate as chameleon noslips. Knuckledusters spawn more often than Syndicate soap. Wirecutters have the same chances of spawning as an entire mechanical toolbox. Extinguishers were five times more common than nearly any other item on the list. Imagine trying to add more items to the list and keep things balanced.

It's stale. The items on the list haven't changed significantly since the loot tables were introduced, while plenty more items have been introduced into the game since then. As well, there are plenty of items that could would be nice random boons during a round if they were on the list, and that should be part of the point of maint diving.

Variety, randomness, and unpredictability are good things. Maintenance areas shouldn't be so static and predictable.

Balance team will have a much easier time of adding to/removing from/tuning the loot tables now that they are split up into sane tiers.

Images of changes

(animated, click the play button)

loot

Testing

I wrote a simulator that parsed the codebase and retrieved the odds for the spawners, then ran them in batches of 50 rounds, collecting and comparing the results. Item counts were reviewed with Balance team.

The most recent results can be viewed here: https://docs.google.com/spreadsheets/d/19rImqR6RACjUrccuih83ta0z7Sz8N_kUP-KBZ-mbUeY/edit?usp=sharing


Declaration

  • I confirm that I either do not require pre-approval for this PR, or I have obtained such approval and have included a screenshot to demonstrate this below.

2024_08_15__14_07_44__Comparing ParadiseSS13_master warriorstar-orion_feat_loot-tables · ParadiseSS1


Changelog

🆑
add: More than 80 items have been added to the maintenance loot table! Expect more trash, more common items, more useful items, and a few more rare items.
/:cl:

@ParadiseSS13-Bot ParadiseSS13-Bot added Testmerge Requested This PR has a pending testmerge request -Status: Awaiting type assignment This PR is waiting for its type to be assigned internally Map Edit This PR will modify a map Sprites This PR modifies the game sprites labels Aug 15, 2024
@Burzah Burzah added the Balance This PR will modify how effective something is or isnt label Aug 15, 2024
@ParadiseSS13-Bot ParadiseSS13-Bot added -Status: Awaiting approval This PR is waiting for approval internally and removed -Status: Awaiting type assignment This PR is waiting for its type to be assigned internally labels Aug 16, 2024
@ParadiseSS13-Bot ParadiseSS13-Bot added the Testmerge Active This PR is currently testmerged on production label Aug 18, 2024
@github-actions github-actions bot added the Merge Conflict This PR is merge conflicted label Aug 18, 2024
@github-actions github-actions bot removed the Merge Conflict This PR is merge conflicted label Aug 19, 2024
@ParadiseSS13-Bot ParadiseSS13-Bot added -Status: Awaiting review This PR is awaiting review from the review team and removed -Status: Awaiting approval This PR is waiting for approval internally labels Aug 24, 2024
@ParadiseSS13-Bot ParadiseSS13-Bot removed the Testmerge Active This PR is currently testmerged on production label Aug 26, 2024
Copy link
Member

@S34NW S34NW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been issue-free on TM for a while. Time to go.

@S34NW S34NW added this pull request to the merge queue Aug 26, 2024
Merged via the queue into ParadiseSS13:master with commit 12cf1ed Aug 26, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Status: Awaiting review This PR is awaiting review from the review team Balance This PR will modify how effective something is or isnt Map Edit This PR will modify a map Sprites This PR modifies the game sprites Testmerge Requested This PR has a pending testmerge request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants