• 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.
And the clothes of scientists depending on if they are commanding a ship or researching "on planet"? (having the ones on the ship with kind of a uniform and the ones on the research screen show a lab coat for example)

You can try " is_researching_area" , i don't know if it is true when he is actually researching a tech or just assigned to physics/engin./society
 
  • 1
Reactions:
You can try " is_researching_area" , i don't know if it is true when he is actually researching a tech or just assigned to physics/engin./society
Yes, I'm not proficient enough with coding but yesterday night it ocurred to me that perhaps I could try to do it BACKWARDS, instead of having the labcoat as default and then look if the scientist is on a ship to give him the uniform clothes, I could try the other way around. Have the uniform as default and then look if the scientist is doing research to give him the labcoat clothes. Does that make sense?

I'm not good at knowing scopes, triggers and effects yet. And there's no official explanation as to what any of them does but...

[Edit]
In only want the uniform scientist clothes when they're commanding a science ship so if is_researching_area is true in any of those cases I think it would work. Besides the scientists only are either researching or in a ship, unless you hire more than you need and then have them doing nothing in your pool, right?.

I can think this method can act weird when/if you tell a science ship to help research on a planet, so then the scientist on that ship will be actually doing research and thus their clothes would change back but... I think I could live with that if there's nothing better.
 
Last edited:
  • 2
Reactions:
I'm not good at knowing scopes, triggers and effects yet. And there's no official explanation as to what any of them does but...
Welcome to the past three days of my life, lol :p

You, honestly, just got to play with it and see what things do. Also, search other files for code that can help. Might help to even look at how some events are handled.
 
Yes, I'm not proficient enough with coding but yesterday night it ocurred to me that perhaps I could try to do it BACKWARDS, instead of having the labcoat as default and then look if the scientist is on a ship to give him the uniform clothes, I could try the other way around. Have the uniform as default and then look if the scientist is doing research to give him the labcoat clothes. Does that make sense?

I'm not good at knowing scopes, triggers and effects yet. And there's no official explanation as to what any of them does but...

[Edit]
In only want the uniform scientist clothes when they're commanding a science ship so if is_researching_area is true in any of those cases I think it would work. Besides the scientists only are either researching or in a ship, unless you hire more than you need and then have them doing nothing in your pool, right?.

I can think this method can act weird when/if you tell a science ship to help research on a planet, so then the scientist on that ship will be actually doing research and thus their clothes would change back but... I think I could live with that if there's nothing better.
Good thinking, it should work perfectly.
 
Good thinking, it should work perfectly.
It's been a long work day and I couldn't try until now.

I know it should work, but it doesn't and I'm pretty sure is my code.

At first I tried (yeah, I didn't look at the triggers "cheatsheet" at first) what I assumed would work

Code:
leader = { #scientists, generals, admirals, governor
        random = {
            trigger = { leader_class = scientist }
            list = {
                "gfx/models/portraits/human/human_male_clothes_scientist.dds"        = { is_researching_area = yes }
                "gfx/models/portraits/human/human_male_clothes_scientist3.dds"
                     }
                 }

And of course it didn't work because the trigger is not expecting a yes (or an any, I tried), as per the example in the triggers wiki it's expecting a type of research like engineering.

So I tried:
Code:
random = {
            trigger = { leader_class = scientist }
            list = {
                "gfx/models/portraits/human/human_male_clothes_scientist.dds"          = { is_researching_area = engineering }
                "gfx/models/portraits/human/human_male_clothes_scientist.dds"          = { is_researching_area = society }
                "gfx/models/portraits/human/human_male_clothes_scientist.dds"          = { is_researching_area = physics }
                "gfx/models/portraits/human/human_male_clothes_scientist3.dds" 
             
         
            }
        }

And it also doesn't work, when you see female clothes appearing on males.... you know something's borked :)
even just trying lines just one by one.

As I said I'm not a coder so I can think solutions but when it's time to do the syntax....

is_researching_area has leaders as a scope so I shouldn't need to change that right? anyone knows the correct way to write that?
 
Maybe try this? I have not modded portraits yet, but this could work.
Code:
    leader = { #scientists, generals, admirals, governor
        "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 } }
        "gfx/models/portraits/human/human_male_clothes_general.dds" = { leader_class = general }
        "gfx/models/portraits/human/human_male_clothes_admiral.dds" = { leader_class = admiral }
        "gfx/models/portraits/human/human_male_clothes_governer.dds" = { leader_class = governor }
    }
 
  • 1
Reactions:
Maybe try this? I have not modded portraits yet, but this could work.
Code:
    leader = { #scientists, generals, admirals, governor
        "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 } }
        "gfx/models/portraits/human/human_male_clothes_general.dds" = { leader_class = general }
        "gfx/models/portraits/human/human_male_clothes_admiral.dds" = { leader_class = admiral }
        "gfx/models/portraits/human/human_male_clothes_governer.dds" = { leader_class = governor }
    }


That's perfect! Thanks!

It works perfectly, I knew it was my code :)

