Rock-Paper-Scissors System for Skills

Hello,


I need help on making skills  with Rock-Paper-Scissors System. 


More or less like:


Rock Skills (dealing 1 damage against another rock skill, dealing 1/2 damage against Paper skill, 2x damage against Scissors)


Paper Skils (defend against rock skill,)


Scissors skills ( break enemy paper skill dealing 2x damage, suffer 2x damage against Rock skills)


I think this 2 examples follow the same rule


1: http://suikoden.wikia.com/wiki/Duel


2-http://ageofwushu.wikia.com/wiki/Combat


My problem is how to make this work in skill.


Thank you
You can achieve this using Elements in skills, and then Elemental resistance on Enemy/Actor tab~
You can achieve this using Elements in skills, and then Elemental resistance on Enemy/Actor tab~



Thanks for the answer cekobico.


I don't think i want a rock enemy vs a rock-paper-Scissors actor. What I need is a neutral Enemy and an neutral  actor that can use any rock, paper or scissor skills.


It the Enemy uses a Rock skill and if the actor uses a Paper skill. The actor doubles the defense against  that  particular enemy rock skill in that turn.
I've been working on an almost identical system in my free time, so I might have some insights- are you using any plugins? Do you want the effect to apply regardless of which order the two battlers go in?
I've been working on an almost identical system in my free time, so I might have some insights- are you using any plugins? Do you want the effect to apply regardless of which order the two battlers go in?



Thank you for your replay Dokter_q


Yes, i'm using some Yan Fly plugins, and i'm able to add more if necessary.


Yes, i what the affect to apply regardless of witch order all batllers go in. 
I think the easiest way to do that is to have the defense bonus apply at the start of the turn, before either skill is actually used.


One way to do it is with Buffs & States Core and Auto Passive States (and a touch of lunatic mode), a state with a <custom turn start effect>. Inside the effect, you check if the battler's action is rock, paper, or scissors, and if so, apply the appropriate defensive state- a Rock state would last 1 turn and resist Scissors, but make you weak to Paper, for example.


You'll need some way for the 'rules' state to distinguish between rock, paper, and scissors skills- how do you currently distinguish? Are they different skill types, like, magic vs special, or do they just deal different elements of damage?
I'm using it as "states"  like poison, sleep etc.  But I'm not sure if i can make for example, a rock skill that can also be make the enemy bleed and also an elemental skill. 


My project is something about martial arts schools fighting each others. I'm thinking about using elements as school tipes. Instead of fire element it ut fire kung fu school. So the fire school is weak against the water tai chi school for example. And a fire school warrior can use 3 times of skills:  Rock (normal attack skills) , paper( defense skills, scissors. (heavy attack skills). 


Also that skills can induce bleed, poison, sleep effects. 
Alright, so I'd do something like this- use Yanfly Element Core, and assign skills to have multiple elements. One of them is going to be your rock/paper/scissors element, the other can be something like fire or wind or physical. To make sure it works, I'd put the RPS element in the element box in the skill itself, and add additional elements via notetag, or even via action sequence.


A "used Rock" state might, for example, naturally have 50% damage rate from scissors element, and 200% or 150% damage rate from paper element, and last for 1 turn. The other two work as you'd expect following that pattern, there's nothing very special about those states themselves.


What you'd want now is the "RPS" state, which you'll want to make as an auto passive state for both teams (you can set that from the plugin options for auto passive states). It doesn't need any settings or content in the state itself, but you should give it a notetag like this:


<custom turn start effect>
var rock = 1; //your "rock" element ID here
var paper = 2; //your "paper" element ID here
var scissors = 3; //your "scissors" element ID here
//make sure they have an action
if (user.currentAction()) {
if (user.currentAction().damage.elementID === rock) {
user.addState(10); //your "rock skill" state ID here
}
if (user.currentAction().damage.elementID === paper) {
user.addState(11); //your "paper skill" state ID here
}
if (user.currentAction().damage.elementID === scissors) {
user.addState(12); //your "scissors skill" state ID here
}
}
</custom turn start effect>


I haven't had a chance to test it, but I think it should be on the right track.
What you'd want now is the "RPS" state, which you'll want to make as an auto passive state for both teams (you can set that from the plugin options for auto passive states). It doesn't need any settings or content in the state itself, but you should give it a notetag like this:



<custom turn start effect>
var rock = 1; //your "rock" element ID here
var paper = 2; //your "paper" element ID here
var scissors = 3; //your "scissors" element ID here
//make sure they have an action
if (user.currentAction()) {
if (user.currentAction().damage.elementID === rock) {
user.addState(10); //your "rock skill" state ID here
}
if (user.currentAction().damage.elementID === paper) {
user.addState(11); //your "paper skill" state ID here
}
if (user.currentAction().damage.elementID === scissors) {
user.addState(12); //your "scissors skill" state ID here
}
}
</custom turn start effect>


I haven't had a chance to test it, but I think it should be on the right track.



Thanks for the response, that solution is the best.


I haven't done any coding in my life. lol . Where do i "copy/past"  that information? In the skills notetag?
That notetag should be on your chosen "the rules" state- a passive state that you apply globally to all battlers to make them use the RPS skill effects. If that throws errors it's probably because I used the wrong names for the battler's object, and I'll have to dig a bit to find the right one.


And remember to change the 1 / 2 / 3 and 10 / 11 / 12 numbers to the IDs of the elements and states, respectively.
I'm sorry but i don't think understand this good enough.


This is as things are, maybe its better this way.


My RPG maker is in Portugues, as it's my main language 🙂


Untitled-2-01.jpg
i think i'm stuck. i cant make it work..

Original thread: https://forums.rpgmakerweb.com/threads/rock-paper-scissors-system-for-skills.66476/