-
Notifications
You must be signed in to change notification settings - Fork 566
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ASRS Supply Pools -- Crates Carryover and MessTech supply (#5018)
# About the pull request <!-- Remove this text and explain what the purpose of your PR is. Mention if you have tested your changes. If you changed a map, make sure you used the mapmerge tool. If this is an Issue Correction, you can type "Fixes Issue #169420" to link the PR to the corresponding Issue number #169420. Remember: something that is self-evident to you might not be to others. Explain your rationale fully, even if you feel it goes without saying. --> 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](https://github.com/cmss13-devs/cmss13/assets/604624/75a698a3-558c-46ea-b43a-eaa004633560) overall supply curve with changes: ![image](https://github.com/cmss13-devs/cmss13/assets/604624/c1198694-d483-43c4-89be-6d46185ef1e3) And the relative effect of both changes to flooring and factor per Xeno count vs current: ![image](https://github.com/cmss13-devs/cmss13/assets/604624/ab8af08e-488a-4383-adf8-c09c460a9ee5) # 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](https://github.com/cmss13-devs/cmss13/assets/604624/edc14437-7726-431e-aa32-292a76d38c94) Alternate food pool spawning in in parallel - here with boosted frequency for testing # Changelog :cl: 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:
- Loading branch information
Showing
11 changed files
with
186 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
//We use the cost to determine the spawn chance this equals out the crates that spawn later in the round. | ||
#define ASRS_HIGHEST_WEIGHT 0 //warning this weight wont change. | ||
#define ASRS_VERY_HIGH_WEIGHT 5 | ||
#define ASRS_HIGH_WEIGHT 15 | ||
#define ASRS_MEDIUM_WEIGHT 25 | ||
#define ASRS_LOW_WEIGHT 35 | ||
#define ASRS_VERY_LOW_WEIGHT 50 | ||
#define ASRS_LOWEST_WEIGHT 100 | ||
|
||
// List of pools of supply packs, rolled individually by the ASRS system | ||
/// Main pool of ASRS supplies, dispensing military supplies such as ammo | ||
#define ASRS_POOL_MAIN "Main" | ||
/// Secondary ASRS pool dispening food related items for MessTech | ||
#define ASRS_POOL_FOOD "Food" | ||
|
||
/// Divider to the amount of xeno forces on the planet to ASRS provided crates. It is used as such sqrt(xenos/ASRS_XENO_CRATES_DIVIDER)) | ||
#define ASRS_XENO_CRATES_DIVIDER 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.