Gw Temp

Menu

Tutorial - 'Improving the AI of "monsters"' by Death Ritual

An item about RPGMaker 2000 posted on

Blurb

How to use Rm2k to make a collection of "smart" monsters that can ascend a game's difficulty level

Body

SMART MONSTERS
A Tutorial on Customizing Your RM2K Games


In the RPG games I’ve played, there are very few homemade ones where the AI for monsters is actually smart. I don’t consider myself to be an expert at monster programming, but it’s a touchy subject of mine. Because there are still some RPGs out there that need help on this, I’m going to write a tutorial on how to customize your monsters. Here it is!



Note: This tutorial is almost exclusively for people new to RM2K. You have been warned.



~Without Battle Events: The Easy Methods~



If you don’t want to wade through the Battle Event dialog box thirteen hundred times (and neither do I, to tell you the truth), I suggest this section. It won’t look as cool or well thought-out, but it will still be better than just letting the computer take its course with your monsters.



What we want to do is create a bunch of smart monsters, that can actually vary their strategies according to what their current condition is, or how badly (or well) the battle is going. I’ll walk you through it, but I’m assuming you’ve got some skills set up and that kind of stuff. I’m going to use a bunch of preset skills to make this easier, but if you want replace them with your own.



OK, we’re going to create a Boss “smart” monster. Start by naming the monster and giving it a cool GFX. Make sure to raise your heroes’ stats so they can successfully challenge the enemy. Give it (at least) 300 HP and 200 MP, so that it’s pretty high on stats and such. Name it something good, but I’ll refer to it as Dragon since that’s the monster I’m thinking of.



Now that you’ve set the stats, clear the entire box of prioritized action skills. Remember that since this guy is tough, we’re going to give him a lot of spells and attacks. (Here, I assume you know how to give a monster an action. If you don’t, then you really should read some other tutorial.) Anyway, let’s pick “Critical Hit” for the first action. Put its priority at 50, which means that our friend Dragon here will usually go for this attack.



Now that Dragon has a basic attack, let’s back that up. Start by picking another action, but choose “Flame Field.” Place it as well at Priority 50. If you want, test it out now – half of the time, Dragon should use Flame Field, and the other half he should perform a critical attack.



But even now he’s not technically a “smart” monster. Let’s add some more attacks. Begin by choosing the condition “Turn No” and pick 5, so that the skill activates at turn 5. (Maybe the Dragon is charging up till then, but the player won’t know it unless you let him/her learn it somehow). Then pick “Tidal Wave” for the skill.



Add in a few more and you’ve got a smart Dragon. Then test the battle, and watch your heroes beat (or get their collective butt kicked by) the Dragon.



~With Battle Events: The Cool Method~



This method can make battles a lot more interactive if you use it right. This way, you can use a big range of special effects during battle, such as dialogue, sudden attacks, and other special things. For this one, I’m going to do my best to copy the coding.



Let’s say that you’re fighting a Dragon, and on your first turn, after entering your command, you want your characters to say something like “Oh my God!”



So this is how you would do it. Go to the Battle Events and click on the “Turn No.” In the second box, type “1” so that the first turn is the only one given such a treatment.



BATTLE EVENT “Oh my God!”

Conditions: Turn 1

Effect:

Show Face: (whatever your hero’s face is)

Show Message: Oh my God!



You can randomize it too.



BATTLE EVENT “Oh my God!”

Conditions: Turn 1

Effect:

Set Variable: V[whatever] – Random (1*3)

Fork Condition

If Variable V[whatever] = 1

Show Face: (hero’s face)

Show Message: Oh my God!

Close Fork

Fork Condition

If Variable V[whatever] = 2

Show Face: (hero’s face)

Show Message: A Dragon . . .

Close Fork

Fork Condition

If Variable V[whatever] = 3

Show Face: (hero’s face)

Show Message: It’s impossible!

Close Fork



See? It’s pretty simple, but it allows you to lighten up your battles. You can put in comedic dialogue, such as two characters arguing, or have a Boss argue with each of the characters in turn. As for a sudden attack, let’s say someone shoots a Boss and causes 10 points of damage. That would be like this:



BATTLE EVENT “Sudden Attack”

Conditions: Turn 5 (so it happens on only this turn)

Effect: Change Enemy HP – Target: 1 – Decrease (10)



Like this, you can add in a lot of different things. Using “Full Recovery” can symbolize a hero’s newfound power, or just that a Boss helps you out (for some unknown reason). You can “Change Condition” and make someone bleed or cursed all of a sudden, or show messages that hint at a Boss’ charging-up attack (like “Countdown . . . 1!” or something).



Above all, remember that it is your RPG, and ultimately, YOU take in it in whatever direction you want.