Gw Temp

Menu

Tutorial - 'Stealing From Multiple Enemies' by jjesper82

An item about RPGMaker 2000 posted on

Blurb

A tutorial on how to steal from multiple enemies at once!

Body

This is my first tutorial so bear with me. If you have any questions about this please email me at the address above or just post a comment here and I will try to answer it.

Note: I am still fairly new at RM2K… if you find a problem with this, please tell me…

This tutorial is for those of you who wish to steal from multiple enemies. Now, since the “Show Choice” option is not present in the Monster Party battle events editor, it seems to me that is impossible for the player to choose which monster he/she wants to steal from. So, I made this tutorial for those of you who wish to steal from multiple enemies at the same time.

An intermediate knowledge of Switches, Variables, Fork Conditions, and Common Events is advisable… here we go…

1. Create the Following Switches/Variables
Switches:
Steal
Steal Switches Off
Monster1 Dead
Monster2 Dead
Monster3 Dead.
(Depending on how many monsters are in the current monster party. For this tutorial, I will use 3 Slimes.)
Already Stole1
Already Stole2
Already Stole3
(Again for however many monsters you want.)
Variables:
Monster1 HP
Monster2 HP
Monster3 HP
(Again however many monsters you have in current monster party.)
Steal Chance1
Steal Chance2
Steal Chance3
(You get the idea.)

2. Go to your database and in the skills tab, create a new skill called “Steal”(No! Really?), make its “Classification” a Switch and make it only available in battle. Set the “ON Switch” to turn switch “Steal” On. Fill out the rest of the info to your liking.
3. Now go to your monster party (mine is 3 slimes as I said above) and do the following:

4. In the Battle Event editor, Set the Trigger to start when Switch Steal is turned on.

5. Now, the very first and most important thing(maybe…lol), Turn the switch “Steal Switches Off” On!

6. Next Set the Variable “Monster HP” to Slime 1’s HP(NOT MAX HP!!!). Do the same with “Monster2 HP” and “Monster3 HP”, setting those to Slime’s 2 & 3 HP, respectively.
So Far, the code should look like this:

