So I’ve got this gamemode of sorts that I’ve been working on for the past day or two, and have since finished most of the clientside code:
After starting some of the serverside coding I ran into a few problems with modularity; sure I could hard code all of the spells and their effects into a single file, but that would be terrible to work with and would be no fun for anyone planning on modding or adding stuff into the gamemode.
I want to make a folder of spells that are individual lua files, read by the main script at the serverside Initialize. They’d have some base variables like icon, name, tooltip, spellID but would all contain their own code for the spells themselves.
I have no problem coding a base with smaller children files, but I’ve simply got no idea how to set it up to be read as I described. I’d also like to be able to call it from LocalPlayer in the client in such a way as this: LocalPlayer():RunSpell(spellID, target). It would be a bit like the SWEP system, I suppose.
Any help would be amazing!