FovHOTP.jpg


Now, the only two things left on the list on the first post, the images for diplomacy and leaders, I think that can't be done, though I'm not sure.

But thanks to all the help from you all I've ,managed to acomplish most of what I wanted to do.
 
Last edited:
  • 1
Reactions:
Holy cow, how did you draw those? They look outstanding!
Haha, thanks, glad you like them.

I've redrawn the males completely with a little variation in phenotypes (no more two "white" phenotypes). And I'll do the same with women though since they work I prefer to first have all the elements i want to have and then polish.

About how... hehe, well, that's what I do, I'm an illustrator /graphic artist/ whateveryouwannacallit ;)
 
  • 1
Reactions:
I'm gonna post here the same I posted on the quick questions thread. That thread goes really quickly and I think it has organically converted into a "deep modding" thread, not bad, orf course but graphics questions don't usually receive an answer. I feel perhaps we need a "Quick questions thread - Graphics" or something like that.

Anyway, this is referred to one of the questions on my opening post here.

Does anyone know if I can add a new room texture without it being dependent on the ethic of the empire?

I want to add this image

fHhXfAh.jpg


and make it so it always get selected when I choose one species - a new custom one I'm making, but for now I'm using humans as a template.

I've used
Code:
game_setup = {  
        default = "ethic_pacifist_room"
        "custom_room" = {is_species_class = human}
     }

