#GAS for turn based RPG

12 messages · Page 1 of 1 (latest)

pliant tundra
#

I'm looking into using the Gameplay Ability System (GAS) for my turn-based RPG but facing some dilemmas with handling Gameplay Effects' durations. I've identified two main approaches:

Component-Based Approach: I could create a separate Gameplay Effect Component that specializes in turn-based durations. This would involve storing a reference to the effect in my Ability System subclass and manually managing its application and removal. It's modular and doesn't require plugin modification, but it feels like a workaround.

Plugin Modification: Another option is to directly modify the GAS plugin code to include a variable for turn-based durations. This would simplify the logic for effect application and removal, but it poses a risk of unforeseen consequences and deviates from the vanilla plugin.

Given these complexities, and considering that my game is single-player, I'm pondering the idea of bypassing GAS altogether. I could then build a streamlined system specifically designed for a turn-based environment, eliminating unnecessary complexities like prediction and replication.

So, I'm at a crossroads and could use some insights. Should I go for one of the existing options or venture into developing my own custom solution?

rustic mesa
#

I wonder if you could use gamplay tags to track duration state effects (think State.Stunned or State.Poisoned) although im uncertain of the exact implementation details. Im looking at a similar approach for a CRPG using GAS

#

I also feel like the component based approach would be an elegant solution

latent sluice
#

I'm very interested in this response. I've been looking into this quite a bit lately. I found this post where the last response appeals to me as a way to do it, but I'm having trouble finding where and how to implement it.
https://forums.unrealengine.com/t/gameplay-ability-system-turn-based/126620/6

Epic Developer Community Forums

In our project, we write a custom AbilityTimerManager to replace the default TimerManager. Change some GameEffect coed, an example is below. /* FTimerManager& TimerManager = Owner->GetWorld()->GetTimerManager(); FTimerDelegate Delegate = FTimerDelegate::CreateUObject(Owner, &UAbilitySystemComponent::CheckDurationExpired, AppliedActiveG...

placid knot
#

for turn based.. theres 2 ways i've seen it done.. the first is by what you linked in which you craete your own turn-based manager for duration effects this way you're dealing with turns and not DeltaTime. the 2nd way, (if you have a hybrid system... like.. open world map movement, but turnbased combat.. so you would want deltatime to effect status effects when not in combat like poison.).. is you use infinite effects instead and use a bInCombat to differentiate between openworld and combat. than you would have an int32 on the effect itself for TurnDuration and CurrentTurnsAlive... once the CurrentTurnsAlive == TurnDuration it would remove itself.. if not, if combat ends and your bool = false, every x seconds via DeltaTime you CurentturnsAlive ++ until CurrentTurnsAlive == TurnDuration and than let the effect remove itself.

latent sluice
latent sluice
#

Still need help with this question. If someone can help.

sage surge
#

you could let it respond on a delegate

#

give effect, once turn is done remove effect. no duration needed

#

if u want a effect durable for a few turns then add a count to it

#

everytime it triggers the delegate update it by 1

#

once reached the cap remove effect