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

Tuttu

Future ruler of my galaxy.
56 Badges
Feb 6, 2011
85
67
  • Magicka
  • Stellaris: Synthetic Dawn
  • Victoria 2
  • The Showdown Effect
  • A Game of Dwarves
  • March of the Eagles
  • Leviathan: Warships
  • Knights of Pen and Paper +1 Edition
  • Heir to the Throne
  • Hearts of Iron III
  • Divine Wind
  • Europa Universalis III: Chronicles
  • Dungeonland
  • Cities in Motion
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Europa Universalis III
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Stellaris: Ancient Relics
  • Prison Architect
  • Stellaris: Megacorp
  • BATTLETECH: Flashpoint
  • Shadowrun: Hong Kong
  • Shadowrun: Dragonfall
  • Shadowrun Returns
  • Stellaris: Distant Stars
  • Surviving Mars: Digital Deluxe Edition
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Age of Wonders III
  • Stellaris: Nemesis
  • Surviving Mars
  • BATTLETECH
  • Crusader Kings Complete
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Stellaris: Galaxy Edition
  • Stellaris
  • Magicka 2
  • Magicka: Wizard Wars Founder Wizard
  • War of the Roses
  • Warlock: Master of the Arcane
Whilst there is a has_prev_building condition check, there doesn't appear to be a has_prev_blocker condition check. Since the scope you need to query is tile, you need something like has_prev_blocker to get the actual blocker type. Try it, see if it's exposed and just undocumented.
Thanks for the hint. I will go this way and see what I can get. :)
 
Last edited:

AlphaAsh

Miserable Git
52 Badges
Mar 16, 2015
1.271
1.167
www.alphastrikegames.com
  • Victoria 2: A House Divided
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Age of Wonders: Planetfall - Revelations
  • Age of Wonders: Planetfall Season pass
  • Age of Wonders: Planetfall Premium edition
  • Age of Wonders: Planetfall Deluxe edition
  • Age of Wonders: Planetfall
  • Victoria 2
  • Victoria 2: Heart of Darkness
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Megacorp
  • Stellaris: Leviathans Story Pack
  • Stellaris: Ancient Relics
  • Stellaris - Path to Destruction bundle
  • Stellaris: Lithoids
  • Stellaris: Distant Stars
  • Stellaris: Humanoids Species Pack
  • Stellaris: Synthetic Dawn
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Apocalypse
  • Shadowrun Returns
  • Shadowrun: Hong Kong
  • Shadowrun: Dragonfall
  • BATTLETECH
  • BATTLETECH - Beta Backer
  • BATTLETECH - Backer
  • BATTLETECH: Season pass
  • BATTLETECH: Flashpoint
  • Surviving Mars
  • Surviving Mars: First Colony Edition
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Campus
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Natural Disasters
  • Cities: Skylines - Mass Transit
  • Cities: Skylines Industries
  • Pillars of Eternity
  • Tyranny: Archon Edition
