HP/MP SWAP

Simple tutorial about exchanging HP and MP.

So you've been thinking, "I want a skill that exchanges HP for MP and/or vice versa.", but you couldn't get around to doing it because you couldn't figure out how to code for it. Well, I'm going to help you create a skill that does that.

You will need the following things:

-1 switch
-2 variables
-1 sound effect
-1 skill (obviously)
-1 character (what's the point if nobody learns it?)

First, go to the "Skills" tab and make a skill like this:

-Type: Normal
-Attack Influence: 0
-Magic Influence: 0
-Variance: 0
-Base #: 0

Then make the type "Switch", set availability to "Battle" only, and set it to an unused switch. I'll refer to it as "HP/MP swap".

Now go to the "Monster Party" tab, and make a new page. Set it to be activated when "HP/MP swap" is turned on. It should look like this so far:

Trigger: Switch -ON
<>Change Switch: Var Switch OFF
<>

The reason I turned the switch off early...well, it doesn't matter whether it's at the end or the beginning (not in this case, at least).

Now have a sound effect play afterwards, then set up 2 unused variables. Name them "Swap HP" and "Swap MP". Set the former to the HP of the character using the skill (remember to subtract 1 afterwards, though), and the latter to his/her/its MP. Afterwards, reduce the character's HP and MP to 1 and 0, respectively, but don't kill him/her/it. Then Increase the his/her/its HP by the value in the "Swap MP" variable (It's obvious why), and MP by the value in "Swap HP".

You're finally done! Now let's see the final product.

Trigger: Switch -ON
<>Change Switch: Var Switch OFF
<>Play Sound Effect: whatever it is
<>Change Variable: Var = character's HP
<>Change Variable: Var - 1
<>Change Variable: Var = character's MP
<>Change HP: character's HP 999 (Remove)
<>Change MP: character's MP 999 (Remove)
<>Change HP: character's HP Var (Add)
<>Change MP: character's MP Var (Add)

This tutorial is actually pretty easy, but I rarely see this type of skill in any RM games (RPGM2KBRPG is probably the only one with it so far). Thank you and goodbye.

Posts

Pages: 1
Corfaisus
Loading... Please Wait
3527
For skills like this, I would suggest setting the max HP that your characters can reach as 999 due to the fact that there is a 3 digit max for the MP value. That is, if you're using Rm2k3. No worries about Rm2k because that's its limit anyway.
Did not test, but... Isn't this going to kill the character?
Corfaisus
Loading... Please Wait
3527
author=undefined
Did not test, but... Isn't this going to kill the character?

That's actually something I wouldn't mind testing, seeing as how I've got nothing to do right now. I'll be back later with my findings.

EDIT: Yes, it would kill your character. Though because the system would leave you at 1 HP after decreasing before the swap, you would have to decrease by that same 1 HP after the swap to make it function correctly.
author=undefined
Did not test, but... Isn't this going to kill the character?

As long as you left the "Possible Death"/"HP Reduction can Kill Target" box unchecked, no, it shouldn't.
Update: Made a slight change to this tutorial; now it says to subtract 1 from the variable that stores the character's HP because reducing that person's HP will only set it to 1.
Pages: 1