#leader scope
    ruler = {
        "custom_room" = { exists = owner owner = { is_species_class = human } }

and

Code:
game_setup = {  
        default = "ethic_pacifist_room"
         "custom_room" = {owner_species = human}
}
#leader scope
    ruler = {
        "custom_room" = { exists = owner owner = { owner_species = human } }

without success. I'm not a coder as you can see. I though perhaps with if + owner_species + set ?

Or maybe make it dependent of the city set with graphical_culture, since I plan on adding a new one also.

Problem is I don't know if those scopes are useful in this case or what...
 
  • 1
Reactions:
I made some "advancements"

I've acomplished... something

In room_texture I've used
Code:
game_setup = {  
        default = "ethic_pacifist_room"
      
        "custom_room" = {graphical_culture = mammalian_01}     
      
      
      
    }

    #leader scope
    ruler = {
      
        "custom_room" = {exists = owner owner = {graphical_culture = mammalian_01}}
             
      
    }
}

then, upon entering the game I thought I got it, on the presaved empires I have, those with the mammalian city show my image (as per the code) and those with other city sets didn't. This would also work for me since I'm doing a custom city set to go with this species so no biggie.

But then, every time I create a new empire, whatever the city set I chose and whatever the species all I get is my custom image :(. Exit and reenter the game does nothing.

I could use my image no problem seting it as the default one but what I want is being able to pass this mod without "overwriting" the room .

I'm really lost here. I don't even know if what I'm trying to accomplish is possible. This half positive result may indicate that it is but.... I don't know
 
  • 1
Reactions:
Does the room still stay the same when you change your ethics? Changing the species doesn't affect the room at all, and the default room is the human one, so setting that as the graphical culture might not be advised.
 
Does the room still stay the same when you change your ethics? Changing the species doesn't affect the room at all, and the default room is the human one, so setting that as the graphical culture might not be advised.
Oh, hey!

Well that code doesn't change the default room. When entering the game with that code, among the premade species on my list, ONLY those with the mammalian city type show my image. Problem is what happens after that. It almost worked though :(


My entry is added at the beginning of the list. I just showed the code I changed, the complete code in the file is this:
Code:
room_selector = {
    #default = "d_room"    #point to textures that end with "_room.dds" but remove the file ending

    default = "ethic_collectivist_room"    #point to textures that end with "_room.dds" but remove the file ending

    #will run with a limited country scope. species and government is set but the country does not actually exist
    game_setup = {  
        default = "ethic_pacifist_room"
         
        "custom_room" = {graphical_culture = mammalian_01}
        "ethic_collectivist_room" = { has_ethic = ethic_fanatic_collectivist }
        "ethic_individualist_room" = { has_ethic = ethic_fanatic_individualist }
        "ethic_materialist_room" = { has_ethic = ethic_fanatic_materialist }
        "ethic_militarism_room" = { has_ethic = ethic_fanatic_militarist }
        "ethic_pacifist_room" = { has_ethic = ethic_fanatic_pacifist }
        "ethic_spiritualism_room" = { has_ethic = ethic_fanatic_spiritualist }
        "ethic_xenophile_room" = { has_ethic = ethic_fanatic_xenophile }
        "ethic_xenophobe_room" = { has_ethic = ethic_fanatic_xenophobe }
        "ethic_collectivist_room" = { has_ethic = ethic_collectivist }
        "ethic_individualist_room" = { has_ethic = ethic_individualist }
        "ethic_materialist_room" = { has_ethic = ethic_materialist }
        "ethic_militarism_room" = { has_ethic = ethic_militarist }
        "ethic_pacifist_room" = { has_ethic = ethic_pacifist }
        "ethic_spiritualism_room" = { has_ethic = ethic_spiritualist }
        "ethic_xenophile_room" = { has_ethic = ethic_xenophile }
        "ethic_xenophobe_room" = { has_ethic = ethic_xenophobe }
    }

    #leader scope
    ruler = {
          
        "custom_room" = {exists = owner owner = {graphical_culture = mammalian_01}}
        "ethic_collectivist_room" = { exists = owner owner = { has_ethic = ethic_fanatic_collectivist } }
        "ethic_individualist_room" = { exists = owner owner = { has_ethic = ethic_fanatic_individualist } }
        "ethic_materialist_room" = { exists = owner owner = { has_ethic = ethic_fanatic_materialist } }
        "ethic_militarism_room" = { exists = owner owner = { has_ethic = ethic_fanatic_militarist } }
        "ethic_pacifist_room" = { exists = owner owner = { has_ethic = ethic_fanatic_pacifist } }
        "ethic_spiritualism_room" = { exists = owner owner = { has_ethic = ethic_fanatic_spiritualist } }
        "ethic_xenophile_room" = { exists = owner owner = { has_ethic = ethic_fanatic_xenophile } }
        "ethic_xenophobe_room" = { exists = owner owner = { has_ethic = ethic_fanatic_xenophobe } }
        "ethic_collectivist_room" = { exists = owner owner = { has_ethic = ethic_collectivist } }
        "ethic_individualist_room" = { exists = owner owner = { has_ethic = ethic_individualist } }
        "ethic_materialist_room" = { exists = owner owner = { has_ethic = ethic_materialist } }
        "ethic_militarism_room" = { exists = owner owner = { has_ethic = ethic_militarist } }
        "ethic_pacifist_room" = { exists = owner owner = { has_ethic = ethic_pacifist } }
        "ethic_spiritualism_room" = { exists = owner owner = { has_ethic = ethic_spiritualist } }
        "ethic_xenophile_room" = { exists = owner owner = { has_ethic = ethic_xenophile } }
        "ethic_xenophobe_room" = { exists = owner owner = { has_ethic = ethic_xenophobe } }
    }
}

Yep, that's the problem. I don't want my room to be the default one since it would get changed upon selecting any ethics. And I don't want it to change anything vanilla if, for example I'm playing multiplayer I have to give my mod to the other players so they can see my species but I don't want their rooms getting overwritten with mine.

Tha's why I want to be able to make the room dependent on any other thing but the ethics. Something I can link with my custom species. It seems the rooms are linked with the ethics via conditionals and the owner scope so I thought I could use another condition or the scope owner_species to do what I want. But I'm not a coder and I don't really know what I'm doing. The only thing I could cobble together that seems to almost work is using the graphical_culture and since I'm doing also a custom graphical culture for my species that wouldn't overwrite anything.

Ugh, I'm finishing with the actual drawing part of the mod and I'm seeing the code is gonna drive me crazy....
 
Last edited:
  • 1
Reactions:
Now, maybe I'm looking at this wrong... I remember that in 07_human_portraits you define the position of the portraits over the rooms. There's a line there that says:

Code:
room = {
    size = { x = 952 y = 340 }
  
    room_texture_selector = "room_selector"
    character = {                        #Character position in room
        orientation = lower_left
        position = { x = 200 y = 0 }
        scale = 1.0
    }

Could I add the texture directly there in room_texture_selector? instead of letting it go to the room _selector, maybe set it for my species (of course in a 08_myspecies_portraits.txt)

[EDIT] Scrap that, somehow I mixed 00_portraits_main (where the selector for rooms is located) and 07_portraits_human in my head and changin things in the former changes things for everybody. I don't know if you can reduce the scope of that to only one species...
 
Last edited:
There's a conditional that can be evaluated in the same scope as has_ethic called is_species. Try that instead?

I'm dangitsdaaaaang on Steam btw.
 
There's a conditional that can be evaluated in the same scope as has_ethic called is_species. Try that instead?

I'm dangitsdaaaaang on Steam btw.

Didn't see that conditional in the wiki? might have skiped it, though non being a coder, I was looking exactly for that.

But...
Doesn't work, nothing, nada :mad:

Up until now the only thing that showed some reaction was that graphical_culture. And if it did something it should be possible, it means the selector isn't locked onto the has_ethics right?

And this image is just one thing of the bunch I have doubts about how to code when I finally have all the images, soon. :eek:.

wow, what a name :D though caocao reminds me of a chinese general and a game ... dynasty warriors?. Heading to bed but I'll add you ;)

[EDIT] Nevermind I see you were advicing me :)
 
I added you, just wasn't sure if you would add people out of nowhere so I hoped that would explain it.

Let's talk about this more over PM; we're working on very similar projects and can only benefit from helping each other solve these modding dilemmas.