garret95

Pokémon Breeder
Member
Joined
Mar 15, 2017
Messages
17
Reaction score
4
First Language
Spanish
Primarily Uses
RMMV
EDIT: Fixed. After getting the new versions of those two plugins now everything works perfectly.

Hi, I've been using a few tips & tricks from good ol' Yanfly, but for some reason this one doesn't work properly.
This one is called Kyrie Eleison, and is basically a state that once applied to anyone can block 10 physical hits before disappearing. It can also be destroyed when the user loses 30% of his HP.
Here's the link to the video:

The thing is that, whenever an actor or enemy with this state is hit, the battle crashes and gives me the error from below.
I've tried deactivating all my plugins but the two that I need to make this work (Battle Engine Core and Buffs and States Core) but it crashed anyway.

Here's the code needed to make the state work:
Code:
<Custom Apply Effect>
// The number of hits before the shield wears off.
user._KyrieHits = 10;
// The number of damage before the shield wears off.
user._KyrieHP = Math.floor(user.mhp * 0.30);
// Set the state counter to display HP left.
user.setStateCounter(stateId, user._KyrieHP);
</Custom Apply Effect>

<Custom Remove Effect>
// Remove the number of hits to expire the shield.
user._KyrieHits = undefined;
// Remove the damage needed to expire the shield.
user._KyrieHP = undefined;
// Reset the state counter.
user.setStateCounter(stateId, 0);
</Custom Remove Effect>

<Custom React Effect>
// Check if the action deals HP damage.
if (this.isHpEffect() && value > 0) {
  // Play an animation on the target.
  target.startAnimation(53);
  // Calculate the amount of HP to reduce.
  var reduce = Math.min(value, target._KyrieHP);
  // Reduce that from the value.
  value -= reduce;
  // Reduce that value from the shield amount.
  target._KyrieHP -= reduce;
  // Reduce the hits from the shield count.
  target._KyrieHits -= 1;
  // Set the state counter to reflect the new HP amount left
  target.setStateCounter(stateId, target._KyrieHP);
  // Create a text to display.
  var text = "<CENTER>" + target.name() + "'s shield blocks " + reduce + " damage and has " + target._KyrieHits + (target._KyrieHits !== 1 ? " hits" : " hit") + " left."
  // Set the wait time.
  var wait = 90;
  // Display the text.
  BattleManager.addText(text, wait);
}

Here's what I've digged up so far:
Code:
TypeError: undefined is not a function
at Game_Action.eval (eval at <anonymous> (file:///C:/Users/USUARIO/Documents/Games/Laboratorio%20de%20Pruebas/js/plugins/YEP_BuffsStatesCore.js:1653:32), <anonymous>:20:17)
at Game_Action.customEffectEval (file:///C:/Users/USUARIO/Documents/Games/Laboratorio%20de%20Pruebas/js/plugins/YEP_BuffsStatesCore.js:1653:5)
at Game_Action.reactStateEffects (file:///C:/Users/USUARIO/Documents/Games/Laboratorio%20de%20Pruebas/js/plugins/YEP_BuffsStatesCore.js:1750:17)
at Game_Action.onReactStateEffects (file:///C:/Users/USUARIO/Documents/Games/Laboratorio%20de%20Pruebas/js/plugins/YEP_BuffsStatesCore.js:1744:20)
at Game_Action.executeDamage (file:///C:/Users/USUARIO/Documents/Games/Laboratorio%20de%20Pruebas/js/plugins/YEP_BuffsStatesCore.js:1716:18)
at Game_Action.apply (file:///C:/Users/USUARIO/Documents/Games/Laboratorio%20de%20Pruebas/js/rpg_objects.js:1657:18)
at Game_Action.apply (file:///C:/Users/USUARIO/Documents/Games/Laboratorio%20de%20Pruebas/js/plugins/YEP_BattleEngineCore.js:2685:34)
at Game_Action.apply (file:///C:/Users/USUARIO/Documents/Games/Laboratorio%20de%20Pruebas/js/plugins/YEP_BuffsStatesCore.js:1635:34)
at Function.BattleManager.invokeNormalAction (file:///C:/Users/USUARIO/Documents/Games/Laboratorio%20de%20Pruebas/js/rpg_managers.js:2337:18)
at Function.BattleManager.invokeAction (file:///C:/Users/USUARIO/Documents/Games/Laboratorio%20de%20Pruebas/js/plugins/YEP_BattleEngineCore.js:1514:14)

I have a lot of plugins and the MV 1.3.4, but I've been making lots of stuff and there hasn't been any incompatibility like this before.
So if anyone can please help I'll be in doubt, thanks.
 
Last edited:

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,935
Reaction score
14,767
First Language
English
Primarily Uses
RMVXA
You'll need to provide much more detail. What is this skill? Where did you find this skill (link to the page please! No one is going to search all of Yanfly's Tips and Tricks to find it for you). What other plug-ins do you have? Are they al up to date? Are you using MV 1.3.5, or an older version?
 

garret95

Pokémon Breeder
Member
Joined
Mar 15, 2017
Messages
17
Reaction score
4
First Language
Spanish
Primarily Uses
RMMV
Thanks for the reply. Fixed and upgraded. Hope this is enough.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,683
Reaction score
8,492
First Language
German
Primarily Uses
RMMV
additionally, check if you have the yanfly plugins in the correct order - the wrong order will break the scripts.
 

garret95

Pokémon Breeder
Member
Joined
Mar 15, 2017
Messages
17
Reaction score
4
First Language
Spanish
Primarily Uses
RMMV
Yes, I can assure you they're all in the correct order. I always follow the order given by Yanfly on the videos.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,683
Reaction score
8,492
First Language
German
Primarily Uses
RMMV
but some of those videos are old, and the correct order of all plugins is not given in any video, it's the order on the website.
 

garret95

Pokémon Breeder
Member
Joined
Mar 15, 2017
Messages
17
Reaction score
4
First Language
Spanish
Primarily Uses
RMMV
Indeed, sorry for not being specific enough. I also checked the list of the website and everything is where it should be.

EDIT: Well, it seems that I didn't have the latest versions of those two plugins. Now it works perfectly. Thanks for the suggestions.
 
Last edited:

Latest Threads

Latest Profile Posts

My Overworld might be a mix of inspiration from 2D Final Fantasy games, Breath of Fire, Battlechasers: Nightwar, Super Mario World, and Pillars of Eternity. If I can make it more in-depth than just walking from point A to point B, that might do a lot for the gameplay experience. Hmm...
Terribly depressed. Worst birthday I've had in years, no motivation to work on anything. Still no income. At least I've got my computer running again.
Doing RPG Maker News for 19th September 2021

Stream will be live with some Dark Souls 3, followed by a session of the Interactive Text Adventure! Feel free to drop by!

Forum statistics

Threads
115,204
Messages
1,088,008
Members
149,778
Latest member
bestringtonesnett
Top