edited November 3 in ORK Support
Hello Everyone,

First of all, thank you for this great tool that is ORK Framework.
It is perfect for starting the development of a game / prototype (RPG / ARPG) with basic or advanced features.
When I use it, I feel like the developer of it has thought of all aspects of developing such a game and all the ways to make it easy to set up and develop additional features.
It is really a pleasant tool to use and very interesting to master.

In order to develop a prototype of games, I therefore started by learning to master this tool by following the suggested tutorial and by looking a little by myself for ways to solve the problems I encountered (often that I created myself ^^).

I also found a lot of solutions on the support forum and I also wanted to thank the great ork framework community for the time they spend helping others in their quest for the game of their dreams.

Now that I have advanced in mastering the features of ORk, I am encountering some problem (in view of developing my own game / combat system) and I am therefore turning to you for your help.

*I also intend to soon propose some simple tutorial to facilitate the use of certain functionality to the newcomer (like for example the easy setup of a ragdoll system for death animations in the turn based battle systems).

INFORMATION:
I am not a developer, I do however master the basics of how the unit / ork Framework works.
I am 2D ​​/ 3D artist (intermediate LVL), Animator (intermediate LVL).
I am using ORK FRAMEWORK in version 2.27.1 coupled with several other unity assets.

(I'm not sure if I should create a TOPIC for every Problem I encounter, or I can use that one by updating it.)

Thank you in advance for your help.

1) In order to develop my own combat system, (based on turn-based system) I wanted to test the following functionality:
The player receives 4 skills, chosen at random, from the skills they have learned.
The 4 abilities are changed every turn.
My final goal is that: all 4 abilities are put in a list and become inaccessible until all of the player's abilities have been used at least once (sort of a DECK system)
For the moment I am blocking on a strange problem, I do not know if this is due to a bug or a misunderstanding on my part.
To achieve this first step, I use the "select data" and custom event system at the start of the player's turn.
So I set up the following system (with only 1 ability for the test):

A) With a global event that starts at the start of the player's turn:
1) "Select Ability" adds all of the player's abilities to the "ALL" list
2) "Forget Ability - Player" from the "ALL" list
3) "Forget Ability" from the "SOME" list (this list contains an ability chosen at random later, from the ALL list "
4) "Select Selected Data": Some: Set Random All
5) Learn ability: PLAYER: Some
6) and finally, I clean the "Selected DATA" with "Select Selected data" ALL REMOVE ALL ALL and Some: REMOVE ALL SOME.

As you can see on the image below, I added "show dialog" to indicate errors to me during the development of this event.

https://pasteboard.co/Jxp1zU3.jpg

