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

Dibujor

Sergeant
91 Badges
Jan 10, 2014
93
24
www.dibujor.com
  • Victoria 3 Sign Up
  • Crusader Kings III: Royal Edition
  • BATTLETECH
  • Imperator: Rome Deluxe Edition
  • Stellaris: Galaxy Edition
  • Europa Universalis IV
  • Surviving Mars: First Colony Edition
  • Surviving Mars: Digital Deluxe Edition
  • Imperator: Rome - Magna Graecia
  • Crusader Kings II
  • Age of Wonders: Planetfall
  • Pillars of Eternity
  • Tyranny: Archon Edition
  • Hearts of Iron IV: Colonel
  • Cities: Skylines Deluxe Edition
  • Age of Wonders III
  • Prison Architect
  • Empire of Sin
  • Shadowrun Returns
  • Warlock: Master of the Arcane
  • Stellaris: Necroids
  • Stellaris: Federations
  • BATTLETECH - Backer
  • Stellaris: Megacorp
  • Stellaris: Lithoids
  • Cities: Skylines - Campus
  • Stellaris: Ancient Relics
  • Stellaris: Nemesis
  • Europa Universalis IV: Pre-order
  • Shadowrun: Dragonfall
  • Age of Wonders: Planetfall Sign Up
  • Europa Universalis IV: Mandate of Heaven
  • Tyranny - Bastards Wound
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rights of Man
  • BATTLETECH - Beta Backer
  • Europa Universalis IV: Dharma
  • BATTLETECH: Heavy Metal
  • Crusader Kings II: Charlemagne
  • BATTLETECH: Season pass
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Stellaris Sign-up
  • Stellaris: Galaxy Edition
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
  • Stellaris: Synthetic Dawn
  • Tyranny - Tales from the Tiers
So, I'm making a mod creating a new species based on humans. I'm drawing all from scratch and so far I have the portraits, clothes and hair system working (for now just substitutes the humans, just for test. I have to fully understand how to add this a new species). The hairs proved a bit trickier since they aren't saved at the same
scale as the bodies but found the way.

But I need the answer to some questions before commiting a lot more hours to draw and paint new things that I don't know if would work. I tried my luck at the quick questions thread but it goes really fast and there's a lot of questions that go unanswered so I didn't want to disturb that thread flooding it with my questions. Here we go:

I want the ruler to be "always the same", kind of a clone (same portrait, different traits and clothes. So technically let the game generate a new leader but using the same body portrait). I know how to do that but,


Is there a way that I can make the ruler always use the same name?
Let's say Augustus , maybe Augustus I, II, III and so on. Regnal names only apply if monarchy or divine mandate right?
I want to add a new "city type". Can I tie it to this new species? [SOLVED]
It seems you can, just adding the images to city_sets and they should appear as selectable when creating an empire.

This are the images I'm referring to (gfx>portraits>city_sets):
WcTF781.jpg
Can I tie a new diplomacy "background" to my species instead of the government type?
Or do I need to create a new government type for them to link that government with the​
image?. I want the species to have their own "diplomacy background" , a new one. The vanilla ones change based on government type.

This are the images I'm referring to (gfx>portraits>city_sets):
bURC8XE.jpg

Can I link new "leader backgrounds" with only this species without changing the backgrounds for all species?

This are the images I'm referring to (gfx>portraits>leaders):
NNyR8GJ.jpg
pjJtrQ4.jpg

Is it possible to change the clothes of pops when I enslave them? [SOLVED]
Just add
Code:
= { is_enslaved = yes }
at the end of the clothes you want for slaves

And the clothes of pops depending on the type of planet they are on? [SOLVED]
Thanks to @Warial for pointing me to the trigger. Just add
Code:
= { planet = { is_planet_class = pc_arid } }
at the end of the clothes you want for every planet (codes for planets are in common>planets_classes>00_planets_clases.txt )

And the clothes of scientists depending on if they are commanding a ship or researching "on planet"? [SOLVED]
Y
ou can with this bit of code thanks to @Kliwarrior for pointing me to the correct trigger and to @Yard1PL for showing me the correct way of writing it. Just add this bit of code to the scientist clothes
Code:
"gfx/models/portraits/human/human_male_clothes_scientist.dds" = { leader_class = scientist OR = { is_researching_area = engineering is_researching_area = physics is_researching_area = society } }
"gfx/models/portraits/human/human_male_clothes_scientist3.dds" = { leader_class = scientist NOT = { is_researching_area = engineering is_researching_area = physics is_researching_area = society } }

I think I can add a new loading screen but not make it only show up if you select this new species right? [SOLVED]
Kind of, you can make it appear if the mod is "on" but that's all, can't specify when.

And finally, and not related to graphics...

can I change the text for the diplomatic answers for this species and the bit of lore you receive when starting a new game with this species? [SOLVED]
Yes you can. I'll look out how when I have all the graphics


Thank you very much in advance for any help you can give me :)
 
Last edited:
Well I can answer not much of these Questions so I try to guess now a bit.

Is there a way that I can make him always use the same name?
You can always use the same name, there for you have the name_lists. For a new Species/Empire I would create a new one, just copy some old and change it. Now to keep one Name you just have to edit the following lines.

Code:
regnal_first_names_male = {
Alexander Vladimir Boris Tiberius Theobald Valerian Maximus Lucius Elohim Malketh
            }
regnal_first_names_female = {
Theodora Fatima Miranda Cordelia Svetlana Anastasia Valentina Henrietta Karan
            }
regnal_second_names = {
Nabaal Paktu Gaalsien "S'jet" Somtaaw Siidim Hraal LiirHra Manaan Kaalel Magann Sagald Jaraci Tambuur
            }

The regnal_names are the names which will be chosen for the successor of the current Ruler.

I want to add a new "city type". Can I tie it to this new species?, Make it selectable?
To add a new City Type you just have to create one as the race was named. For example mine is called hiigaran_01(graphical_culture). Thats the name of the race also the prefix for ships, textures, icons, images etc. So you just need to go to the folder gfx/portraits/city_sets. In here are all Cities that you can choose from. Like: hiigaran_01_city_l01.dds, hiigaran_01_city_l02.dds and so on. Just replace all 5 of these files and it should work.

Can I tie this new one to the species instead of the government?
I can't really answer that, buts it not only tied to the government but also the edicts who you choose for your empire.

can I link new "leader backgrounds" with only this species without changing the backgrounds for all species?
Here I would guess you try the old try and error tactics for modding, maybe you find a way.

Is it possible to change the clothes of pops when I enslave them?
I don't think so, because when you are enslaving them only their status is changed not what they are wearing.

And the clothes of pops depending on the type of planet they are on?
I don't think so either with that, because the clothes are randomly chosen, the more clothes the more variants you have.

And the clothes of scientists depending on if they are commanding a ship or researching "on planet"?
I don't think so either with that, because the clothes are randomly chosen, the more clothes the more variants you have.

I think I can add a new loading screen but not make it only show up if you select this new species right?
Yes you can make a new loadingscreen, just overwrite the old ones, but they are tied to nothing, just loading.(gfx/loadingscreens)

can I change the text for the diplomatic answers for this species and the bit of lore you receive when starting a new game with this species?
Yes you can change the reaction text for the diplomacy. It should be in localisation/dip_messages_l_english.yml for example. Didn't found anything else that have the dip in its name as a file.

So hopefully you can work with that. When not, please just ask and I try to answer it right.
 
Hey, thanks for answering :)

Well I can answer not much of these Questions so I try to guess now a bit.

Is there a way that I can make him always use the same name?
You can always use the same name, there for you have the name_lists. For a new Species/Empire I would create a new one, just copy some old and change it. Now to keep one Name you just have to edit the following lines.

Code:
regnal_first_names_male = {
Alexander Vladimir Boris Tiberius Theobald Valerian Maximus Lucius Elohim Malketh
            }
regnal_first_names_female = {
Theodora Fatima Miranda Cordelia Svetlana Anastasia Valentina Henrietta Karan
            }
regnal_second_names = {
Nabaal Paktu Gaalsien "S'jet" Somtaaw Siidim Hraal LiirHra Manaan Kaalel Magann Sagald Jaraci Tambuur
            }

The regnal_names are the names which will be chosen for the successor of the current Ruler.

I read somewhere in the forums that the regnal_names only applied to monarchy government types, so if you have a democracy government type it doesn't work. That's why I asked. So you say it always applies to the ruler, no matter what government type?

I want to add a new "city type". Can I tie it to this new species?, Make it selectable?
To add a new City Type you just have to create one as the race was named. For example mine is called hiigaran_01(graphical_culture). Thats the name of the race also the prefix for ships, textures, icons, images etc. So you just need to go to the folder gfx/portraits/city_sets. In here are all Cities that you can choose from. Like: hiigaran_01_city_l01.dds, hiigaran_01_city_l02.dds and so on. Just replace all 5 of these files and it should work.

So I can just add the new files in there and then select them when creating an empire? I dont need to delete the vanilla ones right? I've read the last patch fixed the interface giving more space for added elements like cities, etc.

Can I tie this new one to the species instead of the government?
I can't really answer that, buts it not only tied to the government but also the edicts who you choose for your empire.
Yeah, I've seen it change with the traits also. I've spent more time doing this mod that actually playing the game :D.

