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

Aregodas

Second Lieutenant
30 Badges
Jun 14, 2017
198
561
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Imperator: Rome
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Synthetic Dawn
  • Stellaris - Path to Destruction bundle
  • Stellaris: Distant Stars
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris
  • Crusader Kings II: Way of Life
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Age of Wonders III
  • Crusader Kings II: Holy Fury
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
Anyone know where I can find scopes? Trying to add a check to befriend/sway function to make it work on adolescent rulers, but cant find what the right scope to use...
Rather than "found", scopes are "made". Anyways, I haven't checked in detail but it seems you would only need to change scope:recipient = { is_adult = yes } for something like scope:recipient = { age > 13 }. Like this:
Code:
    is_shown = {
        scope:actor = { has_perk = befriend_perk } # Unlocked by the Befriend Perk
       
        NOT = { scope:actor = scope:recipient }
        scope:recipient = { age > 13 }
        scope:actor = { is_adult = yes }
    }
As mentioned, I didn't thoroughly checked after seeing this, it's too late for me and I gotta go to bed. Try it out and if it doesn't work I'll promise to look again tomorrow, this time in detail.
 
  • 1Like
Reactions:

Lord Zing

Recruit
14 Badges
Dec 26, 2020
8
2
  • Magicka
  • War of the Roses
  • Magicka 2
  • Tyranny: Archon Edition
  • BATTLETECH
  • Surviving Mars
  • Age of Wonders III
  • Surviving Mars: Digital Deluxe Edition
  • Surviving Mars: First Colony Edition
  • BATTLETECH: Flashpoint
  • Surviving Mars: First Colony Edition
  • BATTLETECH: Season pass
  • BATTLETECH: Heavy Metal
  • Crusader Kings III
Rather than "found", scopes are "made". Anyways, I haven't checked in detail but it seems you would only need to change scope:recipient = { is_adult = yes } for something like scope:recipient = { age > 13 }. Like this:
Code:
    is_shown = {
        scope:actor = { has_perk = befriend_perk } # Unlocked by the Befriend Perk
    
        NOT = { scope:actor = scope:recipient }
        scope:recipient = { age > 13 }
        scope:actor = { is_adult = yes }
    }
As mentioned, I didn't thoroughly checked after seeing this, it's too late for me and I gotta go to bed. Try it out and if it doesn't work I'll promise to look again tomorrow, this time in detail.
Yeah, found it while savaging through various parts of the folder. Now my next challenge to tackle is if else settings. For example if the character in prison is a family member, I want to be able to run an abduction scheme on them.


Is it possible to trigger if else conditionin scope:target block? Like if imprisoned target is family, then we'll allow abduction scheme, if not, we just do what we normally do.
What would be a correct way to create and update a new variable?
 
Last edited:

Thomas_Oak

Major
8 Badges
May 11, 2018
643
758
  • 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
My event doesn't seem to be able to use the following localisation:

[capital.GetNameNoTierNoTooltip]

Do I need to set the scope of the capital in the event to be able to use it? I rather expected it to automatically select the capital of root by default. Obviously not. :confused:
 

Anyasia

Lightbringer
72 Badges
Aug 5, 2015
428
265
  • Europa Universalis IV: Rights of Man
  • Crusader Kings Complete
  • Crusader Kings II
  • Crusader Kings III
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II: Conclave
My event doesn't seem to be able to use the following localisation:

[capital.GetNameNoTierNoTooltip]

Do I need to set the scope of the capital in the event to be able to use it? I rather expected it to automatically select the capital of root by default. Obviously not. :confused:

I've always saved the location as a scope in the event, which I picked up from several vanilla events. Doing a quick search now, though, it looks like you might be able to do something like [ROOT.GetCapitalLocation.GetNameNoTierNoTooltip]? No promises, though.
 

Thomas_Oak

Major
8 Badges
May 11, 2018
643
758
  • 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 Anyasia. I ended up doing the normal scope save. Works fine.

As a new thought, I am pondering whether it is possible to have gender specific opinion modifiers. I am considering making a decision which will please the realm's women and irritate the men. Any thoughts on how best to go about this?
 

YTnuBF

Captain
65 Badges
Apr 5, 2014
354
181
  • Victoria 2: A House Divided
  • Heir to the Throne
  • Magicka
  • Majesty 2
  • March of the Eagles
  • Cities in Motion 2
  • Victoria: Revolutions
  • Semper Fi
  • Sengoku
  • Sword of the Stars II
  • Europa Universalis IV: Res Publica
  • Victoria 2: Heart of Darkness
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Knights of Honor
  • Crusader Kings II: Sunset Invasion
  • 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
  • Hearts of Iron III: Their Finest Hour
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Europa Universalis IV: Art of War
  • Hearts of Iron III
  • For the Motherland
  • For The Glory
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Divine Wind
  • Europa Universalis III
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings III
  • Victoria 2
  • Europa Universalis IV
  • Crusader Kings II: Conclave
  • Europa Universalis III: Collection
  • Cities: Skylines
  • Crusader Kings II: Reapers Due
  • Stellaris: Digital Anniversary Edition

