[QUESTION] Where are the color presets stored?

In the color picker there’s a set of buttons that let you load the canonical color and badge sets. I’d like to modify those, but I can’t figure out where the data is stored. I’ve found the button graphics and UI files that reference them(UI\NewUI\PlayerSetup\preset_[race].tga and \ui\newui\shared\playersetup.lua respectively), but I can’t find any data there or elsewhere that associates these buttons with colors or badges. Anyone know where that is?

If this is black-boxed, it’d be really nice if it wasn’t. It’s the kind of polish that can take a total conversion up a notch.

ed: For clarity, I’m not referring to the swatches over the picker and under the preview image, those can be changed by editing the defprofile\playercfg.lua file(though it requires a new profile or a restore defaults to take effect). I’m referring to the larger buttons over the preview image.

I think I ran across these a while back, as I eventually need to make the same tweaks for brick space. Pretty sure its editable. I’ll keep an eye out.

Edit: sigh I was looking at the thing you had already found. No idea. Edit edit: doublesigh I don’t even know where it stores the colors. I tried adding a third color select but no joy. It only pays attention to the base and stripe.

Disappointing. I guess it’ll have to wait at least until @BitVenom and company return to us. Thanks for looking into it though.

I would also be interested in knowing this. I’m sure many mods could use it. There is no reason for it to be hard coded, so it would be irritating if that were the case…

I think I have found it:


It has things like this in it:

    type = "ButtonHD",
    ignored = 1,                
    --toggleButton = 1,
    buttonStyle = "RM_TaskbarHD_MenuButtonStyle",
    name = "hiigaranPresetButton",
    helpTip = "$1100",
    helpTipTextLabel = "commandsHelpTip",                            

    Layout = {
        --pos_XY = { x = 256, y = 128, xr = "px", yr = "px" },
        size_WH = { w = 128.0, h = 64.0, wr = "px", hr = "px" },
        lockAspect = 2,
        pivot_XY = {0.0, 0.0},

    BackgroundGraphic = {
        texture = "DATA:UI\\NewUI\\PlayerSetup\\preset_hiigaran.tga",
        textureUV = { 0, 0, 256, 128 },
        --color = { 0, 0, 0, 200 },

I have not yet tried, but I think you could add other blocks to it…

1 Like

That’s where the buttons are, yeah, but it doesn’t contain any color or badge data. Even the color property in background graphic, which would probably only be used for rendering the button, is commented out so shouldn’t have any impact on the game.

I’ve still been hunting for this, but no cigar… I was beginning to wonder if it somehow pulled the team/stripe from the TGA files, but that was a long shot!

I have found this:


It contains some team/stripe/bagde info, but it doesn’t seem to relate to anything that I can find in game:

teamcolours = 
    {{.365,.553,.667},    {.800,.800,.800},    "DATA:Badges/Hiigaran_Border.tga"}, -- 0
    {{.900,.900,.900},    {.100,.100,.100},    "DATA:Badges/Vaygr_Outline_Red.tga"}, -- 1
    {{.900,.900,.900},    {.100,.100,.100},    "DATA:Badges/Vaygr_Outline_Steel.tga"}, -- 2
    {{.900,.900,.900},    {.100,.100,.100},    "DATA:Badges/Vaygr_Outline_Tri.tga"}, -- 3
    {{.000,.000,.000},    {1.00,1.00,1.00},    "DATA:Badges/Soban.tga"}, -- 4
    {{.000,1.00,.500},    {.100,.200,.600},    "DATA:Badges/TFreight.tga"}, -- 5
    {{.000,1.00,.500},    {.100,.200,.600},    "DATA:Badges/Kiith Naabal.tga"}, -- 6
    {{.000,1.00,.500},    {.100,.200,.600},    "DATA:Badges/Kiith Paktu.tga"}, -- 7
    {{.500,.500,.500},    {.500,.500,.500},    ""}, -- N

I’m beginning to think it is hard-coded. I’m also beginning to think that the presets bit is unfinished. The button to “reset all presets” does not make sense - all it does is set the current selection to one of the presets. The presence of the button implies that it should be possible to overwrite the presets or create your own, which is not the case…

1 Like

I believe the data you found is what the default AI colors in skirmish are. Reset to defaults resets the saved color swatches(the ones directly over the color picker, not the ones above the preview image) to the values in data\defprofile\playercfg.lua. Pulling out of the tga files seems like a long shot but not impossible, did you try it?

I tried to replicate one of the tgas, but the log file gave me an error about animated tgas, which seemed odd.

Unable to retrieve UI (animated) texture (DATA:UI\NewUI\PlayerSetup\preset_taiidan.tga)

When clicked, the button produced the same team/stripe/badge combination, so it cannot be getting it from the image. I also looked for it in the race scripts, but couldn’t find it. Single player team/stripe/badge is defined explicitly for each mission. Incidentally, it is possible to change it for a single sobgroup:

SobGroup_SetTeamColours(<sSobGroupName>, <v3BaseColour>, <v3StripeColour>, <sBadgeName>)

@Dwarfinator have you looked into this at all? Might be up your street!

removed because of my idiot brain !

edit : or perhaps I misunderstood what you need ?

edit2 : @Dom2 after reading all your posts, I think I have. What do you want to do exactly ?

edit3 : and more than that, what I said before was trash… ashamed of myself I’m.

After some digging, I’m pretty sure this part is harcoded…
I even found one of my old file of the rainbow mod where I clearly wrote “badge and hsl values converted from rgb (from the tga files as no traces of the preset values anywhere)” :’(

1 Like

We want to add another color preset to this screen (where the four buttons at the top are - see the cursor location):

1 Like

that’s what I supposed after reading your previous messages, but as I said in my previous post (same time as yours), I think it’s hardcoded unfortunately.

Adding a new button with colors and badge from your mod is not a problem at all, but modifying the ship colours/badge in the preview is something else entirely. I could use the same kind of trick I used in my UI mod, but I’m pretty sure it would not work correctly with the hardcoded part of the screen :confused:

edit : and even if it was possible, we have no way to tell the game to use those values in game. Rewriting the whole playercfg.lua file would be a nightmare !
edit2 : or by having a script which would send the defined colours/badge at the beginning of the level. This part is doable

1 Like