1.) Is there a way to force Sector Ai to permanently keep one pop working the tile with a specific building? ( The building would be my mod's new building, and as it is used to drastically rise habitability of a new, modded planet class, the building simply needs one pop non-stop on it - no compromises with that! ).

Thanks in advance !

It's not the most elegant solution, just a work-around, but you could have two versions of the building, one with the requires_pop flag true, one with it false. Then have an event checking for the tile with the building on it, whether it's popped. If it isn't, switch the building to the one with requires_pop false, if it is, switch it to the version with requires_pop true.

It won't force the AI to pop the tile but will ensure the building is always active and won't make the pop unemployed if there's one on it.

EDIT - And if you make the building collect energy/minerals/food, and/or produce science, the AI will be more keen to pop it. The AI especially likes science output.
 
Last edited:

Elth

Second Lieutenant
20 Badges
Apr 23, 2012
137
64
  • Dungeonland
  • Leviathan: Warships
  • Magicka
  • Imperator: Rome
  • Stellaris: Synthetic Dawn
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Magicka 2
  • Mount & Blade: Warband
  • War of the Roses
  • Warlock: Master of the Arcane
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • The Showdown Effect
  • Victoria: Revolutions
  • Europa Universalis IV
  • Crusader Kings II
Is there any way to check in a event if a empire has more or less of X resource (specifically say energy and minerals) on an event?, so I can make thinks like "if you have 20 energy or less your empire recive a event of "economic crisis" or something like that.
 

DDRussian

Captain
56 Badges
May 17, 2015
300
222
  • Victoria 2: Heart of Darkness
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Third Rome
  • Stellaris: Synthetic Dawn
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Mare Nostrum
  • Victoria 2: A House Divided
  • Crusader Kings II
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • 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
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Mandate of Heaven
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings II: Holy Fury
  • Stellaris: Apocalypse
  • Stellaris: Federations
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars
  • Surviving Mars: First Colony Edition
  • Surviving Mars: First Colony Edition
  • Stellaris Sign-up
  • Victoria 2
  • Europa Universalis IV: El Dorado
  • 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: Monks and Mystics
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
Does anybody know how to program an event or something that changes an empire's ethics to those of another one?

I am trying to add an observation post mission to influence the ethics of the primitive civilization. Given that the actual changes caused by the observation missions are implemented by hidden events happening from the pre-FTL state's perspective, and then an event is triggered for the observer to be notified. The easiest way I can think of to make this mission is by having it trigger an event (either immediately or over time) which will change the pre-FTL state's governing ethos, which should not matter given that they do not interact with anyone anyway, and then add a modifier to either the country or planet that greatly lowers ethics divergence. However, I do not know if there is a way to have the game recognize the observer's ethics as the one that the pre-FTL ethics need to change to, or if I should just create separate hidden events for each possible combination?
 

AlphaAsh

Miserable Git
52 Badges
Mar 16, 2015
1.271
1.167
www.alphastrikegames.com
  • Victoria 2: A House Divided
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Age of Wonders: Planetfall - Revelations
  • Age of Wonders: Planetfall Season pass
  • Age of Wonders: Planetfall Premium edition
  • Age of Wonders: Planetfall Deluxe edition
  • Age of Wonders: Planetfall
  • Victoria 2
  • Victoria 2: Heart of Darkness
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Megacorp
  • Stellaris: Leviathans Story Pack
  • Stellaris: Ancient Relics
  • Stellaris - Path to Destruction bundle
  • Stellaris: Lithoids
  • Stellaris: Distant Stars
  • Stellaris: Humanoids Species Pack
  • Stellaris: Synthetic Dawn
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Apocalypse
  • Shadowrun Returns
  • Shadowrun: Hong Kong
  • Shadowrun: Dragonfall
  • BATTLETECH
  • BATTLETECH - Beta Backer
  • BATTLETECH - Backer
  • BATTLETECH: Season pass
  • BATTLETECH: Flashpoint
  • Surviving Mars
  • Surviving Mars: First Colony Edition
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Campus
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Natural Disasters
  • Cities: Skylines - Mass Transit
  • Cities: Skylines Industries
  • Pillars of Eternity
  • Tyranny: Archon Edition
You can change both the ethics of a country, and/or the ethics of individual pops or all pops. As for getting the ethics of the observation post owning country, that's pretty straight-forward.

Dissect the events from Gods and Guardians. You'll also find a few examples in vanilla observation events. Structurally, you'll just want a cluster of if statements. Pseudo-code:

if observing country ethics is x, remove ethic x from observed country, add ethic y to observed country
if observing country ethics is x, remove ethic x from observed country, add ethic y to observed country
if observing country ethics is x, remove ethic x from observed country, add ethic y to observed country
...
 

DDRussian

Captain
56 Badges
May 17, 2015
300
222
  • Victoria 2: Heart of Darkness
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Third Rome
  • Stellaris: Synthetic Dawn
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Mare Nostrum
  • Victoria 2: A House Divided
  • Crusader Kings II
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • 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
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Mandate of Heaven
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings II: Holy Fury
  • Stellaris: Apocalypse
  • Stellaris: Federations
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars
  • Surviving Mars: First Colony Edition
  • Surviving Mars: First Colony Edition
  • Stellaris Sign-up
  • Victoria 2
  • Europa Universalis IV: El Dorado
  • 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: Monks and Mystics
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
You can change both the ethics of a country, and/or the ethics of individual pops or all pops. As for getting the ethics of the observation post owning country, that's pretty straight-forward.

Dissect the events from Gods and Guardians. You'll also find a few examples in vanilla observation events. Structurally, you'll just want a cluster of if statements. Pseudo-code:

if observing country ethics is x, remove ethic x from observed country, add ethic y to observed country
if observing country ethics is x, remove ethic x from observed country, add ethic y to observed country
if observing country ethics is x, remove ethic x from observed country, add ethic y to observed country
...
Is this mod on Steam?
 

DDRussian

Captain
56 Badges
May 17, 2015
300
222
  • Victoria 2: Heart of Darkness
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Third Rome
  • Stellaris: Synthetic Dawn
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Mare Nostrum
  • Victoria 2: A House Divided
  • Crusader Kings II
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • 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
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Mandate of Heaven
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings II: Holy Fury
  • Stellaris: Apocalypse
  • Stellaris: Federations
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars
  • Surviving Mars: First Colony Edition
  • Surviving Mars: First Colony Edition
  • Stellaris Sign-up
  • Victoria 2
  • Europa Universalis IV: El Dorado
  • 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: Monks and Mystics
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
In the pages for types of subjects, one of the possible lines you can add is "can_switch_to". It is used in the tributary file, and lists that tributaries can switch to vassals or protectorates.
If I add a new type of subject empire, are there any other files that I need to edit to make a "can_switch_to" work in it. For example, if I call the new subject type "Client State" that vassals and protectorates can be converted into, do I need to add a new diplomatic interaction or something to make that switch work?

Also, how do I edit the displays in the Contacts window and the diplomacy window? If I can add a new subject type, I would like to have it appear with its own icon in both of those windows to make it easier to keep track of.
 

Divine

Tech Lead
Paradox Staff
33 Badges
Dec 26, 2005
584
1.046
  • Semper Fi
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • March of the Eagles
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • For the Motherland
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • 500k Club
  • Magicka: Wizard Wars Founder Wizard
  • Magicka 2 - Signup Campaign
  • Stellaris Sign-up
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Diplomacy
  • 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
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
With a very large if cluster with static checks, making it ugly if you then add more techs or want it to work with other modded techs. There's no easy way to parse a list/array of a country's techs. You get to c&p has_technology checks until your fingers hurt. Enjoy.
If you're going to add the same set of techs for a lot of new countries then you can at least help yourself to do it as a scripted effect. That way you'll also only need to update everything in a single place later on.
 
  • 1
Reactions:

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
Nice to see you again.

I have some questions:
1) I was surprised to find that in the game it is possible to create a dynamic modifier
damage_vs_country_type_fallen_empire_mult

