PSA/Bug Report - clothes_texture_index borks the pop scope in asset selectors

  • 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.

Princess Stabbity

Random Nonsense Generator
49 Badges
Oct 20, 2016
733
1.191
twitter.com
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Crusader Kings III
  • Stellaris: Federations
  • Magicka 2
  • Cities: Skylines
  • Crusader Kings II: Charlemagne
  • Age of Wonders: Planetfall Season pass
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Distant Stars
  • Stellaris: Humanoids Species Pack
  • Stellaris: Megacorp
  • Stellaris: Apocalypse
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Surviving Mars
  • Surviving Mars: Digital Deluxe Edition
  • Surviving Mars: First Colony Edition
  • Surviving Mars: First Colony Edition
  • Crusader Kings II
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Imperator: Rome
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome - Magna Graecia
  • Age of Wonders: Planetfall Sign Up
  • Age of Wonders: Planetfall Premium edition
  • Age of Wonders: Planetfall Deluxe edition
  • Age of Wonders: Planetfall
  • Age of Wonders: Planetfall - Revelations
  • Age of Wonders III
In case the title isn't clear, here is the issue:
2.2 Le Guin introduced pop jobs, and... attempted to implement an effort-saving system by which the game would automatically aggregate available outfits and distribute them to various jobs.

Sounds great on paper, right?

Well... it does, until you realise that non-optional automation conflicts with the game's own modding capabilities. This system is extremely invasive, limited to ONLY 5 OUTFITS, and forcefully overrides any finer adjustments you might wish to make in asset selectors - the place where I was under the impression that kind of thing was supposed to be done.

To some, this may sound like a trivial issue, but... hi! I'm Princess Stabbity, I'm one of the nutters developing mods such as Mass Effect Civilisations: Asari and Elves of Stellaris. The former totals 95 outfits and the latter is exceeding 250 with more on the way.

All of those outfits, we were hoping to be able to use in Le Guin. We were waiting for the pop job system so that we could take full advantage of it, including, of course, assigning hundreds of clothes to various jobs in the interest of making the population tab more colourful.

So you can probably imagine the annoyance we feel right now, being forcibly limited to only 5 outfits and practically no control over which job wears what. Allow me to explain why this is happening:

Almost all jobs seem to have an associated clothes_texture_index, typically the same across one stratum, with a couple of exceptions (enforcer, soldier). The index assigned to any given job determines what outfit it gets, based on the order in which outfits are listed in the species' clothes asset selector. IGNORING all triggers, so generally the results are generic and thoughtless.

And the worst part? Modders can do nothing about it without modifying vanilla pop job files (common/pop_jobs, common/pop_categories). And the modders this affects the most (portrait creators) are the LAST people who should be touching those.

Of course, this isn't just an unfounded assumption. We tested this system thoroughly and ended up making a small mod that will illustrate the issue (attached below).
This little mod adds a new species of CLOTHINGTEST that you can pick in empire creation. We used this species to test and eventually figure out how the indexing system works and what entry corresponded to which index, by manipulating the system to clothe employed pops in 5 special "outfits". Here is what the experiment concluded:

Code:
# This should hopefully illustrate exactly what's wrong with the clothes_texture_index system forcefully overriding asset selectors.

testerhuman_f_clothes_01 = {
    default = "gfx/models/portraits/testerhuman/wrong_outfit_.dds"    #Index 1: Even though this is not assigned to any pops, the ruler jobs (and specifically, arbitrarily them) will be wearing it and I can't do anything about it
 
    game_setup = {#will run with a limited country scope. species and government is set but the country does not actually exist
        default = "gfx/models/portraits/human/human_female_clothes_admiral.dds"
    }
 
    #species scope
    species = { #generic portrait for a species
        default = "gfx/models/portraits/human/human_female_clothes_ruler.dds"
    }
 
    #pop scope
    pop = { #for a specific pop
        default = "gfx/models/portraits/testerhuman/misplaced_something.dds"    #Index 2: pretty much all worker jobs will be wearing this
 
        #Note how despite these outfits supposedly being both random and NEVER (always = no) supposed to show up,
        #they all will and I will predict which pops will be erroneously using them with 100% accuracy
        random = {
            trigger = { always = no }
            list = {
                "gfx/models/portraits/testerhuman/am_i_overdressed.dds"    #Index 3: most if not all specialists wear this
                "gfx/models/portraits/testerhuman/is_it_slightly_breezy.dds"    #Index 4: soldiers wear this
                "gfx/models/portraits/testerhuman/the_latest_fashion.dds"    #Index 5: this is the latest in police fashion, worn exclusively by enforcers and telepaths
            }
        }
 
        #So that makes a total of 5 outfits that pop jobs can utilise. The only pops who properly use asset selector outfits as intended are... the unemployed. Let me demonstrate:
 
        #Even though in theory the always = yes trigger should allow all pops to wear random human outfits, only the unemployed will use them. Employed pops are limited to the 5 above.
        random = {
            trigger = { always = yes }
            list = {
                "gfx/models/portraits/human/human_female_clothes_ruler2.dds"
                "gfx/models/portraits/human/human_female_clothes_general.dds"
                "gfx/models/portraits/human/human_female_clothes_ruler.dds"
                "gfx/models/portraits/human/human_female_clothes_governor.dds"
                "gfx/models/portraits/human/human_female_outfit_scientist.dds"
                "gfx/models/portraits/human/human_female_clothes_royal.dds"
                "gfx/models/portraits/human/human_female_clothes_admiral.dds"
            }
        }
    }
 
    #Meanwhile leaders are fine. They will wear whatever is assigned to them in asset selectors.
 
    #leader scope
    leader = { #scientists, generals, admirals, governor
        "gfx/models/portraits/human/human_female_outfit_scientist.dds" = { leader_class = scientist }
        "gfx/models/portraits/human/human_female_clothes_general.dds" = { leader_class = general }
        "gfx/models/portraits/human/human_female_clothes_admiral.dds" = { leader_class = admiral }
        "gfx/models/portraits/human/human_female_clothes_governor.dds" = { leader_class = governor }
    }

    #leader scope
    ruler = { #for rulers
        default = "gfx/models/portraits/human/human_female_clothes_ruler.dds"

        "gfx/models/portraits/human/human_female_clothes_ruler2.dds" = { owner = { has_generic_government = yes NOT = { has_authority = auth_imperial } } }
        "gfx/models/portraits/human/human_female_clothes_general.dds" = { owner = { has_militarist_government = yes NOT = { has_authority = auth_imperial } } }
        "gfx/models/portraits/human/human_female_clothes_ruler.dds" = { owner = { has_spiritualist_government = yes NOT = { has_authority = auth_imperial } } }
        "gfx/models/portraits/human/human_female_clothes_governor.dds" = { owner = { has_pacifist_government = yes NOT = { has_authority = auth_imperial } } }
        "gfx/models/portraits/human/human_female_clothes_governor.dds" = { owner = { has_primitive_government = yes  NOT = { has_authority = auth_imperial } } }
        "gfx/models/portraits/human/human_female_outfit_scientist.dds" = { owner = { has_materialist_government = yes NOT = { has_authority = auth_imperial } } }
        "gfx/models/portraits/human/human_female_clothes_royal.dds" = { owner = { has_authority = auth_imperial } }
    }
}

Feel free to test it as well. All you need is a planet full of CLOTHINGTEST pops, including a few unemployed to see how asset selectors do work on them.

stellaris 2018-12-07 01-26-11-53.png

stellaris 2018-12-07 01-26-22-68.png

The fastest way to do so is by using "instant_build" to build a bunch of city districts and the "populate" command to instantly overcrowd the planet. This should produce a wide variety of pops completely disregarding the asset selector, and a few unemployed obeying the selector rules to compare against.

