• edited June 2023
    (New edit at bottom, last one I promise) Edit as a new post since that one is a little big:

    I have it working now (after adding logging to verify), it is indeed calling Set Position over time. However, now I'm noticing that it's only working on the first combatant and then finishing and not calling over the rest. But if I change the exact same nodes to have Move unchecked, it moves them all.

    Move checked using speed of 5 (note schematic finishes because player control becomes unblocked):

    image

    Exact same nodes but with move unchecked:

    image

    The nodes are all the exact same Change Position node with a Move/Wait of speed 5, other than different Selected Data as the object and a different Vector3 position.

    Still digging into it, but definitely something around the Wait part specifically. If I remove all other change nodes and put a Console node after that first one, the console node never gets called but the schematic still ends and unblocks control.

    ---

    Edit Final: Okay, so given this experience I think I need to rewrite my movement component anyways because I don't really like how it's handling positions. Using that, I can write my own custom version of change position for these scenarios which essentially solves this issue to I think since I plan to hook into pathfinding.

    After all of that, I think I just have these 3 questions then:

    1. How exactly do we go about including Wait into custom schematic nodes? I've written a few custom nodes already and have some basic familiarity with it, and I can write a custom node to pass the position directly to the movement component, but I'd still like it to "wait" until the combatant reaches their destination before moving to the next node (which would be read from a field on the movement component).

    2. Using the Waypoint Settings in the Enemy Spawner, does this forward a calculated path to said Waypoint, or does it give the exact point transform specified?

    3. Is there a built-in way to move the formation based on collision, or forward a transform directly? This is part of why I'm thinking of rewriting my controller, as it stands if you move next to a wall and the formation position is in the wall, the character will just get stuck and run against the wall until you move over. I have a few ideas on how to tackle this with the control/script, but before doing so thought I would see if there's something built into ORK.

    If you read all of this, I apologize for the pain you have been put through and you are a saint.
    Post edited by Acissathar on
  • 1) There are 2 ways to do it, either via a constant update check in the node or by forwarding a delegate function to your custom code to call when movement is done.

    For update checks in the node, you need to implement a runtime class for the node that handles it, e.g. check out the Combatant Animation node for an example.

    Delegate function is a lot easier and straightforward, e.g. create a delegate call within the Execute function of the node to let the schematic know when the node finished:
    Notify notify = delegate ()
    {
    schematic.NodeFinished(this.next);
    };

    This is a parameterless function that you can pass on to your code, which can call it when done. So, your code can take a Notify parameter and call it later like this:
    notify();

    2) Waypoints use the positions.
    The pathing is done by whatever movement component you use when the waypoint is used by the move AI. E.g. NavMesh agent finds the path from the current position when actually setting a waypoint as target.

    3) Well, that's once again up to your movement component :)
    E.g. NavMesh agent should calculate the closest point on the NavMesh to the position.
    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 2023
    Awesome, the delegate seems much easier so I'll dig into that and also work on rewriting this controller to better handle 2 & 3. I think my issue there is going too deep into a rabbit hole and misunderstanding my position numbers without taking a step back.

    Speaking of which, in other good news, I figured out my wait issue and in hindsight it's so obvious I'm not sure why I didn't think to check it first. Sometimes you just need some sleep I guess haha

    My GameObject Manager for controlling this scripted battle interaction was looking if the key item was in the player's inventory and disabling the interaction object if so. I was adding the item at the start of the schematic from a previous test, rather than at the end, so midway through the schematic it was being turned off. Wait was only relevant because it gave enough of a delay for the GO Manager check time to kick in.

    So make sure your machine running the schematic is still active while you want the schematic to run is the lesson for today :)


    Edit: Got everything working perfectly, appreciate the help as always :)
    Post edited by Acissathar on
  • Hi @gamingislove,

    Currently going about trying a few Unity-divorced controllers, and am wanting to make a variation of the Top Down Border Camera.

    Is there a way to get it to show up in the ORK controls option?

    image

    My character controller shows up in Combatant -> Default Move Component by inheriting from BaseMovementComponent, so wondering if the same applies here just with a different class?

    Currently I've just copied the Top Down Border Camera and Settings classes from the source and pasted them into the project with new names.

    Not a big deal, I can just combine them and make it a custom camera controller but just curious on if it can get picked up here without rebuilding source.
  • No, it needs to be added as custom controls.

    The player/camera controls don't have such an extensible system as many other parts of the framework. This is to allow the Change Player Control and Change Camera Control node to switch between already set up control types :)
    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!
  • No worries, that's easy enough, appreciate the clarification :)
  • edited October 2023
    Hi GiL, two quick questions this time.

    1. I have an ability variable to store power. I have this pulling correctly in formulas using Selected Data 'action' + Local origin. I would like to display this in a HUD along with other ability information, however, when I try to input the variable I get the following error:

    (snipped a bit)
    NullReferenceException: Object reference not set to an instance of an object
    GamingIsLove.ORKFramework.UI.AbilityHUDStatusTextType.Register (GamingIsLove.Makinom.DataCall call, GamingIsLove.Makinom.Notify notify, System.Collections.Generic.List`1[GamingIsLove.Makinom.VariableHandler]& unregisterHandlers, System.Boolean& isTimeUpdate) (at <6cd1038e56604a3bbe2a1f0d04fb3b4e>:0)
    GamingIsLove.ORKFramework.UI.HUDStatusTextSettings.Register (GamingIsLove.Makinom.DataCall call, GamingIsLove.Makinom.Notify notify, System.Collections.Generic.List`1[GamingIsLove.Makinom.VariableHandler]& unregisterHandlers, System.Boolean& isTimeUpdate) (at <6cd1038e56604a3bbe2a1f0d04fb3b4e>:0)
    GamingIsLove.Makinom.Components.BaseHUDTextContentComponent`1[T].Register () (at <68262aadaf0241c9a20d6665d7a4f3e8>:0)
    GamingIsLove.Makinom.Components.HUDContentProviderComponent.ForceUserUpdate (System.Object newUser) (at <68262aadaf0241c9a20d6665d7a4f3e8>:0)
    GamingIsLove.Makinom.Components.HUDContentProviderComponent.set_User (System.Object value) (at <68262aadaf0241c9a20d6665d7a4f3e8>:0)
    My ability setup:
    image
    image


    2. I have my description setup to show different HUDs based on if it's an ability or item, with the other battle menu options not showing a description. For the most part, this is working fine. My description UI box has a HUD Content provider child, and then I use HUD Conditions on HUD User for Ability/Item on the child.

    This works great for the most part, except when picking targets. Then it shows the description while still showing the ability/item, but without showing the HUD. My guess is that it's trying to show the target's description rather than the ability. Is there a way to get it to keep showing the ability/item rather than the target?

    image

    image

    I am not using a target menu for targeting and those settings are turned off for what it's worth too.

    Description in Battle Menu:
    image

    UI Box:
    image

    UI Box child HUD:
    image
    Post edited by Acissathar on
  • 1) Seems to be a bug, will be fixed in the next update.

    2) No, description shows for the current selection, i.e. an item or ability during item/ability selection and a target during target selection.
    One way around is would be using a separate content provider. E.g. the HUD Shortcut content provider can get the active shortcut of a combatant (e.g. shortcut is active during target selection of the combatant). You'll also need to feed that content provider the correct combatant, i.e. the one selecting targets instead of the targeted combatant. This is can also done via a content provider, e.g. HUD Player Combatant content provider.
    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!
  • Appreciate it, I’ll experiment with #2 and see what I can come with it, thanks!
  • edited October 2023
    @gamingislove That approach works, for the most part, but I'm running into something a little odd and I'm not sure if I'm just missing a step.

    I've changed out the Content Provider on my Description box to be a Player Combatant provider, and created a sub object which has a HUD Shortcut provider with Active Shortcut checked.

    The normal ability HUD displays during move selection, which is great.

    Selecting a move then changes to the Active Shortcut one as expected (denoted with massive text code lol).

    However, as soon as I give any input (such as dpad to change target), it disappears and a new instance of the description box is spawned/turned on, which has nothing feeding through the content providers. It then stops showing as well for the rest of the turn, cancelling and bringing it back up does not re-display it.

    image
    image

    The second Battle Sub Menu looks to be the (empty) Target Menu box, but from my understanding since the Description is only defined once, it would just re-use the description box.

    A small additional question, is there a way to translate some of the ability text codes ( for example) in the shortcut HUD? The way I've been currently doing it is just redefining it as CustomContent on the ability to just return that text code, but not sure if there is a better way to do it.

    Edit: Leaving it as an Ability rather than changing the status text to Shortcut seems to work just fine for this part.

    Edit 2: Seems to be focus related? If I click the Sub menu box again, the description shows back up (but then requires 2 accepts to select target as it takes focus back off the first time)
    Post edited by Acissathar on
  • Hard to say ... could be due to your input keys somehow being used to change focus or go back, etc.
    Generally, why are you using a multi mode setup for the battle menu if the UI boxes are just displayed over each other? Without multi mode, it'd just use one UI box, potentially solving your focus issue.
    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 October 2023
    Without multi-mode it doesn't show the boxes at all when moving to target selection, which is probably no big deal really (and does technically handle the issue).

    However, testing that I noticed that focus isn't being set even without that on the ability menu without first giving input. The box has Auto Select First Input checked, and it seems to be in position based on the selection cursor and highlight, but the description doesn't kick on until input is given (and then it's fine for the rest of the turn it seems even if you cancel in and out)

    image
    Post edited by Acissathar on
  • edited October 2023
    I think I misunderstood what you might have been originally saying to do.

    I've moved my description back to just being the ability/item HUDs as before. I've now moved out the current selected shortcut (which copies the same visual layout) and made that as a standalone HUD. When target highlighting is started, I set a game state which toggles the HUD that I set in a dummy target box Before Open and Before Close schematics. This gives the appearance of both without focus issues (although that first initial focus with the Ability selection does still happen)

    Edit: For some more details before I go to bed on the focus thing, it's like the HUD content isn't being pushed the very first time to the content provider. Even if I turn off my HUD conditions to keep all objects enabled, they just have no data. As soon as I cancel (or give input to the box, like up/down) and bring it back up, the data gets forwarded as expected and it continues to work for the rest of the game. Even if I die and call Game Over, or survive and start a new battle, it continues to work as expected. Very odd.
    Post edited by Acissathar on
  • Might be related to not using a target menu, and the custom battle menu call stuff you have going on (if I'm not mistaken).
    Might need a Unity test project to look into it.
    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!
  • You are correct, I have an unorthodox battle menu system you could say haha. I will send that over :)
Sign In or Register to comment.