How to create Combat System similar to Absolver?

Hey Everyone. I have been searching the internet about this topic for years now. I even switched over from Unity to Unreal since Absolver was made in Unreal.

I am still fairly new to Unreal, tried to learn how to go down the C++ route because of my experience with C# but I am somewhat frustrated by the constant restarting of the editor when I update a header file or create a new class, but that’s a separate issue. I’m going to work with Blueprints for now until I have a better handle on the ins and outs of the engine itself.

I’ve made a couple of projects using blendspaces and anim montages for animation. I thought I knew enough to try and create the Absolver combat deck system but I was sorely mistaken. I saw a post from years ago where someone suggested using a Command Structure, similar to what would be used in strategy games, but I am lost on implementation.

I was hoping someone on here could guide me towards a learning path that would enable me to recreate the Absolver combat system. If any of you have done something similar or even have a suggestion of how I could go about it, I would really appreciate the help. Like I said, I’ve been trying to make this one system for a couple of years and across two game engines with little luck.

Hi! I’m glad you’re adjusting to blueprints. Even after you get more comfortable with C++, more specifically Unreal C++ (not that it’s a completely different thing but, still) I recommend sticking to blueprints for the most part. They have many advantages compared to C++ and it’s also smart to implement the code using blueprints first even for the stuff you’ve decided on applying with C++! But of course you will encounter objectives which will require you using C++ eventually :grin:

As for your question, can you please elaborate? Right now the only thing I know is that you want to repliacate a combat system from a specific game

Hey, to elaborate, the combat system in Absolver allows the Players to create Combat Decks which allows them to select the individual moves for their combo streams.

So unlike most action games in which pressing the light attack combo prompts will always give you the same animation result, Absolver lets the player choose from a set of animations and make their own combo streams.

A simple example would be:

  • Generic Boxing Combo:
    Jab → Jab → Hook → Haymaker

An Absolver like system would let the Player configure this stream:
Variation A:
Hook → Jab → Jab → Haymaker
Variation B:
Jab → Hook → Jab → Haymaker
Variation C:
Haymaker → Jab → Jab → Hook

My goal is to make a customizable combat system that would allow Players to create their own Combat Styles using moves from predefined Combat Styles, like shown above. Examples of this system are Absolver and GodHand.

I also currently don’t know any fancy ways on how to do achieve this, so there might be more efficient ways, but let me tell you the most simple apprach that comes to my mind:

You can connect all these animations with each other both ways, and bind the transition conditions between them to a bool type variable. Again, even after this point this approach can be branched down to various ways, but here’s an example on how to make this work:

Create an array in which each index represents a combat animation. The transition conditions will be binded to an algorithm which checks if the click count matches with the respective animation’s index. While the player rearranges them, the array will be adjusted to it by adding or removing elements. This can actually happen in the animation blueprint’s event graph but any blueprint you wish also does the job, you can cast the result into the anim blueprint’s event graph after all. And plug that into the bool type variable that’s set as the transition conditions between them.

Does that make sense?

(Wanned to clarify something, the animation index isn’t the same with the click count. I meant to say assign the specific click count to that combat style’s index in the array as the player adjusts it. Hmm, when you think about it, it can as well be an enum!)

1 Like

Id checkout some tutorials and documentation on the GAS(gameplay ability system) GAS allows you to localize things like animation sequences, spawning particles, and various other elements into an ability, if applied correctly you could build a UI that allows payers to pick from various abilities that could be chained together in a master ability or tied to an input chain. If your interested in implementing an ability system based in c++ checkout Alamars dev domain on YouTube, has all the steps to get you rolling and will give you a good understanding of how to implement this system

1 Like

I think I tried something like this in Unity but it became very complicated as I started adding more animations as each animation would need a transition to each other animation. I did not try the editing array approach so maybe there’s something there. I tried enums but had a similar problem that it made the extensibility more complicated. But again, that was all in Unity, I’m still learning Unreal so maybe it will work differently on here, just need to get a better handle on the engine.

Thanks for the suggestion.

I was actually watching the Outriders presentation on how they used the Gameplay Ability System the other day and thought that it might the solution I am looking for. I will definitely look into it more.

Also going through Alamars videos right now to see if I can find something that helps.

Thanks for the suggestion.

Jab → Jab → Hook → Haymaker

is these actions triggered by a single key?

For example. you spam A key.the character releases these actions in fixed order.and now you want to customize the order?

I’m not sure if I understand,because I didn’t play many combat games.

but If the above is the case.

I think you could use montage instead of state machine.(because I see you were talking about transition?)in my imagination I don’t see the need for transition.montage can automatically interrupt other animations.

as for implementation.

you could store an array of anim montages. treat the array as an inventory.

when spamming the attack key ,increase an integer,use the integer to get an animation to play.(you might want to figure a way to limit when it can be increased and when it resumes to zero)

and the player can buy,sell,swap action order,etc… operating the array would do the work.

Hey everyone, thanks for the suggestions so far, I’m trying to implement them as I learn how to use Unreal.

