Puppeteer
Emperor
https://github.com/myjimnelson/read-civ-data - A collection of cross-platform C# (.NET Standard 2.0) libraries to read Civ3 SAV & BIQ files (at a very low level so far) and to convert Civ3 PCX and FLC files...to I'm not sure what yet, but maybe Godot or Unity assets.
TL;DR: What's this for? What does it do? Meh, I just made a thing and wanted to share in case anyone finds it useful. Not yet sure what it's for, and it's not in a form usable by a non-programmer yet.
New year, and new tech project inspirations. This one is really just a collection of functions with no coherent end goal for the moment. MIT-licensed but also using Apache-2.0-licensed dll dependencies for decompression and image support.
I've been playing around with reading the save file format for a while now with c3sat/cia3 and briefly toyed around with some civ-like game mock-ups with otda3. I've used Python, C# very briefly, JavaScript, and a lot of Go, with some poking at Godot game engine and its Python-like GDScript.
Well, now I'm playing more with C#. I gravitated to the other languages because they excel where I usually do my thing: system management, devops support, and web utilities. But an actual device app (pc/phone/etc) would usually make a lot more sense in C#, and others have made Civ3 utilities with C#, so maybe others might actually find these libraries useful.
The SAV/BIQ reader is basically a reimplementation of the core of my c3sat/cia3 save-file-reader Go programs. At this point it would be trivial but time-consuming to reach feature parity with the data I've extracted using c3sat/cia3, so I'm probably not doing that until I have a good destination format and use for the data.
The PCX reader is working fine but isn't in a really useful form yet. I have a test function that reads a hard-coded file location and saves the PCX as 'out.png'. An array of transparent palette entries can be passed to the real function for, well, transparency. I think my eventual hope here is to have this create Unity and/or Godot tile sets from Civ3 files.
The FLC reader does pretty well but needs some work as I don't have any Civ3-specific decoding yet. I got something pretty good then realized the colors are off–not just the civ colors–and I don't seem to be reading all the frames yet. I'm getting 80 for units, and I think there are 88, and the very first key frame seems to be wrong or blank. Again I have just a test function that saves each frame as a png, but I think I want to make Unity or Godot animated sprites from the FLCs.
Not that I've ever used Unity. I did toy with Godot a bit, but I am by no means proficient.
Attached is a FLC frame of a running warrior with transparency and transparent shadows working. The lime green stand-in civ color is expected, but I don't recall the warrior's skin being purple?
TL;DR: What's this for? What does it do? Meh, I just made a thing and wanted to share in case anyone finds it useful. Not yet sure what it's for, and it's not in a form usable by a non-programmer yet.
New year, and new tech project inspirations. This one is really just a collection of functions with no coherent end goal for the moment. MIT-licensed but also using Apache-2.0-licensed dll dependencies for decompression and image support.
I've been playing around with reading the save file format for a while now with c3sat/cia3 and briefly toyed around with some civ-like game mock-ups with otda3. I've used Python, C# very briefly, JavaScript, and a lot of Go, with some poking at Godot game engine and its Python-like GDScript.
Well, now I'm playing more with C#. I gravitated to the other languages because they excel where I usually do my thing: system management, devops support, and web utilities. But an actual device app (pc/phone/etc) would usually make a lot more sense in C#, and others have made Civ3 utilities with C#, so maybe others might actually find these libraries useful.
The SAV/BIQ reader is basically a reimplementation of the core of my c3sat/cia3 save-file-reader Go programs. At this point it would be trivial but time-consuming to reach feature parity with the data I've extracted using c3sat/cia3, so I'm probably not doing that until I have a good destination format and use for the data.
The PCX reader is working fine but isn't in a really useful form yet. I have a test function that reads a hard-coded file location and saves the PCX as 'out.png'. An array of transparent palette entries can be passed to the real function for, well, transparency. I think my eventual hope here is to have this create Unity and/or Godot tile sets from Civ3 files.
The FLC reader does pretty well but needs some work as I don't have any Civ3-specific decoding yet. I got something pretty good then realized the colors are off–not just the civ colors–and I don't seem to be reading all the frames yet. I'm getting 80 for units, and I think there are 88, and the very first key frame seems to be wrong or blank. Again I have just a test function that saves each frame as a png, but I think I want to make Unity or Godot animated sprites from the FLCs.
Not that I've ever used Unity. I did toy with Godot a bit, but I am by no means proficient.
Attached is a FLC frame of a running warrior with transparency and transparent shadows working. The lime green stand-in civ color is expected, but I don't recall the warrior's skin being purple?
Attachments
Last edited: