rpgmaker20221

Veteran
Veteran
Joined
Feb 25, 2014
Messages
83
Reaction score
32
First Language
Swedish
Primarily Uses
Hi! This will be my first tutorial ever so if you think that there is things I can improve please let me know ^-^ !

Inspiration^-^
tutcommonevent1ad1.png

Okay now on to the tutorial.

Have you ever played a game where you are faced with a boss encounter blocking your way; and you are underleveled because no one warned you about that this boss encounter will be very difficult leaving you to be merciless slaughtered by the gods?

If you as a game designer do not want your players to be victim of that for various reasons you could easily add a BATTLE PREDICTION or BATTLE ADVISER to warn the player that they are underleveled for example.

I will show you how to setup a simple battle adviser!
You will need
* 1 event
* 4 variables
* 1 common event

If you are not sure what a variable or a common event are, I recommend that you look up those first.

1. Setting things up
You will need 4 variables, a common event, and an event
2. Inside the event
Use the Control Variables command select one of your 4 variables (in my case this is var[54], which I will call SYS! Actor Level). Once you have named your selected variable to whatever you want, set it equal to your actor (in my case, actor 1 (Harry Potter))
tutcommonevent1ab.png

Once you have done that, use the Control Variables command again to set your variable to subtract your boss's level ( in my case the boss will have the level 5).
On the next line use the Call Common Event command and select your desired common event ( in my case i choosed #038 and named it to Duelling Club)
tutcommonevent1ac.png
This is what you should have so far.

3. Inside the common event
Inside the common event the fun will begin.

For this tutorial I have choosen that there will be 5 different advices the player can recieve ( You can have as many as you want)

On the first line in the common event Use the Conditional Branch command, use your variable from earlier and set it to check for equal to 0, like this.
tutcommonevent1ac1.png
Make sure that you do not create it with the "set handling when conditions do not apply" option on.

Good!

Inside this conditional branch use the command Script
and type in the following (or copy)

Code:
$game_variables[117]="AVERAGE";$game_variables[118]=17;
$game_variables[119]="It's too close to call!"

lots of scary stuff right?
No ;) , this does the same as Control Variables command except it will better suite our needs to script it manually this time.

explanation:
$game_variables[n]
is the same as
Control Variables command for variable n.

So what I just did was setting 3 variables (#117,118 and 119) to different values.
remember that you can use whichever variables you want instead of 117,118 and 119, just name them so you know what they are used for. ^-^

You have now created a scenario for when your actor and the boss have the same level.
your common event should look like this at this point.
tutcommonevent1ac2.png

Great! Lets turn this into something useful.
On the next line OUTSIDE of the Conditional Branch use the Show Text command
and write this.
tutcommonevent1ac3.png
You can write whatever you want except making changes to the "\C[\V[118]]\V[117]\C[0]"new line "\V[119]" part.
Now we want to see the result and then let's look at how it happened.
tutcommonevent1ac4.png
Magic! :o (just a quick note, your text may have different colour than mine, this you can control by setting the variable 118 to the colour you want :) )

Awesome! Now the player will be warned while talking/interacting with this boss encounter but only if their level are equal, hmmm that is not likely to happen often at all right? We need to add more conditional branches inside the common event to make this apply for all situations ^-^

4. Adding variation
Open up your common event again
BELOW your conditional branch and ABOVE your Show text command, insert a new conditonal branch exactly as the one you did earlier, this time make it apply for when the level difference between the boss and the player is smaller than or equal to -1
quick example:
boss level: 5
player level: 4

4-5 = -1
like this:
tutcommonevent1ac5.png
Good!

Now inside this conditional branch use the Script command
type in the same as earlier or copy.

but let's edit the text and colour because getting the same advice when there will be a tougher battle isn't realistic at all!

Code:
$game_variables[117]="NO PICNIC IN THE PARK";$game_variables[118]=2;
$game_variables[119]="Your chances are quite low!";

There, nice! Let's take it slow and understand what is happening.

The first line:
$game_variables[117]= "your advice here";
remember to surround your text with " "
";" this sign tells ruby that your line is done.

the second line:
$game_variables[118]=2;
set this variable equal to the number that represents the colour you want your advice text to have.

the third line:
$game_variables[119]="your text here ";

Finally let's look at the Show text message we use at the bottom of our common event.
tutcommonevent1ac3.png
\C[n] = colours the text (n is a number)
\V[n] = reads the value of the n:th variable and write it

Look at line 2
Difficulty:....
Variable 118 gives a colour
Variable 117 gets coloured by that colour and writes its value down
\C[0] resets the colour back to white
then there is a new line
\V[119] writes its value down

Simple, but powerful ^-^
Once you have created enough conditionals and advices to your liking the end result should look something like this.
tutcommonevent1ad.png

And that's it ^-^ please comment below if something seems unclear or scary ¨-¨
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

All new MZ Weather & Title updates are also RETRO'able for MV! Updated RETRO project will be released on same day I'll release updated MZ demo -project!

retro.png
Just lost about half a day's worth of work because rpg maker crashed during playtesting and corrupted my file :kaolivid:
Boku.gif
advanced_puzzling.PNG
Having a lot of fun making different poses for my character sets! Open to suggestions/critique!

CSKttqh.png

AABS laser beams features:
1,Shoot penetrating laser beams for player's normal attack
2,Beam's width/damage/comsumes/loot can be controlled by events/variables with great flexibility
3,Beam can rebound to walls or certain regionID
4,Can play SE when shooting beams
5,Beam's images can be solid images or animated ones.

Forum statistics

Threads
117,018
Messages
1,103,888
Members
152,924
Latest member
POLk7
Top