mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-21 14:34:49 +00:00
## About The Pull Request This PR makes the reward and cooldown for departmental orders scale with crate cost using a logarithmic scaling, instead of comparing the price to preset thresholds for time, or awarding the same amount as the crate's cost. Previously, to calculate the cooldown time, the code was calculated via the following manner: ``` credits = clamp(credits, min, max) time_y = 10 MINUTES * ((credits - min)/(max - min) + 1) ``` Minimum was 320 credits, max was 3000, thus, all crates slid around between 10 minutes to 20 minutes. The reward for delivering the crates was the same as the crate's value. This meant ordering egregiously expensive crates, far beyond 3000 was way too desirable. This PR changes both to use logarithmic scaling. Cooldown time uses `60* log(price)^2.2`, and reward uses `140 * log(price)^1.4`. **Cooldown analysis** At 320 it's 7.54 minutes, at 1400 it's 12.44 minutes, at 3000 (around gun crates) it's 15.5 minutes, at 8000 (hat crate) 20 minutes, at 9000 (expensive atmos cans) it's 20.58 minutes, and at the 20k crate it's 24.76 minutes. **Crate rewards analysis** At 320 it's 475 credits, at 1400 it's 669 credits, at 3000 (around gun crates) its 778, at 8000 (hat crate) it's 925 credits, at 9000 (expensive atmos cans) it's 943 credits, and at the 20k crate it's 1070 credits. Up to 540 credits, you are actually getting a higher reward than what the crate costs, but this is okay, as its a reward for delivering simpler orders. A little surplus for you. For the console UI, I have made items costing 3000 or more display Moderate, and items costing 8000 or more, Long cooldowns. ## Why It's Good For The Game Ordering really expensive crates should be a luxury, not a way to generate money. The money is supposed to be a bonus, in addition to the free crate to sell. Using a logarithmic scale, the credit bonus is reigned in more evenly, making it more predictable for economy tweaking, and avoids players double dipping credits in their free purchase. Decreasing the rewards also give space for other new ways to generate rewards in relation to departmental orders, such as stamping the manifest with the correct head's stamp being worth more money and such. <details> <summary>Old PR Text, which was using a price cap instead</summary> ## About The Pull Request Departmental orders are a neat feature, but some of the available packs had problems economywise. The cooldown of range from 10 to 20 minutes, with 10 minutes being the base for anything costing less than 320 credits, and 20 minutes at 3000 credits. I have no problem with the lower cap, but the upper cap has issues, as recently, a 20k crate was added to cargo, which means it is possible to dump quite a large amount of funds into cargo every 20 minutes. Departmental orders probably need a bigger overhaul, and this solution is imperfect, but I have talked with @ArcaneMusic about this as an interim stop gap measure. This PR also autodocs a proc, and moves some values to global defines, for ease of balancing. This PR affects the following crates, with the uncapped crate values in brackets. Armoury - Combat Shotguns (3500 credits) - Energy Guns (3600 credits) - NT BR-38 Crate (20,000 credits) Engineering - BSA parts (6000 credits) - DNA Vault Parts (4800 credits) Engine Construction - HFR Crate (4800) - Supermatter Shard Crate (4000) Materials - BZ Crate (9000 credits) - Nitrous Oxide (9000 credits) - Water Vapor Crate (3010 credits) Toys - Collectible Hats Crate (8000 credits) ## Why It's Good For The Game Instantly awarding 20k to cargo every 20 minute, in addition to 27k from the other consoles (if both engineering and science orders BZ, service orders collectible hats, and medical orders something around 1000), is a bit too much. The money gained should be along a much more predictable and expected value. With this chance, the most they can get is 13k every 20 minutes across all departments. </details> ## Changelog 🆑 balance: Rewards from departmental orders use a logarithmic scale, resulting in less rewards for high tier crates. The cooldown time is also logarithmic now, which has slightly decreased cooldown values on cheaper crates. /🆑