[2.0] WCS - A combat system framework

Is there a way to activate multiple abilities at the same time? I have two holdable abilities, one for sprinting and one for blocking, each with their own respective status effects, but I can’t seem to be able to use them at the same time.

1 Like
2 Likes

You don’t need to. It only applies if status is active

Is there a way to fire to all clients through skills? The :OnStartClient() function only fires to the person who started it, and SendMessageToClient() only fires to one client. I’d like to be able to handle VFX through the skills if possible. Otherwise I guess I’ll just use remote events

Use remote events, you support to handle that yourself

1 Like

Release 🎈v1.1.0 · g1mmethemoney/WCS · GitHub A new version has been released!

1 Like

This not taking care of vfx replication was a deal breaker for me, sadly. This looks really good though, nice job.

2 Likes

What you’re asking for is not related to combat systems and can be done with a couple lines of code and a remote event (I don’t want to add unrelated stuff to the framework because it makes it less flexible)

Not really. If combat systems can have a framework, so can vfx.

You have a very useful “Holdable” feature, which, if connected to a VFX pipeline, could allow “Holdable VFX”.
You could make a system that communicates to all clients about VFX, when to start them, when to clean them up, the same way you’ve replicated Ability States. It would certainly be very helpful.
VFX is not always one-shot. Continuous VFX need a start and a stop. Your framework could provide that and be an all-in-one combat framework. For now, it’s a combat state replicator.

It’s okay not to have it I guess. It’s just the specific problem I was looking to solve.

I’ve actually made one for Roblox-ts. But it was a separate package. Nothing stops you from making one yourself and connecting it with your skill code. Also worth to mention that WCS is way more than a combat state replicator

Sorry I agree it’s more than a state replicator. That was a bit mean my bad I didn’t realise how I sounded.

I do have a combat system similiar to this one, but without vfx replication. I made the replication part today myself, but your code is super clean, and would’ve loved to see a whole package. Could you link your vfx replication system? I would love to appreciate more of your work.

1 Like

It’s not a state replicator. Id say it knits server and client part of your code so it’s very easy to communicate, while providing a nice structure for your code. Replication is one of the benefits.
Here’s my solution to VFX replication: https://github.com/g1mmethemoney/vfx-system
It utilizes a package we made with my friend called “shared-class”: https://github.com/Tesmi-Develop/shared-class

Not gonna lie I might make something similar for Luau users in the future. It depends on my free time :upside_down_face:

1 Like

Maybe this has to do with this forum’s very loose definition of a framework. Maybe I’m the outlier in thinking it means this, but when I hear the word framework, I think of something that lets you easily compose abilities, maybe with tables or very very simplified scripts because the framework’s taking care of all the heavy lifting, including client prediction, etc.

99% of these frameworks I’m seeing are really just bundled utility modules. I really don’t see any heavy lifting that this takes care of that couldn’t be done with a few lines of code.

4 Likes

WCS itself is around ~1.5-2k lines of Typescript Code, which would be around 4k in luau. It enforces you to code your abilities using OOP and classes by overriding special methods WCS provides with the API. The way your code is currently structured with WCS allows for building complex relations between your abilities (as I said above multiple times). It also takes care of replication, e.g: you can get currently applied status effects or state of any skill from client, which makes it easier to work with data in your UI. In my understanding framework is a library that enforces you to work in its own paradigm and follow its rules, thats why I called it a framework.

1 Like

Why would I not just use attributes instead?

Because WCS partially launches your skill at client side, you can’t do that with attributes.
If you want to know why using attributes to replicate stuff is bad, I have a great article for you:
https://ffrostfall.com/stuff/list/attributes-valueobjects-instances/

With WCS you write your client and server side in one single class, that instantiated on both client and server. Doing it this way allows you to keep our client/server in one single file and don’t write messy code for communicating between them. That’s the idea behind WCS!

I’ve been watching this framework since u posted about it in the OSS discord, just wanted to say I love the thought put into this.

For anyone confused, the framework is really useful if you are interested in combat replication with the states involved (e.g. stuns, parry, invincible, etc), and confused on how to approach it.

Even if you don’t end up using this, I think it’s great to look at the API and reason about the interface it exposes, since a lot of methods and events exist for a not so obvious reason at first.

2 Likes

Agreed, Ive been using it and it works flawlessly. It Includes just about everything Id want in a framework like this, and my code has never been cleaner. Only suggestion I have would be to include some method of VFX replication, like a :SendMessageToAllClients() function.

I’ll be sharing my results with this framework soon once ive polished my system a bit more

2 Likes