• 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

cray935

Second Lieutenant
51 Badges
Apr 14, 2017
180
1
  • Cities in Motion
  • Stellaris: Synthetic Dawn
  • Tyranny - Tales from the Tiers
  • Hearts of Iron IV: Death or Dishonor
  • Crusader Kings III
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • Cities: Skylines - Green Cities
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Surviving Mars: Digital Deluxe Edition
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Surviving Mars: First Colony Edition
  • Cities: Skylines Industries
  • Prison Architect
  • Surviving Mars: First Colony Edition
  • Cities: Skylines - Campus
  • Age of Wonders: Planetfall
  • Stellaris: Lithoids
  • Prison Architect: Psych Ward
  • Stellaris: Galaxy Edition
  • Crusader Kings II
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Common Sense
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Stellaris: Galaxy Edition
  • BATTLETECH
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris
  • Stellaris: Megacorp
  • Imperator: Rome
  • Stellaris: Ancient Relics
  • Stellaris - Path to Destruction bundle
I'm trying to get the coat of arms for the Danelaw to switch based on character religion just like England does for culture. In testing it doesn't automatically switch but will switch before the title is created if you convert to Christianity and then create k_danelaw. It just then won't switch back and forth if you reconvert to Asatru / Christianity. It also works when calling the event coa.1 manually.

These are my triggers:

Code:
coa_switch_to_asatru_trigger = {
    has_religion = religion:germanic_religion
}
coa_switch_to_christian_trigger = {
    has_religion = religion:christianity_religion
}
This is the event code:

Code:
coa.1 = {
    type = character_event
    hidden = yes
    trigger = {
        is_ruler = yes
    }
    immediate = {
        trigger_event = coa.10 # England
        trigger_event = coa.11 # Normans, Welsh, Saxons
        trigger_event = coa.12 # Danelaw
    }
}

...

coa.12 = {
    type = character_event
    hidden = yes
    trigger = {
        any_held_title = { this = title:k_danelaw }
    }
    immediate = {
        if = {
            limit = { coa_switch_to_asatru_trigger = yes }
            title:k_danelaw = { set_coa = k_danelaw } # reset
        }
       
        if = {
            limit = { coa_switch_to_christian_trigger = yes }
            title:k_danelaw = { set_coa = k_danelaw_christian }
        }
    }
}
I then added coa.1 to the religion_on_actions file:

Code:
on_character_faith_change = {
    effect = {
        check_for_equal_doctrine_effect = yes
    }
    events = {
        faith_conversion.0002 # Remove obsolete modifiers
        faith_conversion.0004 # Convert Theocracies
        faith_conversion.0005 # Update marriage opinions
        great_holy_war.0025 # Replace Recipient for ongoing GHW
        great_holy_war.0029 # Beneficiary converted, remove and replace.
        great_holy_war.0059 # Clear Crusader traits on conversion.
        great_holy_war.0084 # Replace fallback ghw recipient
        great_holy_war.0085 # Remove pledged vassals upon conversion of their liege.
        false_conversion.0001    # Flag possible false conversions.
        war_event.3100        # Handles invalidation of religious wars
        coa.1 # check if title Coat of Arms should change.
    }
}
I don't see anything in error.log about this. Anyone able to help debug?
I am more familiar with stellaris, but maybe it is valid here. The check is a trigger right ? so it needs to be in trigger and not in effect (?)
 

dklfhgkjdgkulzr

Recruit
Nov 15, 2020
4
0
I'm not sure what you mean by 'add the regular no_legwear gene to the armor.' My thought is that you might need to create a custom no_legwear rule, as you suggested (or completely overwrite the default 01_legwear.txt file, but that's obviously not as desirable).

I was thinking of adding
mode = add
gene = legwear
template = no_legwear
value = 0

from the no_legwear section directly into the armor as an additional dna modifier like this

