How to do certain types of skills

I've been fiddling around with skills and attacks. But some of them aren't working the way I'd like. I'm trying to make the guard move 100% effect, when used the attack will miss 100% for 1 turn. (I made a state with 0% hit rate, but I don't think I understand hit rate so I am testing 100% evasion state now)

And I made a strong attacking move but I would like it to lower the user's defense and magic defense. It seems like with this one, it's only possible for debuffs. But how to attack the enemy while debuffing the user at the same time?

Oh, and the speed invocation. I thought the higher speed the priority. But that doesn't seem to be the case? How do I make some moves faster than everyone else if these particular moves are used, no matter how fast or slow the user is?

Thanks in advance!

Edit: Oh, and does attack element mean all the users/enemies attacks will turn into that element???
Firstly, on guard, yes, you should use Evasion instead of Hit Rate. Hit Rate is how often the character will hit the target. So you need to have the user guard themselves and improve their Evasion instead, if your goal is to have them dodge the attacks.

Secondly, on the user debuff, you also need the skill to call also call a Common Event. Using the Common Event, you can use scripts to apply debuff to the user of the skill.

Lastly, I believe that how fast the user moves is a combination of Speed and Agility, so a battler with 100 AGI will move faster than someone with 99 AGI, if they both use a skill with the same Speed. I am not entirely sure how Speed affects the turn order though, so I am not able to help you further, but I have seen higher AGI go first even when they are not using a skill with high Speed, while others are. In any case, Speed can go all the way up to 2000 by default, so just add more Speed and adjust other skills to have negatives (lowest is -2000). I believe that it adds to AGI, based on the help file in RMMV, though.

Hope this helps.
What about inflicting 50% hp to the user? How is that done?

And thanks, I'll take any help! 😀

*Please note to those reading, I am trying to make these skills but when they don't work as planned then I asked
For the speed know that the turn is AGI + Action speed of action picked + small random number. So you need to make the action speed really high if you want it always first. You'll have to do the math based on your AGI though to find a number that is high enough that anyone using them goes first.

And since AGI is a factor in there, if enemies use the same skill then it will come down to who has higher AGI who goes first.
What about inflicting 50% hp to the user? How is that done?

And thanks, I'll take any help! 😀

*Please note to those reading, I am trying to make these skills but when they don't work as planned then I asked
In this case, instead of manipulating Evasion, you need to manipulate the Physical Damage and Magical Damage parameters, under Sp-Param instead of Ex-Param
In this case, instead of manipulating Evasion, you need to manipulate the Physical Damage and Magical Damage parameters, under Sp-Param instead of Ex-Param

Okay, but I must be doing it right. When this attack is used, I want the user to immediately lose 50% HP for using this attack. How would I do this? I set up another state with the Sp-Param at 50% but it does nothing to the user.
Oh user to lose HP? Sadly that is either a complicated damage formula which may not account for the fact you can't actually do the skill, or you will have to code it in. Yes that means coding or plug-ins as the engine by default has no good option for handing HP use for skills that will also account for if you can actually use it or not.
Oh user to lose HP? Sadly that is either a complicated damage formula which may not account for the fact you can't actually do the skill, or you will have to code it in. Yes that means coding or plug-ins as the engine by default has no good option for handing HP use for skills that will also account for if you can actually use it or not.

What about with a comment event that adds another state? Can a state do 50% damage to the user?
You can do -50% HP Regen, but that will still let you use the skill if you have under 50% HP. That's where the real issue is going to lie.
If you want it to deal 50% of current HP (not 50% of max) to the user, just add a.hp = Math.round(a.hp / 2); to the beginning of your skill formula.

If you want it to deal 50% of max HP to the user, that will only be feasible if you're OK with allowing the user to use it even while below 50% of max HP (lowering their HP to 1 if they do it that way). If you're OK with that, I think what you want to add to the beginning of your skill formula is a.hp = Math.max(Math.round(a.hp - 0.50 * a.mhp), 1);

Creating a custom condition to use a skill (e.g. "must be above 50%") is impossible without plugins.
Right. The best you could do without plug-ins is a common event check then reject the use of the skill, but the player will then complain they wasted a turn.
Uh, I'm a little confused. It's my fault for not properly explaining.

I meant a move where the user loses 50% health (Or half of what they currently have) while the enemy gains a status like poison.

If that is not possible either, that's fine. You guys are awesome! ♥
Half of what they have, use wavelengths idea. You'll hit no issue too as you'll always be able to spend half of what you got.

Half of Max HP though the issue was you could have 2 HP of 3000 and the system will still let you do it, as it executes the skill then applies any states or runs any common events, and there is no check by the engine if you really have 50% of 3000 (your max HP) which you don't in that example.

But again if you did half of what you currently have, then 50% of 2 is 1, so you are still ok.
Uh, I'm a little confused. It's my fault for not properly explaining.

I meant a move where the user loses 50% health (Or half of what they currently have) while the enemy gains a status like poison.

If that is not possible either, that's fine. You guys are awesome! ♥
Sorry, I did not read your question properly. I thought you were still referring to guarding and losing only 50% of HP damage against the normal attack. Similar to the debuff, you can do it via a Common Event. Unfortunately, without plugins, a lot of such customized stuff needs to be done this way.
If that is not possible either, that's fine. You guys are awesome! ♥
Wavelength's solution should work the way you want. Have you tried it?
Where do I place

a.hp = Math.round(a.hp / 2);


I pasted inside a common event used the script event. And then had the move call the common event. But that failed to work.
Where do I place

a.hp = Math.round(a.hp / 2);
As Wavelength has said, at the beginning of the damage formula.
So for example when you go to the Skills tab for that skill and in the box at the upper-right it says something like 50 + a.atk * 4 - b.def * 2, you have to place a.hp = Math.round(a.hp / 2); before anything else that is in that box. And don't forget the semicolon, if you leave that out you will probably get some really weird results.
Too lazy to read what's been covered and what hasn't, so:

Guard changes: First, hit rate is the affected character's accuracy. Setting that to 0 means they'll always miss, not those that attack them. For near-perfect evasion, set evasion as high as you can, not just 100% since I think high enemy accuracy can override it. Also, there's the sp-parameters "physical damage" and "magic damage" which can be set to 0 to make the target completely immune to physical and/or magical damage, respectively.

Strong skill debuffs user: Can be done in the damage formula:
Code:
a.addDebuff(3, 5); a.addDebuff(5, 5); YOUR_DAMAGE_FORMULA_HERE
Note: the "5" values are the number of turns the debuff lasts, so change to 3 for 3 rounds, 1 for 1 round, etc. as needed.

Quick skill: Change the skill speed to 2000 (highest value allowed) and it should fire off before anything else. Well, not counting other skills also set to 2000.

50% damage to skill user: Set your damage formula to:
Code:
a.gainHp(Math.round(a.hp * 0.5)); YOUR _DAMAGE_FORMULA_HERE
Note: If you'd rather it dealt 50% of the user's max hp instead of current hp, change a.hp to a.mhp, but be aware that it'll kill them without warning if they're below 50% hp.

Edit:

Where do I place

a.hp = Math.round(a.hp / 2);
I pasted inside a common event used the script event. And then had the move call the common event. But that failed to work.
a.hp = anything doesn't work because hp is a property with no setter function assigned to it. What this means in non-programmer terms is that you can't assign values to hp in this manner. You should generally use the gainHp function to add or subtract damage from battlers in combat (it also sets up the result values which streamline combat log messages, damage popups, etc, or the setHp function to assign values to hp otherwise (since it invokes refresh which is important for clamping the values within allowed ranges, managing the death state, etc)
Thanks everyone! I really appreciate it! 😀

Original thread: https://forums.rpgmakerweb.com/threads/how-to-do-certain-types-of-skills.131024/