PNG automaps.... ooh wow (testers required) - by R Soul
R Soul on 31/3/2013 at 16:18
edit: PNG automap program needs testing. See (http://www.ttlg.com/forums/showthread.php?t=141187&p=2181310&viewfull=1#post2181310) hereSo, maps in NewDark can be in png format. Great! True colour! More variety! Search Google images for 'old paper' and if the aspect ratio is close, you can use it! Sod the copyright! Enough exclamation marks!
But there's a snag. LGS's automap tools (makerect and cutout) don't work with png files. They need to be palettized , with green and pink being in specific slots. So, you make your lovely png map, then draw on the pink rectangles and green areas, apply the map palette and run the tools. Easy so far. A couple of extra steps but no trouble.
Then the tedium begins. You can replace each cutout image with one that you've copied from the original, and saved in png format. The city from Stones and Glass Houses has 33 cutouts. Individually replacing them won't be fun. Anther issue is using green as the transparent colour. That only works for palettized images, which defeats the purpose of using png files. For png cutouts, you have to use transparency. For a couple of cutouts that's not a big problem, but for 33...
Fortunately there's a solution at hand. Yesterday I wrote a program that reads a png file and generates the cutouts in the same format. The workflow is as follows:
* Draw your map
* Draw pink boxes around each region
* Add an alpha channel if necessary and delete from areas within the boxes that should not be highlighted
(make use of layers/masks so you can easily edit things later on)
You still need to use the old tools to generate the .bin file for each page, so the following steps are needed:
* Flatten the image, and apply the T2 map palette (or reduce to any 256 colours and move pink to index 254, and don't worry about the transparent areas)
* Make sure pink is not incorrectly assigned to pixels that don't form the pink boxes. If it is, you can just paint over it with any colour.
* Run the automap tools on your region pages (p000ra, p000rb etc) to generate the bin file.
* Undo the palettizing and flattening.
* Apply the masks, merge layers etc so you have one layer with transparency.
* Save is p000ra.png, and p000rb.png etc for other regions.
* Run my png automap program, selecting those png files.
* Put the .bin file in your intrface\missXX folder, along with the .png files.
Where can you get my program? Well it needs to be tested before release, so if you want to test it, let me know...
LarryG on 31/3/2013 at 20:56
I don't have an automap need just now, otherwise I would. My automap for Finals had 25 pages and one of the pages had 64 separate cutouts (the max with 1.18), others had 33, 23, and so on. I wasn't planning on redoing it as png, and certainly not this year, but when I release the whole campaign, in a year or so, I just might, now that you have made it a bit easier. Thank you.
MysteryMan on 31/3/2013 at 22:49
Great info R Soul I have been working on an automap for over a week now. This info will help,thanks.
ZylonBane on 1/4/2013 at 21:13
Quote Posted by R Soul
Anther issue is using green as the transparent colour. That only works for palettized images, which defeats the purpose of using png files.
Umm, Dark recognizes no particular color as transparent. What it deems transparent is palette slot #0,
no matter what's in it.Unless, of course, automaps use a completely different transparency system than the rest of the game.
R Soul on 1/4/2013 at 22:48
You're right, but with a paletted map, I reckon most people would apply the palette exactly as they extracted it from one of the original maps. I see no reason for changing the colour, and 'green' reads better than 'palette slot 0'.
Nameless Voice on 3/4/2013 at 23:39
Then we need to come up with a more appealing name for it, like Pal-o.
LarryG on 4/4/2013 at 02:54
Nah, that sounds too much like a gelatin food used with tiny marshmallows in "salads."
What about:
Pal Naught
Pal Zed
The Stealth Color ...
Nameless Voice on 4/4/2013 at 08:57
Too long, it needs to be short and snappy, preferably one word.
Zontik on 4/4/2013 at 13:07
c0lor
LarryG on 4/4/2013 at 13:08
P0
Edit: pronounced "peanut"