Chargeable Items System

RMVX Event Systems: Chargeable Items System

This event system will allow players to have items that have chargeable properties and is able to change into another item when charged with certain elements or variables. An example of a usage for a system like this would be like Healing Bottles that can be recharged in fountains in various rpg games.

—–

Step 1
Create two new items, one when it is uncharged and one for when it is charged. I’ll name mine “Empty Orb” and “Light Orb

—–

Step 2
Go to Database > Common Events. Create 3 Common Events and name them “Charge1“, “Charge2“, and “Charge3“.

Set “Charge1” to “Parallel Process” and add a new switch, name it “Empty Orb Check“. Then add a conditional branch that checks IF the item “Light Orb” is in the player’s inventory.

Under the conditional branch, add the command “Change Items“, set it to decrease one “Empty Orb“. Next use  the switches command to turn OFF the “Empty Orb Check” switch after decreasing the number of “Empty Orb” items.

Adding more variations of the items for instance “Fire Orb” or “Lightning Orb” items, can be done by copying that conditional branch and paste it under the other conditional branches and changing the item that the conditional branch checks for.

We’re done with the first common event “Charge1

—–

Step 3
Now go to the second common event “Charge2“.
Add a switch called “Empty Orb Gain” and set it to “Parallel Process

That’s it for the second common event “Charge2

—–

Step 4
The last common event “Charge3” is what we’re going to make in this step.
Add a “Change Items” command and set it to add 1 “Empty Orb“. Then add a switch that turns OFF “Empty Orb Gain”

—–

Step 5
Go to the Items section of the Database and set “Light Orb“‘s common event to “Charge2“.

—–

Step 6
On the map, add a fountain/statue/recharge station and make a new Event on it. This’ll be the place where the recharging process will happen.

—–

Step 7
In that Event, add a conditional branch that checks for an “Empty Orb“. Add a message that says “Recharge Empty Orb?“. Feel free to add some choices event commands. Under YES put a “Change Items” event commands to add an “Empty Orb” and a control switches that turns “Empty Bottle Gain” ON and a message that says “You obtained Light Orb!“. Under the ELSE of the conditional branch, add another message saying “You need an Empty Orb to recharge!”.

That completes our “recharging station”.
Simply copy and paste that event anywhere in your game where recharging is possible.

—–

And that’s the end of the tutorial! Hope you learned something from this tutorial and I’m looking forward for tutorial contributions from frequent visitors!

Well, I somehow managed to gather some time to make another eventing tutorial. RMVXTUTS is currently looking for an author to keep the tutorials coming, and give me some time to probably start adding demos to tutorials to make it easier for people to understand.

-Leventhan

Advertisements

About this entry