Hello,
I need to add support for a Subclass in my game and I'm having trouble figuring out how to display it (such as in a HUD).

I've seen some of the other posts like this one but they don't go much into specifics. Currently I'm using a custom component to track the combatant's subclass and save/load it.

I can store the Subclass data in a global variable, but I need to infer the key of the variable in the text field. For example, if I have a character Bob with a global variable with a key of "bob_subclass_name", how do I construct that in the text field? Can I use the % short hand (eg. #varstring%n_subclass_name#)?

Thanks for your help.
  • Following up on this, I think I figured out a solution.

    In the HUDs Status Element, in addition to the short hands (eg. %n for name), you can check the "Use Object Variables" box where the variable #varstringsubclass_name# is looked up on the object (the combatant) instead of global variables.

    When I want to change the combatant's Subclass I call a function that sets `subclass_name` on the combatant:

    combatant.Variables.Set("subclass_name", "The name of the Subclass");

    And it prints as expected in the HUD.

    Thanks!
  • Recent updates intruced the class slots, i.e. a combatant can now 'equip' multiple classes and optionally limit how much a class contributes, e.g. only up to a certain level, or only 50% of status bonuses, etc.

    Class slots are set up in Combatants > Class Slots and are added to combatants (either all via general settings or individual combatants).
    There's also UI support, with a Class Slot menu part, HUD components, etc.
    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!
  • That's exciting to hear. I should have added I'm using ORK v2 though, so I'm assuming this is not available (I don't see it)?
  • I ended up implementing the subclass change functionality using the existing ORK V2 class change code as a reference. I noticed some variables are private and inaccessible to my script though, an example would be "classLevelExp", which appears to prevent me from properly initializing the class level.

    For changing the (sub)class in the UI I'm using a Menu Screen with a Button List. For the menu item I can specify a game event, but is there any way to pass a variable to the game event? I have a separate game event for setting every class and subclass even though they are all doing almost the exact same operation. It would be helpful if I could call a "changeClass" or "changeSubclass" game event and specify what the class is being changed to from the menu item.

    Thanks for your help.
  • Ah yeah, that's not available in ORK 2, only in ORK 3.
    megaphemeral said: is there any way to pass a variable to the game event?
    I'm afraid not - the button list can simply start the event, but not pass on a variable like 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!
  • Okay, I appreciate the confirmation. Thanks!

    If there's ever an opportunity to migrate to ORK 3 I'll take it :)
Sign In or Register to comment.