Help - Search - Members - Calendar
Full Version: [Eventing]Sacrifice Skill
RPG RPG Revolution Forums > Game Engines > RPG Maker XP Discussion > RPG Maker XP Tutorials
RzrBladeMontage
RPG Maker Version: XP
Difficulty Level: 2/10

Well, seeing as how I needed this skill for my own game, I figured that I would share it with all of you. It's a very simple common event that uses variables and it's very easy to understand.
[Show/Hide] Step One

First, go to your common events tab and create a new common event and call it "Sacrifice." Now you need to figure out which of your characters will be the one to gain this skill, I recommend using a black magic user. For this tutorial, I'll use the character "Rid." Go to the skills tab and create a skill and call it "Sacrifice," and under the "Common Event" drop down box, select your Sacrifice common event. You can pick whatever skill icon and animation you want. For the SP Cost and Power, keep them both at zero and for the rest of the ATK-F's and what-not, just put them all at 100. Now go to your classes tab and make sure that Sacrifice is linked with the character of your choice, in my case, "Rid" is my chosen character.

[Show/Hide] Step Two

Now go back to your common event, here we'll start to put this skill together. Create 2 Variables and call them Sacrif. HP and Sacrif. SP. You'll want to start off by making Sacrif. HP equal to your character's HP. Now add a conditional branch checking to see if Sacrif. HP is equal to 1. If it is, add a text message saying something like "Not Enough HP!" and then add the "Exit Event Processing" choice. Under the Else part of the conditional branch, have your Sacrif. HP variable divided by 2. Now Make your Sacrif. SP equal to Sacrif. HP and then have Sacrif. SP divided by 2 as well. Now subtract the HP of your character by the Sacrif. HP variable and add the SP of your character by the Sacrif. SP variable.



Getting confused? I'll break it down for you.

The Sacrif. HP variable gets the HP of your character. Let's say his current HP is 100. The event then checks to make sure his HP is above 1, and if it is it'll let it continue processing. Now we're dividing the characters HP, in this case it's 100, by half, which makes the HP 50. Now we're making the Sacrif. SP equal to Sacfic. HP, which is 50. Then the Sacrif. SP gets divided in half, which makes it 25. Now when we subtract the characters HP by Sacrif. HP, making the characters HP now 50, and we add to the characters SP by Sacrif. SP, which is 25. Basically what this event does it takes the users HP, divides it in half, and then takes that away from the user, and then takes the amount of HP taken away and divides that by half, and then adds that amount to the users SP.

Sorry if I confused anyone with all this, it's supposed to be a simple event lol. I hope you all enjoy!
mudducky
I just worked this out on VX recently, but it's a very interesting way to use events. Thank you for the tutoiral RzrBladeMontage. smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.