I wanted to provide a clip as an example of the system I am trying to replicate. As you can see in the video, there are empty attack sequences (light attacks) and empty alternative attacks (heavy attacks) which the user is able to designate attack animations to from a list of available animations.

I am trying to create a basic replication of being able to choose the attack animation to play when the sequence is triggered through button presses.

@baobao4435 @VisAgilis @doctorpepperdan

This is another example of what I am trying to create. This game also has “Combo Chain Presets” that I would like to replicate.

Sorry for spamming. I am trying to get as much information as I can from experienced developers alongside the trial and error process of trying to make it on my own.

I have been researching it on the internet but the search results aren’t that great when I search for “make your own combo system,” “custom combo system,” or “design your own combo system.” Predictably, the results are just tutorials on how to make a generic combo system.

I am currently trying to implement the suggestion about using arrays of anim montages. Having to learn how to communicate the player’s choice of which anim to play through a UI widget in a separate menu, like these examples.

Thanks in advance for any help you can provide.

Unreal has a system for combos in the IA setup, you can setup certain actions to only trigger if other actions have been triggered in succesion, just a matter of setting up the abilities, tying them to an IA, and setting up the combo in your mapping context

1 Like

I made an quick example.




this is the animation part.
the widget part is kind of hard to make screen shots (kind of messy :joy: )
but if this is what you need and need help with ,I am happy to share the widget logic

1 Like

That’s amazing! This is literally what I want to do. The UI implementation will be different so that’s fine, I’ll probably make a separate menu for Players to go into and edit the combos.

You may not realize it but you have just solved a problem I have been trying to figure out for years now. Seeing your solution, I don’t know why I struggled lol.

This mechanic is the foundation of my game concept.

Thank you so much.

1 Like

Hey all, I wanted to post my initial implementation of this system in case anyone comes across this problem in the future.

First, I took the suggestions here for using arrays of animMontages and @baobao4435’s implementation example using a struct.

I started by creating a Struct for the Actions.

Then I created an Array of Actions in my CombatSystem Blueprint.

This is a combo system I am using that I learnt from a tutorial. It is basic and uses animNotifies to continue and stop a combo.

This event is what play the animations using the Attack Index and Actions Array.

For the reordering of the combo, I am using a simple key press to move an attack to a different place. I still need to implement a more robust system that allows the Player to see all available animations and pick and choose where they go, so the following is a foundation for building that up.

ReorderArrayCall

In this example, I am moving the first attack in the combo to the third position and moving all other attacks one index back.
After the function is completed, I set the Actions array to the modified array that is Output from the function.


FunctionLocalVariables

I probably don’t need the “Array to Reorder” variable since this function is in the same Blueprint but I did it anyway for extensibility. The function also has local variables to make the process easier.
“Temporary Array” is a copy of the original array and it will be the one that is having the reordering done to it.
“Element to Move” is a copy of the array element at the index that will be moved.
“First Element” is the array element at the index that “Element to Move” will be moved to.
Then I added a branch condition to figure out if we are shifting the element to the right or the left. This is because I wanted to create an implementation that moved the other array elements accordingly, not just swap the selected ones.
Again, this is just an initial implementation of the system and will probably change as I develop more iterations.

“Right to Left” is the “True” branch, meaning that the index of the “Element to Move” is greater than the index it is being moved to.
I start off by setting the array element of the “New Index” with the “Element to Move”
Then I start a for loop by incrementing the “New Index” (Index to move to). The For Loop will go from this index to the Index of the “Element to Move.”

The Loop is fairly simple, it gets the element of the current index and sets the “Next Element” to it.
Then I set the array element at the current index to the “First Element” I had stored in the function initialization stage.
After this is done, I set the “First Element” to the “Next Element” and reset “Next Element” to an empty (might be redundant but I did it anyways).
And it loops through that until the Loop completes at which point the return node is called and as you can see in an earlier image, it sets the Actions array in the Blueprint to the modified array from the return.

“Left to Right” is the “False” branch, meaning that the index of the “Element to Move” is less than the index it is being moved to.
I start off by setting the array element of the “New Index” with the “Element to Move”
Then I start a for loop by decrementing the “New Index” (Index to move to). The For Loop will go from this index to the Index of the “Element to Move.”

Now, to my surprise, Unreal doesn’t have a decrementing For Loop natively, so after doing some research and learning about Macros, I created my own implementation of it. I basically just copied the For Loop logic and replaced a greater than check with a less than check. This is it:

The loop itself follows the same logic as the “True” branch.

And there you go, my initial implementation of this system. For now it is a hard-coded change but in the coming days I will attempt to develop a more complex system, perhaps by doing what Absolver did by having a separate menu for Players to go into to do all the edits. Other changes would be to have presets that the Player can switch to during combat to increase variation, similar to Absolver’s implementation. Another would be to add unique attacks if a certain combo stream is used, something suggested by @doctorpepperdan.

Thanks again for your suggestions and help in making this system. I hope my description can help other developers that want to replicate this Custom Combo or Customizable Combo System.