Civ3 API ... ?

Ozymandias

In Terra Fantasia
Supporter
Joined
Nov 5, 2001
Messages
10,877
Location
The lone and level sands
OK, am decades beyond hands-on programming, but I nonetheless stumbled across THIS on Github. It's 4 years old, and is labelled, "civ3_api" - Anybody curious?

... Um, actually, search Github for "Civ3" and there are numerous entries.
 
Last edited:
ericlima's profile says Portugal.

I looked through the project. It's a Ruby on Rails API, but I can't tell what it's supposed to do. It relies on a database, though, and I haven't yet seen code to populate the database. I can't even be sure if it's about this game. Products? Items? Many of the files seem to be framework boilerplate, but there are some apis defined.

Ah, I just found the database schema. I don't understand Portugese (although I do Ruby). Do these words seem to apply to Civ3? Maybe kind of in my that-word-looks-a-bit-english-ey glance, but not really, and the presence of an email record makes me question the whole thing. assuntos, grupoassunto_id, responsavel_id, prazoqtd, prazotipo, departamentos, codigo, orgao_id, assunto_id?

The more I look at it, the more I doubt it's Civ3-related. Updated/created records, email record...doesn't seem to fit, and again I don't see (so far) any reference to a SAV or BIQ file.

However, what do you want from an API? My Civ3 Show-and-Tell thread and code base are kind of a long-term unfocused journey through my programming hobbies, but there are currently two operating executables that both implement an API to query/read save files, and recently BIQ files. I'm getting pretty good at querying map data, game settings, leader info, and very recently techs, all with properly referencing the BIQ.

Neither of my executable's goal is to actually write anything, but at this point it would be almost trivial to modify an uncompressed BIQ or SAV in-place or to write out a byte-modified SAV or BIQ. (I can decompress files but not compress them.) There isn't the knowhow or intelligence to, say, add units or cities, but silly things like turning all grasslands to bonus grasslands or turning all mountains into hills I expect would be trivial. Not that I've tried it, but I have no reason to doubt it would work.
 
It doesn't seem to be anything useful unfortunately. Like Puppeteer said, probably not even Civ3 related. It's mostly generated boilerplate code for database operations, and sounds like generic e-commerce.

I'm looking through the "Civ3" search results. Almost all are irrelevant or things we already know about. A couple of minor exceptions: this one is another BIC/SAV parser of some kind with some nice documentation of the BIC format (apparently no BIQ though). And this one is a neat little Civilopedia browser and map viewer(?) plus some scenario files which, and here's the fun part, draw out various elementary digital circuit diagrams using cities and units. :hmm:

Also, I didn't realize JimmyH had published his IndieCiv code. I'll just... save that for later....
 
Last edited:
JimmyH published his IndieCiv code? I didn't know that, either.

I'll defer to Puppeteer and WildWeazel on the Portuguese Ruby repo. But a couple comments on the other ones WildWeazel found:

- The BIC/SAV parser's documentation is a copy of this thread at Apolyton, which covers both BIX and BIQ files (BIQ files start with BICX, just to be confusing). Apolyton also has a BIC thread. It appears to be in C++, and I found a readme in one of the directories that I'm pretty sure is in Chinese. It probably hasn't been posted about here before, and I'm too tired to figure out how complete it is tonight. The last commit is 8 years ago today, so it looks pretty dormant. Still, if relatively complete, it could be useful.
- The Civilopedia browser has activity as recently as November of 2019, and its author also has a repository whose stated mission has to to with Civ6 saves (but has fewer commits than the Civ3 repo). The developer is based in Louisiana. I wonder if said developer is a member of or lurks on CFC? I'm going to have to try it out when I'm more energetic.

Good thought to search GitHub for Civ3!
 
Back
Top Bottom