YanFly Skill Core evaluation won't work - (maybe a bug?)

Klunky2

Veteran
Veteran
Joined
Jul 2, 2017
Messages
117
Reaction score
4
First Language
german
Primarily Uses
RMMV
Ok I know this requires knowledge at the skill core plugin of yanfly, I still hope some people are accustomed to it. So I want to make a "steal" command, for this there in an requirement for getting to "stealing" to work. Your own agility has to be higher than the one of the monster.
After that a common event will be activated where further actions happen. One of the tem of course is a fork condition which asks if you meet the requirments to steal.
And this is where my problem is. no matter what I do even if I put: $gameSwitches.setValue(255,true); right at the beginning of the evalution, nothing happens... WTF!?

I used a similiar evulation on another skill but on this it worked perfectly. So I really don't know what's wrong with my script here. I looks like the <Before Eval> tag just never happens. I've tried to solve it for 3 hours straight last night, but I just couldn't the mistake here.

The monster I test has DEFINITELY a lower agility and I DEFINITELY ask for the switch 255 in common event 49.

<target action> and <finish action> work. <Before Eval> seemingly not and <formula effect> doesn't work either. D:

So yeah would be thankful for some expert analysis here. D:

Code:
<target action>
wait: 30
move user: target, FRONT BASE, 30, offset x +10
wait: 30
clear battle log
wait: 10
move user: POINT, 660, 300, 30
wait 1
move user: forward, 40, 2
wait: 10
move user: backward 40, 2
wait: 4
se: Wind4, 100, 50
move user: HOME, 40
wait: 20
FACE target: FORWARD
show battle hud
wait: 20
</target action>

<Before Eval>
var x = 100 * $gameVariables.value(225);
x /= 100;
var numTest = x * (a.agi - b.agi);
if (numTest >= 0)
{
$gameVariables.setValue(211, b.index());
$gameSwitches.setValue(255,true);
}
</Before Eval>

<finish action>
common event: 49
</finish action>

<formula effect>
$gameVariables.setValue(12, b.enemyId());
</formula effect>
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,376
Reaction score
7,209
First Language
German
Primarily Uses
RMMV
var x = 100 * $gameVariables.value(225);
x /= 100;
why do you multiply by 100 and divide by it in the next step - that means there is no change to the value in the variable.
numTest -= randNum;
where do you get randNum from? If that is not correctly defined then numTest will also no longer be defined and the next if simply be abandoned as undefined.
 

Klunky2

Veteran
Veteran
Joined
Jul 2, 2017
Messages
117
Reaction score
4
First Language
german
Primarily Uses
RMMV
why do you multiply by 100 and divide by it in the next step - that means there is no change to the value in the variable.

where do you get randNum from? If that is not correctly defined then numTest will also no longer be defined and the next if simply be abandoned as undefined.
for the second one sry already corrected it in the text, it slipped trough the code because I made some adjustments, but it has nothing to do with the implementation, it doesn't work regardless.

As of the multiplier i've put it in to implement some adjustments later to the formula, as for now it practically has no effect yes, multiplying the agi values is also kinda pointless, but there are some values i haven't implemented yet, i'm just about to test if if works on a basic level. But that's not causing the problem anyway.
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,376
Reaction score
7,209
First Language
German
Primarily Uses
RMMV
please show screenshots of actor and enemy - complete windows including the traits, because there have been cases where people misinterpreted how some traits change the attributes.
Also, please show a screenshot of the common event.

if that doesn't show anything, you might have to add test outputs to really check what happens - for example a show text at the beginning of the common event to really see if the common event is never called or if it is called but then abandoned.

also please show a screenshot of your plugin manager with all plugins - that is even more important than the screenshots above. Because in the past, most cases where yanfly's plugins react strangely have been cause by the wrong order of plugins, and we need to check that order as well as other possible incompatibilities.
 

Klunky2

Veteran
Veteran
Joined
Jul 2, 2017
Messages
117
Reaction score
4
First Language
german
Primarily Uses
RMMV
please show screenshots of actor and enemy - complete windows including the traits, because there have been cases where people misinterpreted how some traits change the attributes.
Also, please show a screenshot of the common event.

if that doesn't show anything, you might have to add test outputs to really check what happens - for example a show text at the beginning of the common event to really see if the common event is never called or if it is called but then abandoned.

also please show a screenshot of your plugin manager with all plugins - that is even more important than the screenshots above. Because in the past, most cases where yanfly's plugins react strangely have been cause by the wrong order of plugins, and we need to check that order as well as other possible incompatibilities.
Ok I've made plenty of screenshots, hope that's enough. Not sure if its understandable enough in german.

The Common Event:

Common Event 49.png

Common Event 49 - 2.png
last one simply shows how switch 255 will be deactivated at the end
Common Event 49 - 3.png

The Skill:
skill_klauen.png
you can see the code from above in the notes.

The Actor who uses the skill:
actor_imp.png

