It’s dreamy, right? Being able to yell “STOP! YOU HAVE VIOLATED THE LAW!” on top of your lungs… Anyways, this script doesn’t do that, but simply adds a “Steal” option to shops, so you can, well, steal stuff. If you’re successful, you keep the item, if you aren’t, it activates a switch. What happens afterwards is up to you; that’s what events are here for.
In the configuration module, set up the default % chance to succeed as well as the ID of the switch being enabled if you happen to fail. Note that the term “leader” used below refers to the first party member.
You also have to enter the ID of the variable to keep track of the number of theft attempts.
In the item/weapon/armor database tabs, you can use 3 notetags to set the per-item success chance:
<steal_chance: n%> Base chance
<steal_agi: n%> % of the leader's agility added to base chance
<steal_luk: n%> % of the leader's luck added to base chance
In the class tab, you can enter 2 notetags:
<steal_ok> Class can steal
<steal_class: n%> Class-based bonus added to every chance
In-game, it looks like this:
And if you fail your theft…
What happens afterwards is up to you~