Edit:
I figured out a way to make this work so the thread can be considered closed I suppose if the mods would like.
Hey there all, I've really been hitting a wall with this one due to my lack of javascript knowledge. I've tried countless things and had zero luck so I thought I would bug the community🙂. I have tested this on a brand new and updated project with only Yanfly's skill Mastery Levels plugin, no others, to test the code but the "battler." script call is in many of Yanfly's plugins and it does not work for me in any of them so I believe I may need to add some sort of extra js. to make it work right.
So for instance, I am trying to use, from the skill Mastery Levels plugin the Script call: battler.skillMasteryLevel(skillId).
However, in the debug console I get the code:
ReferenceError: battler is not defined.
The main way I have been trying to use this is as part of a control variable, from a common event. I assign battler.skillMasteryLevel(350) to a variable but when that variable is accessed the error is thrown. This is used as part of a skill in battle.
This error is returned with any script call that references battler. in any Yanfly script that uses that, which there are many. Yanfly always has this in the description: 'battler' is a variable that represents an actor/enemy. So I am thinking I may need to define the variable in a js. somehow but I am not sure.
I would love to hear if anyone has any ideas on this. If I need to add any info please let me know, I will happy do so. And a huge thank you for taking the time to have a look.🙂
Yanflys Skill plugin. http://yanfly.moe/2019/01/25/yep-178-skill-mastery-levels-rpg-maker-mv/
I figured out a way to make this work so the thread can be considered closed I suppose if the mods would like.
Hey there all, I've really been hitting a wall with this one due to my lack of javascript knowledge. I've tried countless things and had zero luck so I thought I would bug the community🙂. I have tested this on a brand new and updated project with only Yanfly's skill Mastery Levels plugin, no others, to test the code but the "battler." script call is in many of Yanfly's plugins and it does not work for me in any of them so I believe I may need to add some sort of extra js. to make it work right.
So for instance, I am trying to use, from the skill Mastery Levels plugin the Script call: battler.skillMasteryLevel(skillId).
However, in the debug console I get the code:
ReferenceError: battler is not defined.
The main way I have been trying to use this is as part of a control variable, from a common event. I assign battler.skillMasteryLevel(350) to a variable but when that variable is accessed the error is thrown. This is used as part of a skill in battle.
This error is returned with any script call that references battler. in any Yanfly script that uses that, which there are many. Yanfly always has this in the description: 'battler' is a variable that represents an actor/enemy. So I am thinking I may need to define the variable in a js. somehow but I am not sure.
I would love to hear if anyone has any ideas on this. If I need to add any info please let me know, I will happy do so. And a huge thank you for taking the time to have a look.🙂
Yanflys Skill plugin. http://yanfly.moe/2019/01/25/yep-178-skill-mastery-levels-rpg-maker-mv/
CONTROL VARIABLE SCRIPT ERROR
js/plugins/YEP_MoveRouteCore.js:1065 battler.skillMasteryLevel(350)
js/plugins/YEP_MoveRouteCore.js:1066 ReferenceError: battler is not defined
at eval (eval at Game_Interpreter.command122 (js/plugins/YEP_CoreEngine.js:1836), <anonymous>:1:1)
at Game_Interpreter.command122 (js/plugins/YEP_CoreEngine.js:1836)
at Game_Interpreter.executeCommand (rpg_objects.js:8930)
at Game_Interpreter.update (rpg_objects.js:8838)
at Game_Troop.updateInterpreter (rpg_objects.js:5226)
at Function.BattleManager.updateEventMain (rpg_managers.js:2281)
at Function.BattleManager.updateEvent (js/plugins/YEP_BattleEngineCore.js:1937)
at Function.BattleManager.update (js/plugins/YEP_BattleEngineCore.js:1895)
at Scene_Battle.updateBattleProcess (rpg_scenes.js:2265)
at Scene_Battle.update (rpg_scenes.js:2257)
js/plugins/YEP_MoveRouteCore.js:1065 battler.skillMasteryLevel(350)
js/plugins/YEP_MoveRouteCore.js:1066 ReferenceError: battler is not defined
at eval (eval at Game_Interpreter.command122 (js/plugins/YEP_CoreEngine.js:1836), <anonymous>:1:1)
at Game_Interpreter.command122 (js/plugins/YEP_CoreEngine.js:1836)
at Game_Interpreter.executeCommand (rpg_objects.js:8930)
at Game_Interpreter.update (rpg_objects.js:8838)
at Game_Troop.updateInterpreter (rpg_objects.js:5226)
at Function.BattleManager.updateEventMain (rpg_managers.js:2281)
at Function.BattleManager.updateEvent (js/plugins/YEP_BattleEngineCore.js:1937)
at Function.BattleManager.update (js/plugins/YEP_BattleEngineCore.js:1895)
at Scene_Battle.updateBattleProcess (rpg_scenes.js:2265)
at Scene_Battle.update (rpg_scenes.js:2257)