@KeeganKLM
Yeah, I was too absorbed with my initial idea I didn't realize the armor scaling and absorption already do what I wanted. My bad. ALSO, THANKS for that Damage101 link. That sure helps me to understand how lunatic coding works.
I still have a bit of question about variables though! Please bear with my question a bit longer (even if my questions sounds...stupid/ignorant)
Can Variables be used as INDEPENDENT Parameter?
Okay, this is actually two question. Is it possible to establish a brand new parameter for the actors (and in extension, enemies) without exchanging the pre-existing ones (MATK/ ATK/TRT/PHA/etc) ? For example, if I want to make a parameter for everyone like, uhh, (for example) [FATIQUE (FTQ)] or something like that; would it be possible?
However, would this brand new parameter :
1. Useable in damage formula or ANY formula in general? BUT
2. Also treated independently for each actor?
It might be a bit confusing but let's say I set var001 as [FTQ]. If I only reference this variable for each actor, the damage will be all messed up because even if everyone start or have different [FTQ], it overwrites the same variable. Which is bad. ALTERNATIVELY, if I make [FTQ1],[FTQ2] and so on for every actor, it makes the formula full of conditions - check which user it is before using which VAR. Which is doable, but also tedious.
I am looking at user.Matk kind of reference/parameter call during damage calculation which makes it a lot easier (I think?) and neater script. In addition, I am also looking at the new
Self Variable plugin, which sounds promising, but I am not sure how and if it is possible to.
Bottom line, making a user.stat (I guess, I don't know if this is even the correct way of saying this) ?
Can the above example applied to enemies
Right, it gets more confusing for me too. So can it be done/set up for enemies too. The VAR will rise and fall as the battle goes on; which makes me a bit more concerned about it. Let's say I used Variable again - since that's all I know because I never use any RM after 2003 - and make [E-FTQ] and set it for a monster - maybe in notetag.
What happens if there are multiple enemies of the same ID in the enemy Troops? I am pretty sure it gets all messed up since it is a single variable that gets overwritten by multiple same IDs. Not to mention the calculations required for each battle event would probably be ridiculously long/complicated.
This is why I am interested about attaching it as an individual stat for each combatant/actor/enemy instead. Please tell me it is possible lel.
Last but not least?
In some JS example, I see sometimes a new variable being defined. For example, in one of Yanfly's tips and trick
<Custom Apply Effect>
target._deathMarkDmg = 0;
</Custom Apply Effect>
<Custom React Effect>
if (value > 0 && attacker === origin && this.isHpEffect()) {
target._deathMarkDmg += value;
}
</Custom React Effect>
That target._deathmarkdmg is something brand new I think (?). So the question is, we can define a variable via JS? How is it different from using VAR001 and so on? Does this value stick forever (I have seen codes that end it as =undefined to clear the value)? Does it only apply for that battle?
Basically I want to know if it works differently than normal SETVAR function Rpgmaker have.
Sorry if it drags on too long, but I am really looking forward to see what I can (and not) do with all these possibilities.