JCivED - a toolbox for Civilization

You are right! Sorry for bothering you then.
 
Messing around with CivNet sav VS CivWin sav, there doesn't seem to be a huge amount between them.

As per this post, CivWin SAV has an initial byte followed by FE FF as some kind of signature.

So the only differences between SAV format (CivWin) and SVE/MAP format (CivDOS), are:
  • SAV is RLE compressed while SVE is flat and MAP is a PIC image
  • SAV contains both game data and map data in 1 file, while in DOS data is split between SVE and MAP
  • Leader names, civ names, nationalities and city names are all 32 chars in SAV, while in SVE they range from 11 to 14, depending on version too
  • SAV has 2 mysterious initial bytes (version ?) set to FE FF (-2 short little endian)

CivNet has a 10 byte header which reads in ASCII as 'CIVNET!' followed by three zeros, then the initial byte then a different signature, F5 FF.

Curiously, I was able to 'convert' a CivNet save by removing the 10 byte header, opening it as a CivWin save (which worked somehow) then resaving it in JCivEd as a CivWin save. I tried this with a second save and JCivEd locked up, so presumably it's a case of very close but not quite the same! I did not attempt to actually play with this save, so there may well be other problems. But it's a start.

EDIT - I'm thinking I must have mixed saves up with all the juggling and hex editing, as I can't make that happen again, no matter what I change (and I managed to lose the one that worked in the process). Oh well, I'll keep looking at it
 
Last edited:
The more I look at this, the more I think I just got mixed up. CivNet saves are as a rule around twice as big as CivWin savs and the plain text city names are in a completely different position in the file. So no, not as easy as messing with the header!

EDIT: here are my comparison saves if anyone is curious, both 4000BC on World map with 3 civs, Romans / French / Babylonians. This was a pain to roll on CivNet because the colour/civ restriction has been lifted. Any Civ can be any colour and its randomized. When you load a save you can select any slot you want and even change the Civ using that slot (the AI Civs will always default back to the original choice though, only the human Civ can be changed this way).
 

Attachments

  • CNETvsCWINSav.zip
    13.4 KB · Views: 6
Last edited:
Nice one @darkpanda always great seeing this tool continuing to add features. Quick, everyone check the MPS back catalogue and see what else is using PIC files! :-D
 
Thanks for the update.
I have a problem, the color palette is not displayed correctly in any image.

 
Thanks for the update.
I have a problem, the color palette is not displayed correctly in any image.


Can you double-check that you have used version 0.0.23a ?

Just in case, note that the patch inside the ZIP is in the companion dd-commons.jar library, so maybe when unzipping, this was not properly overwritten ...

I've just double-checked and don't seem to have any problem with it:

nop.png
 
Ok, I found the error.
I was opening image files previously modified by me and that's why it didn't show the color palette properly.

Sorry for the confusion.
 
More fun with CivNet saves. Byte at offset 0x10 is the player civ. If you force player 00, it defaults back to player 01 which is the Romans. If you force it to be a Civ that isn't in the game, the game will load and fly through all the years until retirement.

Curiously if you set the player to 08, you get Custom tribe named 'Barbarian', and if you try to start the game like this, it wants a password because that colour is 'protected'. I wonder if that password is plain text in the EXE somewhere... would be nice to have some multiplayer Barbarian action.
1687275261181.png
1687275333996.png
 
More fun with CivNet saves. Byte at offset 0x10 is the player civ. If you force player 00, it defaults back to player 01 which is the Romans. If you force it to be a Civ that isn't in the game, the game will load and fly through all the years until retirement.

Curiously if you set the player to 08, you get Custom tribe named 'Barbarian', and if you try to start the game like this, it wants a password because that colour is 'protected'. I wonder if that password is plain text in the EXE somewhere... would be nice to have some multiplayer Barbarian action.
View attachment 665222View attachment 665224
Oh man you do the coolest stuff haha. I of course did that whole thing with playing and winning as the Barbarians in CivDOS and CivWIN a while back but back then I didn't even bother trying to figure out how on earth to do it with CivNET. Interesting that the usual setting player slot to 00 didn't do it and they've moved it to an 8th slot seemingly.
 
Last edited:
I'm now suspecting that's a red herring, I think it's just reading text out of range and one of the words it reads is 'Barbarians', if you set it to higher numbers you get random city names in the text box instead. It probably is 00 = barbarians but they've put code in to stop people doing that hack, which is a shame.

Also, I never noticed CivNet's custom tribe option lets you customise the look of your leader, I'd literally never clicked that option before now :lol:
 
I have a request if you feel like it and can do it. I would like to be able to extract and re-compress the music midis of the civilizations hinmos with the intention of editing or changing them. Could you do something?
 
I have a request if you feel like it and can do it. I would like to be able to extract and re-compress the music midis of the civilizations hinmos with the intention of editing or changing them. Could you do something?

Hi there,

It's one the difficult challenge I have been working on, but sound code is really not easy to reverse engineer, especially for old games like this.

I remember finding some interesting data in the additional General MIDI patch released for CIV (GSOUND.CVL), but since I am not very familiar with MIDI, there is still work before being able to export/import as MIDI files.

So, sadly I advise you to not expect this feature very soon.
 
DOS games will often interface with sound cards directly rather than playing back files, which makes it really tough to change things. Your best bet is to hope @rahorvat 's decompilation reaches a point where enhancements are possible (or play the windows port, you can switch out low quality wav files to your heart's content 😉 )
 
Funny you guys should mention this as while I've got high quality wav and mp3 versions of the Civ1 dos midi soundtrack I don't have the original extracted/converted midi files themselves. I spent an hour or more the other day trying to find them in google searches and just had very little friggin luck (also some old threads on this forum where people asked and had no luck too). The best I could do was the amiga version midi soundtrack which is cool but not as good, and a midi extraction from the pc version that sounds terrible but according to the info in the readme and comments section of the site I got it from does work properly with some plugin but I don't use winamp anymore and would just like regular midis that don't need special plugins.
 
If you just want to listen to the tracks there's this. Maybe reverse engineering this dedicated application is easier than trying to prize the details out of civ itself?

 
Top Bottom