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

Nebula21399

Second Lieutenant
51 Badges
Sep 15, 2018
151
252
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Crusader Kings II: Reapers Due
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Imperator: Rome
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Hearts of Iron IV: No Step Back
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Conclave
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Third Rome
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
So i want to make 4 decisions. One for military, diplomacy,economy and religion. Each category gives 1-2 bonuses (ex: +25 % land morale) for a couple of years.

So far, i wrote this lines of code :

---------------------------------------------------------------------------------------
country_decisions = {
Military_power = {
allow = {
num_of_cities >= 1
can_pay_price = Mil_power1
NOT = {
has_country_modifier = recently_bought_modifier
}
}
effect = {
add_province_modifier = {
global_tax_modifier = 232
}

pay_price = Mil_power1
add_country_modifier = {
name = "recently_bought_modifier"
duration = 365
}
}

ai_will_do = {
factor = 0
}
}
---------------------------------------------------------------------------------------

So far the code isn't working. The decision is showing in the decisions tab, but i can't click it.
 
Last edited:
- Have you defined the price "Mil_power1" at \\ImperatorRome\game\common\prices\ or your mod folder equivalent?
- Can you pay the price "Mil_power1" ?

The effect syntax regarding the adding of a province modifier is unknown to me.
"global_tax_modifier" affects the Country as a whole.
On the Province level you'll usually use "local_tax_modifier" instead.

Additionally you'd need to define a modifier first, which can include effects.
You can look for examples at \\ImperatorRome\game\common\modifiers\ . There different types of modifiers have been separated into their own files, which is handy to follow.

Your code above already has the way to add a country_modifier, of which I've made an example below :

Code:
           add_country_modifier = {
                name = "an_example_modifier"
                duration = 365 #in days, -1 for infinite
            }

Then define the above example modifier at \\ImperatorRome\game\common\modifiers\ or the corresponding folder of your mod, by adding in a new .TXT file (one file can contain all your own modifiers regardless of type).

Code:
an_example_modifier = {
    land_morale_modifier = 0.25 #"gives/adds" +25% to current land morale
}
 
Last edited:
- Have you defined the price "Mil_power1" at \\ImperatorRome\game\common\prices\ or your mod folder equivalent?
- Can you pay the price "Mil_power1" ?

The effect syntax regarding the adding of a province modifier is unknown to me.
"global_tax_modifier" affects the Country as a whole.
On the Province level you'll usually use "local_tax_modifier" instead.

Additionally you'd need to define a modifier first, which can include effects.
You can look for examples at \\ImperatorRome\game\common\modifiers\ . There different types of modifiers have been separated into their own files, which is handy to follow.

Your code above already has the way to add a country_modifier, of which I've made an example below :

Code:
           add_country_modifier = {
                name = "an_example_modifier"
                duration = 365 #in days, -1 for infinite
            }

Then define the above example modifier at \\ImperatorRome\game\common\modifiers\ or the corresponding folder of your mod, by adding in a new .TXT file (one file can contain all your own modifiers regardless of type).

Code:
an_example_modifier = {
    land_morale_modifier = 0.25 #"gives/adds" +25% to current land morale
}
- Have you defined the price "Mil_power1" at \\ImperatorRome\game\common\prices\ or your mod folder equivalent?
- Can you pay the price "Mil_power1" ?

The effect syntax regarding the adding of a province modifier is unknown to me.
"global_tax_modifier" affects the Country as a whole.
On the Province level you'll usually use "local_tax_modifier" instead.

Additionally you'd need to define a modifier first, which can include effects.
You can look for examples at \\ImperatorRome\game\common\modifiers\ . There different types of modifiers have been separated into their own files, which is handy to follow.

Your code above already has the way to add a country_modifier, of which I've made an example below :

Code:
           add_country_modifier = {
                name = "an_example_modifier"
                duration = 365 #in days, -1 for infinite
            }

Then define the above example modifier at \\ImperatorRome\game\common\modifiers\ or the corresponding folder of your mod, by adding in a new .TXT file (one file can contain all your own modifiers regardless of type).

Code:
an_example_modifier = {
    land_morale_modifier = 0.25 #"gives/adds" +25% to current land morale
}
- Have you defined the price "Mil_power1" at \\ImperatorRome\game\common\prices\ or your mod folder equivalent?
- Can you pay the price "Mil_power1" ?

The effect syntax regarding the adding of a province modifier is unknown to me.
"global_tax_modifier" affects the Country as a whole.
On the Province level you'll usually use "local_tax_modifier" instead.

Additionally you'd need to define a modifier first, which can include effects.
You can look for examples at \\ImperatorRome\game\common\modifiers\ . There different types of modifiers have been separated into their own files, which is handy to follow.

Your code above already has the way to add a country_modifier, of which I've made an example below :

Code:
           add_country_modifier = {
                name = "an_example_modifier"
                duration = 365 #in days, -1 for infinite
            }

Then define the above example modifier at \\ImperatorRome\game\common\modifiers\ or the corresponding folder of your mod, by adding in a new .TXT file (one file can contain all your own modifiers regardless of type).

Code:
an_example_modifier = {
    land_morale_modifier = 0.25 #"gives/adds" +25% to current land morale
}
Thank you so much. It's now finally working. Time to upload this to the steam workshop, phewwww.

Thanks a ton. Saved me here