The easiest way to start is to take an existing flag and change it with a graphic editor which is able to keep the same palette, like Photoshop or Aseprite (or GIMP if you know what you're doing).
I wonder, which palletes should be used for editing the pngs for OXCE in GIMP? I have seen a link to github directory with several palette files, and it's not clear which one to use for the following use cases:
- ammunition items (for the soldier equipment screen; I assume the same sprite is reused for Ufopaedia)
- base facilities
I also wonder, if it is possible to use large facility images for 2x2 facilities, or the sprite needs to be split in 4 (consecutively numbered in image ref index, presumably).
Finally, I would like to learn, which option should be used for saving PNG in GIMP. I'm getting the error noted by original poster, that "OpenXcom only supports 8bit images" when using "8bpc RGB". Other options are "8bpc GRAY", "8bpc RGBA", "8bpc GRAYA", "16bpc RGB", "16bpc RGBA", "16bpc GRAY", "16bpc GRAYA". My guess that neither of those are the case, and a special paletted PNG mode should be utilized. Is this correct? Is this the only available option with the OXCE engine?
I'm also confused by the fact that I have seen the images with alpha channel in XCom Files, as base facilities. The Ruleset Reference mentions that only transparency index of zero is supported. Does it mean that alpha channel is indeed supported, but it's only 2-bit? Are the aforementioned images in XCom Files therefore universally supported by the engine, assuming they only have full-transparency in the alpha channel?
Does the use of images larger than 32x40 lead to a segfault? I'm getting some segfault, without meaningful log message to debug further, when trying to view the base with my larger 2x2 facility image. If that is the case, then this is a bug in the implementation, since a program shouldn't crash on the bad input. A graceful exit with an error message is an expected behaviour.
Since the original game used the large under-construction facility frames, what is the right offset reference to use for those? Is it 9? When I used it
without referencing the master (xcom1), only as 9, and not { mod: master, index: 9 }, I got the right result. Now, I'm confused, since my mod does not have an offset 9, and the numerical namespaces for graphics reference indexes are disjoint (that is, they are tagged with their respective disjoint namespaces). Why did this work at all:
- type: STR_LARGE_HANGAR
spriteShape: 9
spriteFacility: 100
and why did this not yield a reference error?
UPDATE
Apparently, GIMP tried to be too fool-proof by doing the right thing (= using indexed PNG mode whenever the image is already in the indexed mode) when "automatic pixelformat" option had been utilized at the time of export. Eek!