Theo - Actor and Enemy Metadata

● ARCHIVED · READ-ONLY
Started by TheoAllen 10 posts View original ↗
  1. About:
    You want to tag an enemy as a flying enemy and also want to increase the damage to the enemy if you're using a ranged weapon but you don't want to do the following:

    > Use element rate only for that reason.
    > Use a complicated state workaround by applying a state to a certain enemy and check if the state exists then boost the damage. Plus it is also a waste of the state slot.

    ... That was just one of many cases, really.

    How to use:
    Let's start with "Ranged weapon vs Flying Enemy"
    if you're using a ranged weapon to a flying enemy, you deal 100 damage, otherwise 50

    Example damage formula:
    Screenshot_701.jpg

    Then what you need to do next is to tag the enemy by putting the tag
    <flying>
    Screenshot_702.jpg

    On the actor side, you need to tag your weapon (for example, bow) with
    <ranged>
    Screenshot_703.jpg

    Yes, that is the only thing you need to do.
    Now test case.
    Screenshot_706.jpg

    This is when you're attacking not using ranged.
    Screenshot_704.jpg

    This is when you're attacking using ranged.
    Screenshot_705.jpg

    Download:
    Save as a new JS file.

    Terms of use:
    Read here
  2. Can the metadata be called with a script or something? I'm trying to make an attack action sequence that is able to detect if your using a ranged weapon.
  3. The purpose of this is so that you could use it in the script call. So, the answer is yes.
  4. TheoAllen said:
    The purpose of this is so that you could use it in the script call. So, the answer is yes.
    Ok good, I don't know how to call it as it's not described in the plugin details. (If it is I don't see it) How would I call it exactly?
  5. BeanCanDev said:
    Ok good, I don't know how to call it as it's not described in the plugin details. (If it is I don't see it) How would I call it exactly?
    What part of my explanation in this thread opening you don't understand?
  6. Hi,

    I have a weird issue when using this and some code to create a damage multiplier effect.

    It works normally in the battle formula, but when I add a state using pre-damage tags, it always does zero damage when a metatag is in the formula. If i change the meta tag to a number, it works fine.

    Here's the code I'm using:
    Pre-damage visustella code
    <JS Pre-Damage As User>

    if (this.isHpEffect() && value > 0) {

    value *= 1.4;

    value = Math.ceil(value);

    }

    </JS Pre-Damage As User>

    Damage Formula
    1704216456362.png

    Meta Tag
    I tried 40 and 40.0 and both didn't work with the damage boost.
    1704216521830.png
  7. @Lonewulf123 40 would be correct, specifying the decimal doesn't do anything.

    That sounds very weird, because if the damage formula works with the VS plugins installed, I don't see how it could be a plugin conflict. By the time the value gets to your notetag, it's already been calculated, so that either works or it doesn't.

    The notetag's code isn't looking at the meta property at all.

    So what are the atk and def values involved? What damage is it doing without the state?
  8. ATT_Turan said:
    @Lonewulf123 40 would be correct, specifying the decimal doesn't do anything.

    That sounds very weird, because if the damage formula works with the VS plugins installed, I don't see how it could be a plugin conflict. By the time the value gets to your notetag, it's already been calculated, so that either works or it doesn't.

    The notetag's code isn't looking at the meta property at all.

    So what are the atk and def values involved? What damage is it doing without the state?

    Without the state, the damage is around 18-22.

    Attacker has 2 Atk
    Defender has 5 Atk.

    With the state the damage is always 0

    if i remove the a.meta.power tag, and put in 40, damage is around 18-22

    with the state the damage is 25 - 30.
  9. Lonewulf123 said:
    Without the state, the damage is around 18-22.
    With the state the damage is always 0
    if i remove the a.meta.power tag, and put in 40, damage is around 18-22
    with the state the damage is 25 - 30.
    That's bizarre.

    Does it change if you reference the notetag normally, without using Theo's getter? (keep the plugin installed and turned on, just use this in your formula): Number(a.actor().meta.power)
  10. ATT_Turan said:
    That's bizarre.

    Does it change if you reference the notetag normally, without using Theo's getter? (keep the plugin installed and turned on, just use this in your formula): Number(a.actor().meta.power)
    That worked.

    Damage when using your code came back as 28 when the state was applied, instead of 0.

    @ATT_Turan, how would you do something similar, except using the enemy instead of the actor?

    Would it be like a.enemy? If the enemy is using the skill (in that instance)