From 4ed3ec2fede103d53ec8fe1449a6c49669580767 Mon Sep 17 00:00:00 2001 From: Platinum Date: Sun, 30 Jul 2023 13:29:34 +1000 Subject: [PATCH] feature: update ammo pricing to be more balanced --- advancedConfig.json | 2 +- src/mod.ts | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/advancedConfig.json b/advancedConfig.json index 15019e2..0616b7f 100644 --- a/advancedConfig.json +++ b/advancedConfig.json @@ -1,7 +1,7 @@ { "startDelayInSeconds": 6.9, "baselineBulletId": "59e6906286f7746c9f75e847", - "baselineBulletPrice": 3000, + "baselineBulletPrice": 1000, "bulletDamageMultiplierRedutionFactor": 0.7, "baselineArmourId": "5c0e655586f774045612eeb2", "baselineArmourWeight": 10, diff --git a/src/mod.ts b/src/mod.ts index 776f317..d137842 100644 --- a/src/mod.ts +++ b/src/mod.ts @@ -205,9 +205,17 @@ class TheBlacklistMod implements IPostDBLoadMod { const baselinePen = this.baselineBullet._props.PenetrationPower; const baselineDamage = this.baselineBullet._props.Damage; - const penetrationMultiplier = item._props.PenetrationPower / baselinePen; + const basePenetrationMultiplier = item._props.PenetrationPower / baselinePen; const baseDamageMultiplier = item._props.Damage / baselineDamage; + // A good linear graph that increases enough for higher pen ammo but keeps lower pen ammo around baseline price. + let penetrationMultiplier = 7 * basePenetrationMultiplier - 6; + + // Due to the maths above, its actually possible to go to the negatives (but I don't think any ammo blacklisted would, but just to be safe) + if (penetrationMultiplier < 0.2) { + penetrationMultiplier = 0.2; + } + // Reduces the effect of the damage multiplier so high DMG rounds aren't super expensive. // Eg. let baseDamageMultiplier = 2 & bulletDamageMultiplierRedutionFactor = 0.7. Instead of a 2x price when a bullet is 2x damage, we instead get: // 2 + (1 - 2) * 0.7 = 2 - 0.7 = 1.3x the price.