I found how Sneak works in UESP. Pickpocket wasn't explained there, so I looked it up and discovered what might be the correct formula

here: http://www.gamesas.com/pickpocket-succe ... 18884.html

The second comment contains it, and its source is: http://forums.bethsoft.com/topic/109721 ... /itemValue

However, I also found a thread which contradicts these, having a formula which does take the weight of items into account. Here it is: http://www.gamesas.com/pickpocketing-t14566.html

For those not interested in checking 3 websites, the first formulae:

Second formulae:Pickpocketing is a multi-stage process. Not all items in the NPC's inventory are available, depending on the initial rolls. There are checks on a steal attempt, and when the window is closed.

On initiating

for each item stack:

roll 100, stack is visible if roll <= pcSneak

On picking an item

fatigueTerm = fFatigueBase - fFatigueMult*(1 - normalisedFatigue)

where normalisedFatigue is a function of fatigue. empty fatigue bar -> 0.0, full fatigue bar -> 1.0

Note fatigueTerm is normally 1.25 at full fatigue.

checks the whole stack no matter how many you try to take

note: filled soulgems have the value of an empty soulgem due to a missing calculation

stackValue = itemValue * itemsInStack

valueTerm = 10 * fPickPocketMod * stackValue

x = (0.2 * pcAgility + 0.1 * pcLuck + pcSneak) * fatigueTerm

y = (valueTerm + npcSneak + 0.2 * npcAgilityTerm + 0.1 * npcLuckTerm) * npcFatigueTerm

t = x - y + x (yes, that's what it does)

if t < pcSneak / iPickMinChance:

roll 100, win if roll <= int(pcSneak / iPickMinChance)

else:

t = min(iPickMaxChance, t)

roll 100, win if roll <= int(t)

On closing the pickpocket window

Same calculation as taking an item, but with valueTerm = 0

Comments

The stealing process is highly broken for most items; any item or stack of items worth over 100 septims has such a negative result that it is picked at minimum chance, and this is at maximum all stats. A player with stats around 50 is picking at minimum for anything valuable. The available items window is not reset after every successful steal, only when you close the window and retry the pickpocket.

I also tried to find whether the Intelligence attribute plays a role in the cost of spells, mainly to check if playing a mage is actually viable without mods.Enter/Leave inventory:

Player.Sneak > d100 + Victim.Sneak

Take items:

Player.Security > d100 + fPickPocketMod * item Weight