• okay... I'm beginning to understand why it doesn't work the way I thought it would work.
    what I thought it was: each action taken subsequently adds to Initiative value, and in turn, to Turn Value. Example:

    image

    However, the Turn Values I'm seeing in the inspector are anything but that. It seems that the game zeroes the Turn Value of the combatant when it's their turn, and in doing so modifies (lowers) the values of other units as well. But since there are more than two combatants, and each one does this when it's their turn, and with the Initiative delay status value growing, along with the formula, and making turn value higher after each reset, it turns into an unholy abomination completely messing up the system. Or something.

    Am I right, and if so, what can be done?
  • edited March 2020
    Exactly - in inverted mode, it works like this:
    - combatant with lowest turn value has the next turn
    - every combatant's turn value will be reduced by that combatant's turn value (to prevent the number from overflowing in long battles), including the combatant itself (i.e. turn value will be 0)
    - the combatant's turn value is increased by the turn formula after finishing the turn
    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!
  • Thanks! No wonder it was all messed up. Now it's calculated as it should be.

    A couple new questions, hope you don't mind:

    1. Status effect duration was supposed to work in accordance with growing turn values: if a buff was placed in Initiative 15, it would last till turn 65 (for example). Now with turn values resetting, I don't see a simple way to count "initiative time". Is there some variable or anything else that could do it?

    2. I'm using the grid tutorial to learn stuff and supplement what I'm doing. Now there's the AoE part. I used it to create a simple trial fireball with all targeting settings identical, and it didn't work. The ability was used ('X used ability Y' notification appeared in the console), but no effect was applied. Then I changed Target Range from None to Single - and voila, it dealt damage to all in range. Any idea why it wouldn't work with no target?
  • 1) Hm, I don't think so. As you by now know, turns and turn values are not the same.
    You probably could implement a custom system via object variables on the combatants and using turn start events (or regularly running global events), but that might get a bit too complicated when a lot of status effects are involved.

    2) When using no targets in grid battles, I'd recommend enabling the Select Target Cell option. Otherwise, the ability is limited to whatever happens in the battle events, e.g. damaging via damage dealers/zones.
    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 March 2020
    1) that was... not the answer I was hoping for :) I'll try to cook something up using variables, I really don't want to change how the system works.

    2) Yeah, I'm using Select Target Cell, the cell is selected, the ability is used... and nothing happens. I change the same ability to target range Single, and suddenly it works correctly.

    a couple more, about turn order:

    3) Is there a possibility to show current Turn Values of the combatants in the Turn Order panel? As far as I see, it's possible to insert order counter, or initiative value, but turn value would be the most informative.

    5) on that note, any way to set tiebreakers for turn order?

    6) can turn order preview use other formula than base turn calculation formula? I'm using random values there, but although they only at the start of the battle, the preview seems to use them too.
    Post edited by 2137 on
  • 2) Well, it still depends on what happens in the battle event :D
    The fireball gameplay tutorial uses damage dealers/zones for damage, so this wouldn't really work with a grid-based AoE attack.
    For this, you'd rather set it up like a normal ability, where the AoE range is used via the Affect Range, using None target with target cell selection. The battle event would use the Calculate node as with other abilities.

    3) No, as the turn value is an internal value used for ordering mechanics, it's not really something that was intended for the player to see :)

    5) No #4? :D
    Abilities can use the Turn Based Order Changes settings to change that.

    6) No, previews use the regular formula.
    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 March 2020
    2) damn, it's probably due to the battle event having no calculate battle event. yeah, that fixed it.

    there was a #4... but I solved it on my side, and it was caused by having no calculate battle event. yeah. I need to remember that.

    5) anything more global? I want Initiative status value to be the tiebreaker (combatant with lower Ini stat wins) and I can't see it working through abilities (especially on the first turn).

    6) alright then - I moved the random part into the battle start event, but there's a new problem. Can the turn order w/previews show only combatants only once? As my turn calculation only takes used abilities into consideration (so base cost=0), the preview now thinks the next combatant has unlimited turns and shows them in all the spots.

    7) is there a way to use Status Value to Variable in a turn start event? It works perfectly as a battle start event, but doesn't do anything here.
    Post edited by 2137 on
  • 5) Hm, not really - the formula calculation is independent from other combatants, and the ordering is strictly based on the turn value.

    6) I'm afraid not - the turn order preview is predicting further turns based on the turn formula, so if the combatant is always the next in line due to that, there's no preventing that.

    7) Make sure to set up a Starting Object actor in the game event and use it for the node - the combatant who's turn starts is available in the event as that actor.
    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!
  • 7) the point is that I don't want to use starting object as the combatant who sets the value - but another one, who's a Global Object (it's part of my plan to circumvent turn values for status effect durations)
  • 7) In that case, use the Global Object object in your node - naturally, the combatant has to be stored in the used key already :)
    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!
  • that's the point though - it doesn't do that. Otherwise event works - I can change his stats using Change Status Value, for example, so he's the correct Global Object. However, when I want to set the global variable, it uses the current turn holder's stat value, not the Global Object's.
  • Hm, are multiple combatants (or other game objects) stored in that global object key?
    Status Value To Variable will store the first available combatant's value into a variable.
    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!
  • It turns out there are. Even though the Search Combatants node was set to Allies only (and Include Player Group was disabled), it apparently added someone else. Had to add a status requirement and now it works.
Sign In or Register to comment.