The official VisuStella notetag help thread

● ARCHIVED · READ-ONLY
Started by Trihan 1458 posts Page 40 of 73 View original ↗
  1. ATT_Turan said:
    Oh, did you request other people not answer in this thread? I didn't see that, and I apologize.
    Haha no need, it was a long time ago. It was just getting hard to keep on top of which questions had been answered and which hadn't because other people were posting answers while I was checking things in the engine, so I was working on things that had already been resolved while questions being posted in the meantime were slipping through the cracks.
  2. Trihan said:
    I was working on things that had already been resolved while questions being posted in the meantime were slipping through the cracks.
    Sounds like you need a system. Perhaps hire an assistant. :wink:
  3. ATT_Turan said:
    Sounds like you need a system. Perhaps hire an assistant. :wink:
    I can't afford to pay myself, let alone an assistant. :p
  4. Trihan said:
    I can't afford to pay myself, let alone an assistant. :p
    I'd be happy to volunteer for some secretarial work... payment in *nature* (and by "nature" I mean "script")
  5. Dark_Ansem said:
    I'd be happy to volunteer for some secretarial work... payment in *nature* (and by "nature" I mean "script")
    Good to know! Okay, your first job is to go through the thread and find any questions that haven't been answered yet. :p
  6. Trihan said:
    Good to know! Okay, your first job is to go through the thread and find any questions that haven't been answered yet. :p
    Be mindful because I might as well do it, only tonight tho, I'm at work rn.
  7. Trihan said:
    Rely a lot more on @ATT_Turan XD



    So to potentially shed some light on what seems to be an inconsistency, that "value" variable only exists in parts of that code that the VS plugins have injected it. In the part of the STB exploit system you're editing the injection code for, I guess they didn't see a need to know how much damage is being dealt since there are other notetags that can deal with that.
    You're right. One could just work that in the default action step mechanics in the battle core. But I'm fine with this. No need complicating things.
  8. Dark_Ansem said:
    Could someone please clarify me how the armor system of visustella works, including the "armor reduction/penetration" tags?

    Dark_Ansem said:
    A different question: is there any way to make TP-damaging skills with VZ? in the vanilla game, it's not possible.

    bgrizzmayne said:
    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

    killdude said:
    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.

    poorrabbit said:
    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.

    The above posts have largely gone unnoticed.

    pp 6-11, 18, 23 are basically full of unanswered questions by you, but they got answered by someone else.
  9. Dark_Ansem said:
    The above posts have largely gone unnoticed.

    pp 6-11, 18, 23 are basically full of unanswered questions by you, but they got answered by someone else.
    Thanks bud! I'll get to addressing those.
  10. Dark_Ansem said:
    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.

    Dark_Ansem said:
    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.
    bgrizzmayne said:
    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.
    killdude said:
    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?
    poorrabbit said:
    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.
  11. Trihan said:
    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.
    Thank you - I think I need a separated thread as that plugin takes a LOT for granted.
  12. Dark_Ansem said:
    Thank you - I think I need a separated thread as that plugin takes a LOT for granted.
    The formula is a parameter and can be changed in damage types.
  13. So, I'm trying to tinker with the various VZ battle plugins, but for ATB/STB I cannot find a solution that gives actors (enemies / PCs) extra turn actions. I'm aware of "action times +" state but I have found that it doesn't always work and it doesn't give a significant amount of control.

    Some battle systems, such as BTB, have extra action functionality baked in as a cost. The "boost" plugin on the other hand gives extra power, but no extra actions.
  14. @Dark_Ansem I'm trying to do the same in the CTB system and getting nowhere. Maybe it's not possible in MZ? If that's the case I shall be seriously hacked off.

    But on to my more immediate concern.
    I have some characters who only use MP, but I cannot find what to turn off where to remove the display of the TP guage. (Yeah, you've no idea how embarrassing that admission is.)

    Can someone enlighten me please.
    Thank you.
  15. Kes said:
    I cannot find what to turn off where to remove the display of the TP guage.
    The Skills and States Core has Gauge Replacement notetags.
  16. @ATT_Turan Helpful as always. Thank you, that is exactly what I need.
  17. I have a couple more questions, not sure if strictly VS related but I got the idea from them, so maybe this is the right place?

    So, I'm trying to build a system with semi-random loot. Some limitations exist however.

    Does this function
    JavaScript:
    const id = Math.randomInt(0) + 15;
    support intervals, rather than only random? something like "const id = Math(1-5; 35-48)?

    Is there a way to make this message
    JavaScript:
    The crate contains stashed x\LastGainObjQuantity \LastGainObj!
    display more than 1 entry after two (or more) consecutive
    JavaScript:
    $gameParty.gainItem($dataItems[id], amount);
    ?

    Lastly, something for chests that reward items and gold...
    So gold would be added through the random variable system, and then the item would be gained via the above script. Which message do I need to write in order for it to display both gold and items?
  18. Dark_Ansem said:
    I have a couple more questions, not sure if strictly VS related but I got the idea from them, so maybe this is the right place?

    So, I'm trying to build a system with semi-random loot. Some limitations exist however.

    Does this function
    JavaScript:
    const id = Math.randomInt(0) + 15;
    support intervals, rather than only random? something like "const id = Math(1-5; 35-48)?

    Is there a way to make this message
    JavaScript:
    The crate contains stashed x\LastGainObjQuantity \LastGainObj!
    display more than 1 entry after two (or more) consecutive
    JavaScript:
    $gameParty.gainItem($dataItems[id], amount);
    ?

    Lastly, something for chests that reward items and gold...
    So gold would be added through the random variable system, and then the item would be gained via the above script. Which message do I need to write in order for it to display both gold and items?
    What will probably help most with this is if I show you the code I provided to @Crossbow for a similar system:

    JavaScript:
    const hasName = function(item) {
      return item && item.name.length > 0 && item.name.slice(0, 5) !== "-----";
    }
    
    let numItems = 3;
    let numWeapons = 2;
    let numArmors = 2;
    const exceptions = [2,3,4,5,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40];
    let maxLoops = Math.max(numItems, numWeapons, numArmors);
    const items = $dataItems.filter(item => hasName(item) && item.itypeId !== 2 && !exceptions.includes(item.id));
    const weapons = $dataWeapons.filter(weapon => hasName(weapon));
    const armors = $dataArmors.filter(armor => hasName(armor));
    while (maxLoops > 0) {
      if (numItems > 0) {
        const item = items[Math.randomInt(items.length)];
        $gameParty.gainItem(item, 1);
        $gameMessage.add(You got \\LastGainObj from the chest!);
    
        numItems--;
      }
      if (numWeapons > 0) {
        const weapon = weapons[Math.randomInt(weapons.length)];
        $gameParty.gainItem(weapon, 1);
        $gameMessage.add(You got \\LastGainObj from the chest!);
    
        numWeapons--;
      }
      if (numArmors > 0) {
        const armor = armors[Math.randomInt(armors.length)];
        $gameParty.gainItem(armor, 1);
        $gameMessage.add(You got \\LastGainObj from the chest!);
    
        numArmors--;
      }
      maxLoops--;
    }
  19. Trihan said:
    What will probably help most with this is if I show you the code I provided to @Crossbow for a similar system:

    JavaScript:
    const hasName = function(item) {
      return item && item.name.length > 0 && item.name.slice(0, 5) !== "-----";
    }
    
    let numItems = 3;
    let numWeapons = 2;
    let numArmors = 2;
    const exceptions = [2,3,4,5,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40];
    let maxLoops = Math.max(numItems, numWeapons, numArmors);
    const items = $dataItems.filter(item => hasName(item) && item.itypeId !== 2 && !exceptions.includes(item.id));
    const weapons = $dataWeapons.filter(weapon => hasName(weapon));
    const armors = $dataArmors.filter(armor => hasName(armor));
    while (maxLoops > 0) {
      if (numItems > 0) {
        const item = items[Math.randomInt(items.length)];
        $gameParty.gainItem(item, 1);
        $gameMessage.add(You got \\LastGainObj from the chest!);
    
        numItems--;
      }
      if (numWeapons > 0) {
        const weapon = weapons[Math.randomInt(weapons.length)];
        $gameParty.gainItem(weapon, 1);
        $gameMessage.add(You got \\LastGainObj from the chest!);
    
        numWeapons--;
      }
      if (numArmors > 0) {
        const armor = armors[Math.randomInt(armors.length)];
        $gameParty.gainItem(armor, 1);
        $gameMessage.add(You got \\LastGainObj from the chest!);
    
        numArmors--;
      }
      maxLoops--;
    }
    Interestingly, this one is limited to 1 per instance and no gold.
  20. Dark_Ansem said:
    Interestingly, this one is limited to 1 per instance and no gold.
    If it's limited to 1 you can just take out the loops.