Register FAQ Search Today's Posts Mark Forums Read
Go Back   JazzJackrabbit Community Forums » Open Forums » JCS & Scripting

Customizing the tileset

proud2beamerican

JCF Member

Joined: Sep 2015

Posts: 75

proud2beamerican is doing well so far

Sep 30, 2015, 07:28 PM
proud2beamerican is offline
Reply With Quote
Customizing the tileset

Hey everyone! I'm new in here (to the JCS section). I just started playing a little bit in JCS and noticed that which ever tileset I will end up using there will be always something missing for my taste. But I don't really intend to build a tileset, hell I wouldn't have the slightest clue how to even start... I just want to be able to add few tiles to the existing tileset. What's the easiest way to do that?

I did some homework btw. and I read a lot. That each tileset uses 256-color palette, that there are Jazz colors that you shouldn't mess with, etc. I also found out that there is a wonderful program called Tileset extractor. Does this thing extracts also the proper palette of the tileset? How can I see that palette and how can I add something using the existing palette-colors of the tileset, place it in the tileset, and save it with the same palette as the tileset was using originally?
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,984

Violet CLM has disabled reputation

Sep 30, 2015, 08:46 PM
Violet CLM is offline
Reply With Quote
If I'm thinking of the same tileset extractor program, yes, it injects the palette into the image, so you should be able to see the palette while viewing the image with any half-decent image editor. The images will be in .png format, though, which JCS doesn't understand, so you'll need to convert them to .pcx or .bmp or something before recompiling.

What sorts of tiles are you looking to add, anyway? If you're looking at the official tilesets, they all(?) have various conversions and expansions that add all sorts of miscellaneous stuff.
__________________
proud2beamerican

JCF Member

Joined: Sep 2015

Posts: 75

proud2beamerican is doing well so far

Oct 6, 2015, 03:02 PM
proud2beamerican is offline
Reply With Quote
The problem is always the same: I get the blue color instead of the transparency each time I convert those PNGs (from tileset extractor) into BMP and then compile a tileset... Is there any solution to that?


I'm interested in many tilesets, but mostly in the original Castle and Tubelectric.
Treylina Treylina's Avatar

JCF Member

Joined: Sep 2009

Posts: 1,046

Treylina is a forum legendTreylina is a forum legendTreylina is a forum legend

Oct 6, 2015, 03:38 PM
Treylina is offline
Reply With Quote
Use pure black for the transparent tileset background, not JCS purple.

Tileset extractor uses the wrong transparent background color for tilesets.
__________________


Jazz Jackrabbit group: https://discord.gg/vZm95tQ
proud2beamerican

JCF Member

Joined: Sep 2015

Posts: 75

proud2beamerican is doing well so far

Oct 7, 2015, 09:07 AM
proud2beamerican is offline
Reply With Quote
Quote:
Originally Posted by Treylina View Post
Use pure black for the transparent tileset background, not JCS purple.
Thx! It worked, although the fact that you have to perform this task in order to have a workable tileset is a little bit disappointing.

Quote:
Originally Posted by Treylina View Post
Tileset extractor uses the wrong transparent background color for tilesets.
That would be, IMHO, a must fix for an author of the tileset extractor.

In my dreams I had a tileset extractor that extracts bmp files with correct transparent blue so you can, for example, open the mask bmp file, fix an issue in the simplest graphical editor, save it, run JCS, compile the tileset. Ahhh... Wouldn't that be beautiful?
Seren Seren's Avatar

JCF Member

Joined: Feb 2010

Posts: 864

Seren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to all

Oct 7, 2015, 10:50 AM
Seren is offline
Reply With Quote
Bytes 0xD851-0xD853 of tileset.exe are responsible for storing the transparency color so you can modify those to 0x000000 in order to get black backgrounds by default. This won't help much with your mask problem because now both transparent and opaque pixels will be represented by black, but hey, you can always have another copy of tileset.exe that sets transparency to white (0xFFFFFF) instead and then invert colors in your "simplest graphical editor". You can also invest some time in a search for a more complex graphical editor. Each option should be faster than waiting for a return of Neobeo, whose last activity was in January 2014.
Treylina Treylina's Avatar

JCF Member

Joined: Sep 2009

Posts: 1,046

Treylina is a forum legendTreylina is a forum legendTreylina is a forum legend

Oct 7, 2015, 11:21 AM
Treylina is offline
Reply With Quote
The easiest/quickest way to turn the JCS purple background into pure black is that I just edit the existing pallette value to pure black on GraphicsGale (the free version should do it's job just fine, the commericial version only allows ICO and GIF access which you don't need). That means you don't need to use flood fill at all, and won't have the possibility of accidently leaving an area non-transparent. The image is palettised (the colours are assigned to the pallette board, which goes up to 255. BMPs/GIFs are always palettised, and PNGs - not if you set them to 24 bit colour mode), allowing me to do that.

However, when I'm making/editing a tileset, I never use pure black for the transparent background, because it makes outlines much harder to see.
__________________


Jazz Jackrabbit group: https://discord.gg/vZm95tQ
proud2beamerican

JCF Member

Joined: Sep 2015

Posts: 75

proud2beamerican is doing well so far

Oct 11, 2015, 06:23 PM
proud2beamerican is offline
Reply With Quote
Quote:
Originally Posted by Sir Ementaler View Post
Bytes 0xD851-0xD853 of tileset.exe are responsible for storing the transparency color so you can modify those to 0x000000 in order to get black backgrounds by default.
Wait, black is only one of 2 transparency colors in JCS, right? Wouldn't be easier to change that wrong blue color into correct transparent one?
Seren Seren's Avatar

JCF Member

Joined: Feb 2010

Posts: 864

Seren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to all

Oct 12, 2015, 03:01 AM
Seren is offline
Reply With Quote
Why yes, there's another color, but that other color is, to my knowledge, palette index 1, so good luck modifying Tileset Extractor to do that. A faster and practically trivial option would be writing an AngelScript mutator that exports a tileset to two BMP files.
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

All times are GMT -8. The time now is 01:25 AM.