• edited August 4
    I don't think this is currently possible.
    You can display selected data via a Selected Data Choice node, which lists stuff in selected data and lets the player select one (choice dialogue).

    However, HUDs, menus or battle menus don't have functionality to show something in selected data.

    Maybe shortcut slots can help you. They can be used to store things like items, equipment or abilities and can be displayed/used in battle menus and HUDs.

    I finally managed to get a result using the tools available in Ork, which is close to my initial expectations.

    A little complex to set up and certainly not optimal from a "resource optimization" point of view, but it does the JOB.

    To put it simply, it is a question of creating a HUD comprising a UI box ("scrollable") including inside the prefab of a "HUD shortcut slot list" (thank you GIL for having put me on the track of the use of shortucts ).

    In this way, it is a question of configuring the elements to be displayed in the shortcuts before launching the HUD (HUD>own schematics>Befor Opening Schematic).

    By correctly configuring each element ( E.g "content size fitter to match the "shortcut list" to the scrollable area of ​​the ui box, enable no empty slot etc ... ) and using the functions "click HUD , "toggle hud " etc... so it is possible to display any "selected data" ( items , ability ) through shortcut slot.

    There are many other things to configure for the system to work properly (for example to be able to use the scroll rect function but keep the possibility of having the Tooltip displayed), but I will not detail it here (I could possibly do it, if someone asks for it here).

    It took me a long time to obtain this result, which remains to be fine-tuned.

    See the attached GIF to see the result.

    I presice that all the graphic elements of the demo below do not belong to me and have only been used for the purpose of making this example.

    click on the GIF for a preview
    demo1
    I'll look into it for future updates.
    Thanks in advance
    Post edited by MadMaxx on
  • edited August 14
    Hello Gil,

    I need advice to set up the global inventory management system in my project.
    I hesitate in several ways to do it and I would like your opinion on the most coherent and optimal from a performance point of view.


    To put it simply, in my project which is a kind of roguelike, the player has a fixed and similar inventory at the start of each battle.
    During the battle, objects can be added to it and at the end of the battle, rewards can also come from the inflated one.

    Let's say that the inventory must therefore be reset after each Round ( 1 Round includes several battles , and so the objects used through the battles must therefore not be persistent in the inventory )

    I cannot use the "add to inventory , create item" node because the objects that must be added are not necessarily determined in advance and I therefore use selected data.

    I therefore hesitate to start the player with an inventory comprising all the objects of the game (+ 2000) and distribute each object at the start of the battle (or turn), the objects being sorted by variables associated with them ( and a kind of "cleaning" would be carried out at the end of each battle or round, to restore the variables of each object in order to find the initial status of the battle inventory ) .

    I specify that the player has access to these items and abilities only through a shortcut slot system, whose elements are randomly distributed by the game system.
    He therefore never has access to his "complete" inventory (for example through a menu ... etc ..


    Or, I'm trying to create a character (ally) with a full inventory and so I could go to this inventory when I need it (I can't really put this solution in place because I have the impression that to be able to access the inventory of an ally, he must face part of the battle group (I specify that the fights only count one player, against enemies).

    Besides, one of the reasons why I struggle is that certain objects must be able to evolve in combat.

    For example, an ability allows you to transform a Potion into PotionMAX (which are 2 different objects).


    To do this I try to associate a variable with the name of the evolved version of an object (in a string) and when the ability is used, the player will select an object from his inventory (selected data choice) and then go get the name of this string and add an object to the inventory that would bear the same name.

    For the moment I can't do it, but I remember that I had successfully done this on ORK2 (in my memory the "Variable To Variable" node was at the heart of this system.
    Node that I no longer find in Ork 3.
    But hey, I suspect that it is possible, so I persist.

    I hope this isn't too confusing.


    Another small question, we agree to say that it is not possible to associate selected data ( item , abilites etc..) on a determined section of shortuct.
    For example "change shortcut range ( 1-10 ) whit selected data".
    We have to assign each Shortcut manually ( selected data > first>remove , change sortuc (1,1) whith selected data etc..... ) ?

    Thank you by advance!!
    Post edited by MadMaxx on
  • Variable Transfer node can be used to transfer all variables from one source to another, and the regular Change Variables node for individual variables.

    As for your system - if you're mainly using selected data, the Select Item node can also create new item instances instead of getting it from an inventory (and the data can be used in other nodes to e.g. add it to an inventory).
    I think that should allow you to do all that, though you still have to define the items somewhere (e.g. in the Select Item node).

    Still, to have the item in the shortcut slot, it also needs to be put into the inventory or it can't be used by the combatant. So, select item (creating it) > add to inventory > change shortcut slot.

    Alternatively, you can also write some custom scripts to handle all 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!
  • edited August 30
    Variable Transfer node can be used to transfer all variables from one source to another, and the regular Change Variables node for individual variables.

    As for your system - if you're mainly using selected data, the Select Item node can also create new item instances instead of getting it from an inventory (and the data can be used in other nodes to e.g. add it to an inventory).
    I think that should allow you to do all that, though you still have to define the items somewhere (e.g. in the Select Item node).

    Still, to have the item in the shortcut slot, it also needs to be put into the inventory or it can't be used by the combatant. So, select item (creating it) > add to inventory > change shortcut slot.

    Alternatively, you can also write some custom scripts to handle all that.
    Thank you for your advice, I managed to set up this system.
    To simplify :
    A "phantom" player is present in the battle reserve and his inventory includes all the game objects accessible to the player.
    During combat, a spell allows the player to choose an item from their inventory to upgrade.
    It selects it through "select data choice" , then the name of the object and compares it with a string variable present in all "upgraded" objects.
    The upgraded item is therefore found in the inventory of the ghost player and transferred to that of the player, and remove the object initially chosen (therefore non-upgraded version of the object).
    I don't know if this is very clear but it works well and suits me xD.


    Another question, is it possible to launch a Battle animation in case of a successful "Critical"
    Indeed, I have an object with a battle animation and a CRIT rate based on a formula.
    I wonder if it is possible to have a battle animation for normal use and a battle animation if the formula returns a positive crit.
    I know that it is possible to trigger battle animations depending on condition, but I can't find the possibility to trigger them in case of CRIT.

    Thanks.
    Post edited by MadMaxx on
  • MadMaxx said: I don't know if this is very clear but it works well and suits me xD.
    As long as it works :D

    The Calculate Action node has options to use different Next slots on the node based on the outcome, e.g. for miss, critical, etc.
    Naturally, this only helps for after the outcome is calculated.

    If you want to have different things (animations, effects, etc.) happen based on the outcome before the actual damage, etc. is calculated, you can use the Determine Action Outcome node to pre-dtermine the hit/miss/crit outcome. You still need to use the Calculate Action node afterwards to calculate the actual damage and other changes, though :)

    So, if you want to have whole battle animations (schematics) used or not based on the outcome, you'd need to first use a schematic (in any case) where you use a Determine Action Outcome node and set some checkable condition (e.g. a variable) based on that. The following battle animations (schematics) can check 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.