Skill that only work on a specific ally

Mkingdom

Veteran
Veteran
Joined
Nov 1, 2019
Messages
86
Reaction score
7
First Language
English
Primarily Uses
RMMV
One of my characters is an engineer who has a skill called drone repair. It will only work on one of my actors who is a drone. How would I set this up?
 

Accatosh

Veteran
Veteran
Joined
Dec 16, 2018
Messages
85
Reaction score
14
First Language
Swedish
Primarily Uses
RMMV
I may have a solution. Try putting this in the skill's damage formula:

b.isStateAffected(x) ? 200 : 0;

It checks if the targeted unit has a specific state or not. So you want the drone to permanently have a specific state. Change the "x" in the formula to the state id.

So this formula heals by 200 HP if the targeted unit has the specific state, else 0 HP.
 

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,017
Reaction score
949
First Language
English
Primarily Uses
RMMV
Without any plugins, I'd try it like this:
  1. Add a note tag to any "drone" actors. Something like <Drone> is fine.
  2. In your damage/healing formula: c = b.isActor() ? b.actor() : b.enemy(); c.meta.Drone ? YOUR_FORMULA_HERE : 0
Note that the <Drone> note tag is case sensitive, so if you have it as <Drone> in the note tag, it needs to be c.meta.Drone in the formula box. c.meta.drone won't work.
 

Kes

Global Moderators
Global Mod
Joined
Aug 3, 2012
Messages
21,637
Reaction score
10,934
First Language
English
Primarily Uses
RMVXA
Would it not be simpler to just use the actor id as the identifier in the skill? As there is only one character to which this applies, the note tag option (I do like it, btw, for other things) seems a bit too much, and it would save having to create a state just for this.

To illustrate what I mean, in Ace the syntax would be (using actor 3 as an example):

b.id==3? your damage formula : 0

I hesitate to give the Javascript equivalent, because I am much less familiar with it, but I hope that is enough to make clear what I am suggesting as an option.

EDIT
It occurs to me that if, in fact, the OP ends up with more than one drone actor, it still might be possible to just use the damage formula using the class id instead of the actor id. Just a thought.
 

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,017
Reaction score
949
First Language
English
Primarily Uses
RMMV
It occurs to me that if, in fact, the OP ends up with more than one drone actor, it still might be possible to just use the damage formula using the class id instead of the actor id. Just a thought.
That only works if all drone actors are using the same class (or previously, just that one actor). The note tag approach I suggested will allow any number of actors with any number of different classes to all be treated as valid targets for this skill, although I'm pretty sure that goes beyond what the OP is trying to do. Figured I'd throw it out there anyway since its the most flexible approach.
 

Mkingdom

Veteran
Veteran
Joined
Nov 1, 2019
Messages
86
Reaction score
7
First Language
English
Primarily Uses
RMMV
Without any plugins, I'd try it like this:
  1. Add a note tag to any "drone" actors. Something like <Drone> is fine.
  2. In your damage/healing formula: c = b.isActor() ? b.actor() : b.enemy(); c.meta.Drone ? YOUR_FORMULA_HERE : 0
Note that the <Drone> note tag is case sensitive, so if you have it as <Drone> in the note tag, it needs to be c.meta.Drone in the formula box. c.meta.drone won't work.
Ok that works. Thanks.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I keep trying to explain to clients that the huddle masses behind the old K-Mart are a Fallout Reenactment group. Somehow I don't think they believe me. :LZSskeptic:
Hey people! What do you think about a core plugin? This will save some lines of code that I repeatedly use in all my plugins...
Wondering if I should make my enemies scale in my non-linear rpg. I'm leaning towards yes, but I don't want to use Yanfly's plugin...
French folk trying to pronounce English words. I loved how the man pronounced squirrel as 'square friend'.
Therapist: any questions? Me: Yeah, are there actually people who think Hotel California is about drugs and not fame or are people just trying to upset me?
Therapist: They WHAT?

Forum statistics

Threads
94,592
Messages
922,148
Members
124,462
Latest member
souldoood
Top