Arcess Posted November 11, 2023 Posted November 11, 2023 (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: Create new mod with PDX launcher. 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 Select option 1 to create the basic directory structure. 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. 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. 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 Submitter Arcess Submitted 11/12/2023 Category Stellaris Requires Edited November 11, 2023 by Arcess 6
schroecat Posted November 14, 2023 Posted November 14, 2023 Great work. I've always been a big believer that anything that can be automated, should be automated. 2
sen4mi Posted December 30, 2023 Posted December 30, 2023 Do I have to download this mod to figure out the starting point (what it works on)?
Arcess Posted December 30, 2023 Author Posted December 30, 2023 Reading the usage instructions above is also an option.
Arcess Posted June 2, 2024 Author Posted June 2, 2024 Updated to 3.12.3, so now the scripts generate portrait sets and appends to vanilla categories. 1
SchwhatNow Posted June 4, 2024 Posted June 4, 2024 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.
DairuggerXV Posted June 4, 2024 Posted June 4, 2024 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.
Arcess Posted June 4, 2024 Author Posted June 4, 2024 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.
SchwhatNow Posted June 4, 2024 Posted June 4, 2024 (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 June 7, 2024 by SchwhatNow
Arcess Posted June 5, 2024 Author Posted June 5, 2024 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.
Arcess Posted June 5, 2024 Author Posted June 5, 2024 Updated scripts to sanitise user input for portrait name.
SchwhatNow Posted June 7, 2024 Posted June 7, 2024 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.
SchwhatNow Posted June 8, 2024 Posted June 8, 2024 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.
Platinphoenixx Posted October 13, 2024 Posted October 13, 2024 So, how does it work with animated portraits? I can't find any info on that.
Arcess Posted October 15, 2024 Author Posted October 15, 2024 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now