Replacing skills with a poisoned variety temporarily.

I’m trying to replace the skills my actors already know with new poison skills for the duration of a few turns in battle via a state that is applied by using an item that either has a chance to poison them or give them the new skills temporarily, and I also want the old skills to be disabled for the duration.
Let me break it down because I know this mess is hard to follow:

1. Player catches a snake and gets a dead snake in their inventory as an item.
2. Player uses dead snake in battle. The snake has a 50% chance of poisoning the player via a state or giving them a state which replaces their original skills with a poison version. EX: The Bite skill is sealed and a new skill appears, the Toxic Bite skill.
If an actor doesn't know a skill, it doesn't get replaced by a poisoned variant.
3. Once the state runs out, Toxic Bite is removed and Bite becomes available again.

How would you go about achieving this? Either with plug-ins or without. I’m using RPG Maker MZ.
Hmmm, just give them the poisoned skills along with normal skills and put VisuStella Skill and States plugin notetags show/hide switch. If the item gives the state turn on the switch at the same time. Then put an erase state notetag to turn off the switch.

edit: different switches for the different actors
Hmmm, just give them the poisoned skills along with normal skills and put VisuStella Skill and States plugin notetags show/hide switch. If the item gives the state turn on the switch at the same time. Then put an erase state notetag to turn off the switch.

edit: different switches for the different actors
But I want to seal the normal skills because it doesn't make sense that I'd have both Bite and Toxic Bite at the same time.

And where do I put the erase state notetag?
No but the switch hides the original skills and makes visible the poison variant skills.

And state notetag (X is switch id):

<JS On Erase State>
$gameSwitches.setValue(X, false);
</JS On Erase State>

edit: you can make different states for the actors, or you can check which actor it is to decide what switch to turn off if using single state
if you have a state and youre already using VS plugins, then why bother with the switches? you can just make having the state the requirement for the player being able to see the skill with the skills and states plugin and not need a set of states and switches per actor.

put the first one in toxic bite's notebox and replace x with the state ID. the second is for regular bite
Code:
<JS Skill Visible>
 visible = user.isStateAffected(x);
</JS Skill Visible>

<JS Skill Visible>
 visible = !user.isStateAffected(x);
</JS Skill Visible>
Good point, I had an itching feeling I was doing it too complicated, I forgot there's the JS notetags for visibility.
if you have a state and youre already using VS plugins, then why bother with the switches? you can just make having the state the requirement for the player being able to see the skill with the skills and states plugin and not need a set of states and switches per actor.

put the first one in toxic bite's notebox and replace x with the state ID. the second is for regular bite
Code:
<JS Skill Visible>
 visible = user.isStateAffected(x);
</JS Skill Visible>

<JS Skill Visible>
 visible = !user.isStateAffected(x);
</JS Skill Visible>
I did not mean to reply to anything, I don't know how to remove replies.

I played around with Visustella's Skills and States, I did something but it's still not working. I can't get the poison skills to show up based on a Switch being on.

Snake Item:
Dead Snake.png
Example of a Poison Skill:
Poison Skill.png

Learned Skill 0010 is Frantic Nip
Show Switch 0012 is Snake Gnaw (Should control if the Poison versions are shown, right?)

Common Event that using the snake item plays:
Gnaw on Snake Outcome.png

The reason nothing is under the condition 'IF Player's Wolf is Affected by Gnaw on Snake Success' is that the notetags I put on the Poisoned Skills should make it so that they only show up if the Switch Snake Gnaw is on, right?

States:
Success:
Gnaw Success.png
Fail:
Gnaw Fail.png
I played around with Visustella's Skills and States, I did something but it's still not working
did you try the thing i mentioned?
did you try the thing i mentioned?
I did and it's not working.
I think it's because you're using leading zeroes on the ids. Take those off.
I did that but it's still not working.
a few things then. Did you save your project before testing it? plugin and notebox changes do not register until you save the project. then youll have to make a new file if youve been loading old saves. if youve done both of those, then and show us a screenshot of the skill exactly as you had it
a few things then. Did you save your project before testing it? plugin and notebox changes do not register until you save the project. then youll have to make a new file if youve been loading old saves. if youve done both of those, then and show us a screenshot of the skill exactly as you had it
I always save my projects.

Regular Bite with the JS Code:
Reg Bite.png


Toxic Bite with the code:
Toxic Bite.png


State 62 is the state given by the dead snake. The JS code makes regular bite disappear from the skills menu when state 62 is applied and then regular bite comes back after the state is no longer applied, that works perfectly. But Toxic Bite is not there, at any point.
But Toxic Bite is not there, at any point.
And toxic bite is being granted by that poison state through an add skill trait as well? you didnt remove it or change the skill its supposed to give?

admittedly, if that state is the only way for the toxic bite to be accessible, then all you need to do was hide the regular bite skill as you cant have toxic bite without the state. But the notetag on toxic bite would just be redundant. it wouldnt hide the skill if everything matched up.
You appear to have plenty of people helping you with the mechanics of this, but if you don't mind my input on the idea itself, I'm not sure it's the best idea. Presumably poison is a standard per-turn HP loss; what you're currently proposing is that once I, as a player, do whatever is needed to capture a snake (which at the very least will, I imagine, require interacting with one on the map) it will then give me a disadvantage in battle more than half of the times I use it? Note that you're not measuring poisoning yourself against poisoning the enemy; you're measuring poisoning yourself against a *20% chance* of poisoning an enemy. That doesn't really seem worth it to me, and as a player I'd likely just never use the snake item.
And toxic bite is being granted by that poison state through an add skill trait as well? you didnt remove it or change the skill its supposed to give?

admittedly, if that state is the only way for the toxic bite to be accessible, then all you need to do was hide the regular bite skill as you cant have toxic bite without the state. But the notetag on toxic bite would just be redundant. it wouldnt hide the skill if everything matched up.
I actually wasn't adding Toxic Bite through an add skill trait, but when I did, it works! And it now only showed up if I had Bite as a skill. I tested it out with a higher tier skill 'maul' (which I did not have) and its toxic equivalent 'Toxic Maul' did not show up. Adding the poisoned skills through the state traits was all I had to do. Everything is working now, I'm so relieved! Thank you!


You appear to have plenty of people helping you with the mechanics of this, but if you don't mind my input on the idea itself, I'm not sure it's the best idea. Presumably poison is a standard per-turn HP loss; what you're currently proposing is that once I, as a player, do whatever is needed to capture a snake (which at the very least will, I imagine, require interacting with one on the map) it will then give me a disadvantage in battle more than half of the times I use it? Note that you're not measuring poisoning yourself against poisoning the enemy; you're measuring poisoning yourself against a *20% chance* of poisoning an enemy. That doesn't really seem worth it to me, and as a player I'd likely just never use the snake item.

Based on my tests, the player will receive the poison skills rather than being poisoned themselves most of the time. I tweaked the poisoned state so it only takes away 10% HP per turn instead. I'm not gonna be THAT cruel to my players LOL.
There is a snake on the maps that you have to kill. I've made a QTE mini game out of it and everything. If you succeed, you get the dead snake, if you fail, the snake bites you and you lose 30HP.
And I've made the poison skills deal poison based on how powerful the skill is. A nip only has a 20% chance to poison an enemy, whereas a bite has a 50% chance, and a maul has a 70% chance.
I actually wasn't adding Toxic Bite through an add skill trait, but when I did, it works! And it now only showed up if I had Bite as a skill. I tested it out with a higher tier skill 'maul' (which I did not have) and its toxic equivalent 'Toxic Maul' did not show up. Adding the poisoned skills through the state traits was all I had to do. Everything is working now, I'm so relieved! Thank you!




Based on my tests, the player will receive the poison skills rather than being poisoned themselves most of the time. I tweaked the poisoned state so it only takes away 10% HP per turn instead. I'm not gonna be THAT cruel to my players LOL.
There is a snake on the maps that you have to kill. I've made a QTE mini game out of it and everything. If you succeed, you get the dead snake, if you fail, the snake bites you and you lose 30HP.
And I've made the poison skills deal poison based on how powerful the skill is. A nip only has a 20% chance to poison an enemy, whereas a bite has a 50% chance, and a maul has a 70% chance.
That's kind of my point, though: you're taking a 50/50 risk of losing 10% HP per turn for 3 turns in exchange for 2-5 turns where you *might* poison an enemy for 10% HP per turn. Maul having a 70% chance of application isn't that great if the state only lasts 2 turns and it runs out before it can do anything for me.
That's kind of my point, though: you're taking a 50/50 risk of losing 10% HP per turn for 3 turns in exchange for 2-5 turns where you *might* poison an enemy for 10% HP per turn. Maul having a 70% chance of application isn't that great if the state only lasts 2 turns and it runs out before it can do anything for me.
You have a point, maybe I should do poisoning severities like I have with bleeding states. Nips do mild poisoning (-10% HP for two turns), Bites do minor poisoning (-20% HP for three turns), and Mauls do major poisoning (-30% HP for five turns).
But how will you do it with add skill traits? You said you want several skills replaced and only if the actor already knows the skill. That would mean you'd need multiple add skill traits which would only take effect if the actor already knows a certain skill. That's why I suggested instead to make the actors also get the poisoned variant whenever they gain/learn a skill.
That would mean you'd need multiple add skill traits which would only take effect if the actor already knows a certain skill. That's why I suggested instead to make the actors also get the poisoned variant whenever they gain/learn a skill.
depends on how many skills they have that are like this imo. if its a few skills then its easy enough to keep using traits and give each skill a show condition that the base skill must be learned. But if they have plenty skills like this, then it would be easier to manage by having the class learn them all as you said and then give every skill the same show condition that the user must be poisoned for it to be visible.

Original thread: https://forums.rpgmakerweb.com/threads/replacing-skills-with-a-poisoned-variety-temporarily.175739/