Yanfly's Skill Core Lunatic tags

gotnovicks

Veteran
Veteran
Joined
Feb 15, 2015
Messages
76
Reaction score
9
First Language
Portuguese
Primarily Uses
N/A
Hi!

(sorry for my bad english btw)

I'm confused with how do I use the "Lunatic Mode" note tags in Skill Core plugin.

Basically, my skills absorbs damage but not the entire damage (so I don't want to use the innate function in formula box), only a % that increases according of users LUK. So here what I tried (the formula I used the way I'd use in the formula box):

<Post-Damage Eval>x = 25 + (a.luk / 5);y = (a.mat * 4) - (b.mdf * 2) j = y * (y/100)a.gainHP(j)</Post-Damage Eval>Post-damage implies the  skill succefully hit the target.

​X calculates the % of dmg absorved

Y is the dmg formula

J is the final calculation (transforms X in a %)

I saw a gainMP() in another topic, so I assumed that a gainHP() would work...

but this code didn't work. Any help? pls >:
 
Last edited by a moderator:

kiriseo

Veteran
Veteran
Joined
Oct 27, 2015
Messages
229
Reaction score
74
First Language
German
I haven't looked at Yanfly's Skill Core yet.

But I have two questions about your code.

The first is:

Did you mistyped here?

Because you said:

J is the final calculation (transforms X in a %)

But there is no x in the calculation on the right side.

The second question:

Does the character, that uses this skill, have full health?

You won't get more health as his max hp.
 

Yanfly

Developer
Joined
Mar 15, 2012
Messages
1,696
Reaction score
2,329
<Post-Damage Eval>var x = 25 + (a.luk / 5);var y = (a.mat * 4) - (b.mdf * 2) var j = y * (y/100)a.gainHP(j)</Post-Damage Eval> Not sure what the "x" is doing there though. It's not being used in any of the equations.

Since you're making new variables, what you'd want to do is include a "var" in front of each one of them as such:
 

Kest

The Ecstasy of Gold
Veteran
Joined
Dec 4, 2014
Messages
147
Reaction score
24
First Language
English
(Is this the general thread for discussing/sharing Lunatic setups in Yanfly Skill Core?)

I was trying to add a skill where the cost is based on the target's MP, but this doesnt seem possible in RMMV without a plugin:



What tags would I use to achieve this effect with YEP Skill Core?
 

kiriseo

Veteran
Veteran
Joined
Oct 27, 2015
Messages
229
Reaction score
74
First Language
German
I was trying to add a skill where the cost is based on the target's MP, but this doesnt seem possible in RMMV without a plugin:

What tags would I use to achieve this effect with YEP Skill Core?
How exactly should the targets MP effect the skill cost?

Should it cost more when the target has low MP, or the other way round?
 

Kest

The Ecstasy of Gold
Veteran
Joined
Dec 4, 2014
Messages
147
Reaction score
24
First Language
English
Lets suppose a skill costs 100 MP from the target - there is no cost for the caster.

If the target has less than 100 MP, the caster cannot use that skill on them.
 
Last edited by a moderator:

kiriseo

Veteran
Veteran
Joined
Oct 27, 2015
Messages
229
Reaction score
74
First Language
German
Hmm... the closest to this I could do is this:

<Pre-Damage Eval>if(b.mp < 100) {b.result().missed = true;}</Pre-Damage Eval><After Eval>if(b.result().isHit()) {b.setMp(b.mp - 100);}</After Eval>It will heal the target only if it has 100 or more MP and the target pays the cost.

Otherwise the heal will miss and nobody pays anything.

But I can't stop the skill to be cast regardless of it.
 

Kest

The Ecstasy of Gold
Veteran
Joined
Dec 4, 2014
Messages
147
Reaction score
24
First Language
English
Works for now... I gave the skill a 2-turn cooldown. Thanks for the help!

I tried using the same trick for a skill that only hits enemies who are less than half health, but for some reason missing damages them anyways:



Lol?  :headshake:

Code:
<Pre-Damage Eval>var x = b.mhp * .5;if(b.hp > x) {b.result().missed = true;}</Pre-Damage Eval>
 
Last edited by a moderator:

kiriseo

Veteran
Veteran
Joined
Oct 27, 2015
Messages
229
Reaction score
74
First Language
German
I have to look into this again.

What I gave you before isn't working as intended either.

It heals the target netherless

/EDIT:

Maybe you should ask Yanfly.

I can't see how you could achieve this with the current state of the plugin.
 
Last edited by a moderator:

Kest

The Ecstasy of Gold
Veteran
Joined
Dec 4, 2014
Messages
147
Reaction score
24
First Language
English
Maybe I didn't look closely enough - I could have sworn the one for healing was working... will have to check again later.
 

kiriseo

Veteran
Veteran
Joined
Oct 27, 2015
Messages
229
Reaction score
74
First Language
German
Maybe I didn't look closely enough - I could have sworn the one for healing was working... will have to check again later.
It'll display "miss" and costs no MP but it heals the target.

