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

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
Additional question, is there a way to define the ruler as a scope? So i can check the ruler traits.

Also would i be correct in assuming that i could set up a modifier in the pop modifiers (EDIT: Empire modifiers would work just as well as capital buildings are empire wide), area that has a scope of Capital_scope and it would check the capital for the condition but apply the modifier only to the specific pop it's running the checks on Empire wide?

Also is their one for civic, i have a feeling it's has_civic, but i can't remember for sure.
the "leader = " scope is used for getting the leader in charge of the scope, so use it in the country scope and you'll get the ruler, use it on a planet and you'll get the governor, on a fleet to get the admiral, etc.

You could check the capital_scope, no problem, you might need to get to the country first, but I think it works in any scope that is "owned". Remember that the capital scope is for the capital planet and not for any specific building or tile. Using an empire modifier is going to be far kinder on the CPU though.

has_civic does exist, yes, but has not been added to the wiki it seems.
 

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
Thank you and yes i know capital scope is just for the capitol, but i assume i can then run a has_building check under the capital scope and it will check for a building on the capital, or is that out to lunch?

e.g.
Code:
Capital_Scope = {
Has_Building = ********
}

p.s. the CPU was the main thought :). Poor thing, so warm so cuddly, all it wants is to serve faithfully and wag it's tail without getting worn out:p.
 

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
Ahh cheers, and presumebly i'd need to to the same but with Planet = in the place of Capital_scope = for planet specific ones in the pop scope, (e.g. the colony shelter/adim/cap/e.t.c.).

And thanks for putting up with 20 questions, as i said this format of coding has some quirks i've never dealt with before and i want to make damned sure i get it right first go out, (or as much as any first go can anyway, typos will be typos). :).

The wiki isn't necessarily super clear on a lot of this stuff, that or its just me getting confused easily :p.
 

cray935

Second Lieutenant
65 Badges
Apr 14, 2017
182
4
  • Cities in Motion
  • Stellaris: Synthetic Dawn
  • Tyranny - Tales from the Tiers
  • Crusader Kings II: Jade Dragon
  • Surviving Mars: First Colony Edition
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • BATTLETECH
  • Age of Wonders: Planetfall
  • Hearts of Iron IV: Death or Dishonor
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • Cities: Skylines - Green Cities
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Surviving Mars: Digital Deluxe Edition
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Surviving Mars: First Colony Edition
  • Cities: Skylines Industries
  • Cities: Skylines - Campus
  • Crusader Kings II: Holy Fury
  • Prison Architect
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - After Dark
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Stellaris: Nemesis
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
Is it possible to access properties of event_targets? Like: event_target:species.class ? I thought I saw something like that before but maybe the syntax is different ??
 

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
Hello,

I am having a bit a trouble with the scripting and .dds file type. I was wondering if anyone can point me in the right direction.

What I am trying to do:
Create a Trait: Done working
Create a Custom Icon: Icon is done. Do not know how to convert PSD to DDS. I found a few converter programs, free, but they do not retain alpha trasparancy. End result is a square icon w/ white space.

Scripting:
First thing I tried: Empire_Inisializer.txt > After creating homeworld > If owner has trait = custom trait > change homeworld to pc_classname.
Second thing I tried: Events and On Game Start/On Action > w/ custom planet_event > If owner has trait = custom trait > if homeworld > change to pc_classname.

I have narrowed it down to the "has_trait = trait_name".

If I just put in my code to change a planet to another planet it will change the planet. But I only want this to happen if the trait is picked.

I am not looking for a handout or for anyone to do the work for me just a nudge in the right direction would be helpful.

Here are some script fragments of things I have tried
Code:
#script 1
if = {
    limit = {
        has_trait = trait_custom
    }
    change_pc = pc_classname 
}

#script 2
switch = {
    trigger = has_trait
    trait_custom1 = { Code For Changing PlanetClass }
    trait_custom2 = { Code For Changing Planetclass }
}

#script 3
if = {
    limit = {
        owner = { has_trait = trait_custom }
    }
    change_pc = pc_classname
}
 

Hibernian

Darmok and Jalad at Tanagra
73 Badges
Feb 16, 2008
2.379
3.032
  • Crusader Kings II
  • Sword of the Stars
  • Supreme Ruler: Cold War
  • Victoria 2: A House Divided
  • Stellaris: Galaxy Edition
  • Rome Gold
  • Naval War: Arctic Circle
  • Europa Universalis III
  • Hearts of Iron III
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Megacorp
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Cradle of Civilization
  • BATTLETECH
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Monks and Mystics
  • BATTLETECH - Digital Deluxe Edition
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • BATTLETECH: Heavy Metal
  • Victoria 3 Sign Up
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV
  • Europa Universalis III Complete
  • March of the Eagles
  • Europa Universalis III Complete
  • Victoria 2
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Mount & Blade: Warband
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Stellaris
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Leviathans Story Pack
  • Darkest Hour
This question seem to have got lost along the way, but I just get a quick answer?

Is there any limit to the amount of "countries" (i.e. star empires/species) in the galaxy?

Is there a limit to how many you can mod the game to start with? (I know the standard is 30, but it can clearly be changed) And is there a limit to how many countries you could add to a custom galaxy map? (i.e could every star system in a 1000 star galaxy be ruled by an independent empire?)
 

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
Is it possible to access properties of event_targets? Like: event_target:species.class ? I thought I saw something like that before but maybe the syntax is different ??

Yes, but there's not much you can do with it, primarily compare the value with the value of something else or use as a target.

Scripting:
First thing I tried: Empire_Inisializer.txt > After creating homeworld > If owner has trait = custom trait > change homeworld to pc_classname.
Second thing I tried: Events and On Game Start/On Action > w/ custom planet_event > If owner has trait = custom trait > if homeworld > change to pc_classname.

I have narrowed it down to the "has_trait = trait_name".

If I just put in my code to change a planet to another planet it will change the planet. But I only want this to happen if the trait is picked.

I am not looking for a handout or for anyone to do the work for me just a nudge in the right direction would be helpful.

Here are some script fragments of things I have tried
Code:
#script 1
if = {
    limit = {
        has_trait = trait_custom
    }
    change_pc = pc_classname
}

#script 2
switch = {
    trigger = has_trait
    trait_custom1 = { Code For Changing PlanetClass }
    trait_custom2 = { Code For Changing Planetclass }
}

#script 3
if = {
    limit = {
        owner = { has_trait = trait_custom }
    }
    change_pc = pc_classname
}
In the init_effects you can't use IF statements or switches. I think you should be able to do a second init_effect though that can be limited like an IF.
 

Epsilon Rose

Private
27 Badges
May 15, 2016
21
24
  • Knights of Pen and Paper +1 Edition
  • Magicka
  • Sword of the Stars II
  • Cities in Motion 2
  • Age of Wonders: Planetfall Deluxe edition
  • Age of Wonders: Planetfall
  • Surviving Mars: First Colony Edition
  • Prison Architect
  • BATTLETECH: Flashpoint
  • Surviving Mars: First Colony Edition
  • Shadowrun: Hong Kong
  • Shadowrun: Dragonfall
  • Shadowrun Returns
  • Surviving Mars: Digital Deluxe Edition
  • Surviving Mars
  • BATTLETECH
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Cities: Skylines - After Dark
  • Pillars of Eternity
  • Magicka: Wizard Wars Founder Wizard
  • Cities: Skylines
  • Teleglitch: Die More Edition
I'm a bit confused by the min_damage stat on weapons. It seems to be both negative and proportional to the strength of the weapon, so it's not directly setting a floor. What is it actually doing?
 

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
In the init_effects you can't use IF statements or switches. I think you should be able to do a second init_effect though that can be limited like an IF.

Hey, thanks this helped a bit. However, I am still just not quite grasping the scripting.

I found the 00_scripted_effect.txt which has helped me a lot. I can just edit my one script instead of it x4 in the system initialize.

In scripted effects you can use IF in there, and I assume switch too.

I think there is a problem with HAS_TRAIT. Or I am using IF LIMIT or SWITCH wrong. Or something else I can quite get my head around.

system init
Code:
init_effect = {
                make_planet_change_if_custom_trait
        }

00_scripted_effect.txt
Code:
make_planet_change_if_custom_trait = {
        switch = {
            trigger = has_trait
            trait_custom1 = { change_pc = pc_gaia }
    }      
}

00_scripted_effect.txt
Code:
make_planet_change_if_custom_trait = {
    if = {
        limit = { has_trait = trait_custom1 }
        change_pc = pc_gaia
    }
}


To me it makes perfect sense! If i have trait custom1 then change planet class. And don't if not.

Just doesn't work. *bangs head on wall*


Something else I tried but didn't work.
Code:
init_effect = {
                change_pc = {
                    limit = { has_trait = trait_custom }
                    pc_gaia
                }
        }
 

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
I'm a bit confused by the min_damage stat on weapons. It seems to be both negative and proportional to the strength of the weapon, so it's not directly setting a floor. What is it actually doing?

Thats the power cost, check the last post of the guides thread, i posted a link to a far better tool for reading that file.
 

Guilliman88

Planet Modifier Guy
46 Badges
Mar 21, 2015
544
429
  • Magicka
  • Stellaris
  • Age of Wonders: Planetfall Deluxe edition
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Surviving Mars: First Colony Edition
  • Cities: Skylines Industries
  • BATTLETECH: Flashpoint
  • Stellaris: Megacorp
  • Prison Architect
  • Surviving Mars: First Colony Edition
  • Cities: Skylines - Campus
  • BATTLETECH: Season pass
  • Age of Wonders: Planetfall
  • BATTLETECH - Digital Deluxe Edition
  • Age of Wonders: Planetfall Premium edition
  • Age of Wonders: Planetfall Season pass
  • Stellaris: Lithoids
  • BATTLETECH: Heavy Metal
  • Stellaris: Federations
  • Crusader Kings III
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Surviving Mars: Digital Deluxe Edition
  • Cities: Skylines
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Mass Transit
  • BATTLETECH
  • Surviving Mars
  • Age of Wonders III
  • Cities: Skylines - Green Cities
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Ancient Relics
  • Stellaris: Synthetic Dawn
  • Age of Wonders: Planetfall - Revelations
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
Does anyone know why my ambient object height and scale values are being lost in save games?

This happens:

Code:
                    create_ambient_object = {
                        type = "pm_planet_shield_object"
                        use_3d_location = yes
                       
                        entity_offset = { min = 0 max = 0 }
                        entity_offset_angle = { min = 0 max = 0 }
                        entity_offset_height = { min = 0 max = 0 }
                       
                        # entity_scale_to_size = yes
                        scale = 15
                    }

But the height and scale values are lost when you save and reload the game. The other values are not lost however?
 

cray935

Second Lieutenant
65 Badges
Apr 14, 2017
182
4
  • Cities in Motion
  • Stellaris: Synthetic Dawn
  • Tyranny - Tales from the Tiers
  • Crusader Kings II: Jade Dragon
  • Surviving Mars: First Colony Edition
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • BATTLETECH
  • Age of Wonders: Planetfall
  • Hearts of Iron IV: Death or Dishonor
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • Cities: Skylines - Green Cities
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Surviving Mars: Digital Deluxe Edition
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Surviving Mars: First Colony Edition
  • Cities: Skylines Industries
  • Cities: Skylines - Campus
  • Crusader Kings II: Holy Fury
  • Prison Architect
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - After Dark
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Stellaris: Nemesis
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
Yes, but there's not much you can do with it, primarily compare the value with the value of something else or use as a target.

Ahm, I want to set the species class from event target in a create_species. The syntax in my question is wrong, so what's the correct syntax? What I have so far is

Code:
            random_pop = {
                species = { save_event_target_as = my_species }
            }
            
            create_species = {
                    name = my_species.name
                    class = my_species.class
                    portrait = my_species.portrait
                    traits = my_species.traits
                    homeworld = my_species.homeworld
             }
 

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
Hey, thanks this helped a bit. However, I am still just not quite grasping the scripting.

I found the 00_scripted_effect.txt which has helped me a lot. I can just edit my one script instead of it x4 in the system initialize.

In scripted effects you can use IF in there, and I assume switch too.

I think there is a problem with HAS_TRAIT. Or I am using IF LIMIT or SWITCH wrong. Or something else I can quite get my head around.

system init
Code:
init_effect = {
                make_planet_change_if_custom_trait
        }

To use a scripted effect you use my_scripted_effect = yes

Ahm, I want to set the species class from event target in a create_species. The syntax in my question is wrong, so what's the correct syntax? What I have so far is

Code:
            random_pop = {
                species = { save_event_target_as = my_species }
            }
           
            create_species = {
                    name = my_species.name
                    class = my_species.class
                    portrait = my_species.portrait
                    traits = my_species.traits
                    homeworld = my_species.homeworld
             }

For create species you don't need to target the individual attributes, although I guess you could. What is mostly used in existing events when making an "offshoot" is to use a pop scope as a target, look at pop_events.txt for an example where a mod offshoot is created.
 

cray935

Second Lieutenant
65 Badges
Apr 14, 2017
182
4
  • Cities in Motion
  • Stellaris: Synthetic Dawn
  • Tyranny - Tales from the Tiers
  • Crusader Kings II: Jade Dragon
  • Surviving Mars: First Colony Edition
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • BATTLETECH
  • Age of Wonders: Planetfall
  • Hearts of Iron IV: Death or Dishonor
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • Cities: Skylines - Green Cities
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Surviving Mars: Digital Deluxe Edition
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Surviving Mars: First Colony Edition
  • Cities: Skylines Industries
  • Cities: Skylines - Campus
  • Crusader Kings II: Holy Fury
  • Prison Architect
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - After Dark
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Stellaris: Nemesis
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
For create species you don't need to target the individual attributes, although I guess you could. What is mostly used in existing events when making an "offshoot" is to use a pop scope as a target, look at pop_events.txt for an example where a mod offshoot is created.

Alright, so I need to create_species inside the pop scope. Thanks for the hint :)
 

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
Question about the properties of authorities and governments: The way the game works, there are certain aspects of government that are defined by the authority. For example, whether re-election is allowed (re_election_allowed = yes / no) is something defined in the authority type. But could this also be defined by government type? For example, Democratic authority has "re_election_allowed = yes," but is it possible to make a government with the Democratic authority that includes the line "re_election_allowed = no" to make an exception to this?
 

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
Is there a way to set the starting agenda for a ruler?