Is there a way to tell an ability to add +1 to a status value automatically for each level, instead of manually setting up each level? The game I'm working on has a very high level cap so some of my passive skills go into the 100+ level range. As a result I was wondering if I could just tell ORK +1 status value for each additional level, instead of having to go in and set Level 1 +1, Level 2 +2 and so on.
I know it doesn't sound like that big of a deal, but having to set up 100+ levels for around 40 skills and having to go back and double check them all because I'll probably mess up the numbers at some point is a pretty decent chunk of time. So I was just wondering if there was a faster way of doing things. Thanks!
  • Under the Status Value : Base Settings, there is a checkbox for Combined Values. Setting that to true will allow you to have your status value be formula-based.

    Does that help?
  • No, there's no way to do that. However, you could write a small script to do that automatically - executing it when the ORK editor is open would change the data there and you can save the changes.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • @gamingislove
    I'm really amateur at scripting,
    The last time I edited ORK files was to change the text (ShowDialogue steps I think?) in events by editing the event xml files back in ORK1. I've never messed with the actual code parts. Could you give me an idea of what I'd be editing, where it is, etc?

    @Nixter
    Not sure how using a formula would let me do what I'm trying to do. Here's my situation, feel free to let me know how to do it with a formula.

    I wanted some of my skills to be infinitely upgradeable (or close enough 100+), so I set them up as stats instead of skills because I didn't see any option to have the skill just be a +1 each level.

    In the skill training menu, I use a flag to determine which stats are upgradable (the skills that the player levels up through skill training) and which shouldn't be shown (normal stats).
    As I have the "skills" as one set of stats, while the rest are "stats" that are upgraded elsewhere, with a different currency.

    The way I designed it, the skill tree has the prerequisite that x points be spent in the tree before Tier 3 skills are unlocked. The points can be spent in any previous skill in the tree.
    So for whether prerequisites are met (x points in tree), I only need one flag to be true.
    Ex: 3 point prereq, for that, any one of these flags could be true
    -3 points in skill A
    -3 points in skill B
    -3 points in skill C
    -1 point in skill A, 1 point in skill B, 1 point in skill C
    -etc.

    Right now to upgrade stats there are only the choices all requirements or one requirement.
    What I need is for the (is it a skill) flag to always to be true to upgrade, and one prereq flag to be true. Seeing as that isn't an available option, I tried to look into making the skills as abilities instead of stats, but I ran into the problem of having to input each skill level.
  • You don't need to change ORK's code for this - here is a working code example of how to do this:


    using ORKFramework;
    using ORKFramework.Bonus;
    using UnityEditor;
    using UnityEngine;

    public class AbilityLevelIncrement
    {
    [MenuItem("Tools/Update ORK Ability")]
    static void IncrementLevel()
    {
    if(ORK.Initialized)
    {
    Ability ability = ORK.Abilities.Get(0);
    // setting up as passive ability
    ability.useableIn = UseableIn.None;
    ability.level = new AbilityLevel[100];
    for(int i = 0; i < 100; i++)
    {
    // setting up the level
    ability.level[i] = new AbilityLevel();
    ability.level[i].passive = new PassiveAbility();

    // setting up the custom bonus
    ability.level[i].passive.bonus.useCustomBonus = true;
    ability.level[i].passive.bonus.custom = new StatusBonusSetting();

    // setting up status value bonuses
    ability.level[i].passive.bonus.custom.statusBonus = new StatusValueBonus[1];
    ability.level[i].passive.bonus.custom.statusBonus[0] = new StatusValueBonus();
    // the ID of the used status value
    ability.level[i].passive.bonus.custom.statusBonus[0].statusID = 3;
    // sets the bonus to use the level
    ability.level[i].passive.bonus.custom.statusBonus[0].bonus = i + 1;
    }
    }
    }
    }


    This will add a new menu item to the Unity menu: Tools > Update ORK Ability. The script must be in an Editor folder in your Unity project. While having the ORK editor opened, select the new menu item and the ability will be updated to be a passive ability with 100 levels and custom status value bonuses set to the level.

    Which ability is updated is handled by this line:
    Ability ability = ORK.Abilities.Get(0);
    Instead of 0, use the ID/index of the ability you want to update.

    Currently, the code will add one status value bonus, that's handled by the setting up status value bonuses part. If you need more bonuses, just increase the array size and set them up like the example bonus.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.