Thanks for the report, I've corrected the error (which only existed in the most recent version).
If you've deleted portions and you don't need to use those tags, that's fine - otherwise, the file on the first post is updated.
Thanks for the report, I've corrected the error (which only existed in the most recent version).
i couldnt tell what those tags were in the first place, i only need the action start eval though, since im only turning on switches to trigger common events to execute plugin commands for live2d animations
<Action Respond Eval>
const fire = 4;
if (this.isAttack() && value > 0) {
target.setHp(0);
} else if (this.item().damage.elementId === fire) {
target.removeState(state.id);
}
</Action Respond Eval>
you didnt make the condition being hit by a physical attack. you made it isAttack(), which is only true if the skill is the same as the one that shows up on the actor command window alongside Guard and Item. So skill 1 in most cases.
you are sure your skill has the element set to element 4 in your terms? this will not adjust for skills with the normal attack element with a fire attack element trait
Ah, good to know. However I originally had it as isPhysical(), but that didn't do anything either, so I tried isAttack() to see if it changed, but nope, it still doesn't do as it should.
Aside from the isAttack() part that @Robro33 pointed out -
this does not refer to the current Game_Action.skill variable provided for that purpose.Alright. Over the weekend I tried that plus a few other things out, also changing 'target' to 'user' since I saw the notation that 'user' is for the actor/enemy the tag is attached to. So far it all results the same.
<Action Damaged Eval>
const fire = 4;
if (skill.isPhysical() && value > 0) {
user.setHp(0);
} else if (this.item().damage.elementId === fire) {
user.removeState(state.id);
}
</Action Damaged Eval>
Because your notetag still has
this in it. You only corrected one conditional.should be
} else if (skill.item().damage.elementId == fire) {
fire just to use it one time, instead of just checking whether elementId == 4).I suppose I should clarify that in the documentation. That is only true for the state-timing-related notetags.
user is always the battler performing the current action and target is the target of that action.True, I was focusing on getting hit with a physical attack and killing the target figured out first. I'll try different eval tags and see if I can get it working, like <Action Reaction Eval>.
I don't see how a difference in timing would matter in your case.
value of the attack to be equal to the current HP. However, that nuance doesn't matter if you're saying it still doesn't work at all.Ah, good to know about Action Reaction.
Then you should show the current code of the notetag and a screenshot of the state from your database.
As I mentioned above, I think changing
value would be better, but what you have looks at first glance like it should work.No errors show up in the log, no.
<Action Damaged Eval>
if (skill.isPhysical() && value > 0) {
target.performCollapse();
} else if (skill.damage.elementId == 4) {
target.removeState(state.id);
}
</Action Damaged Eval>
So you are using the incorrect notetag. Per the documentation, Action Damaged is checked on the user after inflicting damage, but you've put this in the state that would be on the target so it will not be getting evaluated when they're hit.
<Action Reaction Eval>
if (skill.isPhysical() && value > 0)
value = target.hp;
else if (skill.item().damage.elementId == 4)
target.removeState(state.id);
</Action Reaction Eval>
skill as I haven't looked at this plugin in a while. This is correct, and I've corrected it in my earlier post.Ah ok. I think understanding correctly how to use target and user got me a bit.
<State Remove Eval>
const dmg = Math.floor(user.mhp / 3);
$gameTroop.aliveMembers().forEach(enemy => {
if (enemy !== user) {
const result = enemy.result();
result.clear();
result.used = true;
result.hpDamage = dmg;
enemy.gainHp(-dmg);
enemy.startDamagePopup();
enemy.refresh();
}
});
$gameMessage.add(" parasite triggered!");
$gameScreen.startFlash([255, 0, 0, 160], 60);
$gameScreen.shake(5, 5, 30);
</State Remove Eval>
no, your observation is good. when a battler dies, the way its states are removed is handled in a fairly unique way compared to all other instances of removal. the plugin isnt set to catch it.
Game_BattlerBase.prototype.clearStates = function()
{
if (this._states)
{
for (let i=0; i<this._states.length; i++)
{
this.oneStateEval("stateRemoveEval", this._states[i]);
}
}
this._states = [];
this._stateTurns = {};
};
<Action Reaction Eval>
if (value >= target.hp)
// do your parasite stuff
</Action Reaction Eval>
<State Remove Eval>
if (user.hp <= 0)
{
// put all your code in here
}
</State Remove Eval>
Sorry, my error - I haven't used the plugin in a while. Per the documentation, only the Action notetags have a
target variable. user.hp instead of targetOriginal thread: https://forums.rpgmakerweb.com/threads/eval-tags-mz.162424/