Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

I'm having a problem with Yanfly's Plague Touch skill

8 Bit Hero

Villager
Xy$
0.00
TypeError: undefined is not a function
at Game_Actor.eval (eval at <anonymous> (file:///C:/Users/8-Bit%20Hero/Documents/Games/Project1/js/plugins/YEP_SkillCore.js:704:15), <anonymous>:2:18)
at Game_Actor.Game_BattlerBase.meetsSkillConditionsEval (file:///C:/Users/8-Bit%20Hero/Documents/Games/Project1/js/plugins/YEP_SkillCore.js:704:5)
at Game_Actor.Game_BattlerBase.meetsSkillConditions (file:///C:/Users/8-Bit%20Hero/Documents/Games/Project1/js/plugins/YEP_SkillCore.js:664:17)
at Game_Actor.Game_BattlerBase.meetsSkillConditions (file:///C:/Users/8-Bit%20Hero/Documents/Games/Project1/js/plugins/YEP_X_LimitedSkillUses.js:567:61)
at Game_Actor.Game_BattlerBase.meetsSkillConditions (file:///C:/Users/8-Bit%20Hero/Documents/Games/Project1/js/plugins/YEP_X_SkillCooldowns.js:905:61)
at Game_Actor.Game_BattlerBase.meetsSkillConditions (file:///C:/Users/8-Bit%20Hero/Documents/Games/Project1/js/plugins/YEP_RowFormation.js:1169:61)
at Game_Actor.Game_BattlerBase.canUse (file:///C:/Users/8-Bit%20Hero/Documents/Games/Project1/js/rpg_objects.js:2788:21)
at Game_Actor.Game_BattlerBase.canUse (file:///C:/Users/8-Bit%20Hero/Documents/Games/Project1/js/plugins/YEP_X_SelectionControl.js:699:52)
at Window_BattleSkill.Window_SkillList.isEnabled (file:///C:/Users/8-Bit%20Hero/Documents/Games/Project1/js/rpg_windows.js:2176:39)
at Window_BattleSkill.Window_SkillList.isEnabled (file:///C:/Users/8-Bit%20Hero/Documents/Games/Project1/js/plugins/YEP_EnhancedTP.js:3331:50)rpg_managers.js:1618 SceneManager.catchExceptionrpg_managers.js:1579 SceneManager.update
 

Lore

Resident Dragon
Hi there @8 Bit Hero,

Can you elaborate as to what issue you are having with the plugin itself please? Just posting the code doesn't help us help you pin down the issue.

From what I can read however, the issue you seem to be having is the "TypeError: undefined is not a function" issue that people tend to get. Is this correct?

Looking at the base code to implement the skill, the most likely cause is that one of the container symbols is missing. Code is highly sensitive to punctuation, so have a look through the code to make sure all of the apostrophes, brackets, etc, are in the right place. Even the most experienced coder has this issue, and most times, it's as simple as once of the apostrophes having been accidentally deleted.

I've added the base code for the skill below for reference.

Hope that helps! :)

Code:
// Skill Core

<Custom Requirement>
// Check state count for state category the user is affected by.
var count = user.getStateCategoryAffectedCount('Ailment');
// Set the requirement condition to be dependent on the count.
value = count > 0;
</Custom Requirement>

// Skill Core

<After Eval>
// Get the states the user is currently affected by.
var states = user.states();
// This is the category we want to transfer.
var category = 'Ailment';
// Create a loop that goes through each state.
while (states.length > 0) {
  // Get the currently looped state.
  var state = states.shift();
  // Check if the state's categories has the one we want.
  if (state.category.contains(category.toUpperCase())) {
    // Get the number of turns left on the user for the state.
    var turns = user.stateTurns(state.id);
    // Remove the state from the user.
    user.removeState(state.id);
    // Add the state to the target.
    target.addState(state.id);
    // Check if the addition of the state went through.
    if (target.isStateAffected(state.id)) {
      // Set the number of turns for that state for the target.
      target.setStateTurns(state.id, turns);
    }
  }
}
</After Eval>

// Action Sequence

// Sets up the action.
<setup action>
display action
immortal: targets, true
</setup action>

// Moves the user in front of the target.
<whole action>
move user: targets, front, 20
motion standby: user
wait for movement
</whole action>

// User removes ailments from self and applies it to target.
<target action>
face user: target
animation 58: user
wait for animation
motion thrust: user, no weapon
wait: 10
action animation: target
wait for animation
action effect
</target action>
 

Jodis

Adventurer
Xy$
0.44
One thing i know about yanfly's plugins you will have errors if you don't put them in the same order that he has them on his site. Have you looked to see if you have them in the proper order?. Also I would do a recheck to see if i had all the required plugins. I have found that sometimes i forgot a requirement or got them in the wrong order. I don't know if this is your case. But if after doing this and you get the same thing. You should post the error to him. Could be you need to move yanfly's plugins to the top or bottom. Also try disabling everything that is not yanfly to see if it is a conflict. I don't know what you have tried so i am trying to list what i can.

Also he may not have gotten to all of his plugins yet he has a lot to update to 1.3.1
 
Last edited:

8 Bit Hero

Villager
Xy$
0.00
@Lore Thanks for the code . I don't know how but it worked when i paste your code after deleting the default one. And thanks to everyone that tried to help :) .
 
Top