There are two systems for storing graphics in ASC. Each terraintype, vehicletype, objecttype and buildingtype can store the graphics it uses in its own files. That was the original system.
When we later did the transition from octagonal to hexagonal fields, we introduced the concept of graphic sets. Since we wanted to import maps from Battle Isle, but were not allowed to use the original Battle Isle graphics due to their copyright, we introduced the graphic sets. They contain replacement graphics that are similar to the Battle Isle graphics and are arranged exactly like the original ones from Bluebyte. Instead of having its own image, a terraintype may just have a reference to "Battle Isle image #354" for example.
This text discusses this system of graphic sets.
You should not create new graphic sets. If you want to contribute with graphics, create individual graphics. This document is just intended as a reference maintaining the current graphic sets. You don't need to read this article unless you are absolutely sure that you need to :->
Battle Isle has a set of 1674 graphics. Positions up to 1674 should only be used by graphics that are compatible with the original ones from Battle Isle, while later positions can be used without any restrictions. There is currently a upper limit of 4000 graphics.
MAKEGFX Graphic sets are stored in files having the suffix .gfx and can be created with the program MAKEGFX. The syntax of MAKEGFX is: MAKEGFX targetfile.gfx sourceimage1.pcx [...] The source images must be in PCX format and must either be 24 bit images or 8 bit images. MAKEGFX does not perform any color palette adaption, so 8 bit images must already have the ASC palette. In general, 24 bit images should be preferred because some future ASC version may run with 24 bit graphics. Since it is not possible to store transparency information in PCX images, the color 0xFEFEFE ( red : 254 , green : 254 , blue 254 ) will be treated as being transparent. This is just a quick hack and will be removed when the graphics engine of ASC will be rewritten.
But 8 bit images are required for buildings, since the owner of buildings affects a certain range of color indices: The colors 16 - 23 (red colortone) will be shifted depending on the player who owns the building. For the second player these colors will be shifted to 24 - 31 and so on. The color #255 is transparent. ASC does not perform any palette transformation for 8 bit images, so ensure that your images use the standard ASC palette.
MAKEGFX accepts wildcards as parameter: To build the standard graphics set, you can simply type: MAKEGFX asc.gfx graphics/terrain/actual/*.pcx.
The filenames of the source images must reflect the position which they should occupy: The image that should be used on position #354 must be called 354.PCX.
Each graphic set is identified by an ID that works just like the IDs used by vehicles, buildings and objects. GFX2PCX The purpose of this program is to generate an index image (called bi_graph.pcx) of pictures provided by a certain graphic set. It also lists for each picture the vehicles, buildings and objects that use this image.
Additionally it writes all these information to a text file (called itemname.txt) for easier searching.
Call GFX2PCX /? for a list of all program options.
Last change: Sat, 2004-05-29 15:09