Exult Logo
 
Home | Download | Documentation | FAQ | Studio | Screen Shots
Development | Discussion | About Us | Letters | History | Links
 
Exult Discussion
Before posting, make sure you've read the FAQ and searched the message board for previous discussions. When reporting problems/bugs, please include details about your setup (Exult version, OS, sound and video cards).

 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 Trying to get yellow translucent color into the game
Author: Crowley 
Date:   07-15-12 00:15

Shape 912 in Black Gate is puddles of "blood" in various colours. Frames 12-15 are yellow, with solid colour on the edges and translucent in the middle of the puddle. I have extracted those graphics both in .png and .shp form and examined them in Gimp, and from what I can tell, the translucent yellow colour should be the one in palette slot 248. However, trying to insert the graphics into the game results in that colour showing up as white. I have tried importing that both in .png and .shp form.

Reply To This Message
 
 Re: Trying to get yellow translucent color into the game
Author: Malignant Manor 
Date:   07-15-12 00:26

In the game palette, the last 32 colors are 'special'. They behave, by index (0-based), as follows:
224 to 231: Rotation group (8 colors).
232 to 239: Rotation group (8 colors), 238 and 239 are translucent for some shapes.
240 to 243: Rotation group (4 colors), translucent for some shapes.
244 to 247: Rotation group (4 colors), translucent for some shapes.
248 to 251: Rotation group (4 colors), translucent for some shapes.
252 to 254: Rotation group (3 colors), translucent for some shapes.
255: Completely transparent.

These are the semi-transparent colors you are looking for. That is, if the shape in question has/can have translucency. Based on shape source, here is the breakdown:
- faces.vga, sprites.vga: Always translucent.
- fonts.vga, gumps.vga: Never translucent.
- paperdol.vga, shapes.vga: Translucent if you check the 'translucent' check box in the shape information window in ES (in the appropriate tab).


Now, for the actual translucency information. Normally, Exult will load the translucency tables from the "xform.tbl" in static dir. There are 17 such tables (one for each translucent color), and these indicate what each palette entry will look like behind that translucent color. If Exult doesn't find the above file, it creates the tables using certain RGBA values for each translucent color; these RGBA values are also used for OpenGL rendering, so they can be trusted.

By default, the translucent colors should be the following color in game:

- 244: R 144, G  40, B 192, A 128
- 245: R  96, G  40, B  16, A 128
- 246: R 100, G 108, B 116, A 192
- 247: R  68, G 132, B  28, A 128
- 248: R 255, G 208, B  48, A  64
- 249: R  28, G  52, B 255, A 128
- 250: R   8, G  68, B   0, A 128
- 251: R 255, G   8, B   8, A 118
- 252: R 255, G 244, B 248, A 128
- 253: R  56, G  40, B  32, A 128
- 254: R 228, G 224, B 214, A  82

I'm not sure about index 238-243 colors.

Note: These values are used for rendering. If you try to input these values in your image, you will not get what you want! Like I said, you have to use the game palette and use the colors for the corresponding palette entries or use the shape plug-in and paint with the color it generates for the palette.

Reply To This Message
 
 Re: Trying to get yellow translucent color into the game
Author: Malignant Manor 
Date:   07-15-12 00:51

Yeah, I'm having that issue as well when trying to import a shp made from Gimp and not exported.

Edit: Palette index 248 is white for ES so it shows up that way. I have had the wrong index saved when I tried to save the first time in GIMP with an image created that was not indexed before converting. I opened it as a shp file and when I changed the color index, it displayed properly. Importing it worked properly too although I'm not sure how recent this ES version is.

Reply To This Message
 
 Re: Trying to get yellow translucent color into the game
Author: Marzo Sette Torres Junior 
Date:   07-15-12 14:38

The RGBA values are actually approximations, found by doing least squared error approximations. The translucency tables seem to be based on a subtractive color model rather than the alpha model, but I couldn't find a way to reverse engineer it yet.

------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
How To Ask Questions The Smart Way

Reply To This Message
 
 Re: Trying to get yellow translucent color into the game
Author: Crowley 
Date:   07-20-12 11:06

What puzzles me is that I have not had such problems with other translucent colors. If anyone can provide me with any directions on how to get yellow translucent color into the game, I would greatly appreciate that.

