Unique Resource System

ckirkham88

Warper
Member
Joined
Mar 12, 2015
Messages
2
Reaction score
0
First Language
English
Primarily Uses
Okay, I'm still fairly new to RPG Maker, but I'm learning quickly, please bare with me.

I'm trying to give certain party members a resource system that is different from mana. Let's call it Spheres. It's very similar to the rune system used by Death Knights in World of Warcraft. Each character would start battle with 5 Spheres. Skills would cost a varied amount of Spheres. Once used, a Sphere would go on "cooldown", waiting a certain amount of time/turns before it was refilled and usable again. I want each Sphere to recharge independently, not from the bottom up like an energy bar. For example, if 2 Spheres were used for an attack, they would both refresh at the same time. If a third Sphere was used while the others were on cooldown, it would have its own cooldown time and refresh alone, after the other 2.

As a side note, I want to represent the Sphere as actual symbols below the health bar.

Is any of this possible in RPG Maker?
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,624
Reaction score
5,104
First Language
English
Primarily Uses
RMVXA
It's certainly possible but you'd need to script it with RGSS.

Here's the general approach I'd take:

* Give each actor a new attribute (need to add it in Game_Actor, or Game_Battler if enemies also have Spheres) which is an array of five numbers.  The numbers each represent the cooldown remaining for a given sphere, with 0 meaning it's available for use.

* Rig an attribute on the Skills tab (perhaps "Element" or "MP Cost" or something that you won't use) so that it actually sets how many Spheres are necessary to use the skill.  Remove all code from the default clockworks that deals with Element or MP Cost or whatever you chose as your rigged attribute.

* Change the "skill_conditions_met?" method in Game_BattlerBase to reflect that a number of Spheres must have a cooldown of 0 for a character in order for them to be able to use the skill.

* Change the "pay_skill_cost" method in Game_BattlerBase to set the Sphere's cooldowns when a skill is used.

* That will get your system fully working under the hood, but from there, it would be advisable to add elements on the interface to show how many Spheres each character has active (and even better, how much longer each one is on cooldown) and represent the skill's Sphere cost on the Item Window.  This way players will understand what's going on.  This is the most time-consuming part of creating the system; you need to create the graphics for the UI display and change several "Window" methods to get it to show up properly.

There also might be a script out there that already exists which would let you use this completely new character attribute as a skill cost, but I don't know of any (and I don't think that Yanfly's Skill Cost Manager would work completely because you're trying to add these Spheres that work differently than any existing construct in the game).  My instinct is that you would need to commission this in the Classified - Requests section (it's one that I might be willing to take on as long as you don't have a short deadline), but it's also possible you might be able to find someone to do this for you for free in the Script Requests section.  Certainly give it a try, it can't hurt to ask!
 

ckirkham88

Warper
Member
Joined
Mar 12, 2015
Messages
2
Reaction score
0
First Language
English
Primarily Uses
Hey, sorry it took me so long to respond, been distracted.

Thank you for your response! I don't know how to code Ruby yet, but I think I can figure out how to do what you said. My issue now is that I don't want every player to have Spheres, just half of them. Is there a simple way to write it like that? I assume I'll have to drop a tag in notes for the classes that use Spheres, but I'm betting it's more complicated than what you described previously.
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,624
Reaction score
5,104
First Language
English
Primarily Uses
RMVXA
Hey, sorry it took me so long to respond, been distracted.

Thank you for your response! I don't know how to code Ruby yet, but I think I can figure out how to do what you said. My issue now is that I don't want every player to have Spheres, just half of them. Is there a simple way to write it like that? I assume I'll have to drop a tag in notes for the classes that use Spheres, but I'm betting it's more complicated than what you described previously.
I'd probably add an additional attribute "max_spheres" in Game_Actor or Game_Battler, and creating the spheres array based on that max_spheres attribute.  You'll need a few additional lines to only draw the Spheres on the interface if the character's max spheres are 5 instead of 0, but beyond that, it doesn't really require anything additional.
 

TaranAlvein

Villager
Member
Joined
Mar 26, 2015
Messages
11
Reaction score
2
First Language
English
Primarily Uses
Do your characters restore these resource completely after a battle, or does this resource remain in cool-down even after the battle has ended?  I suspect the former, and if so, would suggest this:

First, at the start of combat, initialize the number of resource available to each character in a series of variables.  You can do this by adding a script to the  BattleManager module's Setup class.  For instance, if the number of resource available to party member number 1 is stored in variable 1, you could add

$game_variables[1] = 5 to the Setup class to set that variable to 5 at the start of combat.

Next, when creating the skills that use the resource in question, on the right side you'll see a box titled "Effects".  Create a new effect and go to the "Other" tab.  Have it call a Common Event, and make a series of Common Events that can be called depending on how many of those resources are expended; so for instance, common events "CostOne", "CostTwo", etc.  Inside that event... Well I seem to have run to the extent of my expertise.  What I was going to suggest was a script checking which character just used that skill, then reducing their available resource by the cost of the skill, but I don't know how to check characters in combat.  If anyone else could pick up from here or suggest something better, we could perhaps get this issue resolved.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,977
Members
137,563
Latest member
cexojow
Top