Can I create other modifiers or just
damage_vs_country_type_typename_mult?

2) Looks like bug (game event, but only one trait)
Code:
create_leader = {
                    type = admiral
                    species = owner_main_species
                    name = random
                    skill = 0
                    traits = {
                        trait = random_trait
                        trait = random_trait
                    }
                }

3) Can i set vanilla orders (survey_planet_order etc) to fleet?

4) Can i make condition by fleet_stance (evasive etc)?

5) Where can I read how to do prescripted galaxy (searched on the wiki and not found)?
 

Iyur

icddppl
24 Badges
Apr 2, 2014
731
47
  • Crusader Kings II
  • Imperator: Rome
  • Surviving Mars: Digital Deluxe Edition
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Imperator: Rome Sign Up
  • Surviving Mars: First Colony Edition
  • Stellaris: Megacorp
  • Cities: Skylines Industries
  • Stellaris: Distant Stars
  • Cities: Skylines - Parklife
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Surviving Mars
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Cities: Skylines
  • Stellaris: Synthetic Dawn
  • Cities: Skylines Deluxe Edition

Lailani

Recruit
15 Badges
Sep 14, 2016
3
0
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Conclave
  • Stellaris
  • Hearts of Iron IV: Cadet
  • 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
I'm making quite a huge mod at the moment.. and, all tho I'm learning a lot every day, i have one problem i cannot connect to it's cause.

The problem is this:
My mod among other features has unique empire ethic and unique government that goes with it. It is all working as intended except for one thing;

