Best practice for handling unique abilities effects on a generic ability system?

Godot Version

4.2

Question

Hi, to explain my current issue:

All enemies’ abilities extend from an AbilityNode class, and there are a few different types of abilities I defined ( ConeCleave, Projectile, RectangleCleave, Donut etc… )

Currently I thus have a few different ability scenes, each representing their own type. And each enemy attack is a resource that has parameters that inject into the scene to alter the behavior ( things like radius, direction etc… ). Hitboxes are also correctly configured etc…

To give a brief showcase, it looks like this

Image from Gyazo
Image from Gyazo

The nice thing about the current system is that I can easily edit any enemy ability at will by just increasing / lowering values.
Ideally I want to keep this system and make it so that effects are triggered after telegraph end and occupy the area within the hitbox/collision shape.

So far, mechanically, this system works, HOWEVER, I am now starting to second guess myself because of the effects I want to implement for each attack.

I will be honest and say I have barely, or more like no experience on the art side of things ( particle effects, shaders, sprites etc… ), so I am kind of lost as to how to approach making new effects for each attack. Using an animated sprite for example would lead to the size of the sprite maybe not representing the full size of the actual effect, which might be difficult for scaling in a generic fashion etc… It’s also difficult to know really how would abilities look like in the final product without going into the game/actual runtime.

And knowing each effect would maybe be deeply tied to the attack then it makes maybe not much sense to separate modifiers such as radius etc… from the actual sprite/scene itself.


To summarize then, I am wondering which would be the best practice in that case:

  1. Keep generic scripts, make instead one scene for each ability and add parameters onto the scene directly.
  2. Keep generic ability scenes, make some placeholder nodes ( sprite, particle effect… ) I could override based on an attack resource property ( like effect_name etc… )
  3. Something else?
  1. I think you can do this by var data = {}, just a dictionary variable
  2. Optional
  3. Is this characters created by you? It looking nice
1 Like

Thanks for the answer :slight_smile:
The characters and weapon are done by me yeah, thanks for the praise!
The tiles and aoe effect however not ( still not there yet in terms of my schedule… ).

Regarding my question, just to clarify, I am asking whether it makes more sense to pick 1. 2. or 3 ( another solution ).

Currently each ability takes an optional parameter dictionary that alters behavior ( like attack length, radius, telegraph time etc… ). I just feel like the effects / art of the attacks makes things a bit complicated as I feel like this art would have a clearly defined width and height for example, which would defeat the purpose of putting this width and height into optional parameters into the ability.

I am probably explaining in a weird way. But for example

I currently have a AOEAbility scene.
I have Aoe1 which is 50px of radius with an explosion effect.
I have Ao2 which is 25px of radius with a vortex effect.

I can, currently, easily modify the radius of the ability at will from the resource directly, however the effects themselves pretty much should be fitting this radius, so I am not sure if the effects should be injected similarly via the param dictionary or I should have instead something like

Aoe1Scene ( with explosion effect and 50px radius defined in it )
Aoe2Scene ( with vortex effect and 25px radius defined in it )

1 Like