You could create or use two different opinion modifiers at \\Crusader Kings III\game\common\opinion_modifiers\
and apply them based on whatever triggers you'd like.

Like:
Code:
    the_target_character_scope_of_your_choosing = {
        if = {
            limit = {
                is_female = yes
            }
            add_opinion = {
                target = root
                modifier = made_up_positive_opinion
            }
        }
        else = {
            add_opinion = {
                target = root
                modifier = made_up_negative_opinion
            }
        }
    }

For examples check \\Crusader Kings III\game\common\opinion_modifiers\00_childhood_opinions.txt
to see how you can make an opinion modifier decay or just last a set number of time without changing.

The _opinions.info file in the same folder has additional information. Can be opened with Notepad.
 
  • 1
Reactions:

Aregodas

Second Lieutenant
30 Badges
Jun 14, 2017
198
561
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Imperator: Rome
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Synthetic Dawn
  • Stellaris - Path to Destruction bundle
  • Stellaris: Distant Stars
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris
  • Crusader Kings II: Way of Life
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Age of Wonders III
  • Crusader Kings II: Holy Fury
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
Thanks YTnuBF. I suddenly realised how dense I was being. I can of course name both traits the same within the localisation, so it outwardly appears to affect each sex differently.
I was gonna reply similar to YTnuBF, which is probably the easiest way to do it, as I don't think you can create gender specific opinion moddifiers... but then I remembered about attraction opinion. Now of course those are sex specific, not gender, but if you are adamant about having one single opinion modifier affecting both men and women... it may be worth to take a look at that.
Many traits and modifiers use attraction_opinion, which in essence is one single modifier affecting all characters differently, depending on their sexual inclinations. If you can replace it being affected by sexual preference to just gender, you may be able to actually do it all with just one modifier.
 

Thomas_Oak

Major
8 Badges
May 11, 2018
643
758
  • 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 Aregodas, I hadn't though of using that. But I think I shall stick with the "two traits same name" method, otherwise homosexual women would be annoyed by being given permission to use the temple. :D
 

Aregodas

Second Lieutenant
30 Badges
Jun 14, 2017
198
561
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Imperator: Rome
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Synthetic Dawn
  • Stellaris - Path to Destruction bundle
  • Stellaris: Distant Stars
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris
  • Crusader Kings II: Way of Life
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Age of Wonders III
  • Crusader Kings II: Holy Fury
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
Thanks Aregodas, I hadn't though of using that. But I think I shall stick with the "two traits same name" method, otherwise homosexual women would be annoyed by being given permission to use the temple. :D
Hahahaha. I meant, use the basis of attraction_opinion to create your own thing, not to actually change what attraction_opinion itself does. That'd be a bit... gamebreaking.
Anyways, were I you I'd go for the same choice. Much simpler.
 

Pied-Noir

Future Battle Bishop
On Probation
53 Badges
Sep 6, 2011
2.555
4.846
  • For The Glory
  • Prison Architect
  • War of the Roses
  • Victoria 2
  • 500k Club
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Way of Life
  • Europa Universalis III Complete
  • Crusader Kings II: Horse Lords
  • Europa Universalis III Complete
  • Crusader Kings III: Royal Edition
  • Crusader Kings II: Conclave
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV
  • Crusader Kings II: Reapers Due
  • Tyranny: Archon Edition
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings II: Monks and Mystics
  • Steel Division: Normandy 44
  • Crusader Kings Complete
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings III
  • Hearts of Iron IV: Expansion Pass
  • Sengoku
  • Rome: Vae Victis
  • Europa Universalis III Complete
  • 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
  • Europa Universalis III
  • Victoria 2: Heart of Darkness
  • Divine Wind
  • Europa Universalis IV: Call to arms event
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • March of the Eagles
  • Rome Gold
  • Semper Fi
  • Crusader Kings II
Would anyone be kind enough to script me a basic event template to spawn an adventurer?

I'd like to add scripted events to spawn a handful of key historical figures, such as Rollo in 867 and Ibn Tumart in 1066. The idea is they'd appear with a news event firing for landed characters in their geographical area, and they'd invade a particular title (e.g. d_normandy) with a host that spawns alongside them. If they're defeated or killed then that's the end of it, but if they succeed they'd take the title.

I'm new to scripting CK3 events; I've only made slight edits to a few existing ones, and so I've no idea how to generate specific characters (with retinues) by event. Any help here would be greatly appreciated, as I feel that if I had a working template to go with then I could probably go from there.
 

Hyomoto

