Quick Questions Thread

  • We will be taking the forums down for scheduled maintenance on Monday, May 17th 2021 at 8:00 CDT / 15:00 UTC for approximately 3 hours.
  • Crusader Kings II Expansion Subscription

    Subscribe to the CK II Expansion and enjoy unlimited access to 13 major expansions and more!


  • Crusader Kings III Available Now!

    The realm rejoices as Paradox Interactive announces the launch of Crusader Kings III, the latest entry in the publisher’s grand strategy role-playing game franchise. Advisors may now jockey for positions of influence and adversaries should save their schemes for another day, because on this day Crusader Kings III can be purchased on Steam, the Paradox Store, and other major online retailers.


    Real Strategy Requires Cunning

Viking8008

Recruit
Mar 11, 2021
6
0
You can't write "who" = every_country. Root is your country since that's the scope of the broader event. Try uncommenting out the loop and writing who = this. I think that would do it.
Well. I somehow made it. Now it looks like this:

country_event = { id = hate.66 title = hate.66.name desc = hate.66.desc is_triggered_only = yes option = { name = hate.66.a every_country = { add_opinion_modifier = { who = root modifier = opinion_shielded_my_world } } } option = { name = hate.exit } }

Seems limit = { always = true } was the problem
And every other country now have -200 towards me. But why -200? If the opinion mod is this:

opinion_shielded_my_world = { opinion = { base = -111 } accumulative = yes min = -111 decay = { base = 1 } }

And if I make it -2000 it will be still -200. What if I need more?

Also tooltip is still bugged and stupid. It says "Every empireHiran opinion to Hiran will be -200"
 

mial42

Colonel
16 Badges
Sep 28, 2020
1.165
2.244
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Horse Lords
  • Stellaris
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
Well. I somehow made it. Now it looks like this:

country_event = { id = hate.66 title = hate.66.name desc = hate.66.desc is_triggered_only = yes option = { name = hate.66.a every_country = { add_opinion_modifier = { who = root modifier = opinion_shielded_my_world } } } option = { name = hate.exit } }

Seems limit = { always = true } was the problem
And every other country now have -200 towards me. But why -200? If the opinion mod is this:

opinion_shielded_my_world = { opinion = { base = -111 } accumulative = yes min = -111 decay = { base = 1 } }

And if I make it -2000 it will be still -200. What if I need more?

Also tooltip is still bugged and stupid. It says "Every empireHiran opinion to Hiran will be -200"
No clue about the tooltip, but I've seen that sort of bug with vanilla tooltips as well. As for the opinion modifier, I bet it's because the Vanilla "opinion_shielded_my_world" modifier is -200. Opinion modifier overwriting creates a duplicate with the same name, so your script is adding the original one and not the mod one. Try making a new opinion modifier with the value you want and adding that instead.
 
  • 1Like
Reactions:

Viking8008

Recruit
Mar 11, 2021
6
0
No clue about the tooltip, but I've seen that sort of bug with vanilla tooltips as well. As for the opinion modifier, I bet it's because the Vanilla "opinion_shielded_my_world" modifier is -200. Opinion modifier overwriting creates a duplicate with the same name, so your script is adding the original one and not the mod one. Try making a new opinion modifier with the value you want and adding that instead.
I did what I wanted. The full code is now this.

country_event = { id = hate.66 title = hate.66.name desc = hate.66.desc is_triggered_only = yes option = { name = hate.66.a every_rival_country = { every_country = { add_opinion_modifier = { who = prev modifier = opinion_rep_sab } } } } option = { name = hate.exit } }

The only problem is that in description it says "opinion_rep_sab" -2000. What file and where do I need to edit\create to make it "Reputation Mocked" ?
Also it says -1 per year. How to change decay per day? I saw somewhere that it must be like:


decay = {
base = 1.day
}
But I dont remember exactly ...

And thank you a lot! :D
 

mial42

Colonel
16 Badges
Sep 28, 2020
1.165
2.244
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Horse Lords
  • Stellaris
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
I did what I wanted. The full code is now this.

country_event = { id = hate.66 title = hate.66.name desc = hate.66.desc is_triggered_only = yes option = { name = hate.66.a every_rival_country = { every_country = { add_opinion_modifier = { who = prev modifier = opinion_rep_sab } } } } option = { name = hate.exit } }

The only problem is that in description it says "opinion_rep_sab" -2000. What file and where do I need to edit\create to make it "Reputation Mocked" ?
Also it says -1 per year. How to change decay per day? I saw somewhere that it must be like:


decay = {
base = 1.day
}
But I dont remember exactly ...

And thank you a lot! :D
You can change decay rate in the opinion modifier file itself. Here's the example of the "insult" modifier:
Code:
opinion_insult = {
    opinion = {
        base = -200
    }

    unique = yes
    monthly = yes
    decay = {
        base = 2  
    }
}
Monthly determines if it decays monthly or yearly (I don't think it can be done daily), the decay block determines the value (note: decays TOWARDS 0, so use a positive number!).

As for the opinion modifier localization, you can name them in a localization file (saved to the localization folder as a YML file, must end with the sequence _l_english.yml if English, suggest referring to a vanilla file for the format), like so:
Code:
l_english: #Necessary for any English localization file
    opinion_rep_sab:0 "Whatever you want to name it within the quotation marks"
 

Omnishambles

Sergeant
55 Badges
Dec 21, 2016
66
44
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Third Rome
  • Stellaris: Apocalypse
  • Stellaris
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Federations
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Crusader Kings III
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Shadowrun Returns
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Stellaris: Lithoids
  • Prison Architect
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • War of the Roses
  • Europa Universalis IV
  • Europa Universalis 4: Emperor
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Crusader Kings II: Charlemagne
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • 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
  • Magicka
  • Crusader Kings II: Jade Dragon
Does anyone know how to prevent an empire building an observation post over a specific planet? The rogue scientist observation post events do this I believe, but I can't figure out how for the life of me
 

17blue17

Field Marshal
68 Badges
Nov 9, 2003
6.218
260
Visit site
  • Stellaris: Galaxy Edition
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • 500k Club
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Necroids
  • 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
  • Divine Wind
  • 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
  • Heir to the Throne
  • Europa Universalis III Complete
  • Leviathan: Warships
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Victoria 2
  • Victoria 2: A House Divided
Diplomatic Actions - has_defense_pact

I want to prevent a awakened empire from making a subject of an ai if the ai has a defense_pact with the human player in the common\diplomatic actions file. Example under action_demand_satellite potential section:


NOT = { has_defensive_pact = ??? } how can I specify the human player ?
 

Omnishambles

Sergeant
55 Badges
Dec 21, 2016
66
44
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Third Rome
  • Stellaris: Apocalypse
  • Stellaris
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Federations
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Crusader Kings III
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Shadowrun Returns
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Stellaris: Lithoids
  • Prison Architect
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • War of the Roses
  • Europa Universalis IV
  • Europa Universalis 4: Emperor
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Crusader Kings II: Charlemagne
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • 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
  • Magicka
  • Crusader Kings II: Jade Dragon
Diplomatic Actions - has_defense_pact

I want to prevent a awakened empire from making a subject of an ai if the ai has a defense_pact with the human player in the common\diplomatic actions file. Example under action_demand_satellite potential section:


NOT = { has_defensive_pact = ??? } how can I specify the human player ?
You can check is_ai = no
 

17blue17

Field Marshal
68 Badges
Nov 9, 2003
6.218
260
Visit site
  • Stellaris: Galaxy Edition
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • 500k Club
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Necroids
  • 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
  • Divine Wind
  • 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
  • Heir to the Throne
  • Europa Universalis III Complete
  • Leviathan: Warships
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Victoria 2
  • Victoria 2: A House Divided
You can check is_ai = no
Thanks for the response. The problem is that you end up with trigger = trigger which does not appear to work. I think an event target would work but how to do that in the common diplomacy file? It is really strange there is no simple trigger like NOT = { has_defensive_pact = yes } at a minimum. I even thought about some kind of scripted trigger but I could not figure that out either. I guess maybe setting some kind of country flag by event then using the country flag........
 

DaJay42

First Lieutenant
46 Badges
Jan 31, 2018
218
563
  • Europa Universalis IV
  • Crusader Kings III: Royal Edition
  • Stellaris: Ancient Relics
  • Imperator: Rome
  • Hearts of Iron IV: Cadet
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Crusader Kings II
  • Crusader Kings II: Holy Fury
  • Crusader Kings III
  • Europa Universalis IV: Mandate of Heaven
  • Age of Wonders III
  • Hearts of Iron III
  • Cities: Skylines
  • Cities: Skylines - Mass Transit
  • Shadowrun Returns
  • Stellaris
  • Stellaris: Distant Stars
Thanks for the response. The problem is that you end up with trigger = trigger which does not appear to work. I think an event target would work but how to do that in the common diplomacy file? It is really strange there is no simple trigger like NOT = { has_defensive_pact = yes } at a minimum. I even thought about some kind of scripted trigger but I could not figure that out either. I guess maybe setting some kind of country flag by event then using the country flag........
You need to think "backwards" for this kind of stuff.

Something like this:
Code:
NOT = {
    any_playable_country = {
        is_ai = no
        has_defensive_pact = PREV
    }
}
 
  • 1
Reactions:

Ori Vandewalle

Private
Feb 10, 2021
12
34
Can anyone tell me where the odds of a leader getting a positive or negative trait on leveling are handled? That is, can you mod the effects of a civic like Philosopher King? There doesn't seem to be anything relevant in leader_events_1.txt, but I'm very new at modding, so it's definitely possible I'm missing something.
 

Ori Vandewalle

Private
Feb 10, 2021
12
34
Can anyone tell me where the odds of a leader getting a positive or negative trait on leveling are handled? That is, can you mod the effects of a civic like Philosopher King? There doesn't seem to be anything relevant in leader_events_1.txt, but I'm very new at modding, so it's definitely possible I'm missing something.

Okay, after a little more digging, looks like the relevant file is 00_scripted_events.txt. But if I'm reading the code correctly, it looks like has_civic = "civic_philosopher_king" straight up prevents negative traits for governors and rulers, rather than it being "less likely." But again, I could be missing something.
 

El Doctoro

Private
17 Badges
Mar 11, 2018
15
0
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Prison Architect
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Pillars of Eternity
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
How Do I define a new planet with its own model? I want to create a planet that uses the dyson sphere model, but I'm having trouble. I tried just defining a planet with "dyson_sphere_phase_05_entity" as its entity, but that hasn't worked. I'm looking at defining a new planet entity in the graphics section but I have no idea what most of the properties do, and just copying the dyson sphere model to it hasn't worked.
 

InvisibleBison

Lt. General
29 Badges
Oct 14, 2012
1.376
2.371
  • Crusader Kings II
  • Europa Universalis IV: Common Sense
  • Stellaris: Ancient Relics
  • Crusader Kings II: Holy Fury
  • Stellaris: Megacorp
  • Shadowrun: Hong Kong
  • Shadowrun: Dragonfall
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Synthetic Dawn
  • BATTLETECH
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Tyranny: Archon Edition
  • Europa Universalis IV: Rights of Man
  • Stellaris
  • Crusader Kings II: Way of Life
  • 500k Club
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Europa Universalis IV: Art of War
  • Europa Universalis IV
  • Crusader Kings II: Sword of Islam
  • 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
Does anyone know where ship build times are defined? The files in common/ship_sizes just have references, not actual numbers, and I can't find where those references are defined.
 

mial42

Colonel
16 Badges
Sep 28, 2020
1.165
2.244
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Horse Lords
  • Stellaris
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
Anyone know where to control the probability of "terraforming candidates" spawning? I'm playing with modded 1/16 habitable worlds, but that just means terraforming candidates often outnumber actual habitable planets, and I'd like to a get a ratio closer to Vanilla.
 

Mitchz95

Field Marshal
16 Badges
Feb 4, 2016
3.315
1.955
  • Stellaris: Synthetic Dawn
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Major Wiki Contributor
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
Anyone know where to control the probability of "terraforming candidates" spawning? I'm playing with modded 1/16 habitable worlds, but that just means terraforming candidates often outnumber actual habitable planets, and I'd like to a get a ratio closer to Vanilla.
common/anomalies/00_anomaly_categories.txt. Look for "terraforming_candidate_category".
 

mial42

Colonel
16 Badges
Sep 28, 2020
1.165
2.244
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Horse Lords
  • Stellaris
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
common/anomalies/00_anomaly_categories.txt. Look for "terraforming_candidate_category".
Thank you. I could have sworn that there were non-anomaly terraforming candidates. Maybe that's added by the Unofficial Patch?

EDIT: Yup, !ariphaos_patch_events.txt in ariphaos_patch.2575