Every new game i start has only single pop having my original ethic (and that's the pop sitting on the planet administration tile on my home planet)
All other pops on the planet start the game without that ethic. Also all growing pops are born without that ethic. (all the pops still have any secondary
( original Stellaris ) ethics player has picked during empire creation, and those work normally. This happens even when player's empire has ethics divergence
in huge negative values.

Given enough time while having ethics divergence in negative value, the pops DO get "infected" with my custom ethic. It's just that it is a ridiculously slow process.

In the end let's just mention that same thing happens even if i delete any and all bonuses and/or drawbacks from the custom ethic mentioned before.

Thanks in advance!

----------------------------------------------------
EDIT: i found the cause (partially);
Apperently, this bug happens only when i use maps i generated with Galaxy Generator (and i play only on those maps, tbh). On normal, randomly generated Stellaris maps, my pops have their ethos as i intended them to have.
Does someone have an idea of what's going on?

Thanks in advance!
----------------------------------------------------
 
Last edited:

Divine

Tech Lead
Paradox Staff
33 Badges
Dec 26, 2005
584
1.046
  • Semper Fi
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • March of the Eagles
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • For the Motherland
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • 500k Club
  • Magicka: Wizard Wars Founder Wizard
  • Magicka 2 - Signup Campaign
  • Stellaris Sign-up
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Diplomacy
  • 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
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
Nice to see you again.

I have some questions:
1) I was surprised to find that in the game it is possible to create a dynamic modifier
damage_vs_country_type_fallen_empire_mult

Can I create other modifiers or just
damage_vs_country_type_typename_mult?

2) Looks like bug (game event, but only one trait)
Code:
create_leader = {
                    type = admiral
                    species = owner_main_species
                    name = random
                    skill = 0
                    traits = {
                        trait = random_trait
                        trait = random_trait
                    }
                }

3) Can i set vanilla orders (survey_planet_order etc) to fleet?

4) Can i make condition by fleet_stance (evasive etc)?

5) Where can I read how to do prescripted galaxy (searched on the wiki and not found)?
1: There are some dynamic modifiers depending on the different types of game objects in the databases. But with that said it's still quite strict with what type of modifiers they are. So in this case you can only create damage_vs_country_type_<typename>_mult as seen used once by the original game to create damage_vs_country_type_fallen_empire_mult. There are some other dynamic modifiers but they work in the same kind of way with a defined behavior and a dynamic target that depends on the objects created by other game files.

2: Yes, I saw that previously. It's a really inflexible thing just being able to assign 1 random trait at leader creation but you can somewhat work around it in the meantime if you really need a second or third trait on the leader.

5: I haven't really gotten into this myself yet being spread a bit thin by four projects but hopefully someone else in the community will have more experience on this. I've seen a really ingenious community made tool flying around to create custom galaxies as well.
 

Sicon3

Corporal
50 Badges
Jul 9, 2016
48
20
  • Stellaris - Path to Destruction bundle
  • Stellaris
  • Cities: Skylines Industries
  • Cities: Skylines - Mass Transit
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines - Green Cities
  • Crusader Kings II: Jade Dragon
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Island Bound
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Hearts of Iron IV: Expansion Pass
  • Prison Architect
  • Cities: Skylines - Campus
  • Stellaris: Ancient Relics
  • Prison Architect: Psych Ward
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Hearts of Iron IV: Together for Victory
  • Cities: Skylines
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris: Galaxy Edition
  • Cities: Skylines - Natural Disasters
  • Crusader Kings II: Monks and Mystics
  • 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
  • Stellaris: Synthetic Dawn
I'm sorry if i sound silly or if this is a stupid question but i need some help with this. I've done modding before but I would only make assets (3d models and textures mainly) based off existing code from others. What i am trying to do is create a more in depth personality mod. Part of this mod is to make it so Personalities add modifiers. so my first question is if a personality adds, say. a 20% research buff where do i put that line? do i put it in the personality file or a triggered action or where? a second part of this is that i want to have alliances with certain personalities add effects for example:

#Master Scientists
<any_country> = {
has_ai_personality = {galactic_advancers}
}
<any_country> = {
is_in_federation_with = prev # Checks if country is in a federation with target country
}
modifier = {
all_technology_research_speed = .2
num_tech_alternatives_add = 1
}

I understand this code is not yet complete and improperly formatted but i hope you can see what i am going for. Basically if a country is in a federation with a country that has that personality they get a 20% research buff and an extra tech option

My question on this is how do i trigger this scope and how do i do so in a way that does not cause a lot of lag. there will be 108 personalities in all and i want each to have a unique effect so having them all trigger non stop is probably a bad idea.

Any and all help is appreciated
 

Zarathustra_the

Lt. General
85 Badges
Nov 3, 2011
1.645
985
  • Victoria 2: A House Divided
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • King Arthur II
  • The Kings Crusade
  • Magicka
  • Cities in Motion
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Semper Fi
  • Naval War: Arctic Circle
  • Victoria 2: Heart of Darkness
  • Warlock 2: The Exiled
  • Europa Universalis IV: Third Rome
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Mare Nostrum
  • Stellaris - Path to Destruction bundle
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
  • For the Motherland
  • 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
  • Europa Universalis III
  • Hearts of Iron III
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Divine Wind
  • Europa Universalis III: Chronicles
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Magicka 2: Ice, Death and Fury
  • Crusader Kings II: Conclave
  • Stellaris
  • Warlock: Master of the Arcane
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Field Marshal
@Divine does the button_effect scoping work correctly now? I remember that after implementation it would not properly resolve the object scope, and as a result could only be properly used to add new empire effects.
 

Divine

Tech Lead
Paradox Staff
33 Badges
Dec 26, 2005
584
1.046
  • Semper Fi
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • March of the Eagles
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • For the Motherland
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • 500k Club
  • Magicka: Wizard Wars Founder Wizard
  • Magicka 2 - Signup Campaign
  • Stellaris Sign-up
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Diplomacy
  • 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
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
@Divine does the button_effect scoping work correctly now? I remember that after implementation it would not properly resolve the object scope, and as a result could only be properly used to add new empire effects.
Unfortunately no. It required a bit more coding than was originally thought and I haven't had time to look at it properly while being on all 4 projects. But both me and the coders at Stellaris has the ambition to get it working down the line. So hopefully someone gets time to dig into the issue and fix it sooner rather than later. That said however there's no-one looking into it right now.

I'm sorry if i sound silly or if this is a stupid question but i need some help with this. I've done modding before but I would only make assets (3d models and textures mainly) based off existing code from others. What i am trying to do is create a more in depth personality mod. Part of this mod is to make it so Personalities add modifiers. so my first question is if a personality adds, say. a 20% research buff where do i put that line? do i put it in the personality file or a triggered action or where? a second part of this is that i want to have alliances with certain personalities add effects for example:

#Master Scientists
<any_country> = {
has_ai_personality = {galactic_advancers}
}
<any_country> = {
is_in_federation_with = prev # Checks if country is in a federation with target country
}
modifier = {
all_technology_research_speed = .2
num_tech_alternatives_add = 1
}

I understand this code is not yet complete and improperly formatted but i hope you can see what i am going for. Basically if a country is in a federation with a country that has that personality they get a 20% research buff and an extra tech option

My question on this is how do i trigger this scope and how do i do so in a way that does not cause a lot of lag. there will be 108 personalities in all and i want each to have a unique effect so having them all trigger non stop is probably a bad idea.

Any and all help is appreciated
On the top of my head I think of two non-optimal solutions. The first one is to have an event fire on yearly pulse (in the "common/on_actions/" - folder) where you evaluate the modifiers that should be applied. This has the problem in timing as you might have to wait for quite a while for the modifier to actually take effect.

Another way to do it might be to create a triggered modifier (in the "common/triggered_modifiers/" - folder). I haven't tried adding these to Stellaris yet but there seems to be code support for it. This has the problem with performance since it will verify the triggers excessively.

Ideally you'd like to identify a proper on_action event that would handle the creation of the modifier and then a corresponding on_action event handling the removal (alternatively having an on_action for the yearly pulse to verify that the modifiers and removing obsolete ones with the side-effect that some modifiers might "drag" for a while after they should be gone). I think that for your first example such an on_action might not exist right now but I'll try to add a quick on_join_alliance and on_leave alliance hook to reach you in a future patch.

There might be other more optimal ways to solve the problem that other modders might have experience with.
 

Lhutien

Colonel
109 Badges
Jul 22, 2012
970
425
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Rights of Man
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Stellaris
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Cities: Skylines - Green Cities
  • Europa Universalis IV: Cradle of Civilization
  • Victoria 2
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Europa Universalis III Complete
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis III Complete
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Hearts of Iron IV: No Step Back
  • Cities: Skylines Industries
  • Rome: Vae Victis
  • War of the Roses
  • 500k Club
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Mount & Blade: Warband
  • Crusader Kings II: Way of Life
Does anyone know if the maximum number of tiles on a planet can exceed 25?

Screwing around with the GUI files allows for adjustments to the size of individual tiles (to give more room for extra tiles), whilst increasing the max_horizontal and max_vertical I guess allows for more tiles in the grid - only problem is, I can't for the life of me find the supporting code that allows the surface tiles to exceed 25 now that I've modified the interface to support it.

I know that planets can be 'increased in size beyond 25', but sadly the value (such as 30) does not do much of anything beyond 'claim' that the planet has 30 surface tiles when it only has 25. I suspect this is hardcoded, but in case anyone knows otherwise, I thought I'd post here. Thanks!

Could anyone answer this? I'm interested in knowing this too