Please, please Paradox, this cannot remain in the game. It is annoying and harmful the way it currently functions, to anyone interested in creating clothes for pop jobs, now that they exist. And on top of that is entirely REDUNDANT. The same, actually better, results can be achieved by assigning clothes based on pop job inside asset selectors. No invasive automated overrides required.

I love you but... please >.<
 

Attachments

  • _mslPopJobsIssueShowcase.zip
    146,4 KB · Views: 5
Last edited:
I am having issues with this as well. My mods work fine for changing the clothing of leaders and rulers, but modding pop clothing is not clear. Very limiting.
 
This is a massive issue, and probably one completely unforeseen. Hope it gets fixed shortly so portrait modders can get their work updated.
 
Oh I have no doubt that it was unintentional ^^ But I still need to ask... who thought this was necessary at all? Asset selectors for clothing already existed and they could have been used to the same effect without breaking stuff left and right. This feels like reinventing the wheel while Wheel 1.0 is not only still functional but also superior in every way.

But it just occurred to me that maybe a compromise can be achieved. Perhaps vanilla portraits can keep the indexing system, but I, and I'm sure a lot of other portrait creators, would appreciate if custom portraits could completely opt out of it. An option to do so in the base portrait definitions (gfx\portraits\portraits) would be ideal.
 
Oh. Ow. This is hugely discouraging. Hopefully it can be fixed/reverted/adjusted.

I was really looking forward to seeing what modders could do with the clothes and job system. But if there are literally no triggers st all and clothes are really just random... that kills a lot of my immersion and enthusiasm.

Really hope it’s fixed. Modders have done wonders with pop clothing mods.
 
I'm seeing some modders on the workshop aware of this issue but confused what exactly is causing it. And I just realised I forgot to point out exactly the problematic parts of code.

In common/pop_jobs and commom/pop_categories you will find various files defining vanilla jobs and strata respectively. Most of them, in their definition, include a line like this:
Code:
clothes_texture_index = 3
This is what overrides the triggers in your clothing selectors according to the indexing order I explained in my first post.

Currently, the only way to make the game stop doing that is by removing this line from every single pop_job and pop_category, which necessitates editing vanilla job files. If you're a portrait creator, obviously you shouldn't do that. It would conflict with any mods interested in the mechanical aspects of jobs and will be maintenance-heavy as Paradox will probably want to tweak jobs and add new ones going forward.

So I'm still holding out hope that either the indexing system will be scrapped on the game's end, or some means of allowing custom portraits to opt out of the indexing system is provided.
 
I think so but it doesn't seem to be a priority. I checked the 555a beta build just now and it doesn't seem to have been changed yet. Our clothing selectors are still being ignored by pops with jobs.
 
I think so but it doesn't seem to be a priority. I checked the 555a beta build just now and it doesn't seem to have been changed yet. Our clothing selectors are still being ignored by pops with jobs.
Take your findings and make a post in Bug Report forum. At least then someone will put it in a queue where it might get looked at. Otherwise, I don't think they'll get around to this issue anytime soon.
 
Mhm I suppose. The mod section seemed more appropriate to me since it very specifically relates to a modding issue. I was under the impression that the bug report forum was meant for vanilla problems.

But okay I'll post a link to it there. Anything to get someone's eyebalsl on it and hopefully have it addressed before the Christmas break ,_,
 
Hive government types jobs don't have the clothes_texture_index and are treated just like unemployed pops using random clothing, but still can't find a way to assign clothes to jobs without adjusting the index number in the Original files or adding multiple choices. Brain is now mush thinking about it.
 
The same, actually better, results can be achieved by assigning clothes based on pop job inside asset selectors. No invasive automated overrides required.
Honestly, I would have thought that it would be the solution Paradox would have chose in first place instead of the current clothes_texture_index system... It would have made more sense to use the current system in place instead of gluing another (restrictive) system above it.

Let's hope they will fix/change it.
 
Not yet, most of Paradox probably won't be back to work until next week so it's understandable. Our best hope is pray to the dev gods to bestow upon us the light of their eyeballs.

@Moah
Speaking of which, hopefully it's okay if I tag you on this one too n_n