JCivED - a toolbox for Civilization

Would it be possible to make it possible to have a toggle to hide bonus resources and goody huts (both active and deactivated) when viewing a saved game?
These get in the way of making nice-looking map screenshots for one.
 
Hi DarkPanda, just did some nice JCivEd testing of the DOS to windows conversion. Started a game and founded a city in the DOS game and immediately saved as an SVE/MAP. JCivEd converted to a windows SAV, proceeded to do a rapid despotic chariot rush to clear out my continent in CivWin, converted back to DOS, and resumed my save successfully in CivDOS :D Will report back if I notice any anomalies after doing that.

One question I did have is whether there's a better way of converting between the two than just clicking File -> Save As, then manually typing in a name with a SAV or SVE extension? You sort of have to know that functionality is there to do that and it's a bit cumbersome. I don't mind because I've been following along with the dev anyway, but it might make the feature a bit more visible to have 'Save as Civilization for Windows SAV file' or 'Save as Civilization for DOS SVE' file options or maybe something in the dialogue box after you hit Save.

I love the Civ DOS EXE patches designed to speed up startup by the way, once I figured out that you make a copy of the GSOUND to replace NSOUND to get my general MIDI back, being able to skip startup options, credits and fade in saves so much time. Wonderful.
 
I spoke too soon, there is a thing. I've lost the names of units on the city screen having converted back to DOS. To do with the fact that CivWin does not store names in the SAV file but CivDOS does I guess? I have attached both the DOS and Windows saves to this post.

1658740554828.png
 

Attachments

  • saves.zip
    16.7 KB · Views: 9
I will add that I was able to finish the game in both DOS and Windows (the units are fully functional in DOS, just all the names are blank so you have to guess which one you want to build).

I had a crash after extended play time in the windows version, a bad interrupt error, but I'm 99% sure that's WineVDM. It's not as stable as a virtual machine, so best to save fairly often if you're using it (it only happened the one time after alot of play, so it's not like it really spoils anything, just something to be aware of). Windows version also has an annoying bug which I think I mentioned before where the copy protection question comes up every time you hit a 1000 year milestone after resuming a save, it doesn't seem to remember that I've already answered it previously. None of these things are relevant to JCivEd or save conversion. Just thought I'd share my experiences of the windows version whilst I was using it :)

EDIT - it's definitely reading the names from CIVDATA0.RSC, extracting it using Honza's tools there's a chunk of text named 'People' which has all the unit names in it. Modifying a name (you can do this in a text editor without even needing to decompress and recompress, although I haven't tested that for longer than a few seconds!) and resuming any existing save uses the custom name in that save. Bit of a pain to support though as CivDOS allows name changes to be save specific whereas in CivWin, they appear to be global based on whatevere is in that file. Not to mention that changing a unit name to something longer than the original will almost certainly screw up all the offsets in the resource file.
 
Last edited:
Whilst I was messing around with Honza's tools, I made a little tweak to the DOS tileset just as a proof of concept to show they work. It makes the city background a very light grey so you can see the city size very easily. I actually think the grey is too light now and it looks a bit silly, so I wouldn't want to release it as an official mod, but just in case that was annoying anyone, I'll attach it here.

Next I'm going to try and rearrange the colours to get the DOS Civ colours back, I wonder if there's a palette limitation which forced Honza to keep the different Windows colours. Guess I'll find out.

Warning - has been tested for all of about 30 seconds, back up your saves if you try this! :)
 

Attachments

  • dostileset_lightercity.zip
    73.6 KB · Views: 9
And here's a version where I attempted to correct the city colours to the DOS colours without touching Honza's existing palette. I had to make one palette change, the orange formerly used for Romans is now the pink of England. I do not believe this orange is used anywhere else, but look out for random pinks showing up. Again, very lightly tested, I'm just having fun with the tools!

EDIT - the yellow Egyptians needs a green outline and also is a little on the light side, cyan Chinese is also a little too light. Maybe there's a better palette choice for those two.

EDIT 2 - tweaked the Egyptians and the Chinese to get them a bit closer, also shifted all the units one pixel to the left so the right hand border doesn't get chopped off!
 

Attachments

  • dostileset_correctcivcolours_v2.zip
    73.5 KB · Views: 11
Last edited:
One question I did have is whether there's a better way of converting between the two than just clicking File -> Save As, then manually typing in a name with a SAV or SVE extension? You sort of have to know that functionality is there to do that and it's a bit cumbersome. I don't mind because I've been following along with the dev anyway, but it might make the feature a bit more visible to have 'Save as Civilization for Windows SAV file' or 'Save as Civilization for DOS SVE' file options or maybe something in the dialogue box after you hit Save.
I'm looking into it, and I initially didn't go that way because it would be breaking my model - which is to say my model is not good if it has to be broken to make this kind of stuff easier :)

If you're interested, and to put it simply: to build JCivEd I designed a kind of generic "editor application" framework, which can handle opening/saving files, menu actions, and multiple windows in a generic way (it can be applied to any domain).

However the "save" action being abstract in the model, the actual "save" implementation is delegated to the Object being edited (i.e. the object knows how to save itself, given a file). In our case, the Objects are "SaveGame"s. So taken like that there's no room to have "Save as DOS" and "Save as Win" for the same object. I need to rework this part, in a smart way if possible....
 
I'm not sure CivWin is worth breaking the model for :) the player base is limited to those who know it exists, and are happy to wrestle with VMs, wrappers or a dusty old XP PC, we can handle a bit of work to convert our saves!
 
Whilst I was messing around with Honza's tools, I made a little tweak to the DOS tileset just as a proof of concept to show they work. It makes the city background a very light grey so you can see the city size very easily. I actually think the grey is too light now and it looks a bit silly, so I wouldn't want to release it as an official mod, but just in case that was annoying anyone, I'll attach it here.

Next I'm going to try and rearrange the colours to get the DOS Civ colours back, I wonder if there's a palette limitation which forced Honza to keep the different Windows colours. Guess I'll find out.

Warning - has been tested for all of about 30 seconds, back up your saves if you try this! :)
And here's a version where I attempted to correct the city colours to the DOS colours without touching Honza's existing palette. I had to make one palette change, the orange formerly used for Romans is now the pink of England. I do not believe this orange is used anywhere else, but look out for random pinks showing up. Again, very lightly tested, I'm just having fun with the tools!

EDIT - the yellow Egyptians needs a green outline and also is a little on the light side, cyan Chinese is also a little too light. Maybe there's a better palette choice for those two.

EDIT 2 - tweaked the Egyptians and the Chinese to get them a bit closer, also shifted all the units one pixel to the left so the right hand border doesn't get chopped off!
This is brilliant! Well done on figuring out all his stuff! Although you should probably put this stuff in Honzas thread mate as people aren't going to look in the jcived thread for fixes to Honzas stuff:
https://forums.civfanatics.com/threads/dos-tileset-for-civwin.268133/

.
 
Last edited:
It ended up going far better than I anticipated to the point where I'm happy for it to have a bit more visibility. The only bug I noticed in the latest attached version is that Barbarians are using the transparent colour for their border. probably hidden before by the fact that the right hand border was cut off due to the positioning of the sprites. I'll post a version with that sorted into Honza's thread.

And another fun fact, I thought I had a bug with the top of the legion sprite. Turns out it's one pixel taller than the next tallest set of units (caravan/chariot and a few others) and that pixel gets cut off in the DOS version as well! So I'll leave that for authenticity.

EDIT - the latest version of this mod of a mod can be found here
 
Last edited:
JCivEd v0.0.21a just released !

Release notes:
Code:
	GameSave editor:
		Split "Save as" in two separate menu items for DOS and Win versions
		bug fix: Loading a Win SAV file will auto-populate unit type names using English defaults (previously left blank)
		bug fix: #7 Added checkboxes to hide/show special resources and huts -  https://sourceforge.net/p/jcived/tickets/7/
	CIV.EXE modding:
		Some patches to tinker with strings for rhaul's spanish translation
		Added a patch to modify default audio/video setup when skipping config screen
		Fixed starting positions patch to display current data from EXE rather than default patch values
		Added a patch to fix the "Arctic anomaly" bug (why wasn't it done before ??? XD)
		Added a patch to disable special color processing for white and gray Civs


Have fun !
 
Thanks for your continued work on this editor after all these years, I don't think I'd still be playing Civ 30 years later without the customization that JCivEd allows.
 
A small thing I noticed, is it possible when converting a save from one type to another, to have the default file extension change as appropriate? If I have a DOS SVE file, and I click 'Save as civilization for windows file', the default name in the box is still 'civil0.SVE' (or whatever it's called), but it would make more sense if the extension were changed and the suggested name was 'civil0.SAV'. Same when going the other way from Windows to DOS.

Nice work sorting out the blank unit names. Strange choice from the CivWin devs to reuse the existing save format but strip out the names.
 
A small thing I noticed, is it possible when converting a save from one type to another, to have the default file extension change as appropriate? If I have a DOS SVE file, and I click 'Save as civilization for windows file', the default name in the box is still 'civil0.SVE' (or whatever it's called), but it would make more sense if the extension were changed and the suggested name was 'civil0.SAV'. Same when going the other way from Windows to DOS.

Ok I did it, but will only release it with next version, I won't re-release right now just for this if you don't mind :)
 
Oh yeah, definitely not worth a release, that's for sure. Also thanks for the mention in the about box, that was a pleasant surprise :) I must get round to making a full scenario with JCivEd one of these days instead of just tweaking my own maps.
 
@darkpanda

Unfortunately, this mod works badly for me
Editing 1 tile actually edits 9
Land clearing creates a multiple (9x) graphic bug or creates 9 fish.
Besides, it is not possible to remove or insert new fish or new homes.
Save civdos 475.1, win7
one minute vid with this

I want to create my own map Game of Thrones and I need to place houses in the right places and mark what the player will get each time (build city / tech or money) and set how a any civilization should behave (aggressive / technological / expansive) but more important to be able to build the area.
 
Last edited:
Top Bottom