Major
53 Badges
Dec 2, 2015
723
198
  • Magicka
  • Age of Wonders III
  • Tyranny - Tales from the Tiers
  • Stellaris: Synthetic Dawn
  • Stellaris
  • Stellaris: Nemesis
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Stellaris: Necroids
  • Surviving Mars: First Colony Edition
  • Cities: Skylines Industries
  • Stellaris: Megacorp
  • Prison Architect
  • Surviving Mars: First Colony Edition
  • Cities: Skylines - Campus
  • Surviving Mars: Digital Deluxe Edition
  • Age of Wonders: Planetfall
  • Age of Wonders: Planetfall Deluxe edition
  • Age of Wonders: Planetfall Premium edition
  • Age of Wonders: Planetfall Season pass
  • Stellaris: Lithoids
  • Prison Architect: Psych Ward
  • Stellaris: Federations
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Island Bound
  • Empire of Sin
  • Empire of Sin - Premium Edition
  • Stellaris: Digital Anniversary Edition
  • Sword of the Stars
  • Cities: Skylines
  • Pillars of Eternity
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Tyranny: Archon Edition
  • Stellaris: Distant Stars
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Mass Transit
  • Surviving Mars
  • Tyranny - Bastards Wound
  • Cities: Skylines - Green Cities
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Cities: Skylines - Parklife
  • Sword of the Stars II
  • Cities: Skylines Deluxe Edition
I wasn't sure how to word this for a search, but what's up with the mods? Every mod I looked at either had an incomplete name, or no description. One just read, "ok" and another "dfg", but usually it was just "a". Is there some reason for this?
 

Thomas_Oak

Major
8 Badges
May 11, 2018
643
758
  • 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
When using on-actions we can set a date at which we want our events to fire using the "trigger_on_next_date" line. I am wondering if there is any way to get something like this to work from an event option block. I would like the next event in a chain to fire on the winter solstice. Using the "trigger_on_next_date" line causes the next event to trigger immediately.

edit: All solved. Had a sudden realisation. Sure enough the game uses the back-to-front American date. "trigger_on_next_date" works perfectly with 12.21 instead :D
 
Last edited:

Anyasia

Lightbringer
72 Badges
Aug 5, 2015
428
265
  • Europa Universalis IV: Rights of Man
  • Crusader Kings Complete
  • Crusader Kings II
  • Crusader Kings III
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II: Conclave
When using on-actions we can set a date at which we want our events to fire using the "trigger_on_next_date" line. I am wondering if there is any way to get something like this to work from an event option block. I would like the next event in a chain to fire on the winter solstice. Using the "trigger_on_next_date" line causes the next event to trigger immediately.

edit: All solved. Had a sudden realisation. Sure enough the game uses the back-to-front American date. "trigger_on_next_date" works perfectly with 12.21 instead :D

Wait, wait, you can do what? I've never encountered that parameter before; can you give me an example of its use?
 

Thomas_Oak

Major
8 Badges
May 11, 2018
643
758
  • 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
Wait, wait, you can do what? I've never encountered that parameter before; can you give me an example of its use?
It is very simple indeed.
Code:
    option = {
        name = aesir_statues.0200.a
        trigger_event = {
            id = aesir_statues.0210
            trigger_on_next_date = 12.20
        }
    }

There is a vanilla use in:
events\yearly_events\yearly_events_persia.txt line 30
 
Last edited:
  • 1
Reactions:

Anyasia

Lightbringer
72 Badges
Aug 5, 2015
428
265
  • Europa Universalis IV: Rights of Man
  • Crusader Kings Complete
  • Crusader Kings II
  • Crusader Kings III
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II: Conclave
It is very simple indeed.
Code:
    option = {
        name = aesir_statues.0200.a
        trigger_event = {
            id = aesir_statues.0210
            trigger_on_next_date = 12.20
        }
    }

There is a vanilla use in:
events\yearly_events\yearly_events_persia.txt line 30

Ah, very cool, thanks!

Also, incidentally, the reason the month comes first likely isn't an Americanism (Paradox being based in little-endian-friendly Sweden) so much as a programming norm; where you specify a year, you also put the year first, as in 1066.09.15, so that dates can be sorted properly in plaintext (e.g., so 1 December doesn't get sorted before 30 November, because 1 is less than 3).
 

zhivago6

Captain
40 Badges
Oct 13, 2009
428
35
  • Crusader Kings II: Charlemagne
  • Crusader Kings II
  • Darkest Hour
  • 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
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: No Step Back
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Crusader Kings II: Jade Dragon
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Crusader Kings II: Holy Fury
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Lithoids
  • Hearts of Iron IV: La Resistance
  • Crusader Kings III
  • Battle for Bosporus
  • Hearts of Iron IV: By Blood Alone
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Magicka 2
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Sword of the Stars
Does anyone know how to change the name of council positions based on religion? I want the Chancellor to be called Adjudicator, and the Spymaster to be called Vanguard, but it's not as simple as CK2 by changing the localization. The vanilla localization files under council_|_english read councillor_chancellor:0 "Chancellor" so I made my own council file with councillor_chancellor_mandalorian_religion:0 "Adjudicator" and also councillor_mandalorian_religion_chancellor but nothing changes. I could add the Court Chaplin method for every council position, but that is a real pain as you need to create triggered_desc.
Code:
name = {
        first_valid = {
            triggered_desc = {
                trigger = {