Able Ability System Info and Support Thread

I had an issue with channeled conditions that required me to modify the Able code. Pretty sure I mentioned it before in the past. I’m not sure why the fix has yet to make an appearance in the main code. The problem is some conditions are only checkable on the client side, and not the server side, such as the input conditionals, and the logic for branch and channeled conditions doesn’t account for that entirely.

But since functions like UAblChannelingBase::GetConditionResult and the FAblAbilityInstance::CheckChannelConditions that calls it only operate on bools which can be inverted to true when it wasn’t able to properly check input.

In reality, there are 3 states that need to be accounted for by all the condition checking code, branch conditionals and channel conditionals. It needs to make a distinction between explicit success and failure and a condition that cannot be checked, so it really needs to be treated as a tri-state check against the activation logic. Where the logic breaks as-is is given the fact that the results can be inverted, such as “input not pressed”. GetConditionResult returns false in that situation when it can’t properly check, but because the caller lacks the context that the false is due to the inability to check, if the result is inverted, it gets turned into a success and you have the server making branch of channeling decisions based on information it doesn’t have. A tri-state would only invert the explicit states, and not the ignored state.

Here are select bits of how I fixed these issues, by changing these bools into a tri-state enumerator, and handling them accordingly.

Note how the input conditional returns an ignored state, distinct from the true/false success/failure it returned before. This represents a distinct state that won’t be mistaken for an explicit success/failure state

By handling these distinct states properly, you ensure that anything involving input conditionals, or any user added realm specific conditionals, can ONLY drive state changes from the appropriate realm(client/server)