Jump to content

Home

Kotor font color?


SithRevan

Recommended Posts

Hey I was just wondering in K1 and K2 what controls the font color? This has been puzzling me for quite some time, so if you guys could help me out with figuring it out I would really appreciate it. Thanks guys!:D

I would assume it's set in the COLOR fields under each TEXT struct in the .GUI files. If that is the case it would depend on what text you want to change the color of where you'd have to change it. You'd have to find the GUI file handling the text you want to change.

 

You'll have to use k-gff to see or modify the COLOR field though since they are of the Vector field type introduced with KotOR that older NWN GFF-editors cannot handle. The color information seems to be kept in RGB format On a scale from 0.0 -> 1.0.

 

K1 - I remember seeing an image in Kotor Tool that included the Font...

Look in ERFs->TexturePacks->swpc_tex_gui.erf->D

dialogfont32x32.tpc

The Font images seem to mostly be made up of an alphachannel mask though and not any color information. The game engine fills in the color itself.

Link to comment
Share on other sites

I would assume it's set in the COLOR fields under each TEXT struct in the .GUI files. If that is the case it would depend on what text you want to change the color of where you'd have to change it. You'd have to find the GUI file handling the text you want to change.

 

You'll have to use k-gff to see or modify the COLOR field though since they are of the Vector field type introduced with KotOR that older NWN GFF-editors cannot handle. The color information seems to be kept in RGB format On a scale from 0.0 -> 1.0.

 

 

The Font images seem to mostly be made up of an alphachannel mask though and not any color information. The game engine fills in the color itself.

 

How exactly would I be able to define those colors? Most image editors put the RGB values in hex not decimal like these are. Here is an example of what I am asking:

 

This is what the image editor will give me:

#FFFFFF or #000000

 

This is what I need to change the color of the font in the game:

0.0509803928434849

 

So how do I get that value?

Link to comment
Share on other sites

If my memory isn't so leaky it should be like this:

 

#000000 - black - 0 (0 in decimal)

#FFFFFF - white - 1 (16777215 in decimal)

 

To get the number you want, convert hexadecimal value of selected color to decimal and divide it by 16777215. I think you can round the result but I'm not sure how much.

 

Example: #FF0000 -> 16711680/16777215 = 0,996093809371817670572857294849 -> 0,9961

 

I am using windows calulator in scientific mode. I would test pure blue (0000FF) in game. If font's color would be red, then you need BGR instead of RGB (just swap the values like #ABCDEF -> #EFCDAB before converting to decimal).

Link to comment
Share on other sites

Thanks Kaspian, it worked. I owe you one!:D
I am finally at my home PC now. I looked into galaxymap.gui - the value you have to edit to change text's color is vector. 3 entries - Red, Green and Blue in range from 0 to 1 (using K-GFF). RGB channel is mostly defined in 0-255 range. Divide each channel's value by 255 to get your number.

 

LightSky Blue (#87CEFA)

R: 135 / 255 = 0,52941176470588235294117647058824

G: 206 / 255 = 0,8078431372549019607843137254902

B: 250 / 255 = 0,98039215686274509803921568627451

 

I thought you need all channels in one number :)

Link to comment
Share on other sites

The Font images seem to mostly be made up of an alphachannel mask though and not any color information. The game engine fills in the color itself.

 

So, would that mean modifying dialogfont32x32.tpc could change the font look in the game? (I imagine it would be a rather tedious job!)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...