Open carter-reynolds opened 2 years ago
This commit added player data saving functionality. exports to json currently. https://github.com/carter-reynolds/pyRPG/commit/9bdab5d1b5794b7e09711756a95a24e7999944d3
Still need to:
Save skill data
load both player and skill data via another function that takes the json files and essentially just updates the class.Skill and class.Player variables.
We need a way to save data whether that be by CSV, XML, some other solution I may not currently be aware of. CSV seems easiest to me with my current knowledge but there is likely a better way to go about it.
My thought was that data would only need to be saved during every
rest
orquit
or manualsave
actions. This file would only be referenced as well when the script starts to load saved data.Constantly referencing a CSV could get inefficient and messy but if we limit how much we rely on it, it may not really be a problem this early on and will work as a temporary solution.
Pandas makes it very easy to manage data to a CSV via dataframes. This was my initial thought.
The ideal solution would be something like a python built database of some type, if that exists.
Things that would need to be saved and loaded: