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

selteur

Second Lieutenant
26 Badges
Aug 30, 2012
105
87
  • Crusader Kings II
  • Hearts of Iron IV: Death or Dishonor
  • Battle for Bosporus
  • Crusader Kings III
  • Stellaris: Federations
  • Hearts of Iron IV: La Resistance
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Prison Architect
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines Industries
  • Stellaris: Distant Stars
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Mass Transit
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Cities: Skylines - After Dark
  • Cities: Skylines
  • 500k Club
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Victoria: Revolutions
  • Stellaris: Megacorp
  • Crusader Kings II: Sword of Islam
Did you tried to use event with on_action trigger? You only need to make an "is_triggered_only = yes" event which give the trait to the child only if any parent have that trait, and put ID of the event into list in file in common\on_actions...

Sorry I forgot to thanks you guy!
 

CorpusIurisCivilis

First Lieutenant
41 Badges
Aug 3, 2017
277
47
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Stellaris: Lithoids
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • BATTLETECH: Flashpoint
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Imperator: Rome
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • BATTLETECH: Season pass
  • BATTLETECH
  • BATTLETECH: Heavy Metal
  • Stellaris: Federations
  • Imperator: Rome - Magna Graecia
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Stellaris: Synthetic Dawn
  • Crusader Kings II: The Republic
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne

myrt

Major
13 Badges
Jan 2, 2015
568
135
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Magicka
  • Victoria 2
  • Mount & Blade: Warband
  • Hearts of Iron IV: Cadet
  • Imperator: Rome
  • Imperator: Rome - Magna Graecia
Along the silk road, you can only build silk road trade posts in certain counties. For other trade routes that I have modded in myself, the result is that I can build trade posts in every county along the road, which is really overpowered. How do I restrict which counties you can build trade posts in along custom trade routes?
 

CorpusIurisCivilis

First Lieutenant
41 Badges
Aug 3, 2017
277
47
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Stellaris: Lithoids
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • BATTLETECH: Flashpoint
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Imperator: Rome
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • BATTLETECH: Season pass
  • BATTLETECH
  • BATTLETECH: Heavy Metal
  • Stellaris: Federations
  • Imperator: Rome - Magna Graecia
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Stellaris: Synthetic Dawn
  • Crusader Kings II: The Republic
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne

selteur

Second Lieutenant
26 Badges
Aug 30, 2012
105
87
  • Crusader Kings II
  • Hearts of Iron IV: Death or Dishonor
  • Battle for Bosporus
  • Crusader Kings III
  • Stellaris: Federations
  • Hearts of Iron IV: La Resistance
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Prison Architect
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines Industries
  • Stellaris: Distant Stars
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Mass Transit
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Cities: Skylines - After Dark
  • Cities: Skylines
  • 500k Club
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Victoria: Revolutions
  • Stellaris: Megacorp
  • Crusader Kings II: Sword of Islam
