Gw Temp

Menu

Tutorial - 'Hp and Mp Display Using Pictures or Charactersets' by CyTWO

An item about RPGMaker 2000 posted on

Blurb

Want to use Pictures or Charactersets to display HP or MP in your custom battle system, but don't know how? Well, now you can find out!

Body

Showing HP and MP using Pictures or Charactersets
~By CyTWO~

Before we start, realize that you must have a good understanding of variables, the show picture command, Fork conditions, and event variable conditions.

Now, create two variables, one called Hero HP and the other one called Hero MP. You can either set these values from the default system (in the variables set command box, there's the option at the bottom to set from Hero's X- so you can select set from Hero HP or MP (this means that anytime you want to change the HP or MP you have to first change the Default system values, and the have the variables set themselves from those values again)) or you can set them with your own values.

Then, create another two variables, one called Moded HP and the other called Moded MP. Set the Moded HP variable by the Hero HP variable, and set the Moded MP variable by the Hero MP variable.
Now...

-HP DISPLAY-
Select the Mod option in the variable window, set the moded HP varaible as the variable to be moded, and set the number to be moded by to 10. This gives you the ones value.
Now, create a new variable called HP Ones, and set it by the Moded HP variable.
Now, reset the Moded HP variable by the Hero HP variable. Set the moded HP variable to be moded by 100 this time; this gives you the tens value; 1000 gives you the hundreds value, etc. for future reference...
Take the moded (by 100) variable and set a new variable called HP Tens by it.
Reset it by the Hero HP variable, and then mod it by 1000 this time, and set a new variable called Hero HPHundreds by it.
You can continue to do this until you've reached whatever place value you want, but I'll assume you only went up to the hundreds place value.

-WITH PICTURES-
Make a Parrallel process event (it can either be a common event or a map event, depending on whether you want it around all the time or not). In this event, use Fork conditions that check the value of the variables and then display a picture accordingly (IE. If you want to check and display the tens value, you have the fork condition check- is the variable = ten or above? Then display picture 1; is the variable equal 20 or above? then display picture 2, etc. With hundreds its 100 or above, 200 or above, etc. with ones its just 1 or above, 2 or above, 3 or above, etc.) You'll have to make the number pictures, or steal them from someone else, of course. There ya go!

If you have problems with computer lag, insert wait commands in between the place value checks (IE. In between the ones and tens and in between the tens and hundreds fork conditions)

-WITH CHARACTERSETS-

For charactersets, create a ten page event that checks the value of the variables as the appearance condition. Example, the tens value characterset event would check to see if HpTens equals ten or above, or twenty or above, etc, and would display a 1, or 2, or 3, etc accordingly.

There, now, for MP, do the exact same, only replace the HP variables with MP variables.

There! Now you can display HP and MP with pictures or charactersets.

E-mail me at Chris.keefer@3web.net or come to the forums at WWW.GamingW.net/forums for any help you might need.