can I link new "leader backgrounds" with only this species without changing the backgrounds for all species?
Here I would guess you try the old try and error tactics for modding, maybe you find a way.

I guess I'll have to fin in which file they are called and see how

Is it possible to change the clothes of pops when I enslave them?
I don't think so, because when you are enslaving them only their status is changed not what they are wearing.

And the clothes of pops depending on the type of planet they are on?
I don't think so either with that, because the clothes are randomly chosen, the more clothes the more variants you have.

And the clothes of scientists depending on if they are commanding a ship or researching "on planet"?
I don't think so either with that, because the clothes are randomly chosen, the more clothes the more variants you have.

Yes, I was wondering if I could do something with that change of status, like triggering and event that recalled the clothes and chaged them with the new ones. I've actually drawn various clothes for pops, scientists, governors,etc. For the governors and ruler I'll let the game select from that pool of clothes when creating them, for pops and scientists I'd like to be able to assign different clothes to different situations (like parkas for cold planets)

I think I can add a new loading screen but not make it only show up if you select this new species right?
Yes you can make a new loadingscreen, just overwrite the old ones, but they are tied to nothing, just loading.(gfx/loadingscreens)

Yep, I thought it would be like that. Not a problem though, I was thinking of drawing an illustration as a load screen just for flavour. It really dooesn't matter when it appears.

can I change the text for the diplomatic answers for this species and the bit of lore you receive when starting a new game with this species?
Yes you can change the reaction text for the diplomacy. It should be in localisation/dip_messages_l_english.yml for example. Didn't found anything else that have the dip in its name as a file.

Thanks you, I'll research how it's done :)

So hopefully you can work with that. When not, please just ask and I try to answer it right.

Again, thank you for answering. I'm really new to modding :)
 
I read somewhere in the forums that the regnal_names only applied to monarchy government types, so if you have a democracy government type it doesn't work. That's why I asked. So you say it always applies to the ruler, no matter what government type?
Well then your Race shouldn't be a Democracy, wouldn't really make sense for a Democracy to have always the same leader.

So I can just add the new files in there and then select them when creating an empire? I dont need to delete the vanilla ones right?

Yes, you can just create new ones and the old can stay.
 
  • 1
Reactions:
Some good questions. I too was surprised to see the scale of hairs was different then the bodies; probably lost 30 minutes on that...

I've got a couple questions regarding art as well, hopefully someone can answer them. Hope nobody minds if I ask them.

How do you code in custom clothing for particular roles (ie. general or admiral) for a specific government type? Basically, I want each government type to have unique looking clothing so Militant government leaders looks different from Democracy government leaders. I am not referring to rulers but the various other leaders. I tried copying the ruler code and substituting admiral but it just causes issues.

Maybe? You can define a ruler clothing based on government but I cannot get it to extend properly to other roles.​
Code:
                "gfx/models/portraits/human/human_male_clothes_general_militant.dds" = { owner = { has_government = military_dictatorship } }

How do you make the game pick between various graphics for a leader? For example, if I wanted the game to pick between 2-3 graphics when clothing a General. How can this be achieved?

YES! Use a list.​
Code:
        random = {
            trigger = { leader_class = admiral }
            list = {
                "gfx/models/portraits/human/human_male_clothes_admiral.dds"
                "gfx/models/portraits/human/human_male_clothes_admiralb.dds"
                "gfx/models/portraits/human/human_male_clothes_admiral_corp.dds"
                "gfx/models/portraits/human/human_male_clothes_admiral_democracy.dds"
                "gfx/models/portraits/human/human_male_clothes_admiral_militant.dds" #= { owner = { has_government = military_dictatorship } }
                }
            }

How do you create a new phenotype? How would you, for example, add in a male_06?
EDIT: So, I managed to get this one to work by modifying the _human_portrait_entities.assets file but they only show up as little civilians and not as leaders.

EDIT: Maybe I didn't get it to work at all...​

I can handle the graphics... my problems come with implementing via code.

For reference: My Cosmetic Mod.

Thanks!
 
Last edited:
How do you code in custom clothing for particular roles (ie. general or admiral) for a specific government type?
I saw a mod today which had the several clothings added for each Leader, I think. Didn't tested this mod, so I don't really know. http://steamcommunity.com/sharedfiles/filedetails/?id=683756022

How do you make the game pick between various graphics for a leader?
I think thats also managed over the normal clothing for the civilians.

How do you create a new phenotype?
Well for me it looks like you need to create a .mesh first for it to work, with animation and all, after that you could just something like this.
Code:
_human_portrait_entities.asset

entity = {
   name = "portrait_human_male_06_entity"
   pdxmesh = "portrait_human_male_06_mesh"
  
   default_state = "idle"
   state = { name = "idle"  animation = "idle"  animation_blend_time = 0 chance = 3.0 looping = no next_state = idle}
   state = { name = "idle"  animation = "idle2"  animation_blend_time = 0 chance = 1.0 looping = no next_state = idle}
  
   state = { name = "sad"  animation = "sad"  animation_blend_time = 0 chance = 3.0 looping = no next_state = sad}
   state = { name = "sad"  animation = "sad2"  animation_blend_time = 0 chance = 1.0 looping = no next_state = sad}
   scale = @humanscale
}

_human_portrait_meshes.gfx

pdxmesh = {
        name = "portrait_human_male_06_mesh"
        file = "gfx/models/portraits/human/human_male_06_portrait.mesh"
        animation = { id = "idle"    type = "human_male_06_happy_animation" }
        animation = { id = "idle2"    type = "human_male_06_happy_2_animation" }
        animation = { id = "sad"    type = "human_male_06_sad_animation" }
        animation = { id = "sad2"    type = "human_male_06_sad_2_animation" }
        scale = 1.0
    }
 
  • 1
Reactions:
How do you code in custom clothing for particular roles (ie. general or admiral) for a specific government type? Basically, I want each government type to have unique looking clothing so Militant government leaders looks different from Democracy government leaders. I am not referring to rulers but the various other leaders. I tried copying the ruler code and substituting admiral but it just causes issues.

You change this lines of code with the appropriate clothes (in gfx>portraits>asset_selectors):
Code:
#leader scope
    ruler = { #for rulers
        default = "gfx/models/portraits/human/human_male_clothes_ruler.dds"
      
        "gfx/models/portraits/human/human_male_clothes_general.dds" = { owner = { has_government = military_dictatorship } }
        "gfx/models/portraits/human/human_male_clothes_general.dds" = { owner = { has_government = martial_empire } }
        "gfx/models/portraits/human/human_male_clothes_general.dds" = { owner = { has_government = military_junta } }
        "gfx/models/portraits/human/human_male_clothes_admiral.dds" = { owner = { has_government = ordered_stratocracy } }
        "gfx/models/portraits/human/human_male_clothes_admiral.dds" = { owner = { has_government = military_republic } }
        "gfx/models/portraits/human/human_male_clothes_admiral.dds" = { owner = { has_government = martial_demarchy } }
  
        "gfx/models/portraits/human/human_male_clothes_admiral.dds" = { owner = { has_government = pirate_codex } }
  
  
        "gfx/models/portraits/human/human_male_clothes_ruler.dds" = { owner = { has_government = divine_mandate } }
        "gfx/models/portraits/human/human_male_clothes_ruler.dds" = { owner = { has_government = transcendent_empire } }
        "gfx/models/portraits/human/human_male_clothes_ruler.dds" = { owner = { has_government = theocratic_oligarchy } }
        "gfx/models/portraits/human/human_male_clothes_ruler.dds" = { owner = { has_government = theocratic_republic } }
      
        "gfx/models/portraits/human/human_male_clothes_ruler.dds" = { owner = { has_government = irenic_monarchy } }
        "gfx/models/portraits/human/human_male_clothes_ruler.dds" = { owner = { has_government = despotic_empire } }
        "gfx/models/portraits/human/human_male_clothes_ruler.dds" = { owner = { has_government = star_empire } }
        "gfx/models/portraits/human/human_male_clothes_ruler.dds" = { owner = { has_government = transcendent_republic } }
        "gfx/models/portraits/human/human_male_clothes_ruler.dds" = { owner = { has_government = direct_democracy } }
        "gfx/models/portraits/human/human_male_clothes_ruler.dds" = { owner = { has_government = moral_democracy } }
        "gfx/models/portraits/human/human_male_clothes_ruler.dds" = { owner = { has_government = irenic_democracy } }
        "gfx/models/portraits/human/human_male_clothes_ruler.dds" = { owner = { has_government = indirect_democracy } }
        "gfx/models/portraits/human/human_male_clothes_ruler.dds" = { owner = { has_government = democratic_utopia } }
  
        "gfx/models/portraits/human/human_male_clothes_ruler.dds" = { owner = { has_government = stagnated_ascendancy } }
      
        "gfx/models/portraits/human/human_male_clothes_governer.dds" = { owner = { has_government = despotic_hegemony } }
        "gfx/models/portraits/human/human_male_clothes_governer.dds" = { owner = { has_government = enlightened_monarchy } }
        "gfx/models/portraits/human/human_male_clothes_governer.dds" = { owner = { has_government = transcendent_oligarchy } }
        "gfx/models/portraits/human/human_male_clothes_governer.dds" = { owner = { has_government = plutocratic_oligarchy } }
        "gfx/models/portraits/human/human_male_clothes_governer.dds" = { owner = { has_government = peaceful_bureaucracy } }
        "gfx/models/portraits/human/human_male_clothes_governer.dds" = { owner = { has_government = irenic_protectorate } }
        "gfx/models/portraits/human/human_male_clothes_governer.dds" = { owner = { has_government = mega_corporation } }
  
        "gfx/models/portraits/human/human_male_clothes_governer.dds" = { owner = { has_government = primitive_feudalism } }
        "gfx/models/portraits/human/human_male_clothes_governer.dds" = { owner = { has_government = fragmented_nations } }
      
        "gfx/models/portraits/human/human_male_clothes_scientist.dds" = { owner = { has_government = ai_overlordship } }
        "gfx/models/portraits/human/human_male_clothes_scientist.dds" = { owner = { has_government = science_directorate } }
        "gfx/models/portraits/human/human_male_clothes_scientist.dds" = { owner = { has_government = illuminated_technocracy } }
        "gfx/models/portraits/human/human_male_clothes_scientist.dds" = { owner = { has_government = subconscious_consensus } }
      
    }
}
How do you make the game pick between various graphics for a leader? For example, if I wanted the game to pick between 2-3 graphics when clothing a General. How can this be achieved?