Is my event valid ? (I'm noob in event modding and have I difficulties to understand the wiki)

namespace = heri

character_event = {
id = heri.1
desc = EVTDESCheri.1

hide_window = yes

is_triggered_only = yes

trigger = {
NOR = {
father = {
NOR = {
trait = eternmadara
}
NOR = {
trait = eternsasuke
}
NOR = {
trait = manitachi
}
NOR = {
trait = manmadara
}
NOR = {
trait = manobito
}
NOR = {
trait = mansasuke
}
NOR = {
trait = rinnegan
}
NOR = {
trait = rinnegansasuke
}
NOR = {
trait = rinneshar
}
NOR = {
trait = shar1
}
NOR = {
trait = shar2
}
NOR = {
trait = shar3
}
}
mother = {
NOR = {
trait = eternmadara
}
NOR = {
trait = eternsasuke
}
NOR = {
trait = manitachi
}
NOR = {
trait = manmadara
}
NOR = {
trait = manobito
}
NOR = {
trait = mansasuke
}
NOR = {
trait = rinnegan
}
NOR = {
trait = rinnegansasuke
}
NOR = {
trait = rinneshar
}
NOR = {
trait = shar1
}
NOR = {
trait = shar2
}
NOR = {
trait = shar3
}
}
}
}

on_birth = {
immediate = {
random_list = {
70 = {}
30 = {
add_trait = shar1
}
}
}
}
}
 

Rydelfox

Lt. General
90 Badges
Oct 30, 2016
1.476
12
  • A Game of Dwarves
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Magicka
  • Majesty 2
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Third Rome
  • Sword of the Stars
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Europa Universalis IV: Mare Nostrum
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Jade Dragon
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Call to arms event
  • 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
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Conclave
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Stellaris
  • Hearts of Iron IV: No Step Back
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV
I am working on a huge mod that has (at last count) around 30 custom decisions for the character to change their culture upon payment of a fixed amount of prestige and piety, and only if they meet certain conditions, ie right region, same culture is already adjacent etc. The decisions brings up an event with some custom text ("So you've decided to convert to XXX . . ." and the option to back out.

What I would like to do is cut down some of the masses of events and localisations I have to do, so here's what I want to do. From what I can tell at the very least I need one decision for each conversion option, as the criteria for each decision are all slightly different. But ideally I would like each decision to send the culture to be converted to (the "target culture") to the one event, along with the prestige and piety cost. This event would then deduct the cost and make the culture change and bring up one of 10 different localisations depending upon the culture "tech levels". Thus if you wish to convert to culture A then you get the event with its associated cost and culture change, along with the custom localisations for the event and its options, associated with Culture A.

My guess is that I can set the data in the decision, so that before the event is called I do something like set_variable = { name = target_culture value = XXX }, then the same for prestige and piety cost, then call these in the event. For the localization I just have a triggerto spit out the relevant texts, eg

EVTDESCdawn.102 = {
trigger = {
OR = {
target_culture = XXX
target_culture = YYY
etc
}
text = EVTDESCdawn.102.1

and so on.

Quesitons -
Is it possible to save a culture as a variable. In other words if I make the decision set target_culture to say "greek" would it then work in the event to say culture = target_culture?
Is the above the right syntax for setting variables?
Does this save anything on the processor load ?
Will this work or should I just make 30 custom events with 30 custom localisations?
Since the only thing changing is the culture ins the localization, I'd have the decision create a flag (such as set_character_flag = target_culture_lombard) for the culture you are converting to, then have the after section of the event clear all of the flags.
Next, create a custom localization that displays the culture name depending on the falg, like this:
Code:
defined_text = {
    name = GetTargetCulture
    text = {
        localisation_key = lombard
        trigger = {
            has_character_flag = target_culture_lombard
         }
   }
   # Repeat for each culture
}
Finally, have the localisation call your custom localisation when it needs the culture name (i.e. EVTDESCdawn.102;I have decided to convert to the [Root.GetTargetCulture] culture.)

Along the silk road, you can only build silk road trade posts in certain counties. For other trade routes that I have modded in myself, the result is that I can build trade posts in every county along the road, which is really overpowered. How do I restrict which counties you can build trade posts in along custom trade routes?
It looks like you'll want a scripted trigger listing the conditions for building the trade post (for instance, the silk road's silk_road_trade_post_trigger is an or block listing all the provinces), then add that trigger to the potential block for your route's trade post in common/buildings. Additionally, you'll want the same conditions in your route's info in common/trade_routes under trade_post_display_trigger to make sure the icon displays.
 

myrt

Major
13 Badges
Jan 2, 2015
568
135
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Magicka
  • Victoria 2
  • Mount & Blade: Warband
  • Hearts of Iron IV: Cadet
  • Imperator: Rome
  • Imperator: Rome - Magna Graecia
Since the only thing changing is the culture ins the localization, I'd have the decision create a flag (such as set_character_flag = target_culture_lombard) for the culture you are converting to, then have the after section of the event clear all of the flags.
Next, create a custom localization that displays the culture name depending on the falg, like this:
Code:
defined_text = {
    name = GetTargetCulture
    text = {
        localisation_key = lombard
        trigger = {
            has_character_flag = target_culture_lombard
         }
   }
   # Repeat for each culture
}
Finally, have the localisation call your custom localisation when it needs the culture name (i.e. EVTDESCdawn.102;I have decided to convert to the [Root.GetTargetCulture] culture.)


It looks like you'll want a scripted trigger listing the conditions for building the trade post (for instance, the silk road's silk_road_trade_post_trigger is an or block listing all the provinces), then add that trigger to the potential block for your route's trade post in common/buildings. Additionally, you'll want the same conditions in your route's info in common/trade_routes under trade_post_display_trigger to make sure the icon displays.
I tried that, but all it did was remove the trade post icon from the trade route map, not actually disable trade posts in the counties I wanted to. As an example, here's a trade route through Denmark I've made. In 00_scripted_triggers.txt I added the following code:
Code:
haervejen_trade_post_trigger = {
    custom_tooltip = {
        text = haervejen_province_desc
        hidden_tooltip = {
            OR = {
                province_id = 261
                province_id = 264
                province_id = 1584
            }
        }
    }
}

Then I added this to the trade route's file in the trade_routes foulder:
Code:
trade_post_display_trigger = {
        haervejen_trade_post_trigger = yes
    }

And yet, I'm able to build trade posts in every county along the trade route, the only difference is that the trade post icon isn't appearing in the map mode. As you can see in Germany where I've yet to add these conditions, there's an icon indicating that you can build a trade post in any county.
 

Attachments

  • den trade.png
    den trade.png
    1,8 MB · Views: 4

Rydelfox

Lt. General
90 Badges
Oct 30, 2016
1.476
12
  • A Game of Dwarves
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Magicka
  • Majesty 2
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Third Rome
  • Sword of the Stars
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Europa Universalis IV: Mare Nostrum
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Jade Dragon
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Call to arms event
  • 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
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Conclave
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Stellaris
  • Hearts of Iron IV: No Step Back
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV
You only mentioned adding it to the trade_post_display_trigger. You also need to add it to the potential block of the trade post itself.
The display trigger just controls the icon. The potential block determines if the trade post can be built.
 

Spirintus

Private
60 Badges
Jun 20, 2015
23
8
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Pre-order
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II
  • 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: Holy Fury
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Imperator: Rome Sign Up
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Mandate of Heaven
  • Imperator: Rome
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Golden Century
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Stellaris: Megacorp
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV
  • Stellaris: Nemesis
  • Teleglitch: Die More Edition
  • Victoria 2
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Tyranny: Archon Edition
  • Knights of Pen and Paper 2
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
Is my event valid ? (I'm noob in event modding and have I difficulties to understand the wiki)

If you want event to fire at birth and give to child sharingan, if any parent have any sharingan type trait, it shoul look like this:
namespace = heri

character_event = {
id = heri.1
desc = EVTDESCheri.1

hide_window = yes

is_triggered_only = yes #If event is triggered only there cannot be trigger ={}



immediate = {
if = {
limit = {
OR = {
father = {
OR = {
trait = eternmadara
trait = eternsasuke
trait = manitachi
trait = manitachi
...other traits
}
}
mother = {
OR = {
trait = eternmadara
trait = eternsasuke
trait = manitachi
trait = manitachi
...other traits
}
}
}
}
random_list = {
70 = {}
30 = {
add_trait = shar1
}
}
}

}

PS: to make it fire at birth you must go to common/on_action, make new .txt file and put there something like:
on_birth = {
events = {
heri.1
...other potential on_birth events
}
}
 

Thezezeal

Captain
3 Badges
Dec 28, 2014
375
3
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Charlemagne
In landed_titles, there's a title of 'e_rebels'. Is that actually used by those random revolts? I'm wondering if I could use to differentiate it between 'external' attackers and 'in-realm uprising'.

Similarly related, does the global_revolt_risk only affect those random revolts? I'd like the Count and above Vassals of my Empire to gradually become more likely to seek Independence as the Empire is attacked and loses Provinces. I already have an event for on the death of the Emperor, but I'm not sure if there might be a better way?
 

myrt

Major
13 Badges
Jan 2, 2015
568
135
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Magicka
  • Victoria 2
  • Mount & Blade: Warband
  • Hearts of Iron IV: Cadet
  • Imperator: Rome
  • Imperator: Rome - Magna Graecia
You only mentioned adding it to the trade_post_display_trigger. You also need to add it to the potential block of the trade post itself.
The display trigger just controls the icon. The potential block determines if the trade post can be built.
But where do I add it the the trade post's potential block?

00_tradepost.txt only sets the conditions for what buildings can be in a trade post once it's built from what I can see, not whether you can build the actual trade post, and so far, I can't even build any buildings in the trade post anyway, even though I've added the following generic building to 00_tradepost.txt:
Code:
ox_silk_road_1 = {    # Ochsenweg Trading Post
        potential = {
            trade_route = ochsenweg
            oxweg_trade_post_trigger = yes
        }
        desc = tr_silk_road_1_desc
        trigger = {
            TECH_TRADE_PRACTICES = 1
        }
        gold_cost = 200
        build_time = 150
        ai_creation_factor = 95

        trade_route_wealth = 1  # Affects total value of trade route
        tradevalue = 5

        extra_tech_building_start = 10.0 # Never get at start of game
    }
Needless to say, I'm a little confused.
 

Attachments

  • den trade.png
    den trade.png
    1,9 MB · Views: 2

robez

Second Lieutenant
58 Badges
Feb 27, 2009
159
21
  • Europa Universalis IV: Art of War
  • Pillars of Eternity
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Mare Nostrum
  • Rome Gold
  • Europa Universalis IV: Res Publica
  • Heir to the Throne
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • 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: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Holy Fury
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Golden Century
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Stellaris: Megacorp
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Stellaris
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Rome: Vae Victis
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Crusader Kings III: Royal Edition
Is there anyway too mod so that the Messalian religion is seen as heathen by catholics and orthodox's?Im playing a custom Messalian ruler that wants too conquer brittania with holy wars and spread the religion.
 

Rydelfox

Lt. General
90 Badges
Oct 30, 2016
1.476
12
  • A Game of Dwarves
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Magicka
  • Majesty 2
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Third Rome
  • Sword of the Stars
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Europa Universalis IV: Mare Nostrum
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Jade Dragon
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Call to arms event
  • 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
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Conclave
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Stellaris
  • Hearts of Iron IV: No Step Back
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV
But where do I add it the the trade post's potential block?

00_tradepost.txt only sets the conditions for what buildings can be in a trade post once it's built from what I can see, not whether you can build the actual trade post, and so far, I can't even build any buildings in the trade post anyway, even though I've added the following generic building to 00_tradepost.txt:
Code:
ox_silk_road_1 = {    # Ochsenweg Trading Post
        potential = {
            trade_route = ochsenweg
            oxweg_trade_post_trigger = yes
        }
        desc = tr_silk_road_1_desc
        trigger = {
            TECH_TRADE_PRACTICES = 1
        }
        gold_cost = 200
        build_time = 150
        ai_creation_factor = 95

        trade_route_wealth = 1  # Affects total value of trade route
        tradevalue = 5

        extra_tech_building_start = 10.0 # Never get at start of game
    }
Needless to say, I'm a little confused.
Ah, it looks like you also need it in the potential block for the trade post in holding_types. Sorry I missed that the first time.
 

Auirus

First Lieutenant
80 Badges
Dec 10, 2016
217
1
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: The Republic
  • Crusader Kings II: Conclave
  • Stellaris: Apocalypse
  • Stellaris: Ancient Relics
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Imperator: Rome Deluxe Edition
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Holy Fury
  • BATTLETECH
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Surviving Mars: Digital Deluxe Edition
  • Cities: Skylines - Green Cities
  • BATTLETECH: Season pass
  • Europa Universalis IV: Rule Britannia
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Necroids
  • Stellaris: Distant Stars
  • Surviving Mars: First Colony Edition
  • Europa Universalis IV: Dharma
  • Imperator: Rome - Magna Graecia
  • Cities: Skylines - Parklife
  • Prison Architect
  • BATTLETECH: Flashpoint
  • Europa Universalis IV
  • Crusader Kings III
  • Hearts of Iron IV: No Step Back
  • Europa Universalis 4: Emperor
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Victoria 2
  • Europa Universalis IV: Golden Century
  • BATTLETECH - Digital Deluxe Edition
  • Warlock: Master of the Arcane
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • BATTLETECH: Heavy Metal
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
I need some help with dynamic flags.

currently I'm using this to set artifact flags:

Code:
set_artifact_flag = previous_owner_@ROOT

Now I want these to be removed after 10 years, how would I do that? I know how to clear static ones, but when I have 4+ dynamic flags on different things I don't know how to handle it :s
 

myrt

Major
13 Badges
Jan 2, 2015
568
135
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Magicka
  • Victoria 2
  • Mount & Blade: Warband
  • Hearts of Iron IV: Cadet
  • Imperator: Rome
  • Imperator: Rome - Magna Graecia
Ah, it looks like you also need it in the potential block for the trade post in holding_types. Sorry I missed that the first time.
And so I added this line of code
Code:
trade_post = {
    trigger = {
        conditional_tooltip = {
            trigger = {
                trade_route = ochsenweg
                OR = {
                    FROM = {
                        is_patrician = no
                    }
                    AND = {
                        port = no
                        FROM = {
                            is_patrician = yes
                        }
                    }
                }
            }
            oxweg_trade_post_trigger = yes
        }
    }
}

by directly switching out the silk road condition just to test. But now I see this (see picture)
 

Attachments

  • den trade.png
    den trade.png
    1,8 MB · Views: 9

jordarkelf

01_TITLE_STRING
164 Badges
Jul 13, 2005
8.040
647
erbkaiser.nl
  • Impire
  • Europa Universalis IV
  • 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 Glory
  • For the Motherland
  • Galactic Assault
  • Gettysburg
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Divine Wind
  • Europa Universalis III Complete
  • Iron Cross
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Lead and Gold
  • Legio
  • Leviathan: Warships
  • The Kings Crusade
  • Lost Empire - Immortals
  • Magicka
  • Majesty 2
  • Victoria 3 Sign Up
  • Crusader Kings II: Sons of Abraham
  • Ancient Space
  • Hearts of Iron Anthology
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Cities in Motion
  • Cities in Motion 2
  • 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
  • A Game of Dwarves
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Commander: Conquest of the Americas
  • Darkest Hour
  • Deus Vult
  • Diplomacy
  • Dungeonland
  • East India Company
  • East India Company Collection
  • Europa Universalis III
For a custom trade route, I did this:

common\buildings\00_tradepost.txt: change the potential to this:
Code:
tr_silk_road_1 = { # Silk Road Trading Post
  potential = {
   OR = {
    AND = {
     trade_route = silk_road
     silk_road_trade_post_trigger = yes
    }
    AND = {
     trade_route = new_road
     new_road_trade_post_trigger = yes
    }
   }
  }
  desc = tr_silk_road_1_desc
  trigger = {
   TECH_TRADE_PRACTICES = 1
  }
  gold_cost = 200
  build_time = 150
  ai_creation_factor = 95
 
  trade_route_wealth = 1 # Affects total value of trade route
  tradevalue = 30
 
  extra_tech_building_start = 10.0 # Never get at start of game
 }
}
Repeat for the other buildings.

common\holding_types\00_holding_types.txt:
Code:
trade_post = {
 trigger = {
  conditional_tooltip = {
   trigger = {
    OR = {
     FROM = {
      is_patrician = no
     }
     AND = {
      port = no
      FROM = {
       is_patrician = yes
      }
     }
    }
   }
   conditional_tooltip = {
    trigger = { trade_route = silk_road }
    silk_road_trade_post_trigger = yes
   }
   conditional_tooltip = {
    trigger = { trade_route = new_road }
    new_road_trade_post_trigger = yes
   }
  }
 }
}

common\scripted_triggers
add a file with this content:
Code:
new_road_trade_route_post_trigger = {
 OR = {
  province_id = 1
  province_id = 2
  province_id = 3
  province_id = 4
  province_id = 5
 }
}
List any provinces on the road that are allowed to build tradeposts.

common\trade_routes: add a file with your new road, listing all the provinces it goes through, even those it does not allow buildings in.
 
Last edited:

myrt

Major
13 Badges
Jan 2, 2015
568
135
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Magicka
  • Victoria 2
  • Mount & Blade: Warband
  • Hearts of Iron IV: Cadet
  • Imperator: Rome
  • Imperator: Rome - Magna Graecia
For a custom trade route, I did this:

common\buildings\00_tradepost.txt: change the potential to this:
Code:
tr_silk_road_1 = { # Silk Road Trading Post
  potential = {
   OR = {
    AND = {
     trade_route = silk_road
     silk_road_trade_post_trigger = yes
    }
    AND = {
     trade_route = new_road
     new_road_trade_post_trigger = yes
    }
   }
  }
  desc = tr_silk_road_1_desc
  trigger = {
   TECH_TRADE_PRACTICES = 1
  }
  gold_cost = 200
  build_time = 150
  ai_creation_factor = 95
 
  trade_route_wealth = 1 # Affects total value of trade route
  tradevalue = 30
 
  extra_tech_building_start = 10.0 # Never get at start of game
 }
}
Repeat for the other buildings.

common\holding_types\00_holding_types.txt:
Code:
trade_post = {
 trigger = {
  conditional_tooltip = {
   trigger = {
    trade_route = silk_road
    OR = {
     FROM = {
      is_patrician = no
     }
     AND = {
      port = no
      FROM = {
       is_patrician = yes
      }
     }
    }
   }
   conditional_tooltip = {
    trigger = { trade_route = silk_road }
    silk_road_trade_post_trigger = yes
   }
   conditional_tooltip = {
    trigger = { trade_route = new_road }
    new_road_trade_post_trigger = yes
   }
  }
 }
}

common\scripted_triggers
add a file with this content:
Code:
new_road_trade_route_post_trigger = {
 OR = {
  province_id = 1
  province_id = 2
  province_id = 3
  province_id = 4
  province_id = 5
 }
}
List any provinces on the road that are allowed to build tradeposts.

common\trade_routes: add a file with your new road, listing all the provinces it goes through, even those it does not allow buildings in.
Oh boy, I had placed the scripted triggers in the scripted effects folder by accident. That cleared it up.
 

Rags17

Ludere Ludum
62 Badges
Dec 11, 2014
5.953
3.631
  • 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
  • Crusader Kings II
  • Europa Universalis IV: Rights of Man
  • Cities: Skylines - Mass Transit
  • Steel Division: Normandy 44
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Surviving Mars
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Holy Fury
  • Crusader Kings Complete
  • Stellaris: Distant Stars
  • Europa Universalis IV: Cossacks
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Cradle of Civilization
  • Battle for Bosporus
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Rule Britannia
  • Imperator: Rome Sign Up
  • Crusader Kings III
  • Stellaris: Megacorp
  • Cities: Skylines Industries
  • Europa Universalis IV: Dharma
  • Victoria 2
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Hearts of Iron IV: La Resistance
  • Stellaris
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Call to arms event
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
In the Events page in the WIki it says that if you want to create an event with multiple descriptions then you must create a description block with each trigger then text that you want to have, but on the same page it says that if you want to have multiple option descriptions then you create a block with each text then event that you want. Is this correct ? Does order matter or is it one way or the other for both ?

FWIW I am creating a single event called by up to 50 decisions, each one classified into one of 12 "tech levels" and sent to the event via the variable tech_level, I have put in 11 different EVTDESCs and EVTOPTAs depending upon the value of tech_level.

Urgent request !
 

othilien

Recruit
54 Badges
Oct 10, 2011
8
0
  • Crusader Kings II
  • Europa Universalis III Complete
  • Stellaris: Synthetic Dawn
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Stellaris
  • Crusader Kings II: Reapers Due
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • 500k Club
  • Tyranny - Tales from the Tiers
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Crusader Kings III: Royal Edition
  • Europa Universalis IV
  • 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
  • Commander: Conquest of the Americas
  • Europa Universalis III
  • Divine Wind
  • Europa Universalis IV: El Dorado
  • 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
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • King Arthur II
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
I made a quick mod that adds, via decision, a couple of custom artifacts into the players treasury. Unfortunately, only the first artifact is showing up in game. I tested this by changing the order of artifacts in the artifacts file I created in the mod folder. Whichever is listed first shows up in the game and the others do not. What am I missing?

EDIT: At the moment I am using two seperate txt files for artifacts, each listing a single artifact. They both show up now, but I shouldn't have to do this as a permanent workaround.
 
Last edited: