I like ORK and primarily love it for the easy way to handle all the backend data of a RPG (stats etc) but I really dislike the current included GUI system that is bloated and cumbersome, incredibly difficult to layout and for me just awful to use. I just want to use my own external UI to display all the ORK data I need but the problem is, how would I access it? Unfortunately ORK doesn't ship with any examples for anything but the sample project. How would I e. g. retrieve data of a combatant to display in a simple Unity text component on a Canvas?
I was able to make custom Inventory, Stat Screen, Hotbar, Turn-based combat controls etc.
You might want to look at these tutorials:
http://orkframework.com/tutorial/howto/scripting-where-is-what/
http://orkframework.com/tutorial/howto/accessing-a-game-objects-combatant/
http://orkframework.com/tutorial/howto/setting-up-project-references/
Otherwise it's kind of too large a topic to get into in general terms. If you have some questions about specific functionality that would be easier to tackle.
@gamingislove had plans for ORK 3 to move ORK into Unity UI component based approach.
Edit: There's a "Update UI Text" component that looks like it could be used? But I'm really confused about it. You‘re supposed to reference a "Content Origin" and can choose "Player" or "Member" but I have no idea what this refers to in ORK terminology. Does "Player" mean the player combatant? What does "Member" mean, a word that literally isn't used anywhere else in the asset as far as I can see? Is it all combatants in the active player group but the first?
In ORK terms combatant is basically the "character" entity of the system. Player, companion, enemy, Wolf, man whatever. If you want them to have stats, inventory and be able to participate in combat you use combatants.
Each combatant must have a "Combatant Group", Think of it like a "Character Party".
There is a special combatant group called Active Group, which easily links to current player group. Group.Leader also points to group leader. in Active Player group leader should be the main player you control.
Member is any combatant that is the member of "Combatant Group".
You'll basically have to reference the class instances and show information yourself. For example if you want to access player you can use:
ORK.Game.ActiveGroup.Leader
if you want to access some stat you can use:
ORK.Game.ActiveGroup.Leader.Status[0].GetValue()
Where '0' index is index of status values.
Anyway thanks for the help so far I'll post more about specific issues as they come up.
As @hellwalker said, a Combatant is an entity, or rather, individual instance in the system - when you're using a combatant in-game, e.g. spawning via spawners, adding to objects or have the battle spawn them, will be an individual instance of the Combatant class.
It bundles all functionality of the combatant, i.e. the status values, applied effects, abilities, inventory, etc. - the functionality is usually access via sub-instances, e.g. abilities via combatant.Abilities.
A combatant is linked to it's game object (doesn't matter if spawned or added via Add Combatant components) using the CombatantComponent, which is done automatically by ORK. This lets you access the combatant of a game object.
Each combatant instance is part of a Group, i.e. the player, enemies or NPCs with combatants attached are all members of groups (or combatant groups). The player's group is the Active Player Group and accessed via ORK.Game.ActiveGroup. There can be multiple player groups, but only one is active at a time - think of it like switching between team A and team B.
So, in short, if you want to access some information to display in a custom UI, you just need to know where to look - probably best to ask here in the forum, though :)
Accessing the player's information is simple possible through ORK.Game.ActiveGroup.Leader. I've tried to make the names and structures as logical as possible, so it shouldn't be too hard to find what you're looking for.
Edit: Also, the tutorials might be old, but they're all kept up to date :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Moreover, when simply logging the console output to the Unity console, for some reason the "Join Active Group" from the Game start event as described in the tutorial is not logged to the console despite "Show Console" in the event settings and "Join Group text" in the Console Settings being enabled. However if I manually add a console logging node after that node I get a line in the Unitiy console just fine.
I also can't find any documentation whatsoever pertaining use of the ORK console so any pointers there would be great.
You can access the console by code via ORK.Game.Console, e.g.:
string text = ORK.Game.Console.GetLines(false);
This will get you all added console lines, the order will be inverted if you pass true.
There are also other GetLines functions to only get console lines of passed on console types.
I'll look into why the join group text isn't shown, might be a bug.
Edit: Yep, that's a bug - the join group text isn't added to the console, will be fixed in the next update.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!