Skip to content

Implement framework for custom multi targeting styles #763

Description

@Iridar

Currently it's not possible to "easily" make a custom X2AbilityMultiTargetStyle , since the XComGameState_Ability::GatherAbilityTargets is native, even though luckily the UnrealScript implementation of its code was included by Firaxis.

That code is calling AbilityTemplate.AbilityMultiTargetStyle.GetMultiTargetOptions, which is also native.

Correct me if I'm wrong, but I think the problem here is that since both functions are native, the native code will talk directly to other piece of native code, bypassing any UnrealScript override functions that you were to put into your X2AbilityMultiTargetStyle subclass.

So in essence, you can make a custom Multi Target Style all you want, but its code will never get called by the game.

robojumper had this to say on this issue:

My recommendation would be to create a separate subclass of XCGS_Ability, scan for non-native target styles in X2AbilityTemplate and instantiate the subclass when needed

This is something I'd be glad to do if I had a better than vague idea of what this means.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions