Help with odd skill system

● ARCHIVED · READ-ONLY
Started by Mr_Saltine 6 posts View original ↗
  1. I am trying to make a skill/magic system similar in function to the "Mana Eggs" from Grandia 2. My version are crystals. for example, equipping the Fire Crystal will only let you see, learn, and use Fire spells. if you unequip the fire crystal, the spells go with it. i can set the crystals to just have all the spells on it, but i want a player to have to buy the spells with job points. I believe the <Learn Show Eval> notetag is what i'm looking for, but i have next to nothing in javascript experience. Just from running around the internet, this is what i've come up with.

    <Learn Show Eval>
    if(!this._actor.isAtypeEquipped(ID)) value = false;
    else value = true;
    </Learn Show Eval>

    i'm unsure if this is even right though.
  2. 1.) It not only matters if the notetag contents are correct, but what type of data you put the formula on. Are you writing this notetag on the item or the skill?

    2.) I assume that this <Learn Show Eval> is coming from a plugin? Can you provide a link to that plugin so that people can read the instructions without having to hunt for it?
  3. OK so the plugin description reads:
    For using a custom code to hide or show the skill, you can use these notetags. Returning value as true will cause the skill to appear regardless of all other requirements being unmet

    You're on the right track, so you want to check if the user has a certain item equipped. What type of data is the user specifically? In this case, it's an actor.
    You can go here to see what kind of methods are available to use on an actor - see any methods that check whether an item is Equipped or not?

    Try to see if you can find it, before checking the spoiler.
    Spoiler
    This is assuming that the "gem" is an armor, since you didn't say what type of item it was.
    Code:
    <Learn Show Eval>
    var gem = $dataArmors[X];
    if (user.isEquipped(gem)) {
        value = true;
    } else {
        value = false;
    }
    </Learn Show Eval>
  4. Aloe Guvner said:
    OK so the plugin description reads:


    You're on the right track, so you want to check if the user has a certain item equipped. What type of data is the user specifically? In this case, it's an actor.
    You can go here to see what kind of methods are available to use on an actor - see any methods that check whether an item is Equipped or not?

    Try to see if you can find it, before checking the spoiler.
    Spoiler
    This is assuming that the "gem" is an armor, since you didn't say what type of item it was.
    Code:
    <Learn Show Eval>
    var gem = $dataArmors[X];
    if (user.isEquipped(gem)) {
        value = true;
    } else {
        value = false;
    }
    </Learn Show Eval>


    i actually got my answer in a steam community discussion. Thank you for replying though.

    Here is the link to that, if anyone else wishes to do the same kind of system i'm doing.
    https://steamcommunity.com/app/363890/discussions/1/1734340257881603497/
  5. Fair enough, looks to be an equivalent solution.