Spiked Enemies? (Solved)

vfxblender

Villager
Member
Joined
Jan 22, 2017
Messages
8
Reaction score
0
First Language
English
Primarily Uses
So here's the spark notes. I want an spiked enemy to hurt you if you jump on it. After digging around forums I found this
https://forums.rpgmakerweb.com/index.php?threads/how-do-i-make-a-spike-effect-in-battle.83164/

kranasAngel suggest that you use this code
Code:
<Custom Respond Effect>[/B][/B][/B]
[B][B][B]var element = this.item().damage.elementId;
if (this.isDamage() && element === x) {// with x being the element ID of Jump
  target.addState(y);// with y being the State ID of counter
}
</Custom Respond Effect>
I have tried this and made a custom element "Jump" and state with the notes but whatever I do the counter does not work.
I even tried a poison effect and yes I made sure to install Yanfly's buff states core, but this plugin hasn't worked for me.

I tried other things like initiating a state in the skill hp damage
a.addState(4);(a.atk * 1 - b.def * 2)

this starts a skill but then I thought about a common event
if state 4 has effected the enemy then apply state to player. how do I make it not take damage with non-spiked enemies then?
I have spent a while trying to figure this out. PLEASE HELP ME!!!


Edit:
----------Here is the solution I found. This is my step by step tutorial.----------------

I developed this if statement in the damage formula

Step 1
Put this in the skill's damage formula the actor uses
if (b.isStateAffected(16)) {a.addState(15) + a.setHp(a.hp - 1)} else {a.atk * 4 - b.def * 2}

Step 2
I created 2 states "Counter" number 15 and "Countercode" number 16
Make CounterCode have no [SV] Overlay

Step 3
I gave the enemy the (16) state I named "countercode" by using the passive state script. (put this in the enemy notes <Passive State: 16>)

YEP.13 – Auto Passive States
http://yanfly.moe/2015/10/17/yep-13-auto-passive-states/

Explanation:
Anyway, based off the if statement, If spiked enemy has this state then it does this {a.addState(15) + a.setHp(a.hp - 1)} which gives the player the "counter" state
and takes away 1hp of the actor.

else
if the enemy does not have the 16 state then attack as normal
if (b.isStateAffected(16)) {a.addState(15) + a.setHp(a.hp - 1)} else {put your own attack formula here}

tip: b.isStateAffected affects enemy, a.isStateAffected affects the actor.

In the counter state you can change the SV motion and the SV Overlay to let the player have a reaction.

This same process can be used to create poison, burn, and spiked damage on the actor.

To tweak the damage formula even more; here is a guide I found to help with HP Regeneration and whatever else customization in the damage formula you want. I hope this helps!

https://www.rpgmakercentral.com/topic/36290-damage-formulas-101-mv-edition/

:kaopride:



 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,389
Reaction score
7,217
First Language
German
Primarily Uses
RMMV
Please show us a screenshot of your plugin manager and tell us the version number of your projects rpg_core.js file (open it with a text editor, the number at the end of the title line).

It might be that the plugins needed for that notetag are configured wrong...
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,224
Reaction score
13,760
First Language
English
Primarily Uses
RMVXA
Also this isn't the forum for this, as this needs to be in the support forum for the engine you are using. Which RPGMaker are you using?
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,112
Reaction score
11,459
First Language
English
Primarily Uses
RMVXA
@vfxblender Going by the JS coding and the reference to plugins, I am going to assume that you are using MV. If in fact you are using another one, please Report this post and ask for it to be moved to the correct one.

It would be helpful if you would edit your Profile Page info to include the engine you are using under your avatar to avoid doubt in the future.
Thanks.

[move]RPGMaker MV[/move]
 

vfxblender

Villager
Member
Joined
Jan 22, 2017
Messages
8
Reaction score
0
First Language
English
Primarily Uses
Please show us a screenshot of your plugin manager and tell us the version number of your projects rpg_core.js file (open it with a text editor, the number at the end of the title line).

It might be that the plugins needed for that notetag are configured wrong...
1.6.0 from the rpg_core

Here is my plugin manager.
upload_2018-5-25_21-40-0.png
 

vfxblender

Villager
Member
Joined
Jan 22, 2017
Messages
8
Reaction score
0
First Language
English
Primarily Uses
Also this isn't the forum for this, as this needs to be in the support forum for the engine you are using. Which RPGMaker are you using?
rpg maker mv.
 

vfxblender

Villager
Member
Joined
Jan 22, 2017
Messages
8
Reaction score
0
First Language
English
Primarily Uses
@vfxblender Going by the JS coding and the reference to plugins, I am going to assume that you are using MV. If in fact you are using another one, please Report this post and ask for it to be moved to the correct one.

It would be helpful if you would edit your Profile Page info to include the engine you are using under your avatar to avoid doubt in the future.
Thanks.

[move]RPGMaker MV[/move]
Kes, on this post you talked about spiked enemies.
https://forums.rpgmakerweb.com/index.php?threads/hurting-self-spiked-enemies.43091/
"I use Battle symphony, and also counter attack, which works fine for both actors and enemies. How have you allocated the rate of counter attack?"
Based on your expertise what would be the best route to create spiked enemies that hurt the player when you jump on them. Sorry to bother you guys but I have exhausted google.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,389
Reaction score
7,217
First Language
German
Primarily Uses
RMMV
1) 1.6.0 is instabile and bug-ridden, please update to 1.6.1
2) your yanfly plugins are in the wrong order, please correct that as soon as possible and then test again with new game.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,112
Reaction score
11,459
First Language
English
Primarily Uses
RMVXA
I use an 'Effect' which depends on Hime's 'Effects Manager' script which was for Ace.
I have no idea if Hime has done an equivalent plugin for MV.

However, you may have more success if you used the search term "Thorn Mail" or "Thorn Armour/Armor" (you can get both spellings) as that is what it is often called.
 
Last edited:

vfxblender

Villager
Member
Joined
Jan 22, 2017
Messages
8
Reaction score
0
First Language
English
Primarily Uses
I use an 'Effect' which depends on Hime's 'Effects Manager' script which was for Ace.
I have no idea if Hime has done an equivalent plugin for MV.

However, you may have more success if you used the search term "Thorn Mail" or "Thorn Armour/Armor" (you can get both spellings) as that is what it is often called.
Thanks for the advice I updated the game and changed the plugin order. Most Thorn Mail effects I found for MV require the buff state core, but the buff state core still wasn't working for some reason. However, I figured it out and I am going to post a text tutorial for all others who might need help. Hopefully this saves you time.

I developed this if statement in the damage formula

Step 1
Put this in the skill's damage formula the actor uses
if (b.isStateAffected(16)) {a.addState(15) + a.setHp(a.hp - 1)} else {a.atk * 4 - b.def * 2}

Step 2
I created 2 states "Counter" number 15 and "Countercode" number 16
Make CounterCode have no [SV] Overlay

Step 3
I gave the enemy the (16) state I named "countercode" by using the passive state script. (put this in the enemy notes <Passive State: 16>)

YEP.13 – Auto Passive States
http://yanfly.moe/2015/10/17/yep-13-auto-passive-states/

Explanation:
Anyway, based off the if statement, If spiked enemy has this state then it does this {a.addState(15) + a.setHp(a.hp - 1)} which gives the player the "counter" state
and takes away 1hp of the actor.

else
if the enemy does not have the 16 state then attack as normal
if (b.isStateAffected(16)) {a.addState(15) + a.setHp(a.hp - 1)} else {put your own attack formula here}

tip: b.isStateAffected affects enemy, a.isStateAffected affects the actor.

In the counter state you can change the SV motion and the SV Overlay to let the player have a reaction.

This same process can be used to create poison, burn, and spiked damage on the actor.

To tweak the damage formula even more; here is a guide I found to help with HP Regeneration and whatever else customization in the damage formula you want. I hope this helps!

https://www.rpgmakercentral.com/topic/36290-damage-formulas-101-mv-edition/

:kaopride:
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

And now since I've got the whole game parts working, the *contents* await.

I've invented a cheap way to manipulate weather. Should I get it patented?
It's change from frikin' hot to beautiful at the cost of only 4 beers.
I think is french enough.
Yanfly told me the new earth all animations in MZ look a bit like summoning potatoes and now I can't unsee it. halp

Forum statistics

Threads
100,589
Messages
977,550
Members
132,187
Latest member
akshpatil
Top