Im making a game like Bee Swarm Simulator, and this is the first time of me going into this organization/storing side of scripting.
I wanted some ideas/solutions of how i could store such Tokens, and make it easy to potentially make it so in the future i could add Tokens, that would have special functionalities.
I’ve thought about putting all the Tokens and what they do inside a Module like a Database which is not bad but what is stored inside it is what im most confused about.
Going back to the idea of special functionalities, how would i store such functionalities, and their functions?
Do i just check if the token is “Special” and then execute their “Special” code or do i put it in a separate table of said Token Database with the “Special” Token’s Function?
I thought about using _G but i think i will only be using this Token Database from one module.
How i would store these Tokens would be something like this:
Each Token would also have different Types, so i could identify which Token does what easier.
I don’t know if this is the most efficient for performance/organization, so im very confused on what i could do to store things like this.
Thanks for your time.