Hi, I'm setting the Turn Preview configuration to the state below.

https://imgur.com/Hy71EuE

The calculation of the turn order is done by modifying the StatusEffect through the Ability's User Change.

I would like to ask about the method to reset the turn order.
Even if I cancel target selection, the changes made to the turn order preview will not be reverted.
For example, I want to reset the turn order when calling Battle.BattleMenu.Show(true),

How can I revert the modified turn order back to its original state?
  • edited July 2023
    Previewed turn order should be gone when the preview stops - might be a bug, will look into it.

    Edit: No, works fine for me.
    However, status changes from status effects are not included in the preview, only adding/removing the effect, but not the status changes from an effect that'll be added.
    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!
  • edited July 2023
    Thank you for your response.

    When a player uses an ability, it applies a StatusEffect and calculates the StackCount of the StatusEffect in the turn calculation. So, the system allows multiple actions per turn, but each time an ability is used, the next turn is delayed.
    (However, the turn preview itself is not functioning as expected... However, that is considered a separate issue)

    Since the BattleMenu operations are also performed through scripts, it might be the cause that the turn preview is not being reset.
    When manipulating the BattleMenu, some menu execute 'Battle.BattleMenu.Show(true)' or 'Battle.BattleMenu.Show()' from the script. Is there a way to manually reset the turn preview in these cases?
    Post edited by modot on
  • edited July 2023
    Hm, not sure if stack count is previewed like that and would impact the turn order preview.

    Since all of this hangs on the previewed thing, you can simply remove the preview via code:
    ORK.GUI.Tooltip.Preview = null;
    There are different preview sources available, though, so if that alone doesn't fix it, also try setting the ForcedPreview and SelectionPreview to null.
    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!
  • ORK.GUI.Tooltip.Preview = null;
    I think this may be an embarrassing question, but how can I access it?
    Will it be accessed through a Handler or a Helper? I'm sorry, but could you provide a clearer explanation or an example?
  • You need to add ORK's namespace to your script:
    using GamingIsLove.ORKFramework;
    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, I tried using the namespaces for GamingIsLove.ORKFramework and GamingIsLove.Makinom...
    I am using ORK3, just to be sure.
  • Ah, sorry - that was ORK 2 code :)

    Here:
    ORK.Game.Previews.Preview = null;
    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 should have mentioned it from the beginning, thank you!

    However, since the display of turn order is still not working as intended, may I ask an additional question?


    Turn Order Setting is as follows. Invert Turn Order is checked.
    https://imgur.com/06isshZ

    The turn order is determined by a Formula. The Formula is as follows.(simplified it for clarity.)
    https://imgur.com/79sz60H

    When using an ability, It applies a StatusEffect through UserChange and delay the user's next turn based on the StackCount of the StatusEffect.

    However, the turn order and turn preview are not working as expected. I'm not sure if the issue lies with the turn order or the preview, The turn preview, for now, works during target selection, but it ends up being different from the actual turn order.


    1. Player can take multiple actions in a single turn. If they use an ability during the first of two possible actions, does the altered turn order reflect in the preview after that? Or is the turn order itself being updated?

    2. With the above settings for TurnOrder and Formula, will the turn preview work correctly?

    3. I'm trying to achieve a relatively simple goal of "delaying the player's next turn every time player use an ability." Are there any other good methods to achieve this? I've been struggling with this issue for quite long time, so any help or suggestions would be greatly appreciated.
  • 1) The turn order is updated after the combatant ends it's turn.
    A preview is only shown while e.g. the action is selected or selects targets (depending on your status preview setup).
    So, changes from the abilities that impact the turn order will only have an effect on it when the combatant is done and the next round is calculated.

    2) I don't think so.
    Previews currently only take status changes (e.g. from bonuses) into account, not if a status effect is applied or the stack count of it.
    There is a major rework of this system planned for the next big ORK 3 update, though, so it might be possible with ORK 3.16 (currently planned for September). I'll keep this scenario in mind for the rework.

    3) Generally it shouldn't be that much of an issue if it's part of the turn order calculation. Changing the order directly will probably not work due to the multi turns resetting the currently selecting combatant's value at the end of their turn, so changes to it are gone for the current user (but would work on other combatants).
    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.