About this mod
Enables elerium degradation in Long War with customizable half-life period and loss percentage
- Permissions and credits
Long War Elerium-115 by liquid
Version 1.00
This mod enables elerium degradation in Long War
To obtain X-COM Vanilla experience set ELERIUM_LOSS to 0.5 and
ELERIUM_HALFLIFE to 20days * 24h = 480. This means that the elerium
will be halved with a period of 20 days.
With this granularity if you have 100 elerium on the 1st of march,
you'll still have 100 on the 19th and you'll have 50 on the 20th.
The default values of the mod halve the elerium each 80 days but the
granularity the degradation is increased to 4 days, so the loss will be
calculated more often (over 20 steps) and not all at once. You'll lose
2.5% of your elerium each 4 days.
Here's how much you'll lose each step if x is the current amount of elerium:
1 for 1< x < 80
2 for 80 <= x < 120
3 for 120 <= x < 160
4 for 160 <= x < 200
5 for 200 <= x < 240
6 for 240 <= x < 280
7 for 280 <= x < 320
8 for 320 <= x < 360
9 for 360 <= x < 400
The minimum loss of elerium is 1 on each step.
Here's the formula for ELERIUM_LOSS with higher granularity:
ELERIUM_LOSS = 1 - B^(-G/T) where:
B is the % lost over the entire cycle
T is the length of the cycle
G is the granularity of the cycle (a single step)
So the default values are calculated like this:
0.025 = 1 - 0.5^(-4/80)