Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to go about setting up a custom skill system?

Asked by 4 years ago
Edited 4 years ago

I am currently creating a magic-style game with skills and such (some that I've already finished coding), and I initially started coding them using Roblox tools, however for the last year or so I've been writing all my code in module scripts throughout my games since they're much more efficient and manageable.

Because of this I also want to have my skills remain as module scripts, and have the code within being called upon using bound actions with ContextActionService (I already have a module for this created).

My issue is that I cannot think of a good system to have where the player can select from a magic type, and then have all the skills within that magic branch be available to them. I tried to start tackling this by creating a Skill object module script using OOP, but I haven't made much progress. (This is because the skills will all share common properties, such as damage, cooldowns etcetera), and then I would create a method :Cast() that would call upon the code in its corresponding module script, but I don't know if this is a good system in the first place and I'm yet to get it working.

Any advice is much appreciated since it is my first time working with "Pseudo-tools" and not default ROBLOX tools. (I have created scripted skills in the past using local scripts but with module scripts, it's not as easy as just pasting it into the user's backpack since they require a main script to be run off of).

(You can think of this as games where you can, for example, pick the "Fire" magic and then your keybinds will be bound to fire skills)

Edit: Typos

0
i clearly don't know the difference between Requests and Concepts Luka_Gaming07 534 — 4y
0
i dont understand what you mean plagueus 44 — 4y
0
what exactly do you want help with? ModuleScripts have their place but you can't run a game on them, use some other scripting methods as well. Benbebop 1049 — 4y
0
Inheritance is an efficient move, and I think you should continue with using OOP to run theses skills. I suggest though, that you create a module script as a skill dictionary alone, with said inheritance, and avoid using module scripts to handle running the skills themselves. Ziffixture 6913 — 4y
1
OOP is overrated. programmerHere 371 — 4y

Answer this question