-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[List Column Type] Support of Arrays? #5
Comments
To be completely honest, I have no real plans to add support for anything. I thought it would be fun to make this for a game project I was porting over, and then life took over, and that project is sitting there doing nothing. I like working on this though, so if you send me a small example of a CDB database that you would want to support, I can take a crack at it, although my timeline for completion isn't that great. Also this code is very purpose driven, and not that DRY. Maintenance of this code might be a problem without a refactor. |
Yeah, it needs some Arrays. The idea behind this plugin is that nothing would be parsed at runtime, so it should keep it nice and fast. That parsing you are doing, is wasting CPU cycles for no good reason (accept for me not using arrays in my project yet). When Defold went open source, I got distracted and spent too much time messing around with it. I'll turn my free-time gaze back to Godot soon. |
At least this parsing is only done one frame when a battle starts so it's not a big deal (it would be bad practice to read data from a database every frame anyway) but yeah arrays help a lot for this stuff |
Ok, so it looks like CastleDB supports Lists, but not Arrays. A List can contain any number of columns, so you end up with an Array of JSON blobs, and it could probably be nested farily deep in the tool, like a List of a List of a List. So this feature is really, a List. |
The support for list/arrays would be incredibly helpful as you can do some really crazy nested list setups that can help populate the game with needed data. Crafting recipes, leveled item lists, possible enemy spawn pools and pretty much anything. |
I've added lists to my fork of this repository. The way I see it, there are two ways of handling a list. For simplicity, I've only done the first option, but I think the 2nd option might be a cool idea.
For example: say we have a Sheet called Teams --> the Row is called TeamsRow. A column has the list type, and has the column name FriendlyTeams. This is an inner class under TeamsRow called TeamsRowFriendlyTeamsList. (I don't know if we need TeamsRow in front, just an example in case there's issues with another class in the project that could be called FriendlyTeamsList.) TeamsRow therefore has a variable TeamsRowFriendlyTeams that is an instance of the TeamsRowFriendlyTeamsList class. TeamsRowFriendlyTeamsList has its own members of the various types in CastleDB, including more lists. The nested list can just keep on if needed. |
Hi, I really like your tool and found it very useful for my game, it works nicely for the database of characters and stuff. The lack of array support however makes it hard to manage stuff such as the database of enemy parties that contains data of all the battles of the game, since each party would have an array indicating their members, weapons etc
Is it planned to add support for it ?
The text was updated successfully, but these errors were encountered: