### Dynamically Generate Individual Portrait Entries using Jinja2 Source: https://github.com/yiyuezhuo/stellaris-portrait-mod-creator/blob/master/gfx_portraits_portraits_template.txt This snippet uses Jinja2 templating to dynamically generate individual portrait definitions. It iterates through a `label_list` to create unique portrait entries, each specifying default selectors for clothes and hair, a greeting sound, and a texture file path derived from a `label_map`. This allows for programmatic creation of many portrait entries. ```Stellaris Scripting with Jinja2 portraits = { {% for label in label_list %} {{label}} = { clothes_selector = "no_texture" hair_selector = "no_texture" greeting_sound = "mammalian_01_greetings" texturefile = "{{ label_map[label] }}" } {% endfor %} } ``` -------------------------------- ### Define Stellaris Species Base Properties Source: https://github.com/yiyuezhuo/stellaris-portrait-mod-creator/blob/master/common_species_names_template.txt This configuration block specifies the core attributes for a collection of generated species. Each species entry includes its singular and plural names, designated home planet and system, and a reference to a name list used for character and ship naming conventions. This data is crucial for populating the game with diverse species. ```Stellaris Script {{ specie_name }} = { kroll = { name = Kroll plural = Kroll home_planet = "Krolldar Prime" home_system = Krolldar name_list = "MAM1" } orassian = { name = Orassian plural = Orassians home_planet = Orassia home_system = Orass name_list = "MAM2" } aramathi = { name = Aramathi plural = Aramathi home_planet = Arakim home_system = Aramus name_list = "MAM3" } immutharan = { name = Immutharan plural = Immutharans home_planet = Immuth home_system = Immuthor name_list = "MAM2" } hiffnar = { name = Hiffnar plural = Hiffnari home_planet = Hiffnus home_system = Hiff name_list = "MAM4" } zaanami = { name = Zaanami plural = Zaanami home_planet = Zaanamar home_system = Zaan name_list = "MAM5" } estwani = { name = Estwani plural = Estwani home_planet = Estwaana home_system = Wani name_list = "MAM3" } vailon = { name = Vailon plural = Vailons home_planet = Vallgar ``` -------------------------------- ### Define Character Portrait Base Properties in Stellaris Script Source: https://github.com/yiyuezhuo/stellaris-portrait-mod-creator/blob/master/gfx_portraits_portraits_template.txt This snippet defines the base properties for a character portrait, including its overall size and the positioning and scaling of its 3D entity and 2D icon. It sets the bounding box for the portrait, and specifies how the character model and its flat icon are rendered within that space. ```Stellaris Scripting character = { size = { x = 475 y = 380 } entity = { orientation = center_down position = { x = 50 y = -20 } scale = 24 } #2d Portrait position icon = { orientation = center_down position = { x = 0 y = 0 } scale = 1.0 } } ``` -------------------------------- ### Jinja2 Template for Stellaris Species Portrait Definition Source: https://github.com/yiyuezhuo/stellaris-portrait-mod-creator/blob/master/common_species_classes_template.txt This Jinja2 template snippet defines a species entry for Stellaris, dynamically populating the 'portraits' block using a loop over a 'portraits_list' variable. It also sets static attributes like 'graphical_culture' and 'move_pop_sound_effect', which are common for species definitions in Stellaris modding. ```Jinja2 {{ specie_name }} = { portraits = { {%- for portraits in portraits_list %} "{{- portraits.name -}}" {% endfor %} } graphical_culture = mammalian_01 move_pop_sound_effect = "moving_pop_confirmation" } ``` -------------------------------- ### Define Dynamic Portrait Groups with Scope-Based Triggers using Jinja2 Source: https://github.com/yiyuezhuo/stellaris-portrait-mod-creator/blob/master/gfx_portraits_portraits_template.txt This extensive snippet defines portrait groups, dynamically generated using Jinja2. Each group can specify a default portrait and includes sections for `game_setup`, `species`, `pop`, `leader`, and `ruler` scopes. Within these scopes, `add` blocks with `trigger` conditions (e.g., `gender = male/female`) determine which portraits from the `group.portrait` list are applied, allowing for highly conditional portrait assignments based on in-game entity types and attributes. ```Stellaris Scripting with Jinja2 portrait_groups = { {% for group in group_list %} {{ group.name }} = { default = {{ group.default }} game_setup = { add = { trigger = { ruler = { gender = male } } portraits = { {%- for portrait in group.portrait %} {{ portrait -}} {% endfor %} } } add = { trigger = { ruler = { gender = female } } portraits = { {%- for portrait in group.portrait %} {{ portrait -}} {% endfor %} } } } #species scope species = { #generic portrait for a species add = { portraits = { {%- for portrait in group.portrait %} {{ portrait -}} {% endfor %} } } } #pop scope pop = { #for a specific pop add = { portraits = { {%- for portrait in group.portrait %} {{ portrait -}} {% endfor %} } } } #leader scope leader = { #scientists, generals, admirals, governor add = { trigger = { gender = male } portraits = { {%- for portrait in group.portrait %} {{ portrait -}} {% endfor %} } } add = { trigger = { gender = female } portraits = { {%- for portrait in group.portrait %} {{ portrait -}} {% endfor %} } } } #leader scope ruler = { add = { trigger = { gender = male } portraits = { {%- for portrait in group.portrait %} {{ portrait -}} {% endfor %} } } add = { trigger = { gender = female } portraits = { {%- for portrait in group.portrait %} {{ portrait -}} {% endfor %} } } } } {% endfor %} } ``` -------------------------------- ### Define Custom Species for Stellaris Mod Source: https://github.com/yiyuezhuo/stellaris-portrait-mod-creator/blob/master/common_species_names_template.txt This configuration snippet defines multiple custom species (races) for a Stellaris portrait mod. Each entry specifies the species' name, plural form, home planet, home system, and a reference to a name list used for character generation. These definitions are typically used by the game engine to populate custom empires. ```Game Config home_system = "Snotalitvish-Qa" name_list = "MAM2" } ragerian = { name = Ragerian plural = Ragerians home_planet = Aeria home_system = "Aeria Husila" name_list = "MAM3" } pouzjok = { name = Pouz-Jok plural = Pouz-Jokans home_planet = "Pouzjok Prime" home_system = Lokand name_list = "MAM4" } jusstkan = { name = Jusstkan plural = Jusstkans home_planet = Jusstka home_system = Juss name_list = "MAM5" } klaggian = { name = Klaggian plural = Klaggians home_planet = Lyrogg home_system = Lagragga name_list = "MAM3" } uqopraknar = { name = Uqo'Praknar plural = Uqo'Praknarians home_planet = Qawlogg home_system = "Losstran Peav" name_list = "MAM1" } onedqarak = { name = Oned'Qarak plural = Oned'Qaraki home_planet = Ire'Laoman home_system = "Ire'Laom Jumtra" name_list = "MAM2" } ruphaari = { name = Ruphaari plural = Ruphaari home_planet = Ruphaa home_system = Rupha'iaa name_list = "MAM5" } qwepulci = { name = Qwe'Pulci plural = Qwe'Pulcians home_planet = Uklapp home_system = Uklapp'Knor name_list = "MAM4" } groknaploran = { name = Groknaploran plural = Groknaplorans home_planet = Adnor home_system = Adanir name_list = "MAM3" } ktaknor = { name = K'Taknor plural = K'Taknorians home_planet = "Ufram Puf" home_system = Ufram name_list = "MAM4" } gagassi = { name = Gagassi plural = Gagassi home_planet = Meknassa home_system = Pultran'Ogg name_list = "MAM1" } hadadeshi = { name = Hadadeshi plural = Hadadeshi home_planet = Vababa home_system = Ba'Vababa name_list = "MAM1" } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.