SithRevan Posted September 28, 2006 Share Posted September 28, 2006 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! Link to comment Share on other sites More sharing options...
Agent Xim Posted September 28, 2006 Share Posted September 28, 2006 K1 - I remember seeing an image in Kotor Tool that included the Font... Look in ERFs->TexturePacks->swpc_tex_gui.erf->D dialogfont32x32.tpc Never tried it, but interesting Link to comment Share on other sites More sharing options...
stoffe Posted September 28, 2006 Share Posted September 28, 2006 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! 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 More sharing options...
SithRevan Posted September 29, 2006 Author Share Posted September 29, 2006 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 More sharing options...
Kaspian Posted September 29, 2006 Share Posted September 29, 2006 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 More sharing options...
SithRevan Posted September 29, 2006 Author Share Posted September 29, 2006 Thanks Kaspian, it worked. I owe you one! Link to comment Share on other sites More sharing options...
Darkkender Posted September 29, 2006 Share Posted September 29, 2006 Didn't you create a small utility that did this Kaspian? Link to comment Share on other sites More sharing options...
Kaspian Posted September 29, 2006 Share Posted September 29, 2006 Yes Darkkender, but it just converts RGB or hex to BGR and backwards. I can add a feature to convert color to 0-1 range if you think it could come handy. Link to comment Share on other sites More sharing options...
Darkkender Posted September 29, 2006 Share Posted September 29, 2006 Yes it would. Link to comment Share on other sites More sharing options...
Kaspian Posted September 30, 2006 Share Posted September 30, 2006 Thanks Kaspian, it worked. I owe you one! 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 More sharing options...
Agent Xim Posted September 30, 2006 Share Posted September 30, 2006 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 More sharing options...
SithRevan Posted October 1, 2006 Author Share Posted October 1, 2006 Yes actaully I have already tried chaging some of the front in the game to custom fonts that I have on my computer and I have to say it is pretty hard to do. But when you complete it and the fonts actaully work in the game it becomes worth it! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.