Where does the game apply your flag color to textures?

  • We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Mitchz95

Field Marshal
17 Badges
Feb 4, 2016
3.537
2.571
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Major Wiki Contributor
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
I'm trying to figure out how this works. I know ship trails use gfx/map/trail.dds (which is grey-white) for the texture and somehow apply your empire's flag color to it. Likewise, ships' glowy bits are white by default and them fill in those bits with your flag color.

But I can't find anything in the game files that actually applies the color to those textures. I feel like I'm overlooking something but I don't know where to look. Can anyone offer any advice?
 

Shushoni

Private
26 Badges
Nov 17, 2014
21
8
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Semper Fi
  • For the Motherland
  • Stellaris - Path to Destruction bundle
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Tyranny: Archon Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV Sign-up
  • Stellaris
  • War of the Roses
  • Stellaris: Synthetic Dawn
  • Stellaris: Megacorp
  • Hearts of Iron IV: Expansion Pass
There won't be anything in the game files for this. It's done through the game engine using the textures. Here in the wiki is where you can find out which layer of which texture does what. Specifically, what you are looking for I believe, is the Emissive layer of the Normal texture and I believe the Mask layer in the Specular texture both use the empire primary color. It's been a while since I worked on ships, but that should be accurate.
 

Mitchz95

Field Marshal
17 Badges
Feb 4, 2016
3.537
2.571
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Major Wiki Contributor
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
There won't be anything in the game files for this. It's done through the game engine using the textures. Here in the wiki is where you can find out which layer of which texture does what. Specifically, what you are looking for I believe, is the Emissive layer of the Normal texture and I believe the Mask layer in the Specular texture both use the empire primary color. It's been a while since I worked on ships, but that should be accurate.

zZu0yTC.gif


I read through that page and understood maybe five words overall. :p

Any idea which files specifically I'd have to reference in order to use an empire's color somewhere? I assume I can just use "gfx/folder/folder/filename.dds" but I'm not sure where to look.
 

Mitchz95

Field Marshal
17 Badges
Feb 4, 2016
3.537
2.571
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Major Wiki Contributor
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
So I did some more investigating and I found some potentially useful code in gfx/FX/flag_sprite.shader. Specifically, the command "vColor = GetFlagColor". There aren't any vanilla files that use this command; how might I use it correctly for, say, "color = { x x x x }" commands?
 

Mitchz95

Field Marshal
17 Badges
Feb 4, 2016
3.537
2.571
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Major Wiki Contributor
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
check out the graphical culture file and look for a parameter thats called ship_color = yes or so.

I'm trying to apply the color to energy weapons, so your lasers will match the colors of your ships and flags. Don't think ship_color will work there.