RPG Maker MV

RPG Maker MV

Reverse skill/item effect
Im using Yep Selection control and wondering if there is a way of making healing Items and spells deal damage against a target instead of healing like against an undead enemy
< >
Showing 1-9 of 9 comments
Slim Jimmy May 29, 2017 @ 5:18pm 
yes you can, just remember that it uses the plugins in a certain way...

https://www.youtube.com/watch?v=CILbgvxz7DA
martingolding96 May 29, 2017 @ 10:33pm 
What can't thoes 2 plugins do?
Also how would i reverse a revive effect?
Last edited by martingolding96; May 30, 2017 @ 12:01am
martingolding96 Jun 1, 2017 @ 10:11am 
I guess there's no way to reverse revive effects then
Caethyril Jun 2, 2017 @ 5:36am 
Originally posted by martingolding96:
I guess there's no way to reverse revive effects then
Would that be an insta-kill? Or do you mean you want to conditionally apply the revive effect? Or something else?
martingolding96 Jun 2, 2017 @ 9:45am 
Originally posted by Caethyril:
Originally posted by martingolding96:
I guess there's no way to reverse revive effects then
Would that be an insta-kill? Or do you mean you want to conditionally apply the revive effect? Or something else?
Yeah an insta kill for undead targets
If the item/magic gave 100% health restoration it wouldn't matter but having only 1 item and spell revive and fully heal a target would be to other powed unless i made the item hard to get and the spell have a huge cost but i don't want to do that either
Last edited by martingolding96; Jun 2, 2017 @ 9:57am
martingolding96 Jun 3, 2017 @ 7:55am 
is there a script that can target a state using variables?
Caethyril Jun 3, 2017 @ 8:10am 
I was actually looking at this just now! =D
Originally posted by martingolding96:
Yeah an insta kill for undead targets
If the item/magic gave 100% health restoration it wouldn't matter but having only 1 item and spell revive and fully heal a target would be to other powed unless i made the item hard to get and the spell have a huge cost but i don't want to do that either
I'm not sure how to check for removing a state via a react effect...

I think the tricky part here is that the revival gets applied after the damage, because it's a skill Effect. One way around this could be to put the "remove death state" bit in the skill's damage formula. Something like this, maybe:
if (b.isStateAffected(24)) { b.mhp } else { b.removeState(1); NormalHealingFormulaGoesHere }
In theory, this would make the skill apply healing equal to the target's max HP if they are affected by state #24, otherwise remove state #1 (the death state) and apply healing according to whatever formula you put in there. Replace the 24 with the ID of your own undead state. Then undead should recieve a full heal, which will be inverted into an instant kill. I haven't tested it myself, though.

If using this method, you'll probably want to remove the skill's death-state removal Effect, too, otherwise any undead killed will just be revived again immediately! =P

Originally posted by martingolding96:
is there a script that can target a state using variables?
The damage formula box uses "a" and "b" for the user and target respectively. Outside of that you could try "user" and "target" (works for Yanfly's Lunatic mode, not sure about elsewhere). Then you can add state #42 like so:
b.addState(42);
Or remove it as seen above. And the damage formula box has an alias for variable values, too! Normally it'd be $gameVariables.value(1), but in the formula box you can use the shorthand v[1].

As an example, I think this should add the state with ID stored in variable #1 to the target of the skill, then do 25 damage/healing (depending on how you've got it set up) to the target:
b.addState(v[1]);25
martingolding96 Jun 3, 2017 @ 9:33am 
Originally posted by Caethyril:
if (b.isStateAffected(24)) { b.mhp } else { b.removeState(1); NormalHealingFormulaGoesHere }
In theory, this would make the skill apply healing equal to the target's max HP if they are affected by state #24, otherwise remove state #1 (the death state) and apply healing according to whatever formula you put in there. Replace the 24 with the ID of your own undead state. Then undead should recieve a full heal, which will be inverted into an instant kill. I haven't tested it myself, though.
This is almost perfect i just can't target dead allies due to the plugin that allows me to target enemies
Last edited by martingolding96; Jun 3, 2017 @ 9:37am
Caethyril Jun 4, 2017 @ 5:19am 
Originally posted by martingolding96:
This is almost perfect i just can't target dead allies due to the plugin that allows me to target enemies
Ah. Yes, that's a bit of a problem for a revive skill. Dx

Someone on the forums had exactly this problem, though it doesn't look like they found a solution: https://forums.rpgmakerweb.com/index.php?threads/yanfly-target-core-selection-control-problem.64951/

I think the issue is with the scope: "Ally" and "Dead Ally" are treated differently for skill scopes. Selection Control offers a blend of "Ally or Enemy", but not "Dead Ally or Enemy".

For reference, I tried the following, which let me select anyone and revive my dead ally; however, it makes selecting anyone other than a dead ally do nothing...
<Actor or Enemy Select> <Custom Select Condition> target.isActor() ? this.item().scope = 9 : this.item().scope = 1; </Custom Select Condition>
(The default scopes are labelled 0 to 11, corresponding to the order listed in the Scope dropdown in the database.) The problem seems to be that the condition is evaluated when the skill is chosen for use but before selecting a target, which makes sense but isn't much help here.

I think something similar to the snippet above should work if there's a tag that's evaluated when the user selects a target and before it applies the scope filter. I tried Skill Core's <Before Eval> tag but that didn't seem to work either. Maybe it needs another plugin. =(
Last edited by Caethyril; Jun 4, 2017 @ 5:20am
< >
Showing 1-9 of 9 comments
Per page: 1530 50

Date Posted: May 29, 2017 @ 2:21pm
Posts: 9