State that adds elemental versions of skills

Hi all, couldn't find the solution to this problem though I'm sure it's been discussed.

I want an elemental state that will replace skills with alternate elemental versions.

Example. An electrify state replaces Dual Attack with Electric Dual Attack.

I tried using Seal Skill and Add New Skill to achieve this but the problem is, all potential New Skills show up. This includes ones the actor doesn't have the non elemental counterpart to. I want it to only replace a skill the actor actually has with it's electrical counterpart.

Does anyone know if/how to make this happen?
Well, it's fairly easy, if a little tedious with eventing. Essentially have a troop event that checks every turn if your character(s) have said state. If they do unlearn basic skill, learn elemental skill, else learn basic skill, unlearn elemental skill.

Otherwise you could use yanfly's buffs and states core and make the sate notetag say something like this:

<Custom Apply Effect>
// Make actor ID 1 learn skill ID 25
$gameActors.actor(1).learnSkill(25);
// Make actor ID 1 forget skill 7
$gameActors.actor(1).forgetSkill(7);
</Custom Apply Effect>

I'm not proficient with script, so this will likely not be 100% correct. If it works, this would only ever work for actor 1, but I'm sure there's a different way to adress the actor affected by the state too that I'm not seeing.

And I'm sure someone with more knowledge will be able to help further.
Instead of using Add Skill/Seal Skill, use Add Skill Type and Seal Skill Type. Have the "electric skills" get learned by your character at the same level as their non-elemental counterparts, and make them the skill type of the skill type you're adding with the state. Make it so that your character doesn't normally have access to the electric skill type unless they have that current state.
Instead of using Add Skill/Seal Skill, use Add Skill Type and Seal Skill Type. Have the "electric skills" get learned by your character at the same level as their non-elemental counterparts, and make them the skill type of the skill type you're adding with the state. Make it so that your character doesn't normally have access to the electric skill type unless they have that current state.
Ahhh thank you so much. I'm pretty sure this is the way to do exactly what I want. Can't wait to try it.
Glad I could help! I hope it works the way you envisioned.
What about setting the skills to do damage of the normal attack element and changing it with the state? it isn't what you're asking for but it could work.
What about setting the skills to do damage of the normal attack element and changing it with the state? it isn't what you're asking for but it could work.
Yes that could work as well. I wanted the animation and the name of the skull to change as well though, so I made new ones.
@Ericfrancisrock I tried it. This is exactly what i had in mind. Thanks

Now I'm trying to make the new skill type replace the old skill type in the menu rather than have both of them show up with one being unusable.

Trying to use Hime Actor Battle Command but I don't know if it works in States.
Trying to use Hime Actor Battle Command but I don't know if it works in States.
Notetags only work where they say they do in the instructions - in this case, on actors.

You could use Victor Engine's Command Replace to put JavaScript conditions on your skill categories, but I think you're going the wrong way with all of this.

This method can work, but if it were me I wouldn't be removing learned skills and making new skill types and all of that. Just use Yanfly Skill Core notetags to hide and show as appropriate.

So you make your state that adds the Electric Dual Attack skill. Then you give your regular Dual Attack the following:
Code:
<Custom Show Eval>
visible=![13, 25, 41, 50].some(id => user.addedSkills().includes(id));
</Custom Show Eval>
Replace the numbers in the brackets with the IDs of all skills that should cancel the original one (electric dual attack, flaming dual attack, etc.).

Then having any of those from a state will prevent the original from showing up.
Notetags only work where they say they do in the instructions - in this case, on actors.

You could use Victor Engine's Command Replace to put JavaScript conditions on your skill categories, but I think you're going the wrong way with all of this.

This method can work, but if it were me I wouldn't be removing learned skills and making new skill types and all of that. Just use Yanfly Skill Core notetags to hide and show as appropriate.

So you make your state that adds the Electric Dual Attack skill. Then you give your regular Dual Attack the following:
Code:
<Custom Show Eval>
visible=![13, 25, 41, 50].some(id => user.addedSkills().includes(id));
</Custom Show Eval>
Replace the numbers in the brackets with the IDs of all skills that should cancel the original one (electric dual attack, flaming dual attack, etc.).

Then having any of those from a state will prevent the original from showing up.
Ok thank you. I will give this a try!
Notetags only work where they say they do in the instructions - in this case, on actors.

You could use Victor Engine's Command Replace to put JavaScript conditions on your skill categories, but I think you're going the wrong way with all of this.

This method can work, but if it were me I wouldn't be removing learned skills and making new skill types and all of that. Just use Yanfly Skill Core notetags to hide and show as appropriate.

So you make your state that adds the Electric Dual Attack skill. Then you give your regular Dual Attack the following:
Code:
<Custom Show Eval>
visible=![13, 25, 41, 50].some(id => user.addedSkills().includes(id));
</Custom Show Eval>
Replace the numbers in the brackets with the IDs of all skills that should cancel the original one (electric dual attack, flaming dual attack, etc.).

Then having any of those from a state will prevent the original from showing up.
Actually, I think doing it this way will bring back my first problem so I'm attempting to use VE Command Replace. Not working though. Here's what I have

<command replace: 'Arts', 'Electric Arts', skill type 6>
result = a.state == 13;
</command replace>

I don't know java at all so I attempted to copy and paste one of his examples and tweak it. I didn't see an example that changed based on the state though, so I guessed.

Edit: shoot. Just realized that I should put the code in the notetag for the state, not the actor. I think I can figure this out now.
Actually, I think doing it this way will bring back my first problem
...no, you just use the same notetag on the new skills. So on your Electro Dual Attack you put
Code:
<Custom Show Eval>
visible=user.isLearnedSkill(X);
</Custom Show Eval>
where X is the ID of Dual Attack (no leading zeros). So it will only be visible if the user knows Dual Attack. Then the notetag I gave you above will make Dual Attack not visible as long as they have access to any of the elemental Dual Attacks.

result = a.state == 13;
That's not correct syntax. You'd do: result = a.isStateAffected(13)
Ok thank you. You're a life saver right now. I really appreciate your help.

Original thread: https://forums.rpgmakerweb.com/threads/state-that-adds-elemental-versions-of-skills.157905/