Any interest in a database for techs?

Specifically geared toward MOD-making.

I've been working on an Access 2007 database for my mod work & thought I'd check with the community to see if other might be interested in it. It's not the most polished, but it does sport a large form that will link any given technology to the various "beniis" it grants (civilization abilities, planetary improvements, starbase modules, starship components and invasion tactics.) In that regard, I think it's kinda slick. :) I've built in some controls by which I can turn on & off various MODs and then generate the relevant XML files. I'm a bit annoyed with Access' output to text feature, as blank fields are not displayed in Access but show up in the text files (nothing that a decent text editor like TextPad - plug, plug - can't fix, but it still annoys me.)

I started it because I wanted to be able to more readily compare the changes in text strings between different releases and the editing I had undertaken. It then grew to support the addition of mod data and is still a work-in-progress. It differentiates between the different racial trees and links them into a "universal" (master) tree and seems to work pretty well, if not exactly blindingly fast.

Why Access? Because it's simple to use & it's bad enough that I'm coding a database for a game on a recreational level. I don't particularily feel the need to fire up my localhost, write MySQL and PHP code and then code out data dumps of the XML files. This has been difficult enough! Importing the XML data was problematic on a couple of accounts. First off, many of the files embed the entity ID as an attribute rather than a tag. Secondly, Access decided to be brain-dead and would only pick up the first few XML tags & ignore the rest, so I had to create a dummy entry that contained all the tags in use in that file. After that, it went reasonably well. I initially had each racial tech tree in its own table and used a union query to link them all together. I ditched that when I became nervous about Access' ability to deal with the cascading query sets I was building. So now they're all in one massive table. One of the benefits for me has been being able to create validating look-up fields, so that I get the correct spelling of a technology ID when linking a new component to it (for example.) I've also been able to fire up some queries to compare how many RPs each race requires to research an entire branch of military hardware (weapons & defense), as I'm working on a mod that will revamp that by introducing a lot more racially specific technologies into the tech trees & I want to make sure that I keep the balance as close to the stock game as possible.

If there's any interest in it, I'll post it out on the library as soon as I can. If there's no interest in it, so be it. I'll still be using it! :D

4,594 views 6 replies
Reply #1 Top

Looks like we've been working on coincidental 'tools'... as i was developping the GTeChnos utility over the last few months - i also "designed" some sort of XML parser routine to load all this data into the VBX code. I nearly went for an SQL process and was able to resist the usual Access databas'ing (old habits!) as it was my first instinctive choice.

But, then came along Galactopedia for TA by Netriak which took me off that personal project for good reasons.

 

Still working though - i'd be real curious to see what that DB does!

 

Reply #2 Top

Well, one cool thing is that the tech form will show all the related goodies that tech gives you. That's handy when I'm working on my mods & I'm nowhere near the game and don't feel like wading through the raw data files looking for stuff. Also, I'm currently got a couple queries that'll list the various weapons, defenses and engines, their technology research cost and then spit out "efficiencies": component value for research cost, component size for research cost and construction cost, how many will fit on a hull, etc. Useful for checking to see that there's no uber-powerful component in the list or that something that's pricey is actually worth it (sort of like upgrading to an Invention Complex - way too expensive to do that unless you're desperate for that extra couple of RPs; far better to get the Discover Spheres & upgrade into them.) I'm sure there's other things that could be done with it. I also like being able to add piles of new techs and such into the db & then have it spit out the correct XML files for me (aside from the blank line nonsense, which I'm guessing that the editors shipping with ToA will also take care of but I've not actually tested that. Maybe this weekend.) Being able to make sure that the various field have the correct values is great in avoiding typos or some such that might break the mod files: making sure the correct tech IDs are used, etc., keeping the spelling consistent, etc. Plus spell-checking is supported. Eventually I'd like to be able to figure out some way to pull in the various graphical images used for thumbnails and whatnot, so that you can see what you're getting. That'd require a fair amount of system work tho too, because I'd want the db to be able to reference custom resources and not just those in the stock files and I'd want it to be able to seek off the hard-drive instead of trying to cram those things into the db file. But, mainly, I do this because I'm a geek. I make databases and spreadsheets for almost all the games I play for any length of time. I had one for Fate that would help me figure out which magic items to use, depending on what sort of "focus" I was operating at (e.g., hunting for treasure, maximizing damage, etc.). Same thing with ToME. Sigh... Luckily my wife understands, even if she occasionally shakes her head at me. :D Gotta love a woman that not just lets her husband play games, but encourages him to do so and plays them herself. Plus she loves sci-fi, maybe even more than I do!

Reply #3 Top

Just out of curiosity...

Why the hell do you want to do it with ms access(deployment and awful vba and forms comes to mind) or any database, rather just coding a gui for the xmls with eg sharpdevelop or ms visualstudio express version, if you do not have any professional Visual Studio? 

Some time ago, I thought about taking ms sql express db as storage media for some GC2 tools

But I quickly swept this thought away since it is complicating things more than it will be useful, and you have to staticly import the data.

In your case you even have a sort of readonly scenario. In .net strongly typed datasets would be the keyword.

My solution came down to directly accessing the game xml files done by some classes, in a sense, a mini database engine doing updates, inserts and deletes via linq for tables defined in xml file and the big plus... the "database" is always up to date :)

 

 

 

 

Reply #4 Top

Weeelll... The live data sets are definitely a huge plus. I used Access cuz it's easy and it's more of a labor of love than production. Besides, a fair number of the users I support use it, so it's good for me to keep in the mix and know what they're up against. :) Another big issue is that I'm not a very talented programmer. I tend to plod along and get stuff done, but it takes me a while. The few shining moments of brilliant coding are mostly obscured by monotonous years of drudge-coding. Well, that's maybe a bit more prosaic than true, but gets the general sense of it.

But, since you bring it up, let me ask you this then: aside from being linked dynamically to the games data files, how would you envision the data structure for the MODs, to wit, the stuff that I'm making up. I don't want it to be jammed into the game per se. Would it be possible to point some of the data structure at the game's stock XMLs and other parts pointing at the mod folder(s) and yet accessible in a single entity in terms of being able compare values. I suppose I could code different tables for the different mods and union set them, but I'm nervous about union sets from my years with Access... :)

If you've some sample code that you'd be willing to share, I'd love to see it. I may be an old dog but I'm pretty sure I'm not beyond the point of learning new tricks. In fact, the more I think about it as I'm writing this, the more I'd like to delve into this idea/solution of yours. Portability would be a plus - I have a Clie UX-50 that I use all the time for writing stuff, entering data lists & spreadsheets, what-have-you, so being able to parse non-binary data would be a terrific boon for that!

Thanx! :)

Reply #5 Top

Well, I was talking about the core data engine of my new GalCiv2IDE II ^^

Currently it is split up into 2 .net assemblies, a data.dll containing the datasets, and a core.dll with the engine which detects installed GC2 types reads/writes data, does all the settings for the 3 versions...

It is working fine, but it is still under development since I'll probably implement entities.

Since you try to achieve a quite similar task, I'll think about sharing the source :)

Reply #6 Top

Quoting MrKorx, reply 5
Since you try to achieve a quite similar task, I'll think about sharing the source
End of MrKorx's quote

That would certainly be very generous of you and quite appreciated by me (as long as you're not expecting any sort of "miracle code" from me... like I said, programming seems to be my bane in the otherwise quite comfortable digital world.) And if not, that's fine too. I downloaded Visual Basic Express and been plinking around on it. Once I get a dribble of spare time, I'll see about pulling in the XMLs and what I can do with them. Wheee! :)