Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hi again. I'm having an issue with one of my states and after some testing found it was incompatible with this Parry plug-in. Honestly not sure what could be causing the issue.

Below is the state's notebox; basically it blocks a physical skill of a pre-defined skill type. Any idea what could be causing it/how to fix it?

<custom select="" effect=""> // Check if this action is a skill and targets an opponent. if (this.item() && DataManager.isSkill(this.item()) && this.isForOpponent()) {   // Create a pool of blocked Skill TYPES.   var blockedtypes = [];   // Add the skill type ID's to that pool.   blockedtypes.push(2, 3, 5, 7, 8, 10, 11, 13, 14);   // Create a pool of blocked individual skills.   var blockedskills = [];   // Add the individual skill ID's to that pool.   blockedskills.push(1, 3, 4, 5, 8, 9, 200, 201, 202, 203, 204, 205, 206, 208, 209);   blockedskills.push(56, 125, 300, 407);   // Check if the skill type or skill ID matches.   if (blockedtypes.contains(this.item().stypeId) || blockedskills.contains(this.item().id)) {     // If it does, then store the skill's original success rate.     this._formerItemSuccessRate = this.item().successRate;     // Now drop the skill's success rate to 0.     this.item().successRate = 0;     // Start an animation to show the spell shield occurred.     target.startAnimation(53);   } } </custom>  <custom deselect="" effect=""> // Check if there is a success rate stored. if (this._formerItemSuccessRate !== undefined) {   // Restore the skill's success rate.   this.item().successRate = this._formerItemSuccessRate;   // Remove this spell shield state.   target.removeState(stateId); } </custom>

What specifically is happening when this skill triggers?

The plugin makes some changes to how an action is applied to a target (namely, it checks for a parry after it checks for a block, which it does after the miss chance is checked), so it's possible that your effect is triggering when a parry (or block) has happened. You could add some extra checks like if (this.result.isBlocked() || this.result.isParried()) and then do the rest of it.


Nothing in those note tags should be affected by my plugin though, select effects and deselect effects have been thoroughly tested, as the block chance plugin uses them to cause the block effect.

~Ramza

Thanks for the response. The skill is based on one by Yanfly which basically sets the success rate to 0 if the incoming skill is on the list.

I tried adding an if/else at the beginning of the <Custom Select Effect> checking for a parry/block like you suggested and then activating the skill if false, but my JS skills are pretty basic and not 100% I did it correct.

I don't think the block/parry is the issue though. If I turn the Parry plug-in OFF, the skill still activates with the Block plug-in ON. Also when Parry is ON, even though none of my characters are capable of Parrying the skill doesn't trigger.

Where is the Parry plugin loaded in your plugin order?

Both of the plugins overwrote functions that other plugins might use, knowing this I did state to load block chance immediately after BattleCore, and it's possible that you may also need to load Parry Chance right after that as well to prevent any compatibility problems because of the way I did this.

~Ramza

(1 edit)

Hey it's loaded under Yanfly's BuffStates Core; I read somewhere that it needed to be under that one whereas your Block plug-in is right under the BattleCore. If I move Parry right under Block, it doesn't work anymore.

If it's just not compatible with the skill it's too bad and I won't be able to use it, but at least the Block plug-in works with no problems.