Steal skill mechanics - Explanation needed.

Hey guys.

I was thinking about a mod where the PC can't see certain items on the steal interface, depending on his steal skill. This is in order to make the steal skill more valuable, and less susceptible to save scumming:). A second option would be to give penalties, or outright disallow certain items from being stolen, unless PC has a high enough steal skill.

Thanks.

This is a really cool idea for a mod!
 
Hi,

can anyone confirm that the code of the steal function is the same in Fallout 1 as it is in Fallout 2? I have several times attempted to alter the apparent constant modifiers values (such as the cap of 95% chance if the player’s steal skill is above or -25% if stealing from the front) through Cheat Engine but without any luck

After an extensive search, I managed to locate the mark’s steal skill in the memory with Cheat Engine. Setting it to a negative value basically eliminates the catch_chance check.
Somewhat annoyingly, the mark’s steal skill will be re-located in the memory each time a load occurs. But at least now I know how to track it
 
This is a really cool idea for a mod!

I agree! I would support it because I play as a thief in my playthrough and I try to steal from every NPC on the map. It's frustrating to Save and load, save and load, save and load, save and load, save and load. Every time I fail the steal and when I do reload the save, for some reason I fail stealing at the first attempt like it's scripted to fail on the same NPC after reloading the save. :/

(Keep in mind I have Steal at 151% and Sneak at 150%)
 
What's up guys, I'm new to the forum and made an account just for this!

I've played FO1 a few times but never beaten it completely, so I'm playing Fallout 1 Et Tu right now. I wanted to understand the steal mechanic, and found this thread. Thank you to whoever made the Wiki.

I have moderate programming experience, so the code on the wiki is great for understanding how the mechanics of the game works. One thing I'm not quite understanding though is if the code on the wiki is truly an accurate reflection of the code in the game?

For steal specifically, the way it is written on the wiki, the thief's steal skill level has no actual impact on the probability of being caught when the
roll_vs_skill is not a critical success or critical failure.... It only has the chance to impact the probability of the steal attempt being a critical success.

The
mark_roll_result function should include success_chance as an input, no? Below is how it's shown on the wiki.
mark_roll_result = roll_vs_skill(catch_chance, 0)

As the code is written
success_chance only impacts roll_result, as shown below.
roll_result = roll_vs_skill(success_chance, stat_critical_chance(thief))

It appears that roll_result returns : CRITICAL_SUCCESS, CRITICAL_FAILURE, ... , ... , ... (the ... represent other potential return values, but none of them matter the way the code is written)

If it returns CRITICAL_SUCCESS then the steal is successful (great!)

If it returns CRITICAL_FAILURE then the steal is unsuccessful (great!)

However if it returns anything else, then this line is executed.

if (is_critter(mark))
catch_chance = steal_skill(mark) - chance_mod
else
catch_chance = 30 - chance_mod
mark_roll_result = roll_vs_skill(catch_chance, 0)


This means the only way the player's steal skill can impact actually stealing is if increasing steal increases the chance of a critical success roll, which I have no idea if it does. I would imagine all crit rolls are simply based on the players critical chance, and not the individual skill.

I hope FO2 isn't coded this way, because it means putting points in steal is completely useless. Can anyone please let me know if I'm off anywhere?

Thanks everyone!
 
I got a reply on my post through email, but I don't see it here. Thank you for commenting. Since I don't see the reply on the forum, I'll paste it below and respond.

