Jump to content

[mod] Portrait Mod Builder


Arcess

Recommended Posts

Posted (edited)

Portrait Mod Builder

View File

Portrait Mod Builder

 

Requires ability to run shell scripts

 

Windows 10:

 

 

Linux or Mac:
You may need to make the scripts executable with chmod +x

 

Usage:

  1. Create new mod with PDX launcher.
  2. Run run.sh with the location of the mod as an argument.
    • e.g. 
      ./run.sh  /mnt/c/Users/<USER NAME>/Documents/Paradox\ Interactive/Stellaris/mod/my_new_portrait_mod

       

  3. Select option 1 to create the basic directory structure.
  4. Select option 2 and set the name and species class for each portrait you intend to create.
    • Name will be sanitised (lowercase, non-alphanumeric converted to underscores) to prevent issues.
    • Directory structures will be created for each portrait.
    • Portrait names ending with "_anim" will generate animated portrait phenotypes that require further editing.
  5. Fill the directories below with portrait textures (dxt5, no mipmaps, 420x320 for static portraits).
    Tier 1 - always appears:
    /gfx/models/portraits/<PORTRAIT NAME> - Non-gendered or no dimorphism, will always appear e.g. Robots
    
    Tier 2 - gendered:
    /gfx/models/portraits/<PORTRAIT NAME>/masc - Masculine body
    /gfx/models/portraits/<PORTRAIT NAME>/fem - Feminine body
    /gfx/models/portraits/<PORTRAIT NAME>/andro - Androgynous body
    
    Tier 3 - sexed:
    /gfx/models/portraits/<PORTRAIT NAME>/masc/male - Masculine male
    /gfx/models/portraits/<PORTRAIT NAME>/masc/female - Masculine female
    /gfx/models/portraits/<PORTRAIT NAME>/masc/herm - Masculine hermaphrodite
    /gfx/models/portraits/<PORTRAIT NAME>/fem/male - Feminine male
    /gfx/models/portraits/<PORTRAIT NAME>/fem/female - Feminine female
    /gfx/models/portraits/<PORTRAIT NAME>/fem/herm - Feminine hermaphrodite
    /gfx/models/portraits/<PORTRAIT NAME>/andro/male - Androgynous male
    /gfx/models/portraits/<PORTRAIT NAME>/andro/female - Androgynous female
    /gfx/models/portraits/<PORTRAIT NAME>/andro/herm - Androgynous hermaphrodite
    • Name is not important.
    • Having textures present in all directories of an entire tier is recommended.
  6. Select option 3 to generate portrait code based on detected textures.
    • Generated code:
      • Scripted triggers
      • Portrait Categories and Sets ("Other" setting will need manual renaming)
      • Phenotypes (animated portraits will need manual editing)
      • Portrait groups
    • Scripted triggers behave differently depending on whether tier 3 is filled:
      • If tier 3 is not filled, special triggers overwritten by other mods will affect tier 2
      • If tier 3 is filled, special triggers overwritten by other mods will not affect tier 2 behaviour but instead affect tier 3

    


 

Edited by Arcess
  • 1 month later...
  • 5 months later...
Posted

After struggling with this for a few days using Bash I managed to get it to spit out a portrait mod to completion. However, this portrait mod does not appear to function despite the update. It's a mammalian set but does not appear in the mammalian section nor any other section; even with all other mods turned off.

Posted

it took me a minute to get used to the Linux setup, but once I got it to work, I go to say, this is honestly the easiest portrait mod maker I've worked with, Now, if I can find one that works for namelists. I've found two that supposed work with python, but neither wants to operate, and my hand-built name list doesn't do sequential names well and occastion. Anyway, thanks for the shell script, it really does work well for me. I now have to go through and update my portraits, as even though they work now a small handful are off-center, but that's probably a legacy from the tutorial to make them off-center.

Posted
3 hours ago, SchwhatNow said:

After struggling with this for a few days using Bash I managed to get it to spit out a portrait mod to completion. However, this portrait mod does not appear to function despite the update. It's a mammalian set but does not appear in the mammalian section nor any other section; even with all other mods turned off.

Did you use the older version for the setup? Starting from scratch using the updated scripts should create all the right folders and let the portrait naming part create the set and category files.

 

I'm not sure what else related to the scripts could have caused portraits to not appear.

 

Otherwise I would have to see the mod you produced to see what the problem is.

 

1 hour ago, DairuggerXV said:

it took me a minute to get used to the Linux setup, but once I got it to work, I go to say, this is honestly the easiest portrait mod maker I've worked with, Now, if I can find one that works for namelists. I've found two that supposed work with python, but neither wants to operate, and my hand-built name list doesn't do sequential names well and occastion. Anyway, thanks for the shell script, it really does work well for me. I now have to go through and update my portraits, as even though they work now a small handful are off-center, but that's probably a legacy from the tutorial to make them off-center.

Ease of use was one of the design goals, allowing portrait mod makers to spend more time and effort on the actual art. Another was having the user naming there so mods made by the scripts won't clash unless users use the exact same names for their portraits.

 

I haven't looked into namelists, only did the bare minimum for the example mod I tossed on Steam.

Posted (edited)
On 6/4/2024 at 11:34 AM, Arcess said:

Did you use the older version for the setup? Starting from scratch using the updated scripts should create all the right folders and let the portrait naming part create the set and category files.

 

I'm not sure what else related to the scripts could have caused portraits to not appear.

 

Otherwise I would have to see the mod you produced to see what the problem is.

 

 

I ultimately ended up re-downloading the scripts today when I went through and got it working so it should be the most updated version. Still I can give you the mod it created easily enough to see if you notice anything out of the ordinary.

 

Edited by SchwhatNow
Posted

Looks like the issue is having spaces in the portrait name, which pass all the way through to the result, which the game doesn't handle well.

 

I'll see about converting whitespaces to underscores (and probably lowercase for consistency) in the next version.

Posted
On 6/5/2024 at 3:22 PM, Arcess said:

Updated scripts to sanitise user input for portrait name.

Can confirm that the update did the trick after I remade the mod. Thanks for the investigation and quick update.

Posted

As a side note, am I'm not sure if this is intentional and I missed a mention of it, but when creating Machine/Robot portrait mods with this script it forgets to add the "species_class = ROBOT" line into portrait_sets so they are only selectable for machines unless we manually add that line in.

  • 4 months later...
Posted
On 10/14/2024 at 10:16 AM, Platinphoenixx said:

So, how does it work with animated portraits? I can't find any info on that.

 

It adds basic lines that you have to fill in yourself.

 

The particulars are out of scope for the tool, you still have to know what you're doing for animated portraits.

 

See the Stellaris wiki, vanilla code and other animated portrait mods for examples and actual assets to use.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...