Hello, I just finished the 2d QuickStart.

I'm very happy with all the cool options I've got, but I can't figure out how to set up threat/evasion values.

For the most part I see in abilities I can create a "miss chance" but I don't know how to set up something like a status effect that the miss chance to be even lower or create a threat value to make an enemy more likely to target a tank-based character over my mage.

Another ability I want to add is a protect status effect where a unit will automatically take the hits for his allies, a protect ability, for example.

Sorry if this isn't the right place to ask.
  • edited July 30
    Hi @gateguard

    These can be handled many different ways, much of it depends how You want the mechanics to work. I'll toss out some guesses at different ways to do it, but we probably need to know more specifically how you intend the mechanic to work.

    I would recommend doing the Status System tutorial + 3D RPG playground if you'd like more depth in to various systems of the framework.


    -
    I think you're talking about the miss schematic in an ability, it is the schematic that runs when the Hit Chance fails(misses). There is also an Evade Animation here: https://orkframework.com/guide/editor/battles/damage-types/

    You could do something simple like a Status Value for Evade and all it does is subtract from the end of the Hit Chance formulas for abilities. https://orkframework.com/guide/tutorials/status-system-setup/05-formulas/

    In that tutorial the hit chance is (User.DEX / Target.AGI) * 100. At the end of the formula if you subtracted your Status Value for Evade, it would be reducing the % chance to hit by the Status Value amount. ((User.DEX / Target.AGI) * 100) - EVA

    If you want to do something more like a separate % chance to evade that is not using the Hit Chance %, that is more complicated, essentially the built in Block mechanic.

    -
    Threat is most likely going to be handled in Battle AI. https://orkframework.com/guide/documentation/battles/battle-ai/

    Lots of ways to go about it though.

    If what you want is preferred class order my first thought is use Check Status to see if the target is a Combatant Type Tank or Class Tank, success -> move/ability, Fail-> check the next biggest threat type, repeat. Put in a chance node on the successes so there's a chance it will not use the top threat and skip to the next one, and or put a chance node before any of that so maybe it skips the class checks altogether and choses random target (still going through other checks like distance etc)

    There are also nodes related to amount of damage done that could choose target based on raw damage.

    If you want to do a value based system where certain abilities add a specific threat amount, that is more complicated.

    Take a look at this Taunt/Provoke schematic, it is sort of in the same vein of thought that you are checking for something in the Battle AI (in this case a status effect) to give priority to a target.

    https://orkframework.com/guide/tutorials/status-system-setup/16-battle-ais/#21-toc-title

    https://orkframework.com/guide/non-knowledgebase/2d-grid-battle-rpg/10-battle-ai/


    -
    Protect I haven't actually created one yet so I'm not sure if the newer Status Effect settings make it easier now, or using Status Value change schematics (when HP changes a schematic runs and checks for the Protected status effect(s))

    There was a tutorial in Ork2 about using Linked combatants nodes to do it, which the node still exists in Ork3
    https://orkframework.com/ork-2/tutorial/gameplay/protecting-allies/










    Post edited by GeneralK on
  • edited July 30
    Thank you very much general K! I will check those out in a moment.

    I'm not sure if I should make a new topic or if it's fine to put it right here, but I've come across an odd problem that wasn't around earlier.

    If I hit the menu button it dims the screen like it's supposed to, but won't show the menu.

    image

    When I hit the menu button again, it goes back to being normal.

    image

    And the menu works again for some reason.

    image

    But I can't figure out why it needs me to hit the menu and exit the menu before working like it's intended to.

    I've also noticed another bug, if I don't open and close the menu before fighting monsters, the game will not proceed because the menu will not work.

    I assume it might be trying to fade that part of the UI in, but isn't able to and so the game is in a state of perpetual waiting at the end of combat.

    What mistake did I make?
    Post edited by gateguard on
  • edited July 30
    Glancing at the 2d quickstart tutorial there's not a ton to this menu, like I don't see Game States being used.

    I'd say check your UI Fade in / fade out schematics to start with.

    The reason it's probably stopping the game is because the menu settings (at least in the tutorial) are blocking everything while it's open, meaning it's probably still open even though not visible.



    Post edited by GeneralK on
  • Yeah it was probably somewhere in the step 25 or so where I messed up, I'll see if I can fix it all, thank you for responding.
  • edited July 30
    All right, well I tried a few things, I even removed the fade in from UI Boxes general settings, it didn't do anything.

    One of the UI boxes in "Layer 1" of Makinom refuses to work unless I open and close the menu for 1 time minimum.

    The only thing I can think of is it tries to enable the object a moment before the object is spawned so it never gets enabled. That would explain why it's functional except for the first time I open it. On top of that I have noticed if I go to layer 1 and forcefully enable it, it ends up perfect?

    Is there a way to spawn menus before the game starts? Or force enable the object attached to the fade in script? Or just force the game to hit the menu button once, wait .2 seconds, then hit the menu button again every time the game loads? I think that could work as a Band-Aid even if it's not ideal.

    I'll probably just start over from the beginning, I wanna make this right.
    Post edited by gateguard on
  • edited July 31
    The expert will be back soon, I'm sure he will have better insight.

    What's the other menu that's open / layer1 menu?

    Still sounds like the block settings and pause from another menu are active and when you're manually doing one it's unblocking all those. If you look at combatant in inspector for battle info does it say game paused? Like maybe combatant placement menu or Battlemenu are opening and blocking control/pausing but not displaying


    Do you have more than one menu set to that same keyboard button?

    Did you skip any tutorial steps?

    Are the fades also set up under UI Box settings And menu settings?

    Post edited by GeneralK on
  • edited July 31
    So there's two UI boxes that spawn here when I first go to the menu:
    image

    When I enable the first one, it's a blank UI box that doesn't seem to have any use.
    image

    When I enable the second one, it's the correct menu which is normally working except for the very first time it's called.
    image

    There's only one menu button in the Base Control input keys. I don't think I made any mistakes there.

    I did not skip any steps.

    And yeah, they're in both those spots
    image

    here

    image

    and here


    It's ok, I'm not sure what mistake I made, but thanks for taking time to look into it. I'm currently trying again on another project, I'll see if I can figure out what step I'm making the mistake on unless I manage to not make that mistake again.
    Post edited by gateguard on
  • Are you using the latest ORK version (3.18.1)?
    Also, do you get any error or warning in the Unity console?
    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 errors, my console is clean.

    image

    And yeah this is what I imported for ORK.

    I did discover something which is probably relevant. It's not solved but I figured out why I didn't detect it earlier.

    If I go to the start menu and start a new game or continue, the menu has this error.

    If I start from the Town scene or the Forest scene, the menu works flawlessly. Obviously I made some kinda mistake around there, but I don't know what.
  • Did some tests and seems to work fine on my end.

    Just noticed you have open/close schematics set up in your menu screen - are those the same used by the UI boxes?
    Schematics to fade in/out the boxes are only used in the UI box setups, not in menu screens, so you can remove them (might be related to your 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 August 2
    I removed them but the issue remains.

    EDIT: This is odd. I uploaded the game in a web build. The web build doesn't have this error, but unity editor does. I'm using unity 2022.3.1f1 with URP if it's relevant.

    EDIT 2: Uh it breaks the first time, but works afterward. Here's an upload of it:

    I changed the meu key to Escape because F1 kept creating new tabs on my browser.

    https://infernull.itch.io/ork

    password is ORK.
    Post edited by gateguard on
  • edited August 4
    I did find a "solution" I guess.

    I changed my start menu to "battle UI"

    image

    After that the menu pops up no problem anymore.

    image

    However it does create an entirely new problem unfortunately:

    image

    The battle menu now stopped working.

    So... yeah.

    I put two and two together, created a copy of the blue center prefab and created a new UI Box element at layer 1 called "start menu," then set the start menu to start menu instead of blue center.

    I'm not sure why this works. But it does seem to resolve the error.

    EDIT: There is an odd bug. When I exit to title screen the title screen doesn't open. I suppose it's fine to just throw a script on it that says on start invoke an enable gameobject function in .1 seconds if it's not enabled or something.
    Post edited by gateguard on
  • Hm, can you send me a Unity test project where this happens?
    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!
  • I just sent you a link to dl the source, deleting the library and giving the details you asked for on that page
  • Well, this is embarassing.

    "Your Start Menu scene’s game starter has Start Game enabled – this somewhat disrupts the whole process, just disabling it should make the whole thing work as intended. Generally, the start menu scene shouldn’t have the game running, as that also starts using other features (e.g. allowing access to menu screens)."

    This solved the issue.

    Just leaving this here for anyone else who might have the same problem.
Sign In or Register to comment.