test_output.png
Here is the test output of Variable 211. Variable 211 should contend the position index of the enemy that was targeted, but it simply shows "0".

$gameVariables.setValue(211, b.index()); (you can see it in the code above, just before the switch 255 gets turned on.

All the plug-ins I have:

plug-in manager.png

plug-in manager2.png

plug-in manager3.png

(yeah it's pretty much I know, but the implementation of "Skill_Core" works on other skills perfectly.)
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,376
Reaction score
7,209
First Language
German
Primarily Uses
RMMV
the order of your yanfly plugins is a big mess. They CANNOT work correctly in that order as they are overriding each other in the wrong order - this means that part of them can work (where it doesn't conflict with other overrides) but other parts will not.

please go to yanfly's website, the list of all plugins. He even suggests at top to follow that order exactly - and that suggestion was made when there were only a few dozen plugins. In the communities experience, with the larger number of plugins involved, that is no longer a suggestion but an absolute requirement.

Please re-order your yanfly plugins to be in exactly that order (top to bottom). Other plugins can be added between them where compatibility requires that, but yanfly's plugins have to be in that order.

And remember that this reordering destroy compatibility with older savefiles, you'll have to start new games on the titlescreen of all further playtests (but you can save and continue those new games until the next big change in the plugin list).

EDIT: and why have you added a patch for the yanfly itemcore if you don't use the itemcore plugin?
 
Last edited:

Klunky2

Veteran
Veteran
Joined
Jul 2, 2017
Messages
117
Reaction score
4
First Language
german
Primarily Uses
RMMV
the order of your yanfly plugins is a big mess. They CANNOT work correctly in that order as they are overriding each other in the wrong order - this means that part of them can work (where it doesn't conflict with other overrides) but other parts will not.

please go to yanfly's website, the list of all plugins. He even suggests at top to follow that order exactly - and that suggestion was made when there were only a few dozen plugins. In the communities experience, with the larger number of plugins involved, that is no longer a suggestion but an absolute requirement.

Please re-order your yanfly plugins to be in exactly that order (top to bottom). Other plugins can be added between them where compatibility requires that, but yanfly's plugins have to be in that order.

And remember that this reordering destroy compatibility with older savefiles, you'll have to start new games on the titlescreen of all further playtests (but you can save and continue those new games until the next big change in the plugin list).
Ok thanks for the info.

I've ordered it exactly how shown on the YanFly website, for the other plug-ins I looked if there was any info how to place it. There are some things I can only guess about I suppose.

But the problem still exists here is the new order of all the plug-ins:

plug-in manager.png
plug-in manager2.png
plug-in manager3.png

I'm pretty sure that it can't be a mistake in the plug-in order itself. Because my other implementation of such an skill who is pretty similar, works totally fine. Maybe there is an error about how I use the tags form the skill core?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,631
Reaction score
13,222
First Language
English
Primarily Uses
RMMV
After you use the skill and it doesn't work, can you hit F8 to open the dev tools and go to the Console tab? Grab a screenshot of that so we can see if there's any error.
 

Klunky2

Veteran
Veteran
Joined
Jul 2, 2017
Messages
117
Reaction score
4
First Language
german
Primarily Uses
RMMV
After you use the skill and it doesn't work, can you hit F8 to open the dev tools and go to the Console tab? Grab a screenshot of that so we can see if there's any error.
Unfortunelately debugging doesn't work with my RPG-Maker MV, dunno why but at some point all these features like seeing variables, going through walls, F8 and so on doesn't work anymore.
 

Klunky2

Veteran
Veteran
Joined
Jul 2, 2017
Messages
117
Reaction score
4
First Language
german
Primarily Uses
RMMV
Ok i've seen that I could use F12, then I can open the debugger but, it only shows one message:

PIXI-error.png

What am I supposed to do??
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
6,985
Reaction score
4,734
First Language
Dutch
Primarily Uses
RMXP

I've moved this thread to Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

Klunky2

Veteran
Veteran
Joined
Jul 2, 2017
Messages
117
Reaction score
4
First Language
german
Primarily Uses
RMMV
Ok now I've found out that I use old js for my project I swapped them out except the "plugin.js" Now the debugging tool works like before. Great. But when I use my stealing ability the console log, logs absolutely nothin. Should it log something?

1596372349911.png

That's all.

Edit: could it be that action sequences and evals together are not possible!?!? It looks like my eval and the formula effect are gettin straight out ignored.
 
Last edited:

Klunky2

Veteran
Veteran
Joined
Jul 2, 2017
Messages
117
Reaction score
4
First Language
german
Primarily Uses
RMMV
Here is another code of mine:

Code:
<Enemy or Actor Select>
<Post-Damage Eval>
var hpPercent = 0.2;
if (target.hpRate() <= hpPercent) {
var x = 15 * $gameVariables.value(5);
x /= 100;
var numTest = x * (a.luk * 4 - b.luk * 2);
var randNum = 1 + Math.random() * 100;
randNum = Math.round(randNum).clamp(1, 100);
numTest -= randNum;
if (numTest >= 0)
target.addState(11);
}
</Post-Damage Eval>
This works to 1000%

So why does this work, but not the other skill?

Here is screenshot of said skill:

1596373633834.png
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,376
Reaction score
7,209
First Language
German
Primarily Uses
RMMV
at some point all these features like seeing variables, going through walls, F8 and so on doesn't work anymore.
That usually happens if the editor is version 1.6.x but the project core is still 1.5.x or older.

Please go to your project directory, js and then open rpg_core.js with a text editor. (do not doubleclick it).
What is the version number at the end of the title line? (no number there means 1.0)

Please do not update your project (yet) if it is older, there are some older plugins that do not work with 1.6.x. If you have an older project core, then you need to check for which core the plugins were programmed and either change everyone for a 1.5.x version or (better) update everything to 1.6.2 versions before updating the core.
In both cases it will help with bughunting to tell us both editor version and project core version
 

Klunky2

Veteran
Veteran
Joined
Jul 2, 2017
Messages
117
Reaction score
4
First Language
german
Primarily Uses
RMMV
Hey I found the problem!

the problem is that i've put the visual animation on.
<target action>
</target action>

Somehow <target action> overrides the <formula effect> and <Before Val> so if anything should happen inbetween these tags it will be ignored because there is something in <target action>, which would be applied usually when I don't write the notetag. But since I've writen it down, these particular thing that would bring <formula effect> and <Before Val> to work, misses now.

Does anyone know what it is?
I've changed the <target action> tag to <whole action> and now it works.

There is still one annyoing thing left on the skill. The motion of the character who uses it, will make an silly and unfitting "chant" motion right after the <whole action> he does it because <target action> is not specified. If I would specify it, the character would not longer do his chant animation but then the other tags don't work again.
Is there some way override the chant motion? It look like I HAVE to put it in the target action tab.

I hope you guys can still follow me.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,376
Reaction score
7,209
First Language
German
Primarily Uses
RMMV
@Klunky2 please read my last post above - even if you found your current problem, it will cause other problems if you continue to use an 1.6.x editor with an 1.5.x or older project - especially if you already copied different js files to get the debugging working again. Because that would result in a project with a mix of different versions of core files.
 

Klunky2

Veteran
Veteran
Joined
Jul 2, 2017
Messages
117
Reaction score
4
First Language
german
Primarily Uses
RMMV
@Klunky2 please read my last post above - even if you found your current problem, it will cause other problems if you continue to use an 1.6.x editor with an 1.5.x or older project - especially if you already copied different js files to get the debugging working again. Because that would result in a project with a mix of different versions of core files.
So far nothing is broken. I'll keep my eyes peeled. I don't use very complicated plug-ins most of them are very system based. YanFlys Plug-ins are up to date nontheless and I'll try out if the other plugins will still do their work. I'm pretty sure the recent problem has nothing to do with swapping out the versions.
 

HumanNinjaToo

The Cheerful Pessimist
Veteran
Joined
Apr 18, 2013
Messages
1,099
Reaction score
507
First Language
English
Primarily Uses
RMMV
There is still one annyoing thing left on the skill. The motion of the character who uses it, will make an silly and unfitting "chant" motion right after the <whole action> he does it because <target action> is not specified. If I would specify it, the character would not longer do his chant animation but then the other tags don't work again.
Is there some way override the chant motion? It look like I HAVE to put it in the target action tab.
If the only issue is this chant motion, you can go to your system tab and, I believe it's at the top right, delete the skill type from that list that would show the chant motion upon using the skill. Otherwise, it may be an option in the Yanfly Battle engine core. Then the way around that would be to manually put in the motion user: chant command in any other sequences that you would like to show it, instead of it happening automatically.

Also, I noticed your original issue was a switch getting turned on prior to the skills damage effects taking place. I recently discovered that if you do switches and variables using <Custom Execution> it will actually happen before <Before Eval> and before <Pre-Damage Eval>. I recently had an issue where the first time I used a skill when starting the game, it would never run the variable/switch changes using before eval and pre-damage eval, but it would work the next time I used the skill. Using custom execution fixed my issue. Could be worth looking into in the future when you have a skill that needs to do something with switches or variables prior to the damage execution.
 

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

Latest Threads

Latest Profile Posts

When you're lost out therrrrre and you're alllll alone, ahwahwah waitin, to carry you hooooommmme, uhhheverywhere you look! (someone hit me with those backing vocals)
X.X cant focus... too many thing want do... help!
Day 2 of teaching MV, student can move cat across the map.
Got inspired and started writing a simple tower defence battle system last night :o
Good news! I have located an amazing 3D website called SketchFab that has rotatable renderings of famous statues!

Forum statistics

Threads
100,524
Messages
976,780
Members
132,080
Latest member
nwr
Top