I did this for my custom race and it works (in gfx>portraits>asset_selectors):
Code:
#leader scope
    leader = { #scientists, generals, admirals, governor
        random = {
            trigger = { leader_class = scientist }
            list = {
                "gfx/models/portraits/human/human_male_clothes_scientist.dds"
                "gfx/models/portraits/human/human_male_clothes_scientist2.dds"
                "gfx/models/portraits/human/human_male_clothes_scientist3.dds"
            }
        }
        "gfx/models/portraits/human/human_male_clothes_general.dds" = { leader_class = general }
        "gfx/models/portraits/human/human_male_clothes_admiral.dds" = { leader_class = admiral }
        random = {
            trigger = { leader_class = governor }
            list = {
        "gfx/models/portraits/human/human_male_clothes_governor.dds"
        "gfx/models/portraits/human/human_male_clothes_governor2.dds"
        "gfx/models/portraits/human/human_male_clothes_governor3.dds"
        }
      
    }
 
  • 1
Reactions:
For one of my questions

Is it possible to change the clothes of pops when I enslave them?

I found the condition is_enslaved exists for pop but I haven't found the way to use it to trigger the change of clothes.

I've tried with :

Code:
#pop scope
    pop = { #for a specific pop
        default = "gfx/models/portraits/human/human_female_clothes_pops.dds"
    }
  
    pop = {is_enslaved
    "gfx/models/portraits/human/human_female_clothes_pops_enslaved.dds"

and with:

Code:
#pop scope
    pop = { #for a specific pop
        default = "gfx/models/portraits/human/human_male_clothes_pops.dds"
        trigger = {is_enslaved = yes}
        "gfx/models/portraits/human/human_male_clothes_pops_enslaved.dds"

without result, it breaks all the clothes assignments. The only other way I see I can try is with:

Code:
"gfx/models/portraits/human/human_male_clothes_pops_enslaved.dds"     = { pop = { is_enslaved}}

But I don't know if it will work, I'm not a coder... :( . The existence of that conditional gives me hope this can be done in some way, but I don't know how
 
  • 1
Reactions:
Is it possible to change the clothes of pops when I enslave them? I saw some string, slave related in one of the files I was "studying" and wondered if this could be done at all.
Yes. That's what I use:
Code:
"gfx/models/portraits/chick/chick_clothes_slave.dds" = { is_enslaved = yes }
It works without problem. However you have to reload the window first.
 
  • 1
Reactions:
How do you code in custom clothing for particular roles (ie. general or admiral) for a specific government type?
I saw a mod today which had the several clothings added for each Leader, I think. Didn't tested this mod, so I don't really know. http://steamcommunity.com/sharedfiles/filedetails/?id=683756022
I think these sort of mods are just entire texture swaps for the humans. When I checked it out it didn't check for government type or anything.

I think thats also managed over the normal clothing for the civilians.
This only effects ruler creator where you can pick from everything available. After you start the game and have new leaders they ONLY pick the ruler portrait. I'm trying to get it to pick between a couple types of portraits dependent on government type.

I think I've figured out how to get it to pick between various images, just not how to do that AND a government type.This stuff is tough! I can share my code later.

How do you create a new phenotype?
Well for me it looks like you need to create a .mesh first for it to work, with animation and all, after that you could just something like this.
Code:
_human_portrait_entities.asset

entity = {
   name = "portrait_human_male_06_entity"
   pdxmesh = "portrait_human_male_06_mesh"

   default_state = "idle"
   state = { name = "idle"  animation = "idle"  animation_blend_time = 0 chance = 3.0 looping = no next_state = idle}
   state = { name = "idle"  animation = "idle2"  animation_blend_time = 0 chance = 1.0 looping = no next_state = idle}

   state = { name = "sad"  animation = "sad"  animation_blend_time = 0 chance = 3.0 looping = no next_state = sad}
   state = { name = "sad"  animation = "sad2"  animation_blend_time = 0 chance = 1.0 looping = no next_state = sad}
   scale = @humanscale
}

_human_portrait_meshes.gfx

pdxmesh = {
        name = "portrait_human_male_06_mesh"
        file = "gfx/models/portraits/human/human_male_06_portrait.mesh"
        animation = { id = "idle"    type = "human_male_06_happy_animation" }
        animation = { id = "idle2"    type = "human_male_06_happy_2_animation" }
        animation = { id = "sad"    type = "human_male_06_sad_animation" }
        animation = { id = "sad2"    type = "human_male_06_sad_2_animation" }
        scale = 1.0
    }
So, is there a way to add a new phenotype (ie. face) without having to create a new mesh? I just don't have Maya. Can I just alter it so it uses a different texture somehow? I need to look into this, I could have sworn I saw an alien race using different textures.



A look at my code...
Code:
    #leader scope
    leader = { #scientists, generals, admirals, governor

        random = {
            trigger = { leader_class = general }
            list = {
            "gfx/models/portraits/human/human_male_clothes_general.dds"
            "gfx/models/portraits/human/human_male_clothes_generalb.dds"
            "gfx/models/portraits/human/human_male_clothes_generalg.dds"
            "gfx/models/portraits/human/human_male_clothes_military.dds"
            "gfx/models/portraits/human/human_male_clothes_military2.dds"
            "gfx/models/portraits/human/human_male_clothes_general_corp.dds"
            "gfx/models/portraits/human/human_male_clothes_general2_corp.dds"
            "gfx/models/portraits/human/human_male_clothes_general_democracy.dds"
            "gfx/models/portraits/human/human_male_clothes_general_militant.dds" = { owner = { has_government = military_dictatorship } }
                }
            }

        random = {
            trigger = { leader_class = admiral }
            list = {
            "gfx/models/portraits/human/human_male_clothes_admiral.dds"
            "gfx/models/portraits/human/human_male_clothes_admiralb.dds"
            "gfx/models/portraits/human/human_male_clothes_admiral_corp.dds"
            "gfx/models/portraits/human/human_male_clothes_admiral_democracy.dds"
            "gfx/models/portraits/human/human_male_clothes_admiral_militant.dds" = { owner = { has_government = military_dictatorship } }
                }
            }
        
        random = {
            trigger = { leader_class = scientist }
            list = {
        "gfx/models/portraits/human/human_male_clothes_scientist.dds"
        "gfx/models/portraits/human/human_male_clothes_labcoat1.dds"
        "gfx/models/portraits/human/human_male_clothes_labcoat2.dds"
        "gfx/models/portraits/human/human_male_clothes_science_corp.dds"
        "gfx/models/portraits/human/human_male_clothes_science_democracy.dds"
        "gfx/models/portraits/human/human_male_clothes_science_militant.dds"  = { owner = { has_government = military_dictatorship } }
        "gfx/models/portraits/human/human_male_clothes_science2_militant.dds"  = { owner = { has_government = military_dictatorship } }
                }
            }
    
        
        random = {
            trigger = { leader_class = governor }
            list = {
        "gfx/models/portraits/human/human_male_clothes_governer.dds"
        "gfx/models/portraits/human/human_male_clothes_ruler_corp.dds"
        "gfx/models/portraits/human/human_male_clothes_ruler_democracy.dds"
        "gfx/models/portraits/human/human_male_clothes_ruler2_democracy.dds"
        "gfx/models/portraits/human/human_male_clothes_ruler3_democracy.dds"
        "gfx/models/portraits/human/human_male_clothes_ruler4_democracy.dds"
        "gfx/models/portraits/human/human_male_clothes_ruler_militant.dds"  = { owner = { has_government = military_dictatorship } }
                }
            }
How do I get this to select leader clothing from a list BUT is also dependent on government type? SOLVED (SEE BELOW) I'm gonna try and remove the random code when I get home and see if that works with the has_government but I think I'm doing it all wrong. Right now those (with the has_government code) show up as bugged but it does randomly select an outfit from the list; the lists are working.
 
Last edited:
Yes. That's what I use:
Code:
"gfx/models/portraits/chick/chick_clothes_slave.dds" = { is_enslaved = yes }
It works without problem. However you have to reload the window first.
THANK YOU!! it works like a charm :)

I've added the solution to the first post for future reference if someone has the same problem.

Now I have to find the answer to my other questions :D

I have the feeling the clothes of pops for different planet types should something similar, l know there is an is_planet what I don't know if ithere exists is_planet = arid or sometthing like that, I cana't find it in the wiki.

I'm closer now :D
 
THANK YOU!! it works like a charm :)

I've added the solution to the first post for future reference if someone has the same problem.

Now I have to find the answer to my other questions :D

I have the feeling the clothes of pops for different planet types should something similar, l know there is an is_planet what I don't know if ithere exists is_planet = arid or sometthing like that, I cana't find it in the wiki.

I'm closer now :D
I didn't test it, but maybe something like that:
Code:
"gfx/models/portraits/chick/chick_clothes_slave.dds" = { planet = { is_planet_class = pc_arid } }

is_enslaved = yes worked because you are already in a pop scope. However, when you want to check what type of planet the pop is on, you have to change the scope. Planet types are all declared in common/planet_classes.
 
  • 1
Reactions:
I think these sort of mods are just entire texture swaps for the humans. When I checked it out it didn't check for government type or anything.
I think I've figured out how to get it to pick between various images, just not how to do that AND a government type.This stuff is tough! I can share my code later.
How do I get this to select leader clothing from a list BUT is also dependent on government type? I'm gonna try and remove the random code when I get home and see if that works with the has_government but I think I'm doing it all wrong. Right now those (with the has_government code) show up as bugged but it does randomly select an outfit from the list; the lists are working.

I answered how to pick between various images in my response above. About how to make the game choose between images based on leader AND government type... it is there also. The game chooses between different clothes for the ruler based on the government type.

[Edit] Oh, I get it now. You want the game to give appropriate clothes based on government type to the leaders, not just the ruler. Then I guess you could try this:

Code:
leader = { #scientists, generals, admirals, governor
        random = {
            trigger = { leader_class = scientist }
            list = {
                "gfx/models/portraits/human/human_male_clothes_scientist.dds"      = { owner = { has_government = military_dictatorship } }
                "gfx/models/portraits/human/human_male_clothes_scientist2.dds"    = { owner = { has_government = martial_empire } }
                "gfx/models/portraits/human/human_male_clothes_scientist3.dds"    = { owner = { has_government = military_junta } }
            }
        }

I see that's similar to your code and it should work. It works for me letting it select between various garments for scientist, granted I didn't specify the has_government but it should work.
So, is there a way to add a new phenotype (ie. face) without having to create a new mesh? I just don't have Maya. Can I just alter it so it uses a different texture somehow? I need to look into this, I could have sworn I saw an alien race using different textures.

Yes, there is. My species is a completely drawn from scratch new texture over the human meshes, it works and animates properly. I took a screenshot where @Captain Gars answered that question. Here you have it, under the spoiler button

1y0m6FM.png
 
  • 1
Reactions:
I didn't test it, but maybe something like that:
Code:
"gfx/models/portraits/chick/chick_clothes_slave.dds" = { planet = { is_planet_class = pc_arid } }

is_enslaved = yes worked because you are already in a pop scope. However, when you want to check what type of planet the pop is on, you have to change the scope. Planet types are all declared in common/planet_classes.

yep, that's my problem. I'm an artist, not a coder or a modder really and while I'm decyphering it bit by bit there's a lot of files to look for and even then to try to grasp the meaning of all those things (conditions, scope, effects...). I mean I know the meaning of course (although english is not my mother tongue) but apply it to the scripting context... is another matter :D.

I went crazy drawing things and having ideas thinking they would be relatively easy to implement but...

For example the thing about changing scientist clothes depending on if they're on a ship or not, in my mind should be similar to the slave clothes thing (I've found an is_ship_class) but I can't seem to find how to apply that. I burn my eyelashes reading but...

Thank you so much. I'll try the planet thing code tomorrow ok, I oficially owe you a couple of your favourite beverage. It works!. I'm a happy artist being able to give my pops different clothes based on the type of planet. Now I'm closer to get all I wanted added :D
 
Last edited:
For example the thing about changing scientist clothes depending on if they're on a ship or not, in my mind should be similar to the slave clothes thing (I've found an is_ship_class) but I can't seem to find how to apply that. I burn my eyelashes reading but...
This one might be impossible currently... As far as I know, there's no way to check what a leader is doing, apart from researching. I can't think of any way how to make it work. The best you could do right now is to ask for triggers to do this in modding suggestions thread.
 
  • 1
Reactions:
I answered how to pick between various images in my response above. About how to make the game choose between images based on leader AND government type... it is there also. The game chooses between different clothes for the ruler based on the government type.

[Edit] Oh, I get it now. You want the game to give appropriate clothes based on government type to the leaders, not just the ruler. Then I guess you could try this:

Code:
leader = { #scientists, generals, admirals, governor
        random = {
            trigger = { leader_class = scientist }
            list = {
                "gfx/models/portraits/human/human_male_clothes_scientist.dds"      = { owner = { has_government = military_dictatorship } }
                "gfx/models/portraits/human/human_male_clothes_scientist2.dds"    = { owner = { has_government = martial_empire } }
                "gfx/models/portraits/human/human_male_clothes_scientist3.dds"    = { owner = { has_government = military_junta } }
            }
        }

I see that's similar to your code and it should work. It works for me letting it select between various garments for scientist, granted I didn't specify the has_government but it should work.
Right now I've got it randomly selecting between all of the various styles of outfits for the scientist role. Unfortunately, when I try and restrict them to a specific government type it causes issues and isn't functioning properly. I think the has_government check needs to go somewhere else, perhaps in the trigger; anyone know how to do this?

This is still a step forward for me as it's selecting from a list of clothing... I just need it to select for specific government types.


Yes, there is. My species is a completely drawn from scratch new texture over the human meshes, it works and animates properly. I took a screenshot where @Captain Gars answered that question. Here you have it, under the spoiler button

1y0m6FM.png
Thanks for sharing this. I was definitely missing the .gfx file for this and had the files located in the wrong spot. Hopefully this will fix it. Going to test it now! :D

EDIT: I cannot seem to get the new phenotype to actually show up and followed all of these instructions? Am I missing something? :(
 
Last edited:
This one might be impossible currently... As far as I know, there's no way to check what a leader is doing, apart from researching. I can't think of any way how to make it work. The best you could do right now is to ask for triggers to do this in modding suggestions thread.
Thanks for taking the time to look into it. I've posted the request in the modding suggestions thread, don't hold up my hopes too high but hey :)

Seems like the majority of my questions are answered, three majors and one minor. Just have to look for the answer for the backgrounds. I think those should be triggerable without having to depend on the government type, as they are more representative of the architecture of a species. I'll try my luck again on the quick questions thread O_O

I guess at least for the diplomacy one I could create a new government type, apply that to my species in a prescripted file and tie the background to that. But then I wouldn't be able to use the regnal_name to keep my ruler always with the same name, as it only works with monarchy type governments....

For the leader backgrounds I could make them overwrite the vanilla ones but I don't want to do that.
 
Last edited:
So, I think I've found the way to code where it checks government type AND role and selects one from a list but it's not working. Could someone with some coding knowledge take a look at this and see what the problem is? SOLVED (SEE BELOW)

Code:
        random = {
            trigger = { leader_class = general
                OR = {
                    owner = { has_government = military_dictatorship }
                    owner = { has_government = military_junta }
                    owner = { has_government = ordered_stratocracy }
                    owner = { has_government = military_republic }
                    owner = { has_government = military_dictatorship }
                    owner = { has_government = martial_demarchy }
                    owner = { has_government = pirate_codex }
                }
            }
                "gfx/models/portraits/human/human_male_clothes_military.dds"
                "gfx/models/portraits/human/human_male_clothes_military2.dds"
                "gfx/models/portraits/human/human_male_clothes_general_militant.dds"
        }

This is just for one form of government. I'd like to have it for all of them. Right now it bugs out and changes what they look like based on what you're looking at (a general looks like a scientist or governor, depending on what you're looking at). This is the closest I've gotten so far!

EDIT: Wait, I think I've gotten it working.

STAND BY!
 
Last edited:
Ok, I've gotten it working and released my mod. The only stumbling block was getting the triggers to work correctly. Here is how it was done!

How to do a role/government check. SOLVED!

gfx\portraits\asset_selectors
Code:
# GOVERNOR
        #MILITANT
        random = {
            trigger = { leader_class = governor
                OR = {
                    owner = { has_government = military_dictatorship }
                    owner = { has_government = military_junta }
                    owner = { has_government = ordered_stratocracy }
                    owner = { has_government = military_republic }
                    owner = { has_government = military_dictatorship }
                    owner = { has_government = martial_demarchy }
                  
                    owner = { has_government = pirate_codex }
                  
                    owner = { has_government = irenic_monarchy }
                    owner = { has_government = despotic_empire }
                    owner = { has_government = star_empire }
                }
            }
            list = {
                "gfx/models/portraits/human/human_male_clothes_ruler_militant.dds"
                }
            }
I just do one of these for each block of government types (currently split into militant, corporate, republic, theocratic, other, and primitive). It checks for the particular leader role and then if it has a particular government type and then selects from the list of options.

Does anyone know how to weigh these choices so that one item shows up 10% of the time and another 90%? That's probably the only next progression that I need to accomplish.

Anyways, this is a HUGE step for me and my mod. Opportunities are endless. Thanks everyone for your help!

Link:
Fox Cosmetic Mod