Austintatious

Veteran
Veteran
Joined
Jul 16, 2015
Messages
47
Reaction score
10
First Language
English
Primarily Uses
I'm surprised I'm the first person to ever attempt this with RPG Maker MV. Are there really no plugins that already do this? Ideally it would also make each skill usable once per battle for enemy battlers, but that's just a bonus for my purpose.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,511
Reaction score
11,995
First Language
English
Primarily Uses
RMVXA
If there's no specific plugin for this, then why not use one of the plugins which give cool downs and set the cool down for each skill at e.g. 99 turns?
 

Austintatious

Veteran
Veteran
Joined
Jul 16, 2015
Messages
47
Reaction score
10
First Language
English
Primarily Uses
derp I didn't even think to try that! Thanks for the prompt reply!
 

garret95

Pokémon Breeder
Member
Joined
Mar 15, 2017
Messages
17
Reaction score
4
First Language
Spanish
Primarily Uses
RMMV
I think you're looking for one of Yanfly's plugins, YEP_X_LimitedSkillUses.
I've been using it for a while and is pretty good, you can limit all skills at default or each one individually.
 

Cootadude

Noob with exp
Veteran
Joined
May 3, 2019
Messages
67
Reaction score
65
First Language
English
Primarily Uses
RMMV
If there's no specific plugin for this, then why not use one of the plugins which give cool downs and set the cool down for each skill at e.g. 99 turns?
one problem with this method is eventually the 99 turns will pass and the skill will be used again... I would think garret95's method would be better since Yanfly's plugin can make a skill usable only once. If you cannot use the plugin I will try to test a few idea's I have with events.
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
618
Reaction score
260
First Language
English
Primarily Uses
RMMV
You don't even need a plugin for this (or for cooldowns in general). You can create a state that seals the skill, and set it to be removed with whatever condition you want, such as when the battle ends. Obviously, this is a bit of a chore since every skill probably needs its own cooldown state, but it's definitely doable.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,511
Reaction score
11,995
First Language
English
Primarily Uses
RMVXA
one problem with this method is eventually the 99 turns will pass and the skill will be used again
A bigger problem would be having a battle with more than 99 turns! But if it does last that long, then probably the player ran out of skills much, much earlier, so letting them have them back so they can finish this fight might be a kindness.

But actually I personally use the method that @Solar_Flare suggests when I want this. I didn't mention it because I think if you have a lot of skills it could be burdensome. But it's definitely doable.
 
Last edited:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,352
Reaction score
15,166
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Requests. Thank you.

 

Austintatious

Veteran
Veteran
Joined
Jul 16, 2015
Messages
47
Reaction score
10
First Language
English
Primarily Uses
You don't even need a plugin for this (or for cooldowns in general). You can create a state that seals the skill, and set it to be removed with whatever condition you want, such as when the battle ends. Obviously, this is a bit of a chore since every skill probably needs its own cooldown state, but it's definitely doable.
The problem with that is the state gets reset when you die.

Also: how do I programmatically seal a skill? I'm just gonna hard code it, but there's no explanation in the docs.
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
618
Reaction score
260
First Language
English
Primarily Uses
RMMV
There's a "seal skill" trait which is checked by the Game_BattlerBase.prototype.isSkillSealed function. Does that help?

There should be a way to avoid states being reset when you die if that's what you want. I can't remember exactly but it most likely does require a plugin.
 

Austintatious

Veteran
Veteran
Joined
Jul 16, 2015
Messages
47
Reaction score
10
First Language
English
Primarily Uses
Eh, not quite. I want to prgrammatically seal a skill, not check if a skill is sealed. Is there anything I can do other than search the RPG Maker source code?
There's a "seal skill" trait which is checked by the Game_BattlerBase.prototype.isSkillSealed function. Does that help?

There should be a way to avoid states being reset when you die if that's what you want. I can't remember exactly but it most likely does require a plugin.
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
618
Reaction score
260
First Language
English
Primarily Uses
RMMV
The "no coding" way to seal a skill would be:

  1. Create a state that adds the Seal Skill trait for that skill
  2. In your event, add that state to the actor.

If you're doing in JavaScript, you'd probably overwrite the function I mentioned to return true when the skill should be sealed. That's why I pointed you to the "isSkillSealed" function when you asked how to seal a skill – because the way to do it is to, one way or another, make that function return true.
 

Austintatious

Veteran
Veteran
Joined
Jul 16, 2015
Messages
47
Reaction score
10
First Language
English
Primarily Uses
The "no coding" way to seal a skill would be:

  1. Create a state that adds the Seal Skill trait for that skill
  2. In your event, add that state to the actor.

If you're doing in JavaScript, you'd probably overwrite the function I mentioned to return true when the skill should be sealed. That's why I pointed you to the "isSkillSealed" function when you asked how to seal a skill – because the way to do it is to, one way or another, make that function return true.
I understand that, but because I'm building a plugin it won't work for my purposes. What is the instruction the virtual machine receives from the game to seal skills?
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
618
Reaction score
260
First Language
English
Primarily Uses
RMMV
If you're doing in JavaScript, you'd probably overwrite the function I mentioned to return true when the skill should be sealed. That's why I pointed you to the "isSkillSealed" function when you asked how to seal a skill – because the way to do it is to, one way or another, make that function return true.
The quickest way to change how skills are sealed would be to replace this function to do something different. For example:


JavaScript:
const old_isSkillSealed = Game_BattlerBase.prototype.isSkillSealed
function Game_BattlerBase.prototype.isSkillSealed(skill) {}
  return old_isSkillSealed.call(this, skill) || this._sealedSkills.contains(skill);
}

This is untested and incomplete (you'd need to couple it with something that puts things in a _sealedSkills array on the actor), but that's the general approach I would take.

Another possibility would be to add another trait source, which would look something like this (example taken from one of my actual plugins):

JavaScript:
var old_actorTraits = Game_BattlerBase.prototype.traitObjects;
Game_BattlerBase.prototype.traitObjects = function() {
    var traits = old_actorTraits.call(this);
    if(this.race()) {
        traits.push(this.race());
    }
    return traits;
};

In this example this.race() returns a class from the database, which is then used as an additional source of traits (so in effect, actors in this system get two classes - one for their actual class, and one for their race). You can use pretty much anything, as long as it has an array of traits. You could even just push an object that has nothing but an array of traits.
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

My Overworld might be a mix of inspiration from 2D Final Fantasy games, Breath of Fire, Battlechasers: Nightwar, Super Mario World, and Pillars of Eternity. If I can make it more in-depth than just walking from point A to point B, that might do a lot for the gameplay experience. Hmm...
Terribly depressed. Worst birthday I've had in years, no motivation to work on anything. Still no income. At least I've got my computer running again.
Doing RPG Maker News for 19th September 2021

Stream will be live with some Dark Souls 3, followed by a session of the Interactive Text Adventure! Feel free to drop by!

Forum statistics

Threads
115,198
Messages
1,088,020
Members
149,778
Latest member
kamikun95
Top