- May 1, 2017
- 17
- 36
I would like to use a database of a large number of characters, similar to how HHS does with SQLite in their custom engine. This would allow the game to keep track of a large number of characters, compile stat averages, and do all kinds of interesting things with joins, selects etc.
The obvious thing to try is SQLite for Python, create a database for the entire application and tables for each new save and trying to avoid table collisions however I can. Sadly, that doesn't work since the tables are persistent through saves and rollbacks. This means if you change something and then reload or rollback, that change has still taken place, making saves and rollbacks meaningless.
Next up, I looked at the library Pandas. At first, it looks to be pretty much what I want, but it's not included in Ren'Py, and adding it for all three major OSes would be more work than seems reasonable. It is not just a simple .py file that could be added to the directory. Numpy, however, is included in Ren'Py, and has a lot of the desired functionality but does not support mixing data types in a single matrix, which I would need to do to save character data.
I could of course try to make my own data type to do everything I want, but that would be a lot of work, and probably quite inefficient by comparison. So, what would you guys recommend? Can any of the above solutions work if I do something differently, or maybe there is some other way of doing what I want done?
The obvious thing to try is SQLite for Python, create a database for the entire application and tables for each new save and trying to avoid table collisions however I can. Sadly, that doesn't work since the tables are persistent through saves and rollbacks. This means if you change something and then reload or rollback, that change has still taken place, making saves and rollbacks meaningless.
Next up, I looked at the library Pandas. At first, it looks to be pretty much what I want, but it's not included in Ren'Py, and adding it for all three major OSes would be more work than seems reasonable. It is not just a simple .py file that could be added to the directory. Numpy, however, is included in Ren'Py, and has a lot of the desired functionality but does not support mixing data types in a single matrix, which I would need to do to save character data.
I could of course try to make my own data type to do everything I want, but that would be a lot of work, and probably quite inefficient by comparison. So, what would you guys recommend? Can any of the above solutions work if I do something differently, or maybe there is some other way of doing what I want done?