The problem lies within the apply() function from MV.

I first thought of using <Pre-Damage Eval>.

But if I set missed to true in there, it doesn't work.

Because in the apply() function, the result gets reseted and set again.

And I can't do anything about it without changing the function itself.

And setting missed afterwards doesn't work either, because the damage is then already applied.

I had a almost working version, where the target would gain the lost HP after the damage step.

But the hp check wouldn't work as expected, because it would check the hp after the damage is done.

And this approach wouldn't work for healing.

'Cause if the healing spell restores more HP than the target has lost, he would have less HP afterwards.

/EDIT:

Okay, I have officially made my first plugin :D

Please try it and tell me if you find errors.

https://www.dropbox.com/s/ek5iqrbcbedb16j/Kiriseo_ZeroDamage.js?dl=0

To use it, place it below the YEP_SkillCore plugin.

I added a new eval notetag.

For your version of the heal spell I used:



And for your damage skill, this:



You just have to make sure to set zeroDamage to true if you don't want the skill effect taking place.
 
Last edited by a moderator:

Kest

The Ecstasy of Gold
Veteran
Joined
Dec 4, 2014
Messages
147
Reaction score
24
First Language
English
Tested both of them, works great. Thanks again!
 

kiriseo

Veteran
Veteran
Joined
Oct 27, 2015
Messages
229
Reaction score
74
First Language
German
Tested both of them, works great. Thanks again!
That's good to hear. ^^

I read what Yanfly wrote.

I knew I had read something similiar before, but I completely forgot about the Damage Core plugin -.-'
 

Kest

The Ecstasy of Gold
Veteran
Joined
Dec 4, 2014
Messages
147
Reaction score
24
First Language
English
Here's a code that deals X damage even if you miss with an attack.

Code:
<After Eval>if(b.result().missed) { b.setHp(b.hp - x); }</After Eval>
 

Kest

The Ecstasy of Gold
Veteran
Joined
Dec 4, 2014
Messages
147
Reaction score
24
First Language
English
If you want to unlock the skill while State X is active:
 

<Custom Requirement>if (!user.isStateAffected(X)) { value = false; }</Custom Requirement>
And this removes State X from the attacker if he misses the target:

Code:
<After Eval>if(b.result().missed) { a.removeState(X); }</After Eval>
 
Last edited by a moderator:

Kest

The Ecstasy of Gold
Veteran
Joined
Dec 4, 2014
Messages
147
Reaction score
24
First Language
English
class specific skills, for class change plugin:

 

Using Yanfly Skill Core, place in skill notetags:

<Custom Show Eval>if (a._classId === X) { visible = true; }else { visible = false; }</Custom Show Eval>Where X is number of class you want to use skill

if (a._classId === X || a._classId === Y) { visible = true; }For multiple classes, do like above
 

killerfer

Veteran
Veteran
Joined
Nov 4, 2015
Messages
198
Reaction score
49
First Language
Portuguese
I'm trying to make a counter state, where if the actor is hit when he has such state, he counters with a skill. I figured I need to use the lunatic notetag

<Custom Respond Effect> code code</Custom Respond Effect>But I have no idea what I have to type for the actor to use the skill. Maybe someone can help me. If anyone know how to set a rate for it to work too it would be great (like 50% chance for the skill to be cast when the actor is hit)
 

killerfer

Veteran
Veteran
Joined
Nov 4, 2015
Messages
198
Reaction score
49
First Language
Portuguese
Ok so I managed to do this:

<Custom Respond Effect> target.forceAction(57,1); BattleManager.forceAction(target);</Custom Respond Effect>Now if the battler have the state, every time he is attacked he counters with skill 57. The problem is, he loses his turn doing the action. I combined it with Instant Cast, but if the counter happens before the actor makes his selected action, he ignores it. If using ATB is worse because after the counter he resets his bar. I think this is bad because if I have a skill that needs to be charged, he probably will stop charging the skill after the counter. Any helps? Maybe someone achieved this by using a different method?
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Transferring over the character creation to MMO MV is going okie-ish, but slow~ Mainly image assets reformatting/reworking I have to do to work in this engine is a pain. XD At least the MMO battles works pretty well so far! Woop woop! :kaoluv:
At this point I'm sorta convinced that the joke "they mix something in the cafeteria food" may be true. Like, every single person seems to be dozing off in class right after lunch...
Saying overused tropes are bad is like saying I - IV - V - I chord progression is bad.
I swear, the last 3 weeks I haven't felt like helping people at all. No idea why, even if I know the exact solution they need. Might need to harness my inner @Shaz or something. :LZSexcite: :thumbsup-right:
Look, I get that it's illegal, but...

Forum statistics

Threads
93,482
Messages
912,855
Members
123,020
Latest member
HalfofAlone
Top