With this event I get a particular thing, At each fight, the ability of the player is different (it is therefore taken randomly in the list of the player's ability) but then it remains the same between each turn.
At each new round, the ability which was determined in the 1st round remains the same. It is therefore impossible to have another chosen randomly between each turn.
And frankly I don't understand why.
In my event, the lists are supposed to be cleaned up and the process should repeat on each turn, yet it doesn't.
I did tens and tens of tests (to avoid a cohensidence is at the origin of this problem) but nothing helps.
I even included an event at the end of the player's turn with "Clean Selected Data".

So much for the first problem that I encounter, thank you for your possible help !!
(Sorry for the spelling mistakes, English is not my native language)
Post edited by MadMaxx on
  • edited October 26
    I kept looking for a solution and encountered new problems.
    I just multiply the number of "selected data" + "learn ability from select data" NODES and now the things are even stranger.
    As you can see on the images below, in the 1st round, I have 4 abilities chosen at random.
    Then in the second round I only have 3.
    Then in the 3rd round only 2.
    Abilities still don't randomly renew and on top of that, I don't understand why only 3 or 2 are picked on the next turn.

    I think I don't understand how the selected data tool works etc ...

    https://pasteboard.co/JxpT975.jpg

    https://pasteboard.co/JxpT2kR.jpg

    Edit :
    Sometimes, in the 1st turn, only 2 abilities are selected and nothing more moves in the other turn (the 2 same ability are always there, not randomly selected, not removed, not replaced etc.)
    My event really does what it wants
    Post edited by MadMaxx on
  • edited October 26
    Well ... you let the combatant forget the abilities ... i.e. the combatant no longer knows them, and the next time you select the combatant's abilities they'll no longer be there.

    I'd recommend using ORK's shortcut slots instead (but still using selected data to randomly select the abilities):
    - use a Select Ability node to select all abilities of the combatant (using Set change type)
    - use a Select Selected Data node to randomly select one of the abilities (and remove it from the selected data list) and store it into a different selected data
    - use a Change Shortcut node to use the random ability as a shortcut slot
    - repeat Select Selected Data and Change Shortcut to fill the rest of the shortcut slots you want to use

    Having the abilities as shortcut slots allows you to use them in battle menus (Shortcut Slot menu item) and Combatant HUDs (Shortcut type element). If you want the abilities under a sub-menu in your battle menu, set them up as a speparate battle menu and use a Battle Menu menu item in your actual battle menu to open them :)
    Post edited by gamingislove on
    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!
  • Thank-you for your prompt response.

    Very well, I understand my mistake.
    Thanks to you I understand that in reality, I created a loop where the skills are learned, then forgotten, then learned then forget again and therefore can no longer be "called" (or something like that).

    My mistake was to believe that the "forgot ability" node only erased the abilities for the current round / event and that at the end of it the player's ability database was reset to default.
    I think that I thought badly about the organization of my goal.

    I will therefore follow your advice and use ORK's shortcut slots and restart my work.

    I would come back to update here.

    Thanks again !!
  • edited November 7
    Hello Everyone,

    I have made good progress in setting up my combat system, thanks to the advice you have given me.
    For information, I have made the following system:
    I start the game with 10 Ability and during a fight, 4 Ability per turn are randomly distributed.
    To manage the distribution of Ability at the start of the turn, as said before, I use a "select data" NODE and a "Change Shorcut" system.
    Ability can only be used once per turn (reuse cost) and when the player has used all of their Ability (sent to the deck - managed by a NODE selected data) or consumed all of their mana, then they can end his turn.
    The next turn it all starts over, and when all Abilities have been used at least once, they are reset (the Deck rebuilds) and the system starts over.

    I have also implemented a position system for enemies and a system where Ability can only be used based on a specific position of an enemy (I have also created Ability that moves enemies from position to position etc...)

    So everything has been going very well until now, but now I'm having a problem and I feel like I'm going to have a lot of trouble getting around it (without custom code).

    1) Indeed, to be consistent and create strategy, I need the player to be able to have the same Ability several times (for example: Fire, Fire, Fire).
    BUT, if I teach my player 3 times Fire, then Ork will still assume he only has it once.
    So e.g, if my player has to start the game with: Fire, Fire, Fire, Water, Water, Small Shield, Small Heal, he will only start the game with: Fire, Water, Small Shield and Small Heal.
    So it really doesn't work with my combat system where the player needs to have the same Ability multiple times to force them to make choices, or themselves choose what strategy they want to adopt in order to move forward.
    I have tried a lot of things but I really can't find a solution to this problem (apart from creating a lot of Ability and managing the distribution of it in a very long and rigorous way, eg Fire1, Fire2, Fire3 , Fire4 which are actually all: FIRE.


    EDIT 1 :
    I did some tests by changing the method of distributing ablity.
    I changed the "change type" to "ADD" of the "select select data" NODE and at this time, I have many times the same ability which is distributed.
    BUT that does not interest me because its does not correspond with the management of the "DECK" which I need.
    because the same ability can be distributed 4 times when the player only knows it once.
    and moreover, my fears are confirmed, if I use one, all the others are blocked because of the system of "reuse per turn".

    therefore no solution in sight on this point for the moment.



    2) To work around this problem, I opted to radically change the system by using ITEMS instead of Ability to manage this DECK system.
    Indeed, I thought to myself that since it was possible to have the same Item several times and use a limitation to STACK, then I could get the result I wanted.
    I did the same as the Ability and it was working really well.
    BUT, another problem has happened.
    Indeed, since I only used an item / Ability / card a little once per turn, I use the "REUSE" = TURN = SINGLE = VALUE = 1 function and my item is not consumable.
    If I have 3 ITEM FIRE, FIRE, FIRE,and I use 1 FIRE on my turn, then all FIREs are no longer usable (blocked) during the turn.
    I think this is because the item is the same and shares all the information between them.
    I think I would have faced the same problem with the Ability if it could have been used as an item as well.

    I'm not sure which way it is going now.

    Edit 1:

    I'm going to find out about ability variable and item variable.
    I do not yet really understand what it is for, but maybe I will able to find a solution.


    3) I take this update of my questions to ask something else:

    In turn-based combat Is it possible to display the intention (next move) of an enemy in a personalized HUD.

    e.g my player's turn is currently in progress and above the enemy's head, I can see an "icon" (sword) which indicates to me that his next action is an attack ?

    Thanks in advance.



    EDIT 2 :

    Hi all ,

    @gamingislove

    4) I continued to refine the different aspects of this combat system and made major changes in the management of the different parameters.

    E.g I no longer use the "Reuse" system for the management of action by turn but a saving of information in lists (selected data) and the use of NODE "forget" for the abilities and a consumable system for the item.

    At the start of each turn (or sometimes during the turn), the information (carts) is taken from the saved list and restored (learn NODE or add to inventory NODE).

    This is very practical with the system managed by abilities (ability = cards) because it frees up shorcut slots and therefore gives me the possibility of having "cards" which will look for other cards in the deck or the graveyard and put back in the hand (this is not possible with the reuse action because the ability / item remains in hand (in the menu / shortcut) but are no longer usable.

    Anyway, I still haven't found the solution (I don't think there is any) to have the same ability (cards) more than once, which is at the heart of my combat system.

    So I developed this system around the use of ITEM instead of ability because I can have the same item several times in the inventory,, (e.g POTION, POTION, POTION and not allowed the STACK)
    but I encounter a new problem ...............

    SEE IMAGE BELOW FOR DETAIL:

    https://pasteboard.co/Jzfxl7O.jpg

    The problem here is that when I use (click or drag on target) a "ITEM - cards" (potion in this example), the shortcut slot does not empty (it does not update) the icon of the item does not disappear.
    But on the other hand the item is well consumed (-1 potion in the inventory).
    But if I consume the 5 items present in the inventory, then the 3 shortcut slots will become empty at the same time.
    On top of that, the problem is that the slots don't update is that when I have 2 potions in inventory, the 3 shorcut slots always show a potion.

    The problem appears with a Custom HUD for the management of shortcut slots, or with a BATTLE-SUB MENU ( Battle Menu menu item , where the shortcuts are managed / converted in choice buttons).

    I have tried many things to solve this problem but I think the shorcut system was designed to work like this and not in the way that suits me.


    I am therefore stuck with both the ability management system for the cards and the item management system for the cards.
    Post edited by MadMaxx on
  • Since you want to create a card-based system, I'd recommend to use items as cards and make them not consumable (unless your cards should be gone completely after use).

    I've recently worked on a custom project similar to 'Slay the Spire' and used items as cards, global selected data lists (for the deck, cards on hand and abandon/discard piles) and a custom UI for all the handling you'd expect in a card-based battle system.

    If you're doing a custom UI for displaying your cards, you can completely ignore the shortcut slots and directly use selected data for it. Using shortcut slots would only be needed if you're using ORK's battle menu or a combatant/shortcut HUD to display them.

    You can e.g. set up the system like this:

    1) At the start of the battle, store all cards (items, e.g. by item type) from the player's inventory into a global selected data list (i.e. your 'deck').

    2) At the start of the player's turn, select random cards from the 'deck' selected data and store them into the 'hand' selected data. You can use turn start events (default is set up in Battle System > Battle Settings) for this. The Select Selected Data node can randomly select/store selected data, and also use the remove option to remove the selected cards from the deck.

    3) Use battle events on the cards to remove them from the 'hand' selected data and put them on the abandon or discard piles (i.e. separate selected data.

    4) When drawing cards at the start of the turn and the 'deck' runs out, you can move the discarded cards from their selected data back into the deck to have cards again (if your system should work like that).

    In this system, the 'hand' selected data holds all cards you can play during the turn and using them should remove them from it. If you want to use ORK's UI, you can easily use the 'hand' data and store them into shortcut slots - after playing a card, clear all slots and set them remaining to the slots again and the played card will be gone (naturally, first remove it from the 'hand' data).
    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 November 7
    I've recently worked on a custom project similar to 'Slay the Spire' and used items as cards, global selected data lists (for the deck, cards on hand and abandon/discard piles) and a custom UI for all the handling you'd expect in a card-based battle system.
    Ha ! One of my FAV game ( STS ) !!
    @gamingislove I can become alpha / beta tester if you need it =)
    If you're doing a custom UI for displaying your cards, you can completely ignore the shortcut slots and directly use selected data for it. Using shortcut slots would only be needed if you're using ORK's battle menu or a combatant/shortcut HUD to display them.
    I can't use a Custom UI, because I can't write a single line of code (I'm really not a developer)
    And so I don't think I can create the links between the data provided by ORK and a Custom Ui.

    This is why I use ORK to manage the whole project (including UI) . because it turns out to be extremey extremely complete (for the management of almost all aspects of a game).
    You can e.g. set up the system like this:

    1) At the start of the battle, store all cards (items, e.g. by item type) from the player's inventory into a global selected data list (i.e. your 'deck').

    2) At the start of the player's turn, select random cards from the 'deck' selected data and store them into the 'hand' selected data. You can use turn start events (default is set up in Battle System > Battle Settings) for this. The Select Selected Data node can randomly select

    3)............

    it's almost what I realized and it works quite well.

    I followed your advice and moved towards the desired result.

    I will still follow your advice and deactivate the consumable function for the items and reorganize my project accordingly.
    In this system, the 'hand' selected data holds all cards you can play during the turn and using them should remove them from it. If you want to use ORK's UI, you can easily use the 'hand' data and store them into shortcut slots - after playing a card, clear all slots and set them remaining to the slots again and the played card will be gone (naturally, first remove it from the 'hand' data).
    very well i will try that.
    Maybe , This will solve the problem of the slot which is not released when an item is used (see previous post).

    The only problem I can imagine with this solution is that in reality I cannot determine with ORK which shortcut slot was used by the player.
    And so if I have to clean all the shorcut slots when the player use a cards and re-assign them with the "HAND" list minus the card that was used,
    I'm not sure then the cards will go back to the order of the hand it was before the card is been used.

    I need to do some testing.


    PS:
    3) I take this update of my questions to ask something else:

    In turn-based combat Is it possible to display the intention (next move) of an enemy in a personalized HUD.

    e.g my player's turn is currently in progress and above the enemy's head, I can see an "icon" (sword) which indicates to me that his next action is an attack?
    any idea on on this point ?



    Thanks again !!!

    Post edited by MadMaxx on
  • MadMaxx said: I can become alpha / beta tester if you need it =)
    Well, it's a customer project, so that'll not be possible :D
    MadMaxx said: The only problem I can imagine with this solution is that in reality I cannot determine with ORK which shortcut slot was used by the player.
    That's why you'd clear all the shortcut slots you use for displaying the cards and fill them again - that way you don't need to know which was used, since you reset them after using a card.
    Your battle event (e.g. used last in your card item's events) removes the 'action' selected data (which is the item that was used) from the 'hand' selected data, i.e. the card is no longer in hand and will not be set as shortcut afterwards. I think I forgot to mention that in the previous post - the action that uses a battle event (e.g. the ability or item that is used) is available in battle events as the 'action' selected data.

    3) That's a bit more complex, but could be done. Generally, your enemy actions are determined by their battle AI, i.e. if you want to show beforehand what they intend to do, you can control that via game variables (e.g. object variables on the combatants). E.g. using a float variable, 0 being attack, 1 defend, 2 some other action, etc.
    Once you've got your battle AI set up to use the action related to the variable, you can use variable conditions on HUD elements in Combatant HUDs to show that info, e.g. displaying different icons, 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!
Sign In or Register to comment.