kj3400

Hmph Master
Veteran
Joined
Nov 29, 2013
Messages
553
Reaction score
75
First Language
English
Primarily Uses
RMVXA
Is there a way to have a state to allow the target to draw in all attacks of one or more elements, including ones where it wasn't the target of the attack and AOE attacks?
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
6,114
Reaction score
5,879
First Language
English
Primarily Uses
RMVXA
Yes there is. You'll need to script an alias or overwrite of the check_substitute (and possibly apply_substitute) methods in Scene_Battle. First, make sure to give the 'Substitute' property to the state in the regular database. Then comes the hard part - the scripting will set a temporary variable to 'false', and then it needs to check whether the character attempting to take the hit has the "elemental guardian" state or a normal substitute state.
  • If they have the elemental guardian state (or both), it will check the element of the hostile skill being used.
    • If it's the correct element, set the flag to true. Otherwise, do nothing.
  • Repeat this for any additional elemental guardian states that use a different element.
  • If they have a regular substitute state, it will check the "normal" substitute condition (by default, this is whether the intended target is below 25% HP).
    • If the normal substitute condition is met, set the flag to true. Otherwise, do nothing.
Finally, the scripting will check the value of the flag, and if it's true, a substitution will occur. If it remains false, no sub will occur.

I believe that these methods, by default, do have access to the skill being used, but I'm not sure the extent to which it has access to the properties of the would-be substituter. It's kind of tangley code and I don't have hours to play around with it right now. :( To be clear this is definitely doable, but it may take some work.
 

kj3400

Hmph Master
Veteran
Joined
Nov 29, 2013
Messages
553
Reaction score
75
First Language
English
Primarily Uses
RMVXA
I took a couple of days to think about it. I'm not really proficient in scripting, nor do I have the time at the moment to learn unfortunately. I suppose I could find someone who would be willing to do that for me, though.
 

Latest Threads

Latest Posts

Latest Profile Posts

Only 3 more days to get your copy of Move That Box! with -15% discount!
1660090657213.png
Mistakes will be made.
After three years, it was awesome to be back at Gen Con!
Words of Wisdom: You can be honest and alone. Or dishonest and together.
Working on mapping using RPGTools to create parallax maps using PVgames tiles/assets. It's super cool... but mapping is still something I drag my feet on getting done. I hate this but love the math parts of design, which is the opposite of a lot of dev's around, I think. It really do be different strokes for different folks.

Forum statistics

Threads
124,381
Messages
1,163,229
Members
163,180
Latest member
Viking
Top