Various questions about the inner workings of skills

Andrei Nistor

First time out of the vault
Hello, I had a few questions regarding how some of the skills are working in FoT

Does anyone have any idea how the number of hit points healed works for First Aid and Doctor? Does it scale with the max hit points of the target, does it scale with the skill level of the healer. It certanly seems to be much higher than the levels in F1/2.

What does a skill roll look like, is the chance for critical failure similar to the f2 engine calculations? Any ideas on critical failure effects (like crippling limbs).

For first aid the experience reward from what I could gather is Max(15, [healed hit points])

For lockpick it seems like a mistery as it always fluctuates (could it possibly be related to the roll that you did, or a random roll based on the lock difficulty).

Is bandaged always applied after the third use of first aid on the same target or does it fluctuate based on the healer's skill level and also can it be wiped clean if enough time passes between applications of first aid.

Thank you!
 
Here's what I have from my old notes re: behavior of skills. (Note that these are old notes, and from before I started using Ghidra for analysis, so take the info with a grain of salt).

TL;DR:
* Healing amount scales with skill level of healer and heal rate of the target. Max HP doesn't matter, except for when Doctor skill gets a critical success.
* Bandaged state is a counter - each First Aid use increments by 1, and the status is displayed (and First Aid is prohibited) when the value reaches 3.
* Bandaged state can be reduced by applying Doctor skill (-1 to value), or by time passing (notes say -1 per day, not sure if this is exact)

Full details:

Important note: Skills which mention a "critical" success or failure have a serious bug, where an uninitialized variable is used to hold the bits indicating success/fail and critical. For the success/fail bit, the game will properly set/clear the bit value based on the result, but for the critical effect bit, the value from the uninitialized memory is kept. This means that, depending on the preceding code, the critical effects may occur slightly more often, completely randomly, or nearly always, even if they should not.

Sneak:
The game determines a "detection range" for each NPC vs a sneaking character. The range calculation is complex, but includes the following factors: light level (multiplier, formula appears to be (0.5 + [0.0-1.0 depending on brightness]) * 0.666), stance (multiplier, 0.8 for crouch and 0.6 for prone), moving vs not moving (multiplier, 1.5 if moving), NPC's Perception (base value for other multipliers: PE * 3 + 12), difference in skill between NPC and sneaking character (from notes, this is a multiplier: 80 / (SneakSkill - NPCSneakSkill/2 + 100) , with a 20% increase in character's sneak skill with Ghost perk if light level is below 0.6 ), and finally angle-off between sneaker's position and NPC's line of sight (multiplier, 1.0 if within 60 degrees of line of sight on either side, with linear reduction down to 0.0 when exactly behind the NPC). If the sneaking character is within this range when the NPC's think timer triggers, then they will be detected. Note that there is no randomness in the check, other than timing as to when the NPC's think timer triggers - so if a character remains hidden for more than a couple seconds, then they will stay hidden, as long as they and/or NPCs do not move or rotate.

Note the potential for a 0.0 multiplier if directly behind a target - if you can line your character up perfectly behind without being detected, then you can remain there indefinitely for as long or as close as you want.


Steal:
This is a contested skill roll check. Take the character's skill in Steal, and subtract difficulty, calculated as follows:

Target's PE * 0.1 * Target's Steal skill
+ (Total items weight * 2.0 , for weightless items use 0.1 weight per item)
+ 25 if stealing character within 90 degrees of line of sight
(previous two items skipped if stealer has Pickpocket perk)
- 100 if target is sleeping or unconscious
- 25 if stealer is sneaking
- 20 if target is prone
The difference between skill and difficulty is capped to a maximum of 95. This is then compared to a roll from 0-99. If the roll is below the difference, then stealing succeeds, otherwise it fails.

Note that because of the cap, there can never be a 100% chance of success for stealing.


First Aid, Doctor, Repair:
All of these appear to function similarly. First do a skill roll check on the relevant skill; e.g. determine a "success value" as:
skill (capped at 95%) - random roll from 1-100

If this is successful, do a critical check: (success value * 0.1 + critical chance) compared to a roll from 0-99. If roll is lower, then the heal is a "critical success".

Amount healed is:

First Aid: (Random value between [21/80 * FirstAidSkill, 35/80 * FirstAidSkill] + 4*HealerPerks) * (1 + 0.1 * TargetHealRate). Random range min/max is doubled if a critical heal. Applies +1 to Bandaged state; if Bandaged >= 3, then further First Aid will fail.

Doctor: If skill is at least 50%, heal unconscious status. On success, heal all injury states, reduce Bandaged by 1, and OverdosePoints by 15. Then, on non-critical heal, heal (random value between [35/100 * DoctorSkill, 58/100 * DoctorSkill] + 4*HealerPerks) * (1 + 0.1 * TargetHealRate), and on critical heal, fully heal the target.

Repair: On a (robot) actor, does the same as Doctor, just using Repair skill value (taking into account the Tight Nuts trait, reducing Repair skill by 50% if the target has it). On a vehicle, repair recovers a random value between [70/100 * RepairSkill, 122/100 * RepairSkill] vehicle HP, with no critical repair behavior.

If the heal skill check fails: there's a check for a "critical fail", only if the healer has Jinxed or Fear the Reaper traits. Chance for critical fail is 2x the character's critical chance, clamped between [5,25]. On critical fail, First Aid will injure a random body part, Doctor will do the same + deal between 1-9 damage. Repair fail on vehicle does nothing.

Lockpick, Science:
Both of these are straight "contested" skill checks: If skill >= (random roll [0-99] + difficulty), then succeed.

Traps:
In general, also straight "contested" skill checks, with following adjustments:
Setting a timer trap multiplies the effective Traps skill by 1.5
Disarming a trap reduces skill by both difficulty (Set in the entity definition) and "skill roll" (set either in level editor or when a player sets a mine). This is compared to the 1-100 roll as with a normal skill check.
Critical failure can happen on trap disarm if the check fails by at least 50 + 25 * DemolitionExpertPerks, or if the skill check critical condition occurs (same code as for the healing skills to critically fail). (Also affected by bug mentioned above - so trap disarm failures explode more than they are supposed to.)
 
Back
Top