byzantine_war = {
dna_modifiers = {
accessory = {
mode = add
gene = clothes
template = byzantine_war_nobility_clothes
range = { 0 1 } # For the randomness to work correctly
}
dna_modifiers = {
accessory = {
mode = add
gene = legwear
template = no_legwear
value = 0
}
morph = {
mode = modify_multiply
gene = gene_bs_bust
value = 1.0
template = bust_clothes
}
morph = {
mode = modify_multiply
gene = gene_bs_body_shape
value = 1.0
template = body_shape_average_clothed
}
}
weight = {
base = 0
modifier = {
add = 100
portrait_wear_armor_trigger = yes
portrait_byzantine_clothing_trigger = yes
}
}
}



SRY i suck at formatting i just started my modding career 2 days ago XD
 

SauronGorthaur

First Lieutenant
24 Badges
Jun 4, 2014
228
696
  • Crusader Kings III: Royal Edition
  • Crusader Kings II
  • Cities: Skylines
  • Stellaris
  • Europa Universalis IV: Call to arms event
To answer my own question from yesterday, you can modify what animation a portrait in an event uses depending on circumstances. The line to do so is triggered_animation.

To use my example:
Code:
triggered_animation = {
    trigger = {
        scope:serbian_representative = {
            has_culture = culture:serbian
        }
    }
    animation = beg
}
triggered_animation = {
    trigger = {
        scope:serbian_representative = {
            is_councillor_of = scope:scoped_ruler
        }
    }
    animation = personality_rational
}
The way it works is similar to first_valid for variable descriptions. If a trigger for a given triggered animation is not met, the event will go to the next triggered animation and continue to do so until a triggered animation's conditions are met, at which point it picks that one and ignores the rest. So put your preferred animation on top and the fallback options below.
 
Last edited:
  • 1
Reactions:

Question

Lt. General
Jun 11, 2019
1.309
1.556
Im trying to change the convert culture action such that the AI will only convert counties if one of the following is true :

-they own the county directly

-the county holder is a direct vassal of the councillor's liege AND it is the vassal's capital county

How do you do the trigger for this?

I tried this, but it does not work (the AI always refuses to convert culture) :

Code:
if = {
            # If not holder, only convert the capitals of direct vassals
            limit = {
                NOR = {
                    scope:county.holder = scope:councillor_liege #checks if the liege owns it directly
                 
                    scope:county.holder = {
                        is_vassal_of = scope:councillor_liege #checks if the holder is a direct vassal of the liege
                    }

                    scope:county.holder.capital_county = scope:county # checks if the holder's capital_county is scope:county
                }
            }     
            multiply = 0
        }
Edit : I can confirm that this doesnt work at least :

Code:
scope:county.holder = {
                        is_vassal_of = scope:councillor_liege #checks if the holder is a direct vassal of the liege
                    }
Its supposed to check if the county.holder is a vassal of councillor_liege, but its not doing that. I dont understand, whats wrong with it?

Edit 2 : I think scope:county doesnt work in ai_will_do. Going to try moving it to potential_county instead.
 
Last edited:

虚无行者

Sergeant
37 Badges
Jan 31, 2019
83
9
  • Crusader Kings II
  • Imperator: Rome
  • Stellaris: Synthetic Dawn
  • Stellaris: Galaxy Edition
  • Stellaris: Distant Stars
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Mass Transit
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Digital Anniversary Edition
  • Cities: Skylines Industries
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Imperator: Rome Deluxe Edition
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Imperator: Rome - Magna Graecia
  • Crusader Kings III
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Sword of Islam
  • Cities: Skylines
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Leviathans Story Pack
  • 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
  • Crusader Kings II: Charlemagne
What exactly is wrong with my code? Why wasn't this principality created?
 

sineme

Recruit
27 Badges
Oct 24, 2019
6
0
  • Stellaris - Path to Destruction bundle
  • Crusader Kings III
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Surviving Mars: First Colony Edition
  • Prison Architect
  • Stellaris: Megacorp
  • Surviving Mars: First Colony Edition
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Stellaris: Synthetic Dawn
  • Surviving Mars
  • Cities: Skylines - Mass Transit
  • Dungeonland
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Cities: Skylines - Snowfall
  • Knights of Pen and Paper 2
  • Cities: Skylines - After Dark
  • Magicka 2
  • Cities: Skylines
  • Warlock: Master of the Arcane
  • Magicka
Have you looked in the error.log in .../Documents/Paradox Interactive/Crusader Kings III/logs? Also in _council_tasks.info, ai_will_do is not listed, so it probably doesn't exist there. I'd definitely put it in potential_county
Code:
potential_county = {
    scope:county = {
        NOT = { culture = scope:councillor_liege.culture }
    }
    trigger_if = {
        limit = {
            scope:councillor_liege = { is_ai = yes }
        }
        scope:county = {
            OR = {
                holder = scope:councillor_liege
                holder = {
                    is_vassal_of = scope:councillor_liege
                    capital_county = scope:county
                }
            }
        }
        OR = {...
        }
        OR = {...
        }
    }
}
Note: as you were only talking about limiting the AI, the code above would'nt limit a player
 

dklfhgkjdgkulzr

Recruit
Nov 15, 2020
4
0
Quick question regarding localization: I managed to get my own armor into the game but can't get the game to use the regular localization path so i can set different names for the male and female version of the armor.
These are the regular paths i've seen the game use for localization:

PORTRAIT_MODIFIER_custom_clothes_male_clothes_secular_modded_myarmor_01:1 "Myarmor Male"
PORTRAIT_MODIFIER_custom_clothes_female_clothes_secular_modded_myarmor_01:1 "Myarmor female"

but for whatever reason the path my armor gets its localization from is instead.

PORTRAIT_MODIFIER_custom_clothes_modded_myarmor:1 "Myarmor Male"
Do you have any idea what i didn't set up correctly that causes this?
 

Thomas_Oak

Captain
8 Badges
May 11, 2018
345
441
  • Crusader Kings II
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Warlock: Master of the Arcane
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings III
I am trying to create a letter event to trigger if there is a high prowess prisoner in my dungeons, to use as a cheap source of knights. I want to limit it to adults and male only. I mistakenly thought I could use the following script, which is wrong. I am struggling to think of an elegant way of doing it. Any suggestions would be most welcome.
Code:
TOMSprisoner.0100 = {
    hidden = yes
    
    trigger = {
        is_at_war = no
        is_ai = no
        any_prisoner = {
            is_female = no
            age >= 18
            age <= 45
            prowess >= 14
        }
    }
    immediate = {
        ordered_prisoner = {
            is_female = no
            age >= 18
            age <= 45
            prowess >= 14
            save_scope_as = prisoner_knight
            
            order_by = {
                value = 5
                add = prowess
            }
        }
 

SauronGorthaur

First Lieutenant
24 Badges
Jun 4, 2014
228
696
  • Crusader Kings III: Royal Edition
  • Crusader Kings II
  • Cities: Skylines
  • Stellaris
  • Europa Universalis IV: Call to arms event
I am trying to create a letter event to trigger if there is a high prowess prisoner in my dungeons, to use as a cheap source of knights. I want to limit it to adults and male only. I mistakenly thought I could use the following script, which is wrong. I am struggling to think of an elegant way of doing it. Any suggestions would be most welcome.
Code:
TOMSprisoner.0100 = {
    hidden = yes
  
    trigger = {
        is_at_war = no
        is_ai = no
        any_prisoner = {
            is_female = no
            age >= 18
            age <= 45
            prowess >= 14
        }
    }
First of all, if you're just looking for adults, is_adult = yes would achieve that by itself. Moving on, I think your code for the immediate area should look like this:

Code:
immediate = {
    ordered_prisoner = {
        limit = {
            is_female = no
            age >= 18
            age <= 45
            prowess >= 14
        }
        order_by = prowess
        if = {
            limit = {
                NOT = { exists = scope:prisoner_knight }
            }
            save_scope_as = prisoner_knight
        }
    }
}
 

Thomas_Oak

Captain
8 Badges
May 11, 2018
345
441
  • Crusader Kings II
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Warlock: Master of the Arcane
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings III
Thanks Sauron. I used the ages to avoid selecting elderly people, but I guess with the decaying prowess with increased age it might work just as well. :)
 

Yazman

Captain
117 Badges
Jan 1, 2011
404
32
  • Victoria 2: Heart of Darkness
  • Leviathan: Warships
  • Magicka
  • Majesty 2 Collection
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Rome Gold
  • Semper Fi
  • Supreme Ruler: Cold War
  • Stellaris
  • Victoria 2
  • Victoria 2: A House Divided
  • Lead and Gold
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Tyranny: Gold Edition
  • Europa Universalis IV: Mare Nostrum
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Knights of Pen and Paper 2
  • Europa Universalis IV: Pre-order
  • Surviving Mars
  • Europa Universalis IV: Third Rome
  • Knights of Honor
  • Pillars of Eternity
  • Europa Universalis III
  • Cities in Motion
  • 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
  • Darkest Hour
  • Dungeonland
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For the Motherland
  • Hearts of Iron III
  • Heir to the Throne
  • Stellaris: Synthetic Dawn
  • Knights of Pen and Paper +1 Edition
I created some new sea provinces. I defined them as sea_zones in default.map.

And for some reason my new sea has the lake color, and not the sea color like I want it to have. I really need to fix this but can't figure out how. Help!


1605646604804.png
 

Anyasia

Lightbringer
60 Badges
Aug 5, 2015
95
24
  • Crusader Kings II
  • Europa Universalis IV: Cossacks
  • The Showdown Effect
  • Victoria 2
  • Warlock: Master of the Arcane
  • War of the Roses
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Magicka: Wizard Wars Founder Wizard
  • Pride of Nations
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Starvoid
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron IV Sign-up
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings Complete
  • Europa Universalis IV: Third Rome
  • Age of Wonders III
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis III
  • Arsenal of Democracy
  • Cities in Motion 2
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings III
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Commander: Conquest of the Americas
  • Darkest Hour
  • Teleglitch: Die More Edition
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • Gettysburg
  • Leviathan: Warships
  • The Kings Crusade
  • Majesty 2
  • March of the Eagles
  • Naval War: Arctic Circle
  • Europa Universalis IV: Res Publica
  • Sengoku
Is there any way to check climatic data for a given province? I want to condition my event background so it only uses an outdoor option if it's not winter.

My initial thought was to cross-reference the date with the geographical_region trigger (so outdoor event backgrounds could still fire for regions that don't get winter), but realizing I absolutely lack the knowledge to know whether that's the case for many regions on the map, I did some digging and found map_data/climate.txt, which lists which provinces have mild, normal, or extreme winters. Brilliant, except that these don't seem to be referenced from anywhere in script, so I have no idea how to use them, or even if they can be used.

Fallback is to check against all the provinces in map_data/climate.txt, but that sounds kind of insane.
 

Tatterhood

Conscientious Objector
28 Badges
Jun 9, 2016
1.567
1.434
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings III
  • Crusader Kings II: Holy Fury
  • Shadowrun: Hong Kong
  • Shadowrun: Dragonfall
  • Shadowrun Returns
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Crusader Kings II: Jade Dragon
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Reapers Due
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Crusader Kings II
  • Stellaris: Synthetic Dawn
  • 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
  • Crusader Kings II: Charlemagne
Thanks Sauron. I used the ages to avoid selecting elderly people, but I guess with the decaying prowess with increased age it might work just as well. :)
Incidentally you could use can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } instead of the is_female check if you want it to work better for non-male-dominated faiths.
 
  • 1
  • 1Like
Reactions:

Kingsaver

Corporal
36 Badges
Dec 10, 2017
35
7
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings II: Holy Fury
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings III
  • Arsenal of Democracy
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Call to arms event
  • Hearts of Iron III
  • Europa Universalis IV: Res Publica
  • Semper Fi
In vanilla game files I regularly find text which is capitalized. I first thought it had to do with localization, but that is not always the case. Example:
<$INTERCOURSE_CHARACTER$ > in the triggered effects folder ) Does anyone know what these parts of files signify/do?
 

Anyasia

Lightbringer
60 Badges
Aug 5, 2015
95
24
  • Crusader Kings II
  • Europa Universalis IV: Cossacks
  • The Showdown Effect
  • Victoria 2
  • Warlock: Master of the Arcane
  • War of the Roses
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Magicka: Wizard Wars Founder Wizard
  • Pride of Nations
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Starvoid
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron IV Sign-up
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings Complete
  • Europa Universalis IV: Third Rome
  • Age of Wonders III
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis III
  • Arsenal of Democracy
  • Cities in Motion 2
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings III
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Commander: Conquest of the Americas
  • Darkest Hour
  • Teleglitch: Die More Edition
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • Gettysburg
  • Leviathan: Warships
  • The Kings Crusade
  • Majesty 2
  • March of the Eagles
  • Naval War: Arctic Circle
  • Europa Universalis IV: Res Publica
  • Sengoku
In vanilla game files I regularly find text which is capitalized. I first thought it had to do with localization, but that is not always the case. Example:
<$INTERCOURSE_CHARACTER$ > in the triggered effects folder ) Does anyone know what these parts of files signify/do?
The strings surrounded by dollar signs like that are variables that are passed into the effect. For example, that one is called as such:

Code:
intercourse_with_character_effect = {
    INTERCOURSE_CHARACTER = scope:some_character
}
(Though for what it's worth, that particular effect is only used a few times in the whole game, and I'm not sure what it's purpose is; it looks like it's left over test code that's been replaced with had_sex_with_effect.)

These contrast with effects that don't take variables, which are usually just called as some_simple_effect = yes.
 

Anyasia

Lightbringer
60 Badges
Aug 5, 2015
95
24
  • Crusader Kings II
  • Europa Universalis IV: Cossacks
  • The Showdown Effect
  • Victoria 2
  • Warlock: Master of the Arcane
  • War of the Roses
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Magicka: Wizard Wars Founder Wizard
  • Pride of Nations
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Starvoid
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron IV Sign-up
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings Complete
  • Europa Universalis IV: Third Rome
  • Age of Wonders III
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis III
  • Arsenal of Democracy
  • Cities in Motion 2
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings III
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Commander: Conquest of the Americas
  • Darkest Hour
  • Teleglitch: Die More Edition
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • Gettysburg
  • Leviathan: Warships
  • The Kings Crusade
  • Majesty 2
  • March of the Eagles
  • Naval War: Arctic Circle
  • Europa Universalis IV: Res Publica
  • Sengoku
Is there any way to check climatic data for a given province? I want to condition my event background so it only uses an outdoor option if it's not winter.

My initial thought was to cross-reference the date with the geographical_region trigger (so outdoor event backgrounds could still fire for regions that don't get winter), but realizing I absolutely lack the knowledge to know whether that's the case for many regions on the map, I did some digging and found map_data/climate.txt, which lists which provinces have mild, normal, or extreme winters. Brilliant, except that these don't seem to be referenced from anywhere in script, so I have no idea how to use them, or even if they can be used.

Fallback is to check against all the provinces in map_data/climate.txt, but that sounds kind of insane.
The way I ended up solving this is by creating custom regions based on the data in map_data/climate.txt, which I then checked against time_of_year. Unfortunately, it seems like the only way to make custom regions is to overwrite the vanilla regions file, but I doubt many people are doing this anyway, so my hope is collisions with other mods should be rare, and it beats having to check each province ID individually.
 

SauronGorthaur

First Lieutenant
24 Badges
Jun 4, 2014
228
696
  • Crusader Kings III: Royal Edition
  • Crusader Kings II
  • Cities: Skylines
  • Stellaris
  • Europa Universalis IV: Call to arms event
Wait, is there no way to add an opinion modifier for same culture group to a trait? Some traits have same_culture_opinion, but same_culture_group_opinion does nothing. In CKII you could even add opinions for specific cultures and culture groups, so unless I'm missing something, this is extremely lame...
 

Yazman

Captain
117 Badges
Jan 1, 2011
404
32
  • Victoria 2: Heart of Darkness
  • Leviathan: Warships
  • Magicka
  • Majesty 2 Collection
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Rome Gold
  • Semper Fi
  • Supreme Ruler: Cold War
  • Stellaris
  • Victoria 2
  • Victoria 2: A House Divided
  • Lead and Gold
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Tyranny: Gold Edition
  • Europa Universalis IV: Mare Nostrum
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Knights of Pen and Paper 2
  • Europa Universalis IV: Pre-order
  • Surviving Mars
  • Europa Universalis IV: Third Rome
  • Knights of Honor
  • Pillars of Eternity
  • Europa Universalis III
  • Cities in Motion
  • 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
  • Darkest Hour
  • Dungeonland
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For the Motherland
  • Hearts of Iron III
  • Heir to the Throne
  • Stellaris: Synthetic Dawn
  • Knights of Pen and Paper +1 Edition
Update RE: my question about sea water colors: I just had to edit gfx/map/water/watercolor_rgb_waterspec_a.dds! Thanks to UlfDerDritte from the CK3 discord.
 
  • 1
  • 1Like
Reactions:

Abcunbekannt75

Recruit
1 Badges
Nov 14, 2020
7
0
  • Crusader Kings II: The Old Gods
Hello,
i have a question. Where is the gender of a character defined ? (Ionly found the type=male/female in the _dna file or the _bookmark file) I set the type of my custom character on both to type = female, but when i start a game the character is male. Can y help me ?
 

Anyasia

Lightbringer
60 Badges
Aug 5, 2015
95
24
  • Crusader Kings II
  • Europa Universalis IV: Cossacks
  • The Showdown Effect
  • Victoria 2
  • Warlock: Master of the Arcane
  • War of the Roses
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Magicka: Wizard Wars Founder Wizard
  • Pride of Nations
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Starvoid
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron IV Sign-up
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings Complete
  • Europa Universalis IV: Third Rome
  • Age of Wonders III
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis III
  • Arsenal of Democracy
  • Cities in Motion 2
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings III
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Commander: Conquest of the Americas
  • Darkest Hour
  • Teleglitch: Die More Edition
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • Gettysburg
  • Leviathan: Warships
  • The Kings Crusade
  • Majesty 2
  • March of the Eagles
  • Naval War: Arctic Circle
  • Europa Universalis IV: Res Publica
  • Sengoku
Hello,
i have a question. Where is the gender of a character defined ? (Ionly found the type=male/female in the _dna file or the _bookmark file) I set the type of my custom character on both to type = female, but when i start a game the character is male. Can y help me ?
For historical characters (i.e., characters that exist at game start), gender is defined in their character entry in history/characters. For example, Duchess Matilda of Tuscany is defined as female in history/characters/italian.txt:—

Code:
7757 = {
    name = "Matilda" # Matilda di Canossa, Duchess of Toscana, MVP
    dna = 7757_duchess_matilda
    female = yes

    # …
}
For characters created on-the-fly, you can determine gender in create_character using a number of different parameters:—

Code:
create_character = {
    # Choose one
    gender = female
    gender = character:7757 # Will have the same gender as the specified character
    opposite_gender = character:7757 # …or the opposite gender of the specified character
    gender_female_chance = 50 # or a script value between 0 and 100

    # …
}