• Civilization 7 has been announced. For more info please check the forum here .

JCivED - a toolbox for Civilization

@Blake00
Ok, now I see where the problem is.

It is not for editing an image of the civilization, in fact, I can both import and export the color palettes of any image of the civilization with the darkpanda program itself.
The problem is that the image file is from another game and that it displays and extracts it with the colors changed, so I can't extract the color palette correctly.

Hi rhaul,

In fact most of my efforts started from a program called PicViewer3 that was originally written for DrakLands by Joel "QuadKo" McIntyre. You can find it over there: http://www.darklands.net/files/files.shtml

Not sure what you can do with it, but I'm confident it can display Darklands files properly.

Adding Darklands PIC support to JCivEd could be possible, but I need some time to figure it out.
 
@darkpanda
Yes please, it would be a great contribution to the game, with it you could edit all existing images, you could even do a remake of the graphics of the game as it is done now with civilization.

The possibilities with image editing would be endless.
 
I also have the complete gallery of images of the game if you need it.

Anything else you need from the game just ask me and I will provide it to you.
 

Attachments

  • darkpanda.rar
    85 KB · Views: 18
My God, what a joy. I have been suffering with this for 2 weeks.
I have more utilities to view and even edit the images, but all of them do not have the correct colors.
 
In fact it is not as simple as it looks... The problem lies in DarkLands PIC files which contain palettes starting at index 16, while implicitely filling up colors 0 to 15 with standard DOS colors. In CIV PIC and PAL files, palettes always start at index 0, so I never had to manage non-zero palette index in JCivEd code.

This might be tricky to implement in JCivEd without breaking all existing Palette functionality.

Will keep you posted.
 
ok. thanks

Yes, in fact, all specific image viewing programs and image editors are not capable of displaying colors correctly in all images.
I don't know if it will help you but I found this in my quest to find the right color palette for my images.

"Okay, so the PIC format is one or two data chunks one after the other. If a PIC file has a palette, it will come first, and the chunk starts with 0x4D30. The pixel data chunk starts with 0x5830. So you should be able to grab the palette by finding the first instance of 0x5830 in the file and grabbing everything before it."
 
I'm good with file formats and palettes, the problem is elsewhere as I try to show you in this screenshot:

darklands_pics.png


So I need to figure out a way for JCivEd to automatically "pad" the first 16 colors when the palette from PIC file does not start at index 0, and make sure to prevent any damage or side effects on other parts of code that related to PIC and PAL (export/import palette, export GIFs, import images, etc.)
 
I have even more bad news, since those colors are not the same as the ones in the game.
In the programs that I have, it also shows the same colors as in the screenshot, but for example those purple stripes actually have another color.

NOTE: I attach a .bmp file of STARTSCR.PIC extracted by a program in case it helps you.

SCREENSHOT OF THE GAME
 

Attachments

  • STARTSCR 1.bmp
    63.6 KB · Views: 12
Last edited:
Ok, I'm going to give you some things I've found in case they might be useful (including a palette of .pal colors).
Hopefully something will help you.
 

Attachments

  • ARMBACK.PIC.rar
    493 bytes · Views: 15
  • gifs.zip
    139.6 KB · Views: 13
Out of nowhere, some suggestions for JCivED:
1) ability to edit slots of city specialists. This data is stored in SAV file, but there's no way to edit it in JCivED it seems?
2) ability to edit "space ship launched" flags. They are stored next to "space-enabled" flags.
 
Out of nowhere, some suggestions for JCivED:
1) ability to edit slots of city specialists. This data is stored in SAV file, but there's no way to edit it in JCivED it seems?
2) ability to edit "space ship launched" flags. They are stored next to "space-enabled" flags.

1) Indeed, I dived back into this data, and it's really intricated, and probably needs a special UI component and controller to be supported, reason wh I didn't do it before... I'll be looking at it.

2) You got it, done in next version
 
@darkpanda
It's a big step forward but not the exact colors, but it's taking shape.
The best thing is that thanks to this there are other games that can be compatible.
 
Last edited:
@darkpanda
It's a big step forward but not the exact colors, but it's taking shape.
The best thing is that thanks to this there are other games that can be compatible.

Beware: I did this with a hardcoded hack that checks whether the PIC palette "firstIndex" value is either 0 (CIV) or 16 (DarkLands). If other games make a more sophisticated use of this value, it will not work.

Also, as I stated, the "exact" colors that you see when playing the game may not be visible when simply editing PIC files.

It's the same for CIV: for example "coloured" units are not found in the PIC files, because their colors is set by the CIV code directly.

Also, PICs from introduction and world creation are animated by the code directly, using "palette rotation" logic, that cannot be edited in the PICs directly.

So, my take here is that what you get from PicViewer3 or what I did with JCivEd is the best yyou will ever get from a PIC editor program. I may be wrong :)
 
I've told you many times but I'll tell you again, you are the best.
I was actually able to edit the images but it wasn't easy or intuitive.

(Screenshots at the end of the file)

I'm really looking forward to try this new version, won't it be available for a long time? I will try other games as well.
 
Last edited:
I've told you many times but I'll tell you again, you are the best.
I was actually able to edit the images but it wasn't easy or intuitive.

(Screenshots at the end of the file)

I'm really looking forward to try this new version, won't it be available for a long time? I will try other games as well.

I'm willing to spend some time to add the "edit city specialist" asked by tupi, first... But if this becomes too difficult, I'll release the new version directly before spending time on specialists.
 
Sure, I just meant that I really wanted to try the new version, there is no hurry.
You could put screenshots to see exactly what tupi refers with the 2 points, that of the flag of the spaceship I don't know what it refers to or the specialists of the city.

Does it refer to when you can change the population by collectors, happiness (elvis) and scientists?
 
Top Bottom