![]() |
Finding out you are infected the hard way: coughing up blood. |
Player Infection Chance
A new holotape configuration option has been added under Infection Settings -> Player Infection Chance. This setting only appears if the Player Infection setting is NOT disabled (for hopefully obvious reasons). The initial options for this new setting are as follows:
Based on Health (default)
25%
50%
75%
100%
Why Not Based on Armor?
I spent some time thinking about how to make infection more/less likely for players. Early thoughts centered around the armor the player is wearing. I was even going so far as to take into account the size of the armor (amount of flesh covered) instead of armor rating. However, armor is problematic for the following reasons:
1) inconsistent keywords on armor that seems only solvable by depending on a mod like AWKCR
2) mod-specific armors may fall through the cracks
3) it is difficult to query for currently equipped armor without F4SE which isn't available on Xbox
The above can be worked around but would add significant effort and code to maintain just to create variable infection chance. I then came to a realization that a reasonable approximation of armor can be achieved by instead looking at the amount of health lost during an attack. Health also simulates multiple attacks in short duration making the player more vulnerable which makes sense.
Based on Health
This is the default value for the new Player Infection Chance setting. The percentage chance of infection is calculate each time the OnHit is triggered by a zombie attack on the player. Inside the callback the GetValuePercentage convenience function makes it easy to calculate the percentage of health remaining for the player. The formula is pretty simple:
% infection chance = 1 - % player health remainingeg) if % player health remaining = 0.8 (80%), then % infection change = 0.2 (20%)
Improvement to Lethal Infections
When any setting other that 100% infection chance is used the player is now uncertain about whether or not they are infected when struck by a zombie. If the Lethal Infection mode is enabled there will also be an incubation period before applying the infection to the player. Combine these two together and now when a player is hit by a zombie they aren't sure if they are infected or not and won't find out until incubation is over (~45 seconds). The hope is that this will add some tense moments while the player waits to see if the "You are infected" message appears.
Future
I'm considering another config option that would allow configuration of the curability of an infection all the way from incurable to cured 100% of the time with antibiotics. This isn't a big priority though as you can pretty easily roleplay an incurable infection by simply not using antibiotics, but sometimes it is easier to have a setting in case you forget. Having a percentage effective configuration might be interesting though and make the game tougher for those that find they have a surplus of antibiotics.
Another though is to make a cure specific to zombie infection which isn't the game's standard antibiotics at all. That would allow me to control the rarity of the cure and maybe even spawn a quest to retrieve it when you get infected.
1 comments: