[2.0] WCS - A combat system framework

The documentation is filled with examples, so yeah. That would give you a lot of insight

Great. So there should be no limitations to the examples you can provide.

Any update?

1 Like

I shared some of my creations online, theyā€™re not included in the devforum post. Iā€™ll make an examples section once it gets to a certain amount, but again, I donā€™t understand why are you so concerned about examples:

Letā€™s draw a parallel with game frameworks, such as Knit. People donā€™t come and ask ā€œwhat could be done with knit? can you show some examples?ā€ because knit allows you to build any game efficently, same with WCS.

For anyone interested, you can pm me and Iā€™ll include your creation in the examples.

That would be greatly appreciated, thanks.

So Iā€™ve come back after looking through the documentation a bit, and Iā€™m trying to set it up but thereā€™s a few errors popping up. In the installation guide all it says is to place the module inside replicatedStorage, but the server and character setup scripts both call on instances that are not inside replicated storage.

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local WCS = require(ReplicatedStorage.wcs)

local Client = WCS.CreateClient()

Client:RegisterDirectory(ReplicatedStorage.TS.movesets)
Client:RegisterDirectory(ReplicatedStorage.TS.skills)
Client:RegisterDirectory(ReplicatedStorage.TS.statusEffects)

Client:Start()
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local WCS = require(ReplicatedStorage.wcs)
local Attack = require(ReplicatedStorage.Attack)
local Character = WCS.Character

Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(CharacterModel)
		-- apply the wrap when character model gets created
		local WCS_Character = Character.new(CharacterModel)

		-- apply our freshly made skill
		Attack.new(WCS_Character)

		-- destroy it when humanoid dies
		local Humanoid = CharacterModel:WaitForChild("Humanoid")
		Humanoid.Died:Once(function()
			WCS_Character:Destroy()
		end)
	end)
end)

Error:

ReplicatedStorage:

image

1 Like

I think itā€™s pretty straightforward that those folders / files is something you need to create yourself

1 Like

Those are locations where your skills, movesets and status effects will be

Ah sorry, I assumed I hadnā€™t installed the system properly. The documentation is pretty confusing, like when creating an ability I have to provide what? The script within the documentation for applying abilities has this:

local Attack = require(ReplicatedStorage.Attack)

And what exactly am I supposed to provide there? A module? I donā€™t really get it.

And on a side note, it would help a bit if the documentation listed where these scripts should be placed. Some of them are obvious, but others I canā€™t really tell if I should place them under serverScriptService, starterCharacterScripts, or starterPlayerScripts.

Attack is your custom ability. It covers them here: Create an ability | WCS

1 Like

So Iā€™m gonna assume that that code should be within a modulescript under replicatedStorage.
Edit, yeah I get it now, the scripts for abilities are modulescripts that are placed under replicated storage. Itā€™s a little confusing but I understand.

yes! wcs uses them from both client and server to do replication

1 Like

Hey, the documentation on GitHub for the Combat Framework is quite confusing. From what I see in the first image, it discusses how to create an ability, requiring me to assign the attack in WCS.RegisterSkill("Attack") . However, on the next page, I seem to need to do this again, and this time the attack is again referred to as ā€œAttackā€ in the ReplicatedStorage . For someone new to this framework, the instructions are not straightforward and are impossible to follow without further explanation. The issue with this module isnā€™t what it can do, but rather that itā€™s too difficult to understand how to use it properly due to inadequate explanations.

Here is how the GitHub tryā€™s to explain


Somehow after following the instructions properly:

I get this error message:
External Image

my literal problem is this now:


And I will post my rbxl. file if someone sees the problem he can please resend it to me. Because this is seriously really hard to solve without even any resources.
PLACE4.rbxl (189.4 KB)

The provided luaU scripts for setting up abilities reference the attack module as a child of replicated storage, when it actually needs to be a child of the skills folder. Correcting this in the api will eliminate a major point of confusion

As the author, I would appreciate more detailed output and explanations in the documentation. The current guidance is not clear enough, especially for those new to the framework. More comprehensive descriptions and examples would greatly enhance understanding and ease of use. Could you please provide additional details and clarify the process?

I wanted to mention that after a lot of experimentation, Iā€™ve managed to solve it.

2 Likes

Yeah, documentation could explain a bit better on a lot of things, but overall I think OP covers most of the important things. The one main thing that I was confused by was the lack of clarification on how abilities are created. But, with a bit of intuition, it is relatively simple to understand. Itā€™s incredibly well made and very intuitive, within an hour Iā€™ve already made half of my ideal combat system. But, like you said the documentation could use some more thought. (still grateful though, could not imagine how much work this took)

2 Likes

Also, there seems to be a whole lot of complex methods involving damage. Iā€™m not saying a tutorial is necessary, but it would be pretty nice, since I canā€™t really make sense of the api.

The way this framework works is that it has one damage listener(DamageTaken) which manages all the damage for skills/status effects which is where you would be creating the wcs character. Its also the area of the code where you run the humanoid damage stuff etc.

1 Like

Thank you, I could vaguely understand that from the api, but it also seems to handle damage being added or multiplied depending on status effects. I was wondering if the status effects are automatically applied to damage calculations or if i have to manually add them

i donā€™t know if itā€™s pretty straightforward but you have to store your moves, statusEffects and movesets inside modules in replicated storage. that way wcs can replicate them

status effects can change the damage being taken by the character, for example
i can show how to make a simple status effect that increases the original damage by 10%

local Weakness = WCS.RegisterStatusEffect("Weakness")

function Weakness:HandleDamage(original, modified)
        return modified + original * 0.1
end

return Weakness

that way, when this status gets applied all incomming damage will be increased by 10%.
the only thing is missing is that you canā€™t configure the order in which wcs will iterate your effects,
thatā€™s comming next version.

hereā€™s how internal implementation looks if youā€™re interested.

2 Likes

Within a status effect. after setting the humanoid data is there a way to cancel that out? I tried clearhumanoiddata. it doesnt seem to work or does clearhumanoiddata do something else?