MZ Making skills neither physical or magical?

I'd like to have skills that are counted as neither physical or magical. My game also extends into "psionic" and "void" abilities. Unfortunately, it seems you can only tag stuff as physical or magical (certain hit seems to count as whichever the character's highest stat is). So, I wondered if there was a way to create an "isPsionic" and "isVoid", like how there's "isPhysical" and "isMagical"?

Equally, I'd like a way for my two characters that use these abilities to maybe have a stat that's unique to them for these if possible. I know that the VS CoreEngine can allow me to make custom parameters, but I don't know how to then give those to characters and have them increase as they level up and such...
physical or magical (or, certain hit) obeys to the way the evasion and landing is calculated.
certain hit ignores any accuracy or evasion.
what you should be looking at, is the element for each skill.
I think you misunderstood what that setting does.

It has absolutely nothing to do with "magic" - after all, magic does not exist in reality.
Instead it determines which branch of the damage flow the engine uses when calculating damage.

in short,
"phyiscal damage" means the skill checks the hit percentage, then checks the skill success percentage before determing damage.
"magical damage" means that no hit% will be checked, only skill success %
and "certain hit" means neither hit% nor success% will be checked.

The full flow is described here:

so what kind of flow would you have programmed with those other values?
Interesting. Well, I'm using Certain Hit for both Void and Psionics. The issue I'm having is that I have a "frozen" state. When a physical attack hits a frozen enemy, the ice shatters, and your character deals crit damage. Psionics is supposed to ignore the defense and magic defense of an enemy. Normally, I think you could do this via variables, but I'm using a modified version of the "Dragon Quest" damage style in VS BattleCore. Modified, as in... I have no idea if my modifications are even doing anything to actually do what I want. I'll show you the code I've made.

JavaScript:
// Define Constants
const user = this.subject();
const target = arguments[0];
const item = this.item();
const a = this.subject();
const b = target;
const v = $gameVariables._data;
const sign = [3, 4].includes(item.damage.type) ? -1 : 1;
const note = this.item().note;

// Create Multiplier
let multiplier = Math.max(eval(item.damage.formula), 0);
if (this.isCertainHit()) {
    if (note.match(/<PSIONIC>/i)) {
        let value = multiplier * Math.max(a.psiat);
        return (isNaN(value) ? 0 : value) * sign;
    }
    else {
        let value = multiplier * Math.max(a.atk, a.mat);
        return (isNaN(value) ? 0 : value) * sign;
    }
}

// Get Primary Stats
let armor = 1;
if (note.match(/<PSIONIC>/i)) {
    armor = 1;
} else if (this.isPhysical()) {
    armor = b.def;
} else if (this.isMagical()) {
    armor = b.mdf;
};
armor = this.applyArmorModifiers(b, armor);
let stat = 1;
if (note.match(/<PSIONIC>/i)) {
    stat = a.psiat;
} else if (this.isPhysical() && (this.isDamage() || this.isDrain())) {
    stat = a.atk;
} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {
    stat = a.mat;
} else if (note.match(/<PSIONIC>/i)) {
    stat = a.psidef;
} else if (this.isPhysical() && this.isRecover()) {
    stat = a.def;
} else if (this.isMagical() && this.isRecover()) {
    stat = a.mdf;
}

// Check for Recovery
if (this.isRecover()) {
    let value = stat * multiplier * sign;
    return isNaN(value) ? 0 : value;
}

// Calculate Damage
let value = 0;
if (stat < ((2 + armor) / 2)) {
    // Plink Damage
    let baseline = Math.max(stat - ((12 * (armor - stat + 1)) / stat), 5);
    value = baseline / 3;
} else {
    // Normal Damage
    let baseline = Math.max(stat - (armor / 2), 1);
    value = baseline / 2;
}
value *= multiplier;

// Return Value
return isNaN(value) ? 0 : value;
Basically, I'm trying to make it so that psionics is neither going towards b.def or b.mdf, and I do think I've found a good way to do that.
Actually, I wonder, with this code, if I set my psionics to be "magical attack" instead of "certain hit" would that still ignore the defenses due to the notetag?

EDIT: Nope... even setting it to Magical Attack, her attack on a frozen enemy is still dealing the increased critical damage... I wonder if I have the crit part wrong? This is my crit rate code.
JavaScript:
// Declare Constants
const user = this.subject();
const target = arguments[0];

// Create Base Critical Rate
let rate = this.subject().cri * (1 - target.cev);

// Guarantee Phys Crit on Frozen Target
if (target.isStateAffected(19) && this.isPhysical) {
    target.removeState(19);
    return 1;
}

// Apply Notetags
const note = this.item().note;
if (note.match(/<ALWAYS CRITICAL>/i)) {
    return 1;
}
if (note.match(/<SET CRITICAL RATE:[ ](\d+)([%%])>/i)) {
    return Number(RegExp.$1) / 100;
}
if (note.match(/<MODIFY CRITICAL RATE:[ ](\d+)([%%])>/i)) {
    rate *= Number(RegExp.$1) / 100;
}
if (note.match(/<MODIFY CRITICAL RATE:[ ]([\+\-]\d+)([%%])>/i)) {
    rate += Number(RegExp.$1) / 100;
}
if (note.match(/<JS CRITICAL RATE>\s*([\s\S]*)\s*<\/JS CRITICAL RATE>/i)) {
    const code = String(RegExp.$1);
    try {
        eval(code);
    } catch (e) {
        if ($gameTemp.isPlaytest()) console.log(e);
    }
}

// Apply LUK Buffs/Debuffs
const lukStack = this.subject().buff(7);
rate *= 2 ** lukStack;

// Return Rate
return rate;
Psionics is supposed to ignore the defense and magic defense of an enemy. Normally, I think you could do this via variables...
This whole post is pretty confusing. What does any of that have to do with code? The damage of an attack is defined in its damage formula. If you don't want psionic skills to take def or mdef into account, omit them from the damage formula.

The code you have is kinda convoluted, but it looks like you're trying to make a universal function for your damage formula which is clearly not what you actually want in this case. You want a different formula for psionic skills.

I wonder if I have the crit part wrong? This is my crit rate code.
Again, kind of convoluted, I haven't tried to carefully read through the whole thing. But I do notice right off the bat that you have isPhysical, which is a function, not just a property. So you're missing parentheses there.
EDIT: Nope... even setting it to Magical Attack, her attack on a frozen enemy is still dealing the increased critical damage... I
I’m also a little lost… wouldn’t it just be a matter of adding a condition to the script that you shared in the below post, that the guaranteed critical will not work if the attack is of type x or y?

Post in thread 'Making a skill do critical damage while a status is applied to an enemy.'
https://forums.rpgmakerweb.com/inde...us-is-applied-to-an-enemy.159980/post-1370461
As people have already said, the hit type only determines which hit/eva stats are checked when deciding if the skill hits.

If you're using plugins, that might change. Given the context, I'm guessing it's the Damage Styles settings from VisuStella Battle Core's plugin parameters.

I've moved this thread to Plugin Support (from MZ Support). Thank you.

As the plugin's help file notes, it is perfectly possible to disable the Damage Styles feature altogether, or to specify different styles on a per-skill basis using a notetag:
Damage Styles are a new feature added through the Battle Core plugin. When using certain Battle Styles, you can completely ignore typing in the whole damage formula inside the damage formula input box, and instead, insert either a power amount or a multiplier depending on the Damage Style. The plugin will then automatically calculate damage using that value factoring in ATK, DEF, MAT, MDF values.
Skills and Items can use different Damage Styles from the setting you've selected in the Plugin Parameters. They can be altered to have different Damage Styles through the usage of a notetag:

<Damage Style: name>
If "Manual" is used, then no style will be used and all calculations will be made strictly based off the formula found inside the formula box.
Source:
This whole post is pretty confusing. What does any of that have to do with code? The damage of an attack is defined in its damage formula. If you don't want psionic skills to take def or mdef into account, omit them from the damage formula.

The code you have is kinda convoluted, but it looks like you're trying to make a universal function for your damage formula which is clearly not what you actually want in this case. You want a different formula for psionic skills.


Again, kind of convoluted, I haven't tried to carefully read through the whole thing. But I do notice right off the bat that you have isPhysical, which is a function, not just a property. So you're missing parentheses there.
I think part of the confusion is that the code I posted is the "Dragon Quest" battle style from VisuStella's BattleCore. I liked the way that it handled damage and how that damage scaled with the low stat numbers the characters will have.

EDIT: That said, it seems thanks to the help here and in my other topic, we've figured out the issues with why psionics was being a problem. So, thanks for all the help <3 It really was that I had "is.Physical" and not "is.Physical()". Amazing how those parentheses mattered...

Original thread: https://forums.rpgmakerweb.com/threads/making-skills-neither-physical-or-magical.159985/