Healing Items and skill that only effect certain Characters

Titanor

Regular
Regular
Joined
Jul 22, 2013
Messages
51
Reaction score
10
First Language
english
Primarily Uses
N/A
Hey guys, I have a question about healing in RPG maker mz, I have several playable characters in my game, however, 2 are different in the term that they are robots, with more like them on the way.

how can I make it so normal healing items and skills like potions have no effect on them while adding healing items that exclusively heal these characters like robot repair kits, mechanic skills, and/or such?

any methods are fine be it plugins, raw javascript, or eventing.
 

gstv87

Regular
Regular
Joined
Oct 20, 2015
Messages
3,261
Reaction score
2,428
First Language
Spanish
Primarily Uses
RMVXA
make the healing skill a magic element, set the robots to be affected by heal at 0% and the other element at 100%, the reverse on the rest of the characters.
 

NaosoX

Regular
Regular
Joined
Feb 28, 2013
Messages
691
Reaction score
422
First Language
English
Primarily Uses
RMMZ
On the damage setting of the item or spell, choose HP Recovery.

In the formula box type:
Code:
b.actor().meta.Robot ? 0 : 100
Change 100 to whatever your healing formula is.

In the actor database, whoever is a Robot, enter in the notebox:
Code:
<Robot>

If the actor has the <Robot> notetag, the spell/item will do zero healing. If the actor does not have the notetag, it will heal 100, or whatever amount or formula you replace it with.

For Spells/items to heal robots, change the code to this:
Code:
b.actor().meta.Robot ? 100 : 0
If the actor has the <Robot> notetag, it will heal 100, or whatever amount or formula you replace it with. If the actor does not have the notetag, the spell/item will do zero healing.
 
Last edited:

Titanor

Regular
Regular
Joined
Jul 22, 2013
Messages
51
Reaction score
10
First Language
english
Primarily Uses
N/A
both of your methods work for items with only one effect, however I also need a solution for items and skills with 2 or more effects
 

NaosoX

Regular
Regular
Joined
Feb 28, 2013
Messages
691
Reaction score
422
First Language
English
Primarily Uses
RMMZ
What do you mean by 2 effects?

If you're using Visustella Battle Core, you can fully customise items and skills through Action Sequences.

Create a skill/item, link it to a common event.
One example may be to:
Have that common event check for the target being applied to; if it matches the robot, apply whatever effects you desire.
 
Last edited:

Titanor

Regular
Regular
Joined
Jul 22, 2013
Messages
51
Reaction score
10
First Language
english
Primarily Uses
N/A
@NaosoX yes I am using Visustella Battle Core,
How would I check for the target in a common event?
 

NaosoX

Regular
Regular
Joined
Feb 28, 2013
Messages
691
Reaction score
422
First Language
English
Primarily Uses
RMMZ
Ok, that's a general question; and so without knowing the details such as the "effects" you were talking about(as you didn't reply about that), I'll provide a general answer.

How would I check for the target in a common event?
There are a few ways to do this, but it depends on what you want to achieve and what methods you feel comfortable with.

I'll provide one small example:

Control Variable > Game Data > Last > Last Target Actor ID
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
10,958
Reaction score
8,829
First Language
English
Primarily Uses
RMMV
I think the easiest/most universal way to do all of the things you're asking about would be to use the targeting controls in VisuStella's Battle Core.

Just use
Code:
<JS Targets>
targets=$gameParty.members().filter(member => member.meta.Robot);
</JS Targets>

That will only allow the skill to target party members with the <Robot> notetag, so you don't need to worry about coding each skill to act differently whether they're a robot or not.

For healing things, you can either use the damage formula solution from above, or just do the opposite:
Code:
<JS Targets>
targets=$gameParty.members().filter(member => !member.meta.Robot);
</JS Targets>
 

Titanor

Regular
Regular
Joined
Jul 22, 2013
Messages
51
Reaction score
10
First Language
english
Primarily Uses
N/A
@ATT_Turan thank you for the suggestion I will try that now.
 

Titanor

Regular
Regular
Joined
Jul 22, 2013
Messages
51
Reaction score
10
First Language
english
Primarily Uses
N/A
@ATT_Turan It does not work I am still able to use normal items on the robots and robot items on normal actors
 

Latest Threads

Latest Posts

Latest Profile Posts

Sally 1D[face].png
All 8 portraits done, and 8 faces to go with. Put the blonde here to please a couple of members XD

OH MY GOD TORGAL IS THE CUTEST PUPPER
My PS5 arrived. Farewell, productivity.
An optimal price for an indie game on Steam also needs to be accompanied by an optimal sales discount %. For a solo indie game, I think the optimal price is where it should be low enough that a single Steam card can be used to buy it, after tax. A few cents the wrong direction can potentially mean someone who was gifted a Steam card can't buy the game, then picks something else to buy.

Forum statistics

Threads
134,685
Messages
1,249,742
Members
177,427
Latest member
kedi
Top