Steal skill increases probability of succeeding in the steal attempt. It doesn't increase (or decrease) the probability of the subject of theft detecting your attempt. To steal successfully you want to maximize the first by investing in the steal skill (note though that success there is capped at 95%, so you want maybe 105 steal skill to have some breathing room) and minimize the second by lowering target's agility to 1 (which will also lower target's steal skill).

Thank you for the comment. Maybe I didn't describe what I'm seeing well enough in my previous comment, so let me try again.

The function that determines if the steal is a success or not is
is_steal_success(thief, mark, item). There are checks for both your steal attempt (roll_result), and the mark's detection attempt (mark_roll_result). is_steal_success returns true or false.

Looking at
is_steal_success(thief, mark, item) in more detail...
First, a chance modifier is calculated called
chance_mod that takes into account if you have the pickpocket perk, the item size, and if the player is standing in front of the mark.

Then,
roll_result is calculated. This is essentially the player's ability to steal an item, and is based on the player's steal skill, critical chance, if the mark is your party member, and if the mark is knocked out or knocked down. In order to know the specific values that roll_result can return, we would need to look into the code for the
roll_vs_skill(success_chance, stat_critical_chance(thief)) function, but it doesn't matter for what I'm trying to explain.

Below is the rest of the code. The immediate two lines below say that if the player's
roll_vs_skill returns a CRITICAL_SUCCESS, then is_steal_success returns true and the function terminates. If roll_vs_skill returns CRITICAL_FAILURE then mark_roll_result = SUCCESS, is_steal_success returns false, and the function terminates.

However, if
roll_vs_skill returns anything other than CRITICAL_SUCCESS or CRITICAL_FAILURE, then the mark has a roll to determine if they catch the player that is based on the mark's steal skill and the chance modifier calculated earlier. (Note that this roll could also return CRITICAL_SUCCESS, CRITICAL_FAILURE, or something else).

if (roll_result == CRITICAL_SUCCESS)
return true #########
if (roll_result != CRITICAL_FAILURE)
{
if (is_critter(mark))
catch_chance = steal_skill(mark) - chance_mod
else
catch_chance = 30 - chance_mod
mark_roll_result = roll_vs_skill(catch_chance, 0)
}
else
{
mark_roll_result = SUCCESS
}
if (is_success(mark_roll_result))
return false #########
else
return true #########

There are only three lines in this code that terminate
is_steal_success, and I've made them green above and put a line of ### signs next to them.

It is clear that the only ways for a player to be successful in a steal are to roll a
CRITICAL_SUCCESS on their roll_vs_skill, or for the mark to fail their roll_vs_skill. Someone can correct me if I'm wrong, but I don't believe the steal skill (or any skill) factors into if a roll is a CRITICAL_SUCCESS. I would assume that only the critical chance variable matters.

What that means is that no matter your steal skill, if the mark notices you then you fail the steal.

I would contend that the way steal should work is that assuming both you and the mark don't critically succeed or fail the
roll_vs_skill checks, the success of the steal should be calculated comparing your roll vs the mark's roll. This would make it worth investing points into steal. Right now, it seems the best way to improve stealing success is to improve your critical chance.

I hope that makes sense. Again, maybe this code isn't exactly the way that FO2 implements steal. I don't know enough about Falltergeist other than what it says on the github main page. "Opensource crossplatform Fallout 2™ engine writen in C++ and SDL. https://falltergeist.org/"

Thanks y'all
 
You're right, it's exactly like that!
The pseudo-code of stealing describes everything as it works in F1 and F2, you can find the IDA database on the Internet and make sure of this.
The steal skill does not really affect the chance of being detected during pickpocketing.

I would contend that the way steal should work is that assuming both you and the mark don't critically succeed or fail the roll_vs_skill checks, the success of the steal should be calculated comparing your roll vs the mark's roll. This would make it worth investing points into steal. Right now, it seems the best way to improve stealing success is to improve your critical chance.
You can write a global script yourself using sfall hooks to fix the steal mechanics.
I recently made such a mod, but it changes the original behavior quite a lot by adding dependencies on the perception of the target and the steal skill of the player.
 
Last edited:
This doesn't directly answer the op's question but it is related and it's worth thinking about. In both Fallout 1 & 2 detection is dependant on a line of sight basis. Manoeuvre an NPC between the line of sight detector and the object and you can steal everything with 100% success and 0% risk even with a Steal skill of 0. Effectively you're stealing from a dead person. In Fallout 1 if you push an 'out of party' NPC next to Killian so that Killian can't see you steal from his table inventory and you can steal the whole shop. If you do that you probably don't need to Steal again during the rest of the game. The same principle applies in Fallout 2 for opening the door to Metzger's room, Stark's table, etc.
 
In both Fallout 1 & 2 detection is dependant on a line of sight basis. Manoeuvre an NPC between the line of sight detector and the object and you can steal everything with 100% success and 0% risk even with a Steal skill of 0. In Fallout 1 if you push an 'out of party' NPC next to Killian so that Killian can't see you steal from his table inventory and you can steal the whole shop. The same principle applies in Fallout 2 for opening the door to Metzger's room, Stark's table, etc.
Cool advice on how to fool stupid NPCs!
But some people enable the ShootThru_Fix in the sfall.ini, which fixes LOS checking and allows the NPC to see through objects with the ShootThru flag (windows / bars / fences / other NPCs) and then this life hack will not help, but reducing NPC's perception and using sneak will help ;)
 
The ShootThru_Fix is bad and can cause issues in other areas of the game. In my opinion it should not be enabled unless a mod was specifically made with it in mind.
 
If you want to implement proper stealing suitable for ironman, check out Rogue Rebalancing implementation for BG2.
There, upon a failed attempt, you get a dialog in which you can talk yourself out of conflict, based on your stats, skills, reputation. Each failed attempt increases difficulty, and on the 4th failure there's no chance, the NPC turns hostile.
 
Back
Top