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

Carl_Bar

Major
62 Badges
May 22, 2016
726
182
  • Crusader Kings II: Charlemagne
  • Cities: Skylines - Snowfall
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Pre-order
  • Crusader Kings II
  • Sword of the Stars II
  • Sword of the Stars
  • Europa Universalis IV: Res Publica
  • Magicka
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Europa Universalis IV: Art of War
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Age of Wonders: Planetfall
  • Cities: Skylines - Green Cities
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Surviving Mars: Digital Deluxe Edition
  • BATTLETECH - Digital Deluxe Edition
  • Surviving Mars: First Colony Edition
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Shadowrun: Dragonfall
  • Surviving Mars: First Colony Edition
  • Cities: Skylines Industries
  • Stellaris: Megacorp
  • BATTLETECH
  • Cities: Skylines - Mass Transit
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Natural Disasters
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Age of Wonders: Planetfall Deluxe edition
  • Age of Wonders: Planetfall Premium edition
  • Europa Universalis IV: Common Sense
  • Magicka 2
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Stellaris: Nemesis
Ok some of my code isn't working, i'll just post those snippets to see if anyone can spot the issue.

Empire wide Edicts codel (is in country modifiers scope by default):

Code:
        modifier = {
            factor = 1.25
            AND = {
                OR = {
                    has_ethic = ethic_authoritarian
                    has_ethic = ethic_fanatic_authoritarian
                }
                has_edcit = information_quarantine
                }
            }   
        modifier = {
            factor = 0.85
            AND = {
                OR = {
                    has_ethic = ethic_authoritarian
                    has_ethic = ethic_fanatic_authoritarian
                }
                has_edcit = encourage_free_thought
                }
            }

Planetary Edicts code:

Code:
        modifier = {
            factor = 1.2
            AND = {
                Owner = {
                    OR = {
                        has_ethic = ethic_authoritarian
                        has_ethic = ethic_fanatic_authoritarian
                    }
                }
                Planet = {
                    has_edcit = reeducation_campaign
                }
            }
        }
        modifier = {
            factor = 1.3
            AND = {
                Owner = {
                    OR = {
                        has_ethic = ethic_authoritarian
                        has_ethic = ethic_fanatic_authoritarian
                    }
                }
                Planet = {
                    has_edcit = social_engineering
                }
            }
        }
        modifier = {
            factor = 1.1
            AND = {
                Owner = {
                    OR = {
                        has_ethic = ethic_authoritarian
                        has_ethic = ethic_fanatic_authoritarian
                    }
                }
                Planet = {
                    has_edcit = religious_unity
                }
            }
        }

Mind Control Laser Code:

Code:
        modifier = {
            factor = 1.5
            AND = {
                Owner = {
                    OR = {
                        has_ethic = ethic_authoritarian
                        has_ethic = ethic_fanatic_authoritarian
                    }
                }
                Planet = {
                    has_spaceport_module = orbital_mind_control_laser
                }
            }
        }

Any idea why, guessing i screwed up a scope somwhere...
 

Qilue

Captain
70 Badges
Jun 20, 2004
467
58
  • Stellaris: Galaxy Edition
  • Mount & Blade: Warband
  • Mount & Blade: With Fire and Sword
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Magicka 2
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Magicka 2: Ice, Death and Fury
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Magicka: Wizard Wars Founder Wizard
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Europa Universalis IV: Cradle of Civilization
  • Crusader Kings II: Jade Dragon
  • Stellaris: Nemesis
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Magicka
  • Pirates of Black Cove
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
  • 500k Club
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Europa Universalis III: Collection
Where can I find the script for ideal_planet_class? And other similar effects.

I think "ideal_planet_class" is a hardcoded function.

@Carl_Bar
Check your spelling, specifically these - "has_edcit =", should be "has_edict ="
 
Last edited:

Carl_Bar

Major
62 Badges
May 22, 2016
726
182
  • Crusader Kings II: Charlemagne
  • Cities: Skylines - Snowfall
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Pre-order
  • Crusader Kings II
  • Sword of the Stars II
  • Sword of the Stars
  • Europa Universalis IV: Res Publica
  • Magicka
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Europa Universalis IV: Art of War
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Age of Wonders: Planetfall
  • Cities: Skylines - Green Cities
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Surviving Mars: Digital Deluxe Edition
  • BATTLETECH - Digital Deluxe Edition
  • Surviving Mars: First Colony Edition
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Shadowrun: Dragonfall
  • Surviving Mars: First Colony Edition
  • Cities: Skylines Industries
  • Stellaris: Megacorp
  • BATTLETECH
  • Cities: Skylines - Mass Transit
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Natural Disasters
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Age of Wonders: Planetfall Deluxe edition
  • Age of Wonders: Planetfall Premium edition
  • Europa Universalis IV: Common Sense
  • Magicka 2
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Stellaris: Nemesis
Corrected the typo, still no dice. Also the spaceport module modifiers is still non-functional and two more non-functional ones have turned up:

Code:
        modifier = {
            factor = 1.2
            AND = {
                OR = {
                    has_ethic = ethic_authoritarian
                    has_ethic = ethic_fanatic_authoritarian
                }
                has_civic = civic_exalted_priesthood
                }
            }

and

Code:
        modifier = {
            factor = 1.3
            AND = {
                OR = {
                has_ethic = ethic_authoritarian
                has_ethic = ethic_fanatic_authoritarian
                }
                has_ascension_perk = ap_one_vision
            }               
        }
 

ARASHI

First Lieutenant
30 Badges
Oct 1, 2013
211
61
  • Crusader Kings II: Charlemagne
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Stellaris: Distant Stars
  • Cities: Skylines - Parklife
  • Cities: Skylines - Parklife Pre-Order
  • Stellaris: Apocalypse
  • Crusader Kings III
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Europa Universalis IV
  • Stellaris - Path to Destruction bundle
I was trying to tinker with the special system initializer so that primitives would pick a portrait from a custom list defined by me instead of picking it randomly from all available portraits specified in species classes. Attached below was one of my failed attempts:-

Code:
                    create_species = {
                        name = random
                        class = random
                        random_list = {
                            if = {
                                limit = { class = HUM }                             
                                50 = { portrait = humanoid_01 }
                                50 = { portrait = humanoid_02 } 
                            }                     
                            if = {
                                limit = { class = MAM }                             
                                20 = { portrait = mam1 }
                                20 = { portrait = mam2 }
                                20 = { portrait = mam3 }
                                20 = { portrait = mam4 }
                                20 = { portrait = mam5 }
                            } 
                            if = {                             
                                limit = { class = REP }                             
                                20 = { portrait = rep1 }
                                20 = { portrait = rep2 }
                                20 = { portrait = rep3 } 
                                20 = { portrait = rep4 }
                                20 = { portrait = rep5 }
                            }
                            if = {                         
                                limit = { class = AVI }                                 
                                20 = { portrait = avi1 }
                                20 = { portrait = avi2 }
                                20 = { portrait = avi3 }
                                20 = { portrait = avi4 }
                                20 = { portrait = avi5 }
                            } 
                            if = {                             
                                limit = { class = ART }                             
                                50 = { portrait = art1 }
                                50 = { portrait = art2 }
                            } 
                            if = {                             
                                limit = { class = MOL }                                 
                                50 = { portrait = mol1 }
                                50 = { portrait = mol2 }
                            } 
                            if = {                             
                                limit = { class = FUN }                             
                                50 = { portrait = fun1 }
                                50 = { portrait = fun2 }
                            }                             
                        }
                        homeworld = THIS
                        traits = {
                            trait = random_traits
                        }
                    }

Can anyone help me on how to specify a custom portrait list for the primitives? Tried a few different ways to code it with no success. I have no idea if I am using the wrong scopes/triggers etc any assistance would be greatly appreciated.
 

Risa

Lt. General
92 Badges
Mar 2, 2005
1.242
278
  • Semper Fi
  • Europa Universalis III Complete
  • Knights of Pen and Paper +1 Edition
  • Lead and Gold
  • The Kings Crusade
  • Magicka
  • Majesty 2
  • Europa Universalis III Complete
  • Penumbra - Black Plague
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Rome Gold
  • Heir to the Throne
  • Sengoku
  • Ship Simulator Extremes
  • Sword of the Stars
  • Supreme Ruler 2020
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • 500k Club
  • Cities: Skylines
  • Surviving Mars: First Colony Edition
  • Europa Universalis III
  • Hearts of Iron II: Armageddon
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Commander: Conquest of the Americas
  • East India Company Collection
  • Arsenal of Democracy
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • For the Motherland
  • Hearts of Iron III
I was trying to tinker with the special system initializer so that primitives would pick a portrait from a custom list defined by me instead of picking it randomly from all available portraits specified in species classes. Attached below was one of my failed attempts:-

Can anyone help me on how to specify a custom portrait list for the primitives? Tried a few different ways to code it with no success. I have no idea if I am using the wrong scopes/triggers etc any assistance would be greatly appreciated.
Individual item inside create_species is not effect, so you cannot use if there. You can create species with random properties first, then use modify_species within if to change portrait. See scripted effect make_unleashed_messenger for example. (Located in 00_scripted_effects.txt).
 

ARASHI

First Lieutenant
30 Badges
Oct 1, 2013
211
61
  • Crusader Kings II: Charlemagne
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Stellaris: Distant Stars
  • Cities: Skylines - Parklife
  • Cities: Skylines - Parklife Pre-Order
  • Stellaris: Apocalypse
  • Crusader Kings III
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Europa Universalis IV
  • Stellaris - Path to Destruction bundle
Individual item inside create_species is not effect, so you cannot use if there. You can create species with random properties first, then use modify_species within if to change portrait. See scripted effect make_unleashed_messenger for example. (Located in 00_scripted_effects.txt).

Thank you for your suggestion. Doesn't modify species create sub-species though? I want to make primitives pick from a specified list from game start so I don't think modify_species would serve the purpose.
 
Last edited:

Axelius

Scriptkid
86 Badges
Sep 23, 2003
585
538
  • War of the Roses
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Semper Fi
  • Sengoku
  • Sword of the Stars
  • Teleglitch: Die More Edition
  • The Showdown Effect
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Warlock: Master of the Arcane
  • March of the Eagles
  • 500k Club
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Mount & Blade: Warband
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris: Nemesis
  • Divine Wind
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Crusader Kings II
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • Leviathan: Warships
Corrected the typo, still no dice. Also the spaceport module modifiers is still non-functional and two more non-functional ones have turned up:

Code:
        modifier = {
            factor = 1.2
            AND = {
                OR = {
                    has_ethic = ethic_authoritarian
                    has_ethic = ethic_fanatic_authoritarian
                }
                has_civic = civic_exalted_priesthood
                }
            }

and

Code:
        modifier = {
            factor = 1.3
            AND = {
                OR = {
                has_ethic = ethic_authoritarian
                has_ethic = ethic_fanatic_authoritarian
                }
                has_ascension_perk = ap_one_vision
            }              
        }

I think this would be easier to see if we see the entire file, you can attach the .txt by using Upload a File.

In the meantime, try removing the AND bracket. It shouldn't be messing things up, but you never know.
 

Edix

Corporal
32 Badges
May 16, 2016
29
3
  • Stellaris: Synthetic Dawn
  • Stellaris - Path to Destruction bundle
  • Magicka
  • Majesty 2
  • Sword of the Stars
  • Sword of the Stars II
  • Stellaris: Ancient Relics
  • Age of Wonders III
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Stellaris: Megacorp
  • Stellaris: Necroids
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • BATTLETECH
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Stellaris
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Warlock: Master of the Arcane
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II
The following code always returns TRUE and always changes the PC. LIMIT does not limit "has_trait = trait_custom1."

Expected: Should only return TRUE if LIMIT. Should only change PC if the trait is picked.

I have tried changing the scope to LEADER, HOME_PLANET, CAPITAL_SCOPE, and a few others all with the same results.

empire_init.txt
Code:
init_effect = {
                change_pc_if_trait_custom1 = yes
        }


00_script_effects.txt
Code:
change_pc_if_trait_custom1 = {
   
    owner_species = {
            limit = {
                has_trait = trait_custom1
            }
            change_pc = pc_classname
    }

}
 

Risa

Lt. General
92 Badges
Mar 2, 2005
1.242
278
  • Semper Fi
  • Europa Universalis III Complete
  • Knights of Pen and Paper +1 Edition
  • Lead and Gold
  • The Kings Crusade
  • Magicka
  • Majesty 2
  • Europa Universalis III Complete
  • Penumbra - Black Plague
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Rome Gold
  • Heir to the Throne
  • Sengoku
  • Ship Simulator Extremes
  • Sword of the Stars
  • Supreme Ruler 2020
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • 500k Club
  • Cities: Skylines
  • Surviving Mars: First Colony Edition
  • Europa Universalis III
  • Hearts of Iron II: Armageddon
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Commander: Conquest of the Americas
  • East India Company Collection
  • Arsenal of Democracy
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • For the Motherland
  • Hearts of Iron III
The following code always returns TRUE and always changes the PC. LIMIT does not limit "has_trait = trait_custom1."

Expected: Should only return TRUE if LIMIT. Should only change PC if the trait is picked.

I have tried changing the scope to LEADER, HOME_PLANET, CAPITAL_SCOPE, and a few others all with the same results.

empire_init.txt
Multiple problems exist in that code.
At least try this
Code:
change_pc_if_trait_custom1 = {
   
    if = {
            limit = {
                owner_species = { has_trait = trait_custom1 }
            }
            change_pc = pc_classname
    }

}
 

Edix

Corporal
32 Badges
May 16, 2016
29
3
  • Stellaris: Synthetic Dawn
  • Stellaris - Path to Destruction bundle
  • Magicka
  • Majesty 2
  • Sword of the Stars
  • Sword of the Stars II
  • Stellaris: Ancient Relics
  • Age of Wonders III
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Stellaris: Megacorp
  • Stellaris: Necroids
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • BATTLETECH
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Stellaris
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Warlock: Master of the Arcane
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II
At least try this
[/code]

Thanks for the reply.

I have tried IF > LIMIT in many configurations and it always returns FALSE. Does not change PC.

I have gone through all the scripts in the commons folder than might bare any relation to what I am trying to achieve and in all of them the format is

Code:
SCOPE =
    LIMIT = SOMETHING
    EFFECT = DO EFFECT

So I have limited my tinkering to that. I have come to the conclusion that the thing I want to do can not be done.

I really wish there was a clear, documented, outline of the rules for the scripting syntax. And someway to test scripts without having to launch the game and see if it works.
 

Axelius

Scriptkid
86 Badges
Sep 23, 2003
585
538
  • War of the Roses
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Semper Fi
  • Sengoku
  • Sword of the Stars
  • Teleglitch: Die More Edition
  • The Showdown Effect
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Warlock: Master of the Arcane
  • March of the Eagles
  • 500k Club
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Mount & Blade: Warband
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris: Nemesis
  • Divine Wind
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Crusader Kings II
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • Leviathan: Warships
And someway to test scripts without having to launch the game and see if it works.

You can do it via the console in the game. By using the command "reload" you reload all assets, including any txt. You can also use "run [filename].txt" to run any file that you put in documents\Paradox Interactive\Stellaris\
 

Axelius

Scriptkid
86 Badges
Sep 23, 2003
585
538
  • War of the Roses
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Semper Fi
  • Sengoku
  • Sword of the Stars
  • Teleglitch: Die More Edition
  • The Showdown Effect
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Warlock: Master of the Arcane
  • March of the Eagles
  • 500k Club
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Mount & Blade: Warband
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris: Nemesis
  • Divine Wind
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Crusader Kings II
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • Leviathan: Warships
Also, I think I know why it doesn't work. You're doing this in the solar system initializer, correct? The thing is, this is done as the system and planets are initialized, this means that they have not been assigned to the country yet. As such you have no target for "owner", unless you create the country itself in the initialization, which given that this is a custom country you haven't.

The best option in this case is probably to assign the planet a flag and run an event on the "on_game_start" on_action that runs the check for every country.
 

Edix

Corporal
32 Badges
May 16, 2016
29
3
  • Stellaris: Synthetic Dawn
  • Stellaris - Path to Destruction bundle
  • Magicka
  • Majesty 2
  • Sword of the Stars
  • Sword of the Stars II
  • Stellaris: Ancient Relics
  • Age of Wonders III
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Stellaris: Megacorp
  • Stellaris: Necroids
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • BATTLETECH
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Stellaris
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Warlock: Master of the Arcane
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II
Also, I think I know why it doesn't work. You're doing this in the solar system initializer, correct? The thing is, this is done as the system and planets are initialized, this means that they have not been assigned to the country yet. As such you have no target for "owner", unless you create the country itself in the initialization, which given that this is a custom country you haven't.

The best option in this case is probably to assign the planet a flag and run an event on the "on_game_start" on_action that runs the check for every country.

Thanks for the reply and the tip about the console commands.

Yeah, this was my conclusion as well. I will take a break to give myself some time to process some of the info i have read in the last 3 days. Then I will look at the on game start, on action, and how to use flags.

Thanks again!
 

hadaev

Colonel
25 Badges
Sep 7, 2012
972
209
  • Europa Universalis III Complete
  • Divine Wind
  • Crusader Kings II
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Crusader Kings III
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Stellaris: Megacorp
  • Shadowrun: Dragonfall
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Stellaris: Synthetic Dawn
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Tyranny: Archon Edition
  • Stellaris Sign-up
  • Stellaris
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV
  • Magicka

Mitchz95

Field Marshal
17 Badges
Feb 4, 2016
3.534
2.569
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Major Wiki Contributor
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
This is a long shot, but I'll ask anyway: is there any conceivable way one could get the color of energy weapons to match the owner empire's flag?

I was thinking of trying "if" statements in the different energy weapon files ("if flag color = blue, then weapons = blue") but I have no idea whether that would work. Is it even possible to draw flag colors?

Also, unrelated: what program would I use to edit .mesh files?
 

NilusBavarius

The grumpy Hermit
15 Badges
Aug 26, 2008
698
0
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines
  • Mount & Blade: Warband
  • Cities: Skylines - After Dark
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Crusader Kings III
  • Crusader Kings II
... is there any conceivable way one could get the color of energy weapons to match the owner empire's flag?

The Colors of the weapons are softcoded in the particles Folder -> ...\SteamApps\common\Stellaris\gfx\particles\combat\
You could try to change the code to get the result, but personally I have no clue if it would work this way.

...Also, unrelated: what program would I use to edit .mesh files?

Currently you have to use Maya with a User-made importer/exporter to get your hands on the original files -> Post
 

littleraskol

First Lieutenant
25 Badges
May 29, 2013
222
10
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Stellaris: Megacorp
  • Shadowrun: Hong Kong
  • Shadowrun: Dragonfall
  • Shadowrun Returns
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Stellaris: Synthetic Dawn
When exactly does "on_leader_spawned" execute? When a leader is added to the recruitment pool? That's what I am assuming based on how it's currently used in-game (e.g., to add cyborg and other such traits as appropriate). What if I wanted to launch an event when the leader is actually recruited by the player?