edited December 2020 in ORK Support

I want to create the above stat distribution screen.

I studied about oak for about a month,
Ork's basic gui interface is powerful, but in ugui design, it is very difficult to customize as I want.(gui box etc..)

Although there is a stat distribution part in the menu screen of the oak,
I want to create a custom ui.

In the screenshot, I think the minus and plus buttons can be implemented through the status[0].addvalue function in my opinion.
However, it is not applied immediately when the button is pressed.
I want the value to be applied only when the Apply button at the bottom is pressed.
(There is a corresponding function on the menu screen of Ork, but I want to control it through scripting)


And..
 Green text next to a numeric value (when you press the minus button +value or -minus value.)
Is this preview value?? Is there a method to display this?

my code is:


private void Update () {
if (OrkManager.playerCombatant != null) {
statPoint.text = OrkManager.playerCombatant.Status[12].GetValue().ToString();
str.text = OrkManager.playerCombatant.Status[4].GetValue().ToString();
dex.text = OrkManager.playerCombatant.Status[9].GetValue().ToString();
agi.text = OrkManager.playerCombatant.Status[8].GetValue().ToString();
}
}
public void ChangeValue()
{

}
public void AcceptChange()
{

}
public void CancelChange()
{

}
public void ShowPreview()
{

}

ps. Is it possible to completely transfer Ork's menu screens functionality to custom ugui screen??
After implementing something through the menu screen of Ork at first(for testing,but their look is what i don't want),
and based on it I want to make the same functionality but custom ugui, but I have hard time where to start.
Post edited by KESHYAS on
  • ORK's menu screens just use available ORK functionality, so you can replace them with your custom screens - you just have to write the code for it :)

    It's probably best to check out the source code for the status value distribution (class StatusValueDistributionMenuPart) to see how it's done in ORK.
    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!
  • thanks!!!

  • It works a little unexpectedly.

    Through scripting,
    Debug.Log(ORK.Game.ActiveGroup.Leader.Status[12].GetBaseValue());
    ORK.Game.ActiveGroup.Leader.Status[8].AddBaseValue (agiTemp);

    In this way, the value of the exp type is brought to the base type and distributed.
    This works fine.

    However
    When I consumed all 24 points of exp type value (getbasevalue through script), another 24 points remained on the status distribution menu part screen created with ork.

    So for testing

    Debug.Log(ORK.Game.ActiveGroup.Leader.Status[12].GetBaseValue());
    Debug.Log(ORK.Game.ActiveGroup.Leader.Status[12].GetDisplayValue());
    Debug.Log(ORK.Game.ActiveGroup.Leader.Status[12].GetPreviewValue(true));
    Debug.Log(ORK.Game.ActiveGroup.Leader.Status[12].GetValue());

    I wrote a debug

    The top basevalue and the other three values were displaying different values.
    In other words, if I had 24 exp base points, I had a total of 48 exp points.
    (getbasevalue(24) + getvalue(24) = 48)

    Of course, it is a problem that is solved if i do not use the ork menu screen,
    Why doesn't the value I get with getvalue change when I consume the basevalue?
  • The base value is only used by Normal type status values and represents the basic value of the combatant, without all the bonuses, etc.
    Consumable and Experience types don't use the base value, since they work differently :)
    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!
  • edited June 2020
    Thank you!
    Then it sounds like you should use getvalue,addvalue instead of getbasevalue,addbasevalue.

    However, unlike addbasevalue, addvalue has various parameters.

    To bring my exp type value
    ORK.Game.ActiveGroup.Leader.Status[12].GetValue ().ToString ();

    Instead of
    ORK.Game.ActiveGroup.Leader.Status[12].AddBaseValue (-1);


    I used:
    ORK.Game.ActiveGroup.Leader.Status[12].AddValue (-1,false,false,false,false,false,false);

    However, an error occurs that the last argument, StatusValueChangeSource, does not exist.

    What are the proper parameters to put in addvalue??

    Is it right to put all parameter to false?
    What should I put in StatusValueChangeSource?
    Post edited by KESHYAS on
  • You can pass on null for that.
    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.