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

ASRS Supply Pools -- Crates Carryover and MessTech supply #5018

Merged
merged 10 commits into from
Dec 7, 2023

Conversation

fira
Copy link
Member

@fira fira commented Nov 23, 2023

About the pull request

Code refactor aside this has two main effects:

  • Adds ASRS supply pools. These are categories of ASRS spawned gear that run in parallel of each other, that is to say not taking away from the military operation pool of crates. Right now they're hardcoded to give only one crate, and send a crate of food ingredients every roughly 30 minutes as proof of concept, to resupply the MessTech.
  • Adds smooth scaling to amount of crates given by ASRS. The legacy formula is floor(sqrt(xenos/3)) which is rough as for example once the Xeno count goes below 27 you immediately go from 3 crates awarded to 2. To provide a more consistent and reliable supply flow, it's no longer floored - instead the decimal part carries over. To make up for this, the divider factor of 3 got increasded to 4, reducing available supply by effectively around 15%. It is still expected to be an overall supply buff and could be increased.

Current supply "curve":
image

overall supply curve with changes:
image

And the relative effect of both changes to flooring and factor per Xeno count vs current:
image

Explain why it's good for the game

As explained above this aims to fix two main issues.

The first is lack of supply for shipside roles, you have to budget them which many Reqs won't do - now they can get some supplies regardless. More can still be ordered as needed. In both cases this is additional player interaction shipside.

The second is the amount of ASRS crates being highly variable and dropping off suddenly. Carrying over "partial" crates should give a more consistent supply flow.

Testing Photographs and Procedure

image

Alternate food pool spawning in in parallel - here with boosted frequency for testing

Changelog

🆑
add: Introduced ASRS supply pools. As proof of concept, ASRS now spawns a crate of food ingredients every 30 minutes, in addition to regular gear.
balance: ASRS now keeps track of partial crates awarded. This means if you should receive 2.5 then 2.5 crates, you now get 2 then 3, rather than 2 and 2. This is intended to result in smoother, more reliable transitions and scaling with varying amount of Xenos on map.
balance: Amount of ASRS crates awarded was reduced by about 15.5% to make up for crates carrying over. Overall this should result in an about 5-10% reduction in highpop crates, and ~10% increase in lowpop. Pop being based on xeno count.
code: Refactored part of ASRS supply code to be less of a painful, antique artifact.
fix: Fixed incorrect weighting in the ASRS supply code, effects on crate distributions are unknown.
fix: Fixed HPR ammo ASRS packs failing to spawn and ending up as MK1s instead.
fix: Fixed ASRS order numbers not increasing the order IDs... This whole time..
/:cl:

@github-actions github-actions bot added Feature Feature coder badge Balance You need to be a professional veteran game maintainer to comprehend what is being done here. Code Improvement Make the code longer Fix Fix one bug, make ten more labels Nov 23, 2023
@fira
Copy link
Member Author

fira commented Nov 23, 2023

So it seems floor() exists on 515 but not 514 ? Huhhh ? Anyway

@cm13-github cm13-github added the Merge Conflict PR can't be merged because it touched too much code label Nov 25, 2023
@cm13-github
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@cm13-github
Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

@cm13-github cm13-github removed the Merge Conflict PR can't be merged because it touched too much code label Nov 30, 2023
Copy link
Contributor

@Birdtalon Birdtalon left a comment

Choose a reason for hiding this comment

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

Looks good.

code/game/supplyshuttle.dm Show resolved Hide resolved
@fira fira added the Testmerge Candidate we'll test this while you're asleep and the server has 10 players label Dec 2, 2023
@Zonespace27 Zonespace27 added the Balance Approved This PR has had its balance and gameplay-affecting aspects approved. Cry to the Head-maint about it. label Dec 3, 2023
@fira fira mentioned this pull request Dec 3, 2023
@cm13-github cm13-github added the Merge Conflict PR can't be merged because it touched too much code label Dec 6, 2023
@cm13-github
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@cm13-github cm13-github removed the Merge Conflict PR can't be merged because it touched too much code label Dec 6, 2023
@cm13-github
Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

@harryob harryob added this pull request to the merge queue Dec 7, 2023
Merged via the queue into cmss13-devs:master with commit c2ca910 Dec 7, 2023
26 checks passed
cm13-github added a commit that referenced this pull request Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Balance Approved This PR has had its balance and gameplay-affecting aspects approved. Cry to the Head-maint about it. Balance You need to be a professional veteran game maintainer to comprehend what is being done here. Code Improvement Make the code longer Feature Feature coder badge Fix Fix one bug, make ten more Testmerge Candidate we'll test this while you're asleep and the server has 10 players
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants