Could someone please clarify me how the armor system of visustella works, including the "armor reduction/penetration" tags?
Okay, so the way the armor scaling calculation works is this:
First of all, it replaces each instance of b.def, b.mdf, b.agi or b.luk with
Math.max(this.applyArmorModifiers(b, %1), 1), where %1 is the replaced parameter. This applies armour modifiers to b and returns the maximum between that value and 1 (meaning modifiers can't cause the value to be 0 or negative).
It then calculates the damage value as normal, taking the max value between the evaluated formula and 0.
If the action deals HP or MP damage and is not certain hit, the defender's armor is applied:
If the action is a physical attack, we start with target's def, or mdf if it's magical.
We then apply armor modifiers to the target using the relevant parameter.
If armor is greater than or equal to 0, we multiply value by 100 / (100 + armor). Otherwise we multiply value by 2 - (100 / (100 - armor)).
Applying armour modifiers just bundles up all the armor reduction/penetration notetags and reduces them into a final value. For example, let's say you attacked an enemy with 101 def and a 20 flat armour reduction state while equipped with a weapon that has 5% armour penetration.
First the flat value will be subtracted from the enemy's def, giving 81. Then that will be reduced by 5% for the weapon, resulting in the enemy having 76.95 def.
Let's say your weapon attack damage calculation was 50. Ordinarily with no modifiers the enemy's 101 def would reduce that to: 50 * 100 / (100 + 101) = 25. With the armour reduction and penetration, the attack will deal: 50 * 100 / (100 + 76.95) = 28 instead.
A different question: is there any way to make TP-damaging skills with VZ? in the vanilla game, it's not possible.
Yep, absolutely. You could incorporate target.gainTp(-value) into a pre-damage as user notetag on the skill.
Is it possible to run a conditional check in the notetag of a skill that returns the value of another actor's ATB status and then enables the skill use based on that check?
I'm trying to make a dualtech system with the ATB plugin. In order to use a skill that involves two actors, the skill needs to only be selectable if the second involving actor's ATB bar is full. So if Actor 6 (not user) ATB bar is ready....skill is usable. Basically two or three conditional checks in the notetags of a skill to determine it's use. Is actor 6 in the party? is actor 6 alive? Is actor 6's ATB full and ready to act?
Not sure how it'd all work, but the logic is essentially:
if (actor 3 is in the party)
if (actor 3 is alive)
if (actor 3 TPB charge time = 100%)
enable skill use
else (disable skill use)
On discord- i found this:
$gameParty.members()[0].tpbChargeTime()
<JS Skill Enable>
code
code
enabled = code;
</JS Skill Enable>
Not sure how i'd configure that JS together (bit of a beginner) but my bigger question is - would this be best placed in the notetag of the skill for constant checking? I imagine it couldn't be done thru a common event, since that would only run when the skill is selected, but I'm trying to make the skill selectable only under certain conditions
Theoretically you could do
enabled = $gameActors.actor(3).isTpbCharged();
If you put that in the skill notetag, it should make it so that the skill can only be used when actor 3's ATB is full.
Hello. My problem is with encoding elements into Visustella codes
For example a basic damage/healing code:
<JS Post-Damage As Target>
if((this.isHpEffect()&& value > 0){
damage = Math.ceil(damage * member.elementRate(lightningId));
member.gainHp(-damage);
member.startDamagePopup();
}
</JS Post-Damage As Target>
In this code, we can type the element ratio.But how can we add the plus and flats in Visustella's Elements and States Core plugin?(The plugin's formula is:(base + plus) * rate + flat)I tried something like this but it didn't work.
damage = Math.ceil((damage + member.elementPlus(lightningId)) * member.elementRate(lightningId));
I don't have full control over damage rates because of this situation.And I'm having serious problems with the states/skills attached to the notetags.The same problem exists in Slip Damage codes. We were able to specify the element in the Extended Damage Over Time plugin in MV and this made things much easier.
I think if I can solve the above problem, I can get the job done by typing the same formula into the Slip Damage codes.
Thank you for your help in advance.
I'm curious as to why you need to do that on a skill when you can define the element of it in either the damage settings or a multi-element notetag and that rate will be calculated for you. Or are you trying to incorporate additional elemental damage beyond what the skill already deals?
I'm using the VS "Lighting Effects" system.
The lighting effect I'm going for requires two different radial lights.
Why two? Because they have different behaviours and colors.
So, one light is part of the events comment tags. Works great.
The second light is spawned on the event using the plugin comment "Spawn Light on Event".
It follows the event around like it should.
Here's the issue: when the event is erased, the light from the spawn sticks around.
The only way I could find to despawn the spawned light is to use the "Despawn all spawned lights" plugin command. But that would despawn all of the other lights....which is less than ideal.
I have 3 possible work arounds am not sure if two of them can be done:
1 -Is there a way to despawn a light that has been spawned on an event?
2 -Is there a way to have two of the same kind of light attached to an event via comment/notetags?
3 - Obviously, just suck it up and use one light. Least favorite, but currently used option.
1. Yes you can, with the script
SceneManager._scene._lightContainer.children.find(child => child instanceof Sprite_LightSpawn && child._source.eventId === {id of the event the light was spawned on}).destroy();
2. It seems that only one light can be attached via notetags, but the first solution should sort out your problem.