Trigger: Switch [####: Steal]-ON
Change Switch: [####: Steal Switches Off]-ON Set
Variable Ch:[####: Monster1 HP] Set, 1:Slime HP
Variable Ch:[####: Monster2 HP] Set, 2:Slime HP
Variable Ch:[####: Monster3 HP] Set, 3:Slime HP

7. Next, Make a Fork Condition (without Else Case) and set it to say that if the Variable “Monster1 HP” is 0, then the switch “Monster1 Dead” is on. Then do the same for the other monsters with their respective variables and switches.
Now, the code should look like this…

Trigger: Switch [####: Steal]-ON
Change Switch: [####: Steal Switches Off]-ON Set
Variable Ch:[####: Monster1 HP] Set, 1:Slime HP
Variable Ch:[####: Monster2 HP] Set, 2:Slime HP
Variable Ch:[####: Monster3 HP] Set, 3:Slime HP
FORK Optn: Varbl[####: Monster1 HP]-0(Set Variable Monster1 HP to Zero)
Change Switch: [####: Monster1 Dead]-ON Set

:END Case
FORK Optn: Varbl[####: Monster2 HP]-0(Set Variable Monster2 HP to Zero)
Change Switch: [####: Monster2 Dead]-ON Set

:END Case
FORK Optn: Varbl[####: Monster3 HP]-0(Set Variable Monster3 HP to Zero)
Change Switch: [####: Monster3 Dead]-ON Set

:END Case

The Next few steps are kind of hard for me to explain, so I will put the code down and try my best to explain each section….

8. Code:
FORK Optn: Switch [####: Monster1 Dead]-ON(with ELSE CASE)

:ELSE Case
FORK Optn: Switch [####: Already Stole1]-ON(with ELSE CASE)
Mssg: Slime 1 has nothing!

:ELSE Case
Variable Ch:[####: Steal Chance1] Set, Randm(1*5)—(you can choose whatever range)
FORK Optn: Varbl [####: Steal Chance1]-3(with ELSE CASE)—(you can choose a number)
Add/Remove Item: Potion(or whatever you item you want)- 1 incr.
Mssg: You stole a potion from Slime 1!
Change Switch: [####: Already Stole]-ON Set

:ELSE Case
Mssg: You couldn’t steal anything from Slime 1!
:END Case

:END Case

:END Case

EXPLAINATION of Step 8:
Now… what did I just do in step 8? Well… I really don’t know how to explain it very well…but I’ll try…
First I told RM2K to check if the switch Monster1 Dead was on. If it was on, then no stealing would take place, because…well the monster would be dead. But if Monster1 Dead was not on, then it took the first Else Case. After checking that Monster1 Dead WAS NOT on, RM2K then checked to see if the Switch Already Stole was On. If it was on, then it displays the message: “Slime 1 has nothing!” If it was not on, it took the second else case. In the second Else Case, RM2K set the variable, Stealing Chance to a Random Number between and including 1 and 5 (you can put any range in here that you want. This is just an example). It then checked to see if the Variable, Stealing Chance was set to 3 (Again, you can choose any number). If it was, then it added the item, a potion(pick your own item if you want), displayed the message “You stole a potion from Slime 1!”, and then turned the switch, Already Stole, On. If the Variable, Stealing Chance was not set to 3, then it took the third Else Case, which displayed the Message, “You couldn’t steal anything from Slime 1!”

9. Now, just copy and paste this BELOW EVERYTHING, of course change all the variables and switches to their appropriate number.

10. BE SURE TO TURN THE SWITCH “STEAL” OFF AT THE VERY END!!!!

I hope it wasn’t too confusing because I’m not too good at explaining things. The Good News is that I have provided the complete code just below, which should give you a nice visual aide. Here it is…

THE FINISHED PRODUCT

Trigger: Switch [####: Steal]-ON
----------------------------------------------------------
Variable Ch:[####: Monster1 HP] Set, 1:Slime HP
Variable Ch:[####: Monster2 HP] Set, 2:Slime HP
Variable Ch:[####: Monster3 HP] Set, 3:Slime HP
FORK Optn: Varbl[####: Monster1 HP]-0
Change Switch: [####: Monster1 Dead]-ON Set

:END Case
FORK Optn: Varbl[####: Monster2 HP]-0
Change Switch: [####: Monster2 Dead]-ON Set

:END Case
FORK Optn: Varbl[####: Monster3 HP]-0
Change Switch: [####: Monster3 Dead]-ON Set

:END Case
FORK Optn: Switch [####: Monster1 Dead]-ON

:ELSE Case
FORK Optn: Switch [####: Already Stole1]-ON
Mssg: Slime 1 has nothing!

:ELSE Case
Variable Ch:[####: Steal Chance1] Set, Randm(1*5)
FORK Optn: Varbl [####: Steal Chance1]-3
Add/Remove Item: Potion- 1 incr.
Mssg: You stole a potion from Slime 1!
Change Switch: [####: Already Stole]-ON Set

:ELSE Case
Mssg: You couldn’t steal anything from Slime 1!
:END Case

:END Case

:END Case
FORK Optn: Switch [####: Monster2 Dead]-ON

:ELSE Case
FORK Optn: Switch [####: Already Stole2]-ON
Mssg: Slime 2 has nothing!

:ELSE Case
Variable Ch:[####: Steal Chance2] Set, Randm(1*5)
FORK Optn: Varbl [####: Steal Chance2]-3
Add/Remove Item: Potion- 1 incr.
Mssg: You stole a potion from Slime 2!
Change Switch: [####: Already Stole2]-ON Set

:ELSE Case
Mssg: You couldn’t steal anything from Slime 2!
:END Case

:END Case

:END Case
FORK Optn: Switch [####: Monster3 Dead]-ON

:ELSE Case
FORK Optn: Switch [####: Already Stole3]-ON
Mssg: Slime 3 has nothing!

:ELSE Case
Variable Ch:[####: Steal Chance3] Set, Randm(1*5)
FORK Optn: Varbl [####: Steal Chance3]-3
Add/Remove Item: Potion- 1 incr.
Mssg: You stole a potion from Slime 3!
Change Switch: [####: Already Stole3]-ON Set

:ELSE Case
Mssg: You couldn’t steal anything from Slime 3!
:END Case

:END Case

:END Case
Change Switch: [####: Steal]-OFF Set

11. We’re almost done!! YAY!!!! Now go to the common events tab in the database and create a common event called “Steal Switches Off.” Make it a Parallel Process And set the Appearance Conditions Switch as the switch “Steal Switches Off”. Turn off every switch that you used in the Steal Battle Event.
It should look something like this:

Change Switch :[####: Steal]-OFF Set
Change Switch :[####: Already Stole1]-OFF Set
Change Switch :[####: Already Stole2]-OFF Set
Change Switch :[####: Already Stole3]-OFF Set
Change Switch :[####: Monster1 Dead]-OFF Set
Change Switch :[####: Monster2 Dead]-OFF Set
Change Switch :[####: Monster3 Dead]-OFF Set
Change Switch :[####: Steal Switches Off]-OFF Set
I hope it wasn’t too confusing. If you find any mistakes please tell me by emailing me at the address at the top of the tutorial, or by just commenting here.

Thanks for Reading!