Hello! I’ve recently been active again in the development community, and I am trying to improve my skills as a scripter.
I am currently working on a little project trying to test my skills out but I am not sure which data storing method I should be using for this project.
Details about the project:
The player will be able to create his own military base and train up npcs to fight against hordes of enemies, so far I’ve got an idea of how the data for each individual npc could be stored, I cannot show right now because I am writing this this from my phone, but this is an example…
A folder will be placed inside the dedicated npc, for example a Private rank NPC, this npc will be doing push-ups in order to gain exp, furthermore a Sergeant rank NPC can be added to the equation to multiply the speed of which the Private is training at, in the folder inside the npcs I have added a variation of values,
- Level of the Npc
- Exp of the Npc
- Exp needed to lvl to the npc
- the Rank of the npc
I wanted to have a maximum of 30 privates npc slots per each player, I thought it would be a good idea to load all of the npcs into the game using tables, but unfortunately I’m stuck when it comes to loading each individual npc data and saving it whenever a player leaves the game. From my knowledge I have a slight idea of how I can combat this problem.
Can anyone give me a hand with this and suggest me a method of storing all of this data please?