JCivED - a toolbox for Civilization

A neat thing about jcived is that it pulls its graphics directly from the game files rather than keeping its own copy. This was a nice surprise when I opened up a save :)

It does rather highlight my fudge for the hills and mountains. Basically the SNES only has a subset of mountain/hill connection types and will not generate maps with them clustered together in unusual configurations. To fill this gap I would actually need to have some artistic talent and draw new tiles, so for now they just look a bit odd in places.
1706174549003.png
 
A suggestion for a future jcived patch :) can we force the irrigation graphics to be the top layer like other improvements?
I am looking at it, and not going to be easy at first glance...

Rendering squares is a big routine, with chunks of code doing each part (terrain, improvements, rivers, coasts, special resources, ...), and switching parts or switching the order in which parts are processed in assembly, with jumps and the like, is kind of tricky...

The major issue is that I would need to introduce additional assembly JUMPS where there were none before, so as to hijack the execution flow, but sadly adding new code would need more room for the code, which always a big problem when hacking assembly.
One way to make room for new code could be to modify existing code with shorter instructions sometimes removing useless code (which has some occurences), but still needs in-depth analysis.

Will keep you posted when I can progress on this.
 
@darkpanda I have a problem with Importing/Exporting the PIC/GIF images in JCivED.

Steps to reproduce:
- Import the original PIC image in JCivED (for example SP257.PIC),
- Export the image as GIF,
- Close the JCivED,
- Import the GIF file in JCivED,
- Export the imported GIF image as PIC file (file is double in size that the original one, 32.8KB vs. 12.5KB).

The result is the apparent problem with the palette/transparency of the PIC image, as shown below:
Screenshot_20240728_172648.png
 
Looking at my notes from when I did the SNES tileset, there is an extra step I took to get it working.

After converting the edited GIF to a PIC, I then imported the palette from the original PIC file I wanted to replace, choosing the 'substitute palette colours' option. I could then save the new PIC over the old one.

EDIT - although I am wondering now if I actually used any transparency at all. I think all the SNES tiles might have been opaque.
 
Last edited:
Looking at my notes from when I did the SNES tileset, there is an extra step I took to get it working.

After converting the edited GIF to a PIC, I then imported the palette from the original PIC file I wanted to replace, choosing the 'substitute palette colours' option. I could then save the new PIC over the old one.

EDIT - although I am wondering now if I actually used any transparency at all. I think all the SNES tiles might have been opaque.
That’s what I did too, choosing the “substitute palette colours” option, and I do use transparency in my tiles.
 
Looking at my notes from when I did the SNES tileset, there is an extra step I took to get it working.

After converting the edited GIF to a PIC, I then imported the palette from the original PIC file I wanted to replace, choosing the 'substitute palette colours' option. I could then save the new PIC over the old one.

EDIT - although I am wondering now if I actually used any transparency at all. I think all the SNES tiles might have been opaque.
@Lord_Hill and @Vaximillian, your proposed solution works, but file size is still 32.8KB vs. 12.5KB
Don't get it why palette needs to be reloaded from file... Also the file size is larger.
In my compress <-> decompress image tests for OpenCiv1 project I got almost, if not exact, same file as the original PIC file.

So I don't get why there is such a difference. Even if the palette colors are of different bit depths, the color indexes should be the same between PIC to GIF to PIC conversion :crazyeye:

Btw. GIF format is proprietary to this day, but the PNG format is created as a free replacement to GIF and it works the same if not better.
 
Last edited:
To be fair, graphics import/export is one of the oldest features of jcived and one of the least used and tested. I think its remarkable that such mods are possible at all to be honest, DOS games tend not to be modder friendly!
 
To be fair, graphics import/export is one of the oldest features of jcived and one of the least used and tested. I think its remarkable that such mods are possible at all to be honest, DOS games tend not to be modder friendly!
Yes, I agree that it's remarkable that this modding tool even exists. I know that @darkpanda spent countless hours programming it. Just as I spent working on OpenCiv1.
But we can always make it better and simpler with time :)
 
Yes, I agree that it's remarkable that this modding tool even exists. I know that @darkpanda spent countless hours programming it. Just as I spent working on OpenCiv1.
But we can always make it better and simpler with time :)
It is likely I still had non-blocking discrepancies for PIC compression, that I did not resolve because my focus was on SVE / MAP.
I might take a look over the course of august.
 
It is likely I still had non-blocking discrepancies for PIC compression, that I did not resolve because my focus was on SVE / MAP.
I might take a look over the course of august.

Just to remind you I have nailed PIC format and compression almost to a byte in OpenCiv1 ;)

Specifically Compression and GBitmap.cs for palette / image compression code and PIC format.

Even I could provide the conversion, but in .NET Core 8 GDI code is obsolete (that supported indexed color images) and there is no way to write indexed color images directly anymore.
I have done a quick search for a library, but to no avail, almost nobody supports indexed color images anymore.
I guess I would have to write my own code/Library, for example, for PNG format.
 
Last edited:
What I would really like to do is a big graphics modding tutorial covering all the stuff I've learned doing civdos, civwin and civnet tilesets. I've tried to write stuff down but its all scattered in different posts.

@rahorvat if you've got a pic to png converter binary, I'd be happy to try it out. More options for this sort of thing are always better
 
What I would really like to do is a big graphics modding tutorial covering all the stuff I've learned doing civdos, civwin and civnet tilesets. I've tried to write stuff down but its all scattered in different posts.

@rahorvat if you've got a pic to png converter binary, I'd be happy to try it out. More options for this sort of thing are always better
Look at my last post. I updated the answer ;)
 
Excellent. Good luck with your modding.

Just for completeness, jcived does allow direct modification of the palette. I did this for my snes tileset, but it's hard. Lots of colours are hard coded for things like the menus but I managed to change 3 or 4 to get the look i was going for.

I wouldn't attempt this if you're unfamiliar with indexed palettes. Its very easy to mess it up.
 
Excellent. Good luck with your modding.

Just for completeness, jcived does allow direct modification of the palette. I did this for my snes tileset, but it's hard. Lots of colours are hard coded for things like the menus but I managed to change 3 or 4 to get the look i was going for.

I wouldn't attempt this if you're unfamiliar with indexed palettes. Its very easy to mess it up.
Thank you for correcting me about palette modding. Didn't know that JCivED can do event that. I corrected my previous answer.

But as I stated before I wouldn't recommend it, a lot of code is intertwined with palette internally in code...
 
Top Bottom