I found this tutorial while searching through my old posts because I was bored.
It was from the time I still used RM2K. Hope it is useful.
- Zeriab
You can do this in RPGmaker 2k. There are several ways, I will only show one.
In the following I will use:
1 switch: StealSwitch
2 variable: Chance, AmountStolen
Firstly go to the Database\Skills and make, let's call it Steal
Under the classification select Switch.
Make it available at Battle only.
Find the ON Switch and select one, let's call the selected one for StealSwitch
Fill out the rest as you please.
Then go Database\Monsters Party and select the party you want the ability Steal to work against.
Under the Battle Events on page 1 (you only need 1 page) set a trigger to StealSwitch-ON and enter the following commands:
<>FORK Optn:Varbl[xxxx:AmountStolen]-0
<>Variable Ch:[yyyy:Chance] Set, Randm[0*100]
<>FORK Optn:Varbl[yyyy:Chance]-30abov
<>Variable Ch:[xxxx:AmountStolen] Set, Randm[100*2000]
<>Messg:You've stolen \V[xxxx] gold!
<>
:ELSE Case
<>Change Switch:[zzzz:StealSwitch]-OFF Set
<>
:END Case
<>
:END Case
<>
This requires might require a bit explanation.
Let's take the first line: <>FORK Optn:Varbl[xxxx:AmountStolen]-0
This means that you should use a Fork Conditions, check variable, select the AmountStolen and check if it is the same a 0.
The xxxx simply means the number AmountStolen have in the database, yyyy refers likewise to Chance in the variables 'database' and zzzz for StealSwitch in the switches 'database'.
If you want to change the probability of stealing change this line: <>FORK Optn:Varbl[yyyy:Chance]-30abov
If you want to change the amount of gold stolen change this line:
<>Variable Ch:[xxxx:AmountStolen] Set, Randm[100*2000]
Under the Common Events make an event (select a non-used).
Name it whatever you like. Set the Event Start Condition to Parallel Process. Set the Appearance Conditions Switch to StealSwitch
Enter this as the Events Commands
<> Change Money: Money V[xxxx] Incr.
<> Variable Ch:[xxxx:AmountStolen] Set, 0
<> ChangeSwitch:[zzzz:StealSwitch]-OFF Set
<>