Gw Temp

Menu

Tutorial - 'Monster Selection System' by mooglemaster

An item about RPGMaker 2000 posted on

Blurb

A tutorial that shows you how to make a selection system in a custom battle system (CBS).

Body

A Monster Selection System

“I'd like to thank the person that inspired me for this. Someone I cherish very much, who recently became very close to me.”
So I’d say I’m done with the sissy stuff, it’s time to get real. First of all, what in God’s name is a monster selection system? It’s a tool for the hero to choose who it is going to attack. It’s very useful in Custom Battle Systems or Action Battle Systems. It is also quite boring and takes a lot of time to program, so let us move forward.

STEP #1 – SWITCHES AND VARIABLES
Variable 0001 – Enter Password
Switch 0001 – Mons1 Alive
Switch 0002 – Mons2 Alive
Switch 0003 – Mons3 Alive
Switch 0004 – Mons1 Selected
Switch 0005 – Mons2 Selected
Switch 0006 – Mons3 Selected
If you want or need to, you could add more monsters; just be sure to add an “Alive” switch and a “Selected” switch for each opponent you add.

STEP #2 – SETTING EVENTS
<>If Switch [0001: Mons1 Alive] is ON
<>Change Switch: Var. [0004: Mons1 Selected] Switch ON
<>
: Else Case
<>If Switch [0002: Mons2 Alive] is ON
<>Change Switch: Var. [0005: Mons2 Selected] Switch ON
<>
: Else Case
<>If Switch [0003: Mons3 Alive] is ON
<>Change Switch: Var. [0006: Mons3 Selected] Switch ON
<>
: Else Case
<>Go to Label #2
<>
: End Case
<>
: End Case
<>
: End Case
<>
This data will check which Monsters are available for selection. If for some reason no monster
Is available it will go to Label #2, the Return Operation. This event must be a Call Event.

STEP #3 – THE CURSOR MOVEMENT
<> Label #1
<> Enter Password: Var. [0001: Enter Password]
(Wait Until Key Hit, Direction, Decision, and Cancel)
<> Note: ***DOWNWARD MOVEMENT***
<> If Var. [0001: Enter Password] 1
<> Play Sound Effect: Cursor
<> Go to Label #1
<>
: End Case
<> Note: ***RIGHTSIDE MOVEMENT***
<> If Var. [0001: Enter Password] 2
<> Play Sound Effect: Cursor
<> Go to Label #1
<>
: End Case
<> Note: ***LEFTSIDE MOVEMENT***
<> If Var. [0001: Enter Password] 3
<> Play Sound Effect: Cursor
<> Go to Label #1
<>
: End Case
<> Note: ***UPWARD MOVEMENT***
<> If Var. [0001: Enter Password] 4
<> Play Sound Effect: Cursor
<> Go to Label #1
<>
: End Case
<> Note: ***DECISION KEY***
<> If Var. [0001: Enter Password] 5
<> Call Event: Attack
(The Decision Key should be more elaborate than this)
<>
: End Case
<> Note: ***CANCEL KEY***
<> If Var. [0001: Enter Password] 6
<> Play Sound Effect: Buzzer
<> Go to Label #2
<>
: End Case
<> Label #2
<> Change Switch: [0004 to 0006] Switch OFF
<> Call Event: Battle Menu
(The Cancel Key should be more elaborate than this)
<>
Label #1 enters a password command an as soon as it has done it; it goes back to the beginning of the label. If you press Enter you will perform an action and if you press Escape it will go to Label #2. Label #2 calls back the Battle Menu.

STEP #4 – HEADING UPWARDS
<> Label #1
<> Enter Password: Var. [0001: Enter Password]
(Wait Until Key Hit, Direction, Decision, and Cancel)
<> Note: ***DOWNWARD MOVEMENT*** or ***RIGHTSIDE MOVEMENT***
<> If Var. [0001: Enter Password] 1 or 2
<> Play Sound Effect: Cursor
<>If Switch [0004: Mons1 Selected] is ON
<>If Switch [0002: Mons2 Alive] is ON
<> Change Switch: [0004 to 0006] Switch OFF
<>Change Switch: Var. [0005: Mons2 Selected] Switch ON
<>
: Else Case
<>If Switch [0003: Mons3 Alive] is ON
<> Change Switch: [0004 to 0006] Switch OFF
<>Change Switch: Var. [0006: Mons3 Selected] Switch ON
<>
: Else Case
<> Change Switch: [0004 to 0006] Switch OFF
<>Change Switch: Var. [0004: Mons1 Selected] Switch ON
<>
: End Case
<>
: End Case
<>
: Else Case
<>If Switch [0005: Mons2 Selected] is ON
<>If Switch [0003: Mons3 Alive] is ON
<> Change Switch: [0004 to 0006] Switch OFF
<>Change Switch: Var. [0006: Mons3 Selected] Switch ON
<>
: Else Case
<>If Switch [0001: Mons1 Alive] is ON
<> Change Switch: [0004 to 0006] Switch OFF
<>Change Switch: Var. [0004: Mons1 Selected] Switch ON
<>
: Else Case
<> Change Switch: [0004 to 0006] Switch OFF
<>Change Switch: Var. [0005: Mons2 Selected] Switch ON
<>
: End Case
<>
: End Case
<>
: Else Case
<>If Switch [0006: Mons3 Selected] is ON
<>If Switch [0001: Mons1 Alive] is ON
<> Change Switch: [0004 to 0006] Switch OFF
<>Change Switch: Var. [0004: Mons1 Selected] Switch ON
<>
: Else Case
<>If Switch [0002: Mons2 Alive] is ON
<> Change Switch: [0004 to 0006] Switch OFF
<>Change Switch: Var. [0005: Mons2 Selected] Switch ON
<>
: Else Case
<> Change Switch: [0004 to 0006] Switch OFF
<>Change Switch: Var. [0006: Mons3 Selected] Switch ON
<>
: End Case
<>
: End Case
<>
: Else Case
<> Go to Label #2
<>
: End Case
<>
: End Case
<>
: End Case
<> Go to Label #1
<>
: End Case
<>
I personally think these code looks like a funky tree; it has branches that convert into smaller branches until you have twigs and stuff like that. The movement I just coded here is for moving up, as for saying you are selecting Monster #1, so you press the down key and you select Monster #2; or if Monster #2 is dead you select Monster #3; and if Monster #3 is dead you keep your selection with Monster #1. Now, if for some reason Monster #1 is dead, then it goes to Label #2. Then you have to repeat the same stuff but saying Monster #2 is selected or Monster #3 is.
If you understand continues reading; if not take a break.

STEP #5 – HEADING DOWNWARDS
<> Label #1
<> Enter Password: Var. [0001: Enter Password]
(Wait Until Key Hit, Direction, Decision, and Cancel)
<> Note: ***UPWARD MOVEMENT*** or ***LEFTSIDE MOVEMENT***
<> If Var. [0001: Enter Password] 3 or 4
<> Play Sound Effect: Cursor
<>If Switch [0004: Mons1 Selected] is ON
<>If Switch [0003: Mons3 Alive] is ON
<> Change Switch: [0004 to 0006] Switch OFF
<>Change Switch: Var. [0006: Mons3 Selected] Switch ON
<>
: Else Case
<>If Switch [0002: Mons2 Alive] is ON
<> Change Switch: [0004 to 0006] Switch OFF
<>Change Switch: Var. [0005: Mons2 Selected] Switch ON
<>
: Else Case
<> Change Switch: [0004 to 0006] Switch OFF
<>Change Switch: Var. [0004: Mons1 Selected] Switch ON
<>
: End Case
<>
: End Case
<>
: Else Case
<>If Switch [0005: Mons2 Selected] is ON
<>If Switch [0001: Mons1 Alive] is ON
<> Change Switch: [0004 to 0006] Switch OFF
<>Change Switch: Var. [0004: Mons1 Selected] Switch ON
<>
: Else Case
<>If Switch [0003: Mons3 Alive] is ON
<> Change Switch: [0004 to 0006] Switch OFF
<>Change Switch: Var. [0006: Mons3 Selected] Switch ON
<>
: Else Case
<> Change Switch: [0004 to 0006] Switch OFF
<>Change Switch: Var. [0005: Mons2 Selected] Switch ON
<>
: End Case
<>
: End Case
<>
: Else Case
<>If Switch [0006: Mons3 Selected] is ON
<>If Switch [0002: Mons2 Alive] is ON
<> Change Switch: [0004 to 0006] Switch OFF
<>Change Switch: Var. [0005: Mons2 Selected] Switch ON
<>
: Else Case
<>If Switch [0001: Mons1 Alive] is ON
<> Change Switch: [0004 to 0006] Switch OFF
<>Change Switch: Var. [0004: Mons1 Selected] Switch ON
<>
: Else Case
<> Change Switch: [0004 to 0006] Switch OFF
<>Change Switch: Var. [0006: Mons3 Selected] Switch ON
<>
: End Case
<>
: End Case
<>
: Else Case
<> Go to Label #2
<>
: End Case
<>
: End Case
<>
: End Case
<> Go to Label #1
<>
: End Case
<>
It’s the same as in Step #4, but this time we’re choosing the other way. Pretty simple, isn’t it?

STEP #6 – GRAPHICS
For example, I did my enemies as events, so they change graphic when their Selection Switch is on. If you’re using events you might want to do the same thing, but if you’re using pictures as monster display I’d suggest having another event check if the Enemy is being selected, so that the enemy can change color or something like that. You could even use a pointer!

STEP #7 – THANK ME!
Well, as I said before I’d like to thank Ni---- the person who inspired me to do this. And if you want to use this there’s no credits needed but at least post a thank you message.
Visit my site – http://home.graffiti.net/mooglemaster/