Reply To This Message
 
 Re: Trying to get yellow translucent color into the game
Author: Malignant Manor 
Date:   07-20-12 16:26

240 is a brighter yellow. Translucent colors will look different depending on the background backgrounds. Importing is working fine for me on shape files.

Create a new file. Index it and save it as .shp.
Revert it. (notice that the file is screwed up)
Then you can start editing the picture.
Import it into Exult Studio.
Set the shape as translucent.
Save all.


Link to test shp file



It looks like 255 is not displayed as completely transparent or even translucent but as opaque black.

I'm not sure what transparent flag does offhand.

Reply To This Message
 
 Re: Trying to get yellow translucent color into the game
Author: Marzo Sette Torres Junior 
Date:   07-20-12 22:03

The translucent flag makes the shape use translucency instead of palette cycles for the colors in question. And color 255 should be displaying as completely transparent. It is possible that the entry in question is being converted to something else.

------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
How To Ask Questions The Smart Way

Reply To This Message
 
 Re: Trying to get yellow translucent color into the game
Author: Malignant Manor 
Date:   07-21-12 02:01

I wrote transparent not translucent.


Quote:

And color 255 should be displaying as completely transparent. It is possible that the entry in question is being converted to something else.

Exult Studio exported the shape and it still had index 255 so this would appear to be an issue with Exult.

Reply To This Message
 
 Re: Trying to get yellow translucent color into the game
Author: Marzo Sette Torres Junior 
Date:   07-22-12 12:41

Oh, right, the transparent flag; sorry, I misread. The transparent flag makes the object in question not receive clicks; they instead go through to whatever is underneath he object.

------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
How To Ask Questions The Smart Way

Reply To This Message
 
 Re: Trying to get yellow translucent color into the game
Author: Crowley 
Date:   07-31-12 16:55

Which version of GIMP do you use, Malignant Manor? I recently updated to 2.8.0, and following your directions I am unable to revert, probably because that version opens all images as temporary .xcf files for editing.

Reply To This Message
 
 Re: Trying to get yellow translucent color into the game
Author: Crowley 
Date:   07-31-12 17:01

Nevermind, I did manage to get it to work as intended. Thank you!

Reply To This Message
 
 Re: Trying to get yellow translucent color into the game
Author: Malignant Manor 
Date:   07-31-12 17:06

Quote:

Nevermind, I did manage to get it to work as intended. Thank you!


It would be nice if you posted your workaround for future reference. (I'm on GIMP 2.6.8 and am pretty busy at the moment.)

Reply To This Message
 
 Re: Trying to get yellow translucent color into the game
Author: Crowley 
Date:   07-31-12 17:47

I did follow your directions for the most part. The only difference is really that instead of reverting, I opened the .shp file in a new window. Thus, this would be the actions step-by-step:

Create a new file.
Index and save as .shp.
Open the .shp file you just created. Now it should have the bottom half empty, and the top quarters each have a slightly different 1/4 sized image of whatever graphics there were to begin with.
Edit the picture as you please, and save again as .shp.
Import in Exult Studio.
Set the shape as translucent.
Save all.

In step 3, you do not need to specify a palette when GIMP asks for one. Instead you can use the colormap GIMP 2.8.0 automatically creates for each opened image. For reference, for me that has color index #248 as bright yellow, #249 as bright blue, #250 as bright green and #251 as bright red.

Reply To This Message
 
 Re: Trying to get yellow translucent color into the game
Author: Oink! (---.46.227.226.lightower.net)
Date:   03-19-17 22:28

Bump for GrimLock Dragon.

Reply To This Message
 
 Re: Trying to get yellow translucent color into the game
Author: GrimLock Dragon (---.227.30.71.dynamic.ip.windstream.net)
Date:   03-20-17 01:53

Thank you kind sir!

Reply To This Message
 Go to Top  |  Go to Topic  |  Threaded View   Newer Topic  |  Older Topic 


 
 Reply To This Message
 Your Name:
 Your E-mail:
 Subject:
 Subject:
   
 
SourceForge   phorum.org
 
Problems with Exult or this webpage? Contact us.
Last modified: 24 Oct 2001(GMT)