• Victoria 3 - Sign up now!

    The journey begins, sign up now and get a special in-game item when the game is released.


  • 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
  • Crusader Kings II Expansion Subscription

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


richvh

Preserver of the Light
63 Badges
Dec 1, 2001
14.691
1.999
Visit site
  • Stellaris: Leviathans Story Pack
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Knights of Pen and Paper 2
  • Crusader Kings II: Conclave
  • Stellaris
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Crusader Kings II: Reapers Due
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Tyranny - Tales from the Tiers
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • Age of Wonders: Shadow Magic
  • Age of Wonders
  • Age of Wonders II
  • Crusader Kings II: Jade Dragon
  • Crusader Kings III: Royal Edition
  • 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
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • A Game of Dwarves
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Magicka
  • Majesty 2 Collection
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
  • Rome Gold
  • Rome: Vae Victis
  • 500k Club
  • Cities: Skylines
I think you're misunderstanding how event targets work. The mother event passes all event targets to daughter events; changes in one daughter event will not affect the copy of the event target in sister events, but only in its daughter events. You have to structure your event chain with that fact in mind.
 

Rylock

Field Marshal
59 Badges
Mar 10, 2008
11.618
2.427
  • Crusader Kings II: Charlemagne
  • Stellaris - Path to Destruction bundle
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Semper Fi
  • Victoria: Revolutions
  • Heir to the Throne
  • Hearts of Iron III
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III
  • 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: Chronicles
  • Shadowrun: Hong Kong
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Reapers Due
  • PDXCon 2017 Awards Winner
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Necroids
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Pride of Nations
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Victoria 2
  • Europa Universalis III Complete
  • Europa Universalis III Complete
Yeah, as richvh points out, just because the name of the event_target is the same, the "instance" of the event_target is actually unique for each chain of the event. That's on purpose. The only way you can have different chains of an event interact with the same event_target is to use a global_event_target instead.
 

VorpalNeko

First Lieutenant
4 Badges
Jul 20, 2012
281
20
  • Crusader Kings II
  • Europa Universalis IV
  • 500k Club
  • Europa Universalis IV: Pre-order
In the first version, the mother event has many daughter events, the event target is changed in a daughter event, and all sister events see the change. This is seen from the fact that in the first event version, there's only ever one log line from the daughter events.

My point is not that in that the changes fail to propagate in the second version, but that they do in the first case and don't in second case, which differ only in having a time delay. It's the mismatch that's puzzling me.

I could very well be (and probably am) misunderstanding how things are intended to work, but if so, I don't think @richvh's solves my misconceptions (to be clear, @richvh's post indicates that the second version behaves correctly, but that just raises the question why the first version behaves differently, because it shows a change made by a daughter event propagating upwards to the mother event and inherited by other daughters, so it's not always the case that the daughters inherit independent copies).
 
Last edited:
  • 1
Reactions:

Divine

Programmer
Super Moderator
33 Badges
Dec 26, 2005
565
929
  • Semper Fi
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • March of the Eagles
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • For the Motherland
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • 500k Club
  • Magicka: Wizard Wars Founder Wizard
  • Magicka 2 - Signup Campaign
  • Stellaris Sign-up
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Diplomacy
  • 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
In the first version, the mother event has many daughter events, the event target is changed in a daughter event, and all sister events see the change. This is seen from the fact that in the first event version, there's only ever one log line from the daughter events.

My point is not that in that the changes fail to propagate in the second version, but that they do in the first case and don't in second case, which differ only in having a time delay. It's the mismatch that's puzzling me.

I could very well be (and probably am) misunderstanding how things are intended to work, but if so, I don't think @richvh's solves my misconceptions (to be clear, @richvh's post indicates that the second version behaves correctly, but that just raises the question why the first version behaves differently, because it shows a change made by a daughter event propagating upwards to the mother event and inherited by other daughters, so it's not always the case that the daughters inherit independent copies).
Very interesting find. We're investigating this.
 

Captain Gars

Lead AI Programmer
4 Badges
Oct 4, 2010
5.887
902
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
In the first version, the mother event has many daughter events, the event target is changed in a daughter event, and all sister events see the change. This is seen from the fact that in the first event version, there's only ever one log line from the daughter events.

My point is not that in that the changes fail to propagate in the second version, but that they do in the first case and don't in second case, which differ only in having a time delay. It's the mismatch that's puzzling me.

I could very well be (and probably am) misunderstanding how things are intended to work, but if so, I don't think @richvh's solves my misconceptions (to be clear, @richvh's post indicates that the second version behaves correctly, but that just raises the question why the first version behaves differently, because it shows a change made by a daughter event propagating upwards to the mother event and inherited by other daughters, so it's not always the case that the daughters inherit independent copies).

You are actually right. When shooting an event in immediate with no delay, the new event actually uses the original event's scope (sort of like a sub-routine). I wasn't aware of this behavior (it does not work like that in EU4) and personally I think it is dangerous. But now we have it and we won't change it. So take that into account when scripting.
 
Last edited:
  • 3
Reactions:

ngppgn

Field Marshal
19 Badges
Jan 29, 2011
3.508
653
  • Crusader Kings III
  • Imperator: Rome
  • Imperator: Rome Deluxe Edition
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Stellaris
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Res Publica
  • Crusader Kings II
  • Heir to the Throne
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Conquest of Paradise
  • Divine Wind
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Crusader Kings II: The Old Gods
You are actually right. When shooting an event in immediate with no delay, the the new event actually uses the original event's scope (sort of like a sub-routine). I wasn't aware of this behavior (it does not work like that in EU4) and personally I think it is dangerous. But now we have it and we won't change it. So take that into account when scripting.

What do you exactly mean by "the original event scope"? Concretely, say I fire an event to character A, and in the immediate I fire a second event without delay to character B and C. Does this e.g. affect the pointers (ROOT FROM; FROMFROM, etc.) or only the event_targets?
Which kind of precautions should we then be taking when firing events from immediate without delay, as opposed to doing so with delay?
 
  • 1
Reactions:

Captain Gars

Lead AI Programmer
4 Badges
Oct 4, 2010
5.887
902
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
What do you exactly mean by "the original event scope"? Concretely, say I fire an event to character A, and in the immediate I fire a second event without delay to character B and C. Does this e.g. affect the pointers (ROOT FROM; FROMFROM, etc.) or only the event_targets?
Which kind of precautions should we then be taking when firing events from immediate without delay, as opposed to doing so with delay?

Normally when one event fires a another one, the second event creates a FROM scope that is a copy of the original event's scope. And should that event fire a third event, that event will create a chain of two FROM scopes that are copies of the earlier event scopes. But in this case, shooting an event in immediate with no delay, the new event doesn't create a copy for the FROM scope but actually points back to the original scope. Which means if you, as in the example above, fire several such events they can all reach/change the original scope. But I don't believe this will concern anything other than event targets.
 
  • 5
Reactions:

knuckey

AGOT Mod
42 Badges
Oct 10, 2010
1.676
747
  • Crusader Kings II
  • Heir to the Throne
  • Hearts of Iron III
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Holy Knight (pre-order)
  • Cities: Skylines - After Dark
  • Crusader Kings II: Conclave
  • Stellaris
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Mass Transit
  • Surviving Mars
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Parklife
  • Cities: Skylines Industries
  • Crusader Kings II: Holy Fury
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Cities: Skylines - Campus
  • Stellaris: Federations
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Crusader Kings II: Way of Life
  • 500k Club
  • Rome: Vae Victis
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV
  • 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: Sunset Invasion
  • Europa Universalis III Complete
  • Cities: Skylines
  • Rome Gold
We have come across an issue with the marriage AI. It seems a recent patch may of messed up the marriage AI for those characters who are in a 'divine_blood = yes' dynasty. They seem to only ever want marriages within their own dynasty, never going for political marriages outside the dynasty. They will even remain unmarried for their entire lives if there are no suitable marriage candidates in their own dynasty. Needless to say this has dire consequences for the Targaryens in AGoT :D

Some sort of balance in between where they sometimes go for incest and sometimes not would be good.
 

Jorlem

Field Marshal
116 Badges
May 9, 2012
4.476
3.700
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Imperator: Rome - Magna Graecia
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Battle for Bosporus
  • Europa Universalis 4: Emperor
  • Stellaris: Necroids
  • Europa Universalis IV
  • Steel Division: Normandy 44 Deluxe Edition
  • Steel Division: Normandy 44
  • 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
  • Dungeonland
  • Europa Universalis III
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • The Showdown Effect
  • War of the Roses
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Humble Paradox Bundle
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Field Marshal
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Mandate of Heaven
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Tyranny - Bastards Wound
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Expansion Pass
We have come across an issue with the marriage AI. It seems a recent patch may of messed up the marriage AI for those characters who are in a 'divine_blood = yes' dynasty. They seem to only ever want marriages within their own dynasty, never going for political marriages outside the dynasty. They will even remain unmarried for their entire lives if there are no suitable marriage candidates in their own dynasty. Needless to say this has dire consequences for the Targaryens in AGoT :D

Some sort of balance in between where they sometimes go for incest and sometimes not would be good.
Given that this also adversely affects Zoroastrians in vanilla, you should probably also make a thread in the Bug Reports subforum.
 

Divine

Programmer
Super Moderator
33 Badges
Dec 26, 2005
565
929
  • Semper Fi
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • March of the Eagles
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • For the Motherland
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • 500k Club
  • Magicka: Wizard Wars Founder Wizard
  • Magicka 2 - Signup Campaign
  • Stellaris Sign-up
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Diplomacy
  • 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
Given that this also adversely affects Zoroastrians in vanilla, you should probably also make a thread in the Bug Reports subforum.
I've made sure that this is on our bug-tracking database. I might end up being the one that fixes it in the end but we're aware of it now at least.
 
  • 4
Reactions:

zijistark

HIP Lead
58 Badges
Jan 29, 2013
5.118
3.070
zijistark.com
  • Crusader Kings II
  • Stellaris: Apocalypse
  • Knights of Honor
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Pre-order
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Semper Fi
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Crusader Kings II: The Old Gods
  • Cities in Motion
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis III: Chronicles
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Rights of Man
  • Victoria 2
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings III
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Death or Dishonor
  • 500k Club
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
Patch 2.5.2 issue: infamy_modifier does not work-- at all.

One of the key issues addressed with infamy in patch 2.5.2 was the ability to vary the total amount of infamy gained from a war individually by CB type via a new CB parameter infamy_modifier, which is supposed to be a multiplier/factor applied to any Threat which might be gained from that type of war. This new parameter is used in several vanilla CBs, as heavily advertised with patch 2.5.2. However, infamy_modifier does NOT work.

Regardless of the value or formatting of the numeric parameter given to infamy_modifier in any CB, it has no effect whatsoever upon the Threat value gained from CB success. It is as if the implementation of this feature were simply forgotten in the merge for the release of patch 2.5.2.

I've been dealing with this in many of my own mods' CBs for awhile, but I finally decided to thoroughly test this in isolation and report it, because it is a game-changing feature insofar as the Threat mechanic is concerned and is already relied-upon by vanilla. The [probably obvious] fix for this issue will likely result in a major face-palm somewhere in Stockholm, although in the interest of simply having this functionality ASAP, I do hope that I'll be the one facepalming. ;)

I've written an ultra-simple, annotated test CB to demonstrate the problem. I've also placed the CB file into a test mod for easy verification, which is attached to this post.

First, let's cover the test CB for reference, and then I'll show you it in action-- or, rather, as far as infamy_modifier goes, lack of action.

Code:
# This infamy_modifier test CB was designed to be as simple as possible, usable within fully vanilla context,
# and used in the same way(s) that vanilla 2.5.2 uses infamy_modifier. It shows that, for all intents and purposes,
# the CB parameter `infamy_modifier` is ignored.
#
# I chose an is_permanent=yes, check_de_jure_tier=DUKE invasion-style CB only allowed between independent ROOT and FROM.
# The CB itself, of course, is entirely WAD, aside from infamy_modifier's epic fail.

cb_test_infamy_modifier = {
    name = CB_NAME_INVASION
    war_name = WAR_NAME_INVASION
    sprite = 8
    truce_days = 3650
    hostile_against_others = yes
    can_ask_to_join_war = no
    is_permanent = yes
    check_de_jure_tier = DUKE
  
    allowed_to_target_tributaries = no
    allowed_to_target_suzerains = no
  
    # None of these infamy_modifier variants affected Threat gain due to any war outcome (all tested):

    # infamy_modifier = 0 # Why initially chosen: main, desired behavior that led to discovery of this problem
  
    infamy_modifier = 0.0 # Why: perhaps there's a parsing issue with bare integers on the RHS (e.g., 0 as above)
  
    # infamy_modifier = 0.01  # Why: perhaps it doesn't work with a strictly-zero-valued parameter at all
    # infamy_modifier = 0.85  # Why: sanity-checking a value used in vanilla's `claim` CB (#1) -- no dice
    # infamy_modifier = -1.0  # Why: maybe it's not a multiplier/factor but indeed a "modifier," as its name suggests
    # infamy_modifier = -0.99 # Why: maybe it doesn't like 0% infamy at all, given the prior "modifier" logic
    # infamy_modifier = -0.85 # ...

    can_use = {
        ROOT = {
            independent = yes
            NOT = { same_realm = FROM }
        }
    }

    can_use_title = {
        # Any duchy with a direct border
        any_direct_de_jure_vassal_title = {
            holder_scope = { same_realm = FROM }
            location = {
                any_neighbor_province = {
                    owner = { same_realm = ROOT }
                }
            }
        }
    }

    is_valid_title = {
        FROM = {
            any_realm_title = {
                de_jure_liege_or_above = PREVPREV
            }
        }
    }

    on_success_title = {
        ROOT = {
            vassalize_or_take_under_title = {
                title = PREV
                enemy = FROM
                type = invasion
            }
        }
        if = {
            limit = { holder_scope = { same_realm = FROM } }
            usurp_title_only = { target = ROOT type = invasion }
        }
      
        # Variants such as this were also tried (though definitely not necessary):
      
        # ROOT = {
        #     gain_settlements_under_title = {
        #         title = PREV
        #         enemy = FROM
        #         is_crusade = yes # Even if the title holder is not participating in the war...
        #         type = invasion
        #     }
        # }
    }

    on_fail = { } # No need

    on_reverse_demand = { } # No need

    attacker_ai_victory_worth = {
        factor = -1 # always accept
    }

    attacker_ai_defeat_worth = {
        factor = 100
    }

    defender_ai_victory_worth = {
        factor = -1 # always accept
    }

    defender_ai_defeat_worth = {
        factor = 100
    }
}

Got it? Good. Now, let's see it in action...

Spoiler: Despite infamy_modifier = 0.0 in the CB (as one of the numerous values tried), we will still accrue the same amount of Threat as we do in any war with the parameter set to anything else or excluded altogether.

I load up in 1066 as Heinrich Salian [Holy Roman Emperor]. I immediately use the test CB to invade France for the neighboring Duchy of Flanders:



Now, since I'd rather this not get bloody, I then immediately switch to King Philippe of France and surrender to the HRE:



I switch back to the HRE, and I accept the French surrender:



Excellent. Flanders is now under my control, and I've won-- but, wait, what's this?



I've gained 12.00% Threat due to the 'Holy Roman Invasion of Flanders,' and yet I should not have accrued any Threat at all. Once I unpause, the defensive pacts form (as they start forming at 5% Threat).

...

Beers to @Divine if he can tell us how to properly write CBs with varying levels of Threat impact w/ the current patch.

Presently, for special-purpose CBs which tend to come up in "restoration / unification / anarchy" historical scenarios (or, say, various historical invasions in the game already), my only options to prevent the Defensive Pact mechanic from overreacting to these types of wars and thus preventing the desired behavior are to either:

  • Disable the Threat / D-Pact mechanic entirely -- game/mod-global
  • Prevent the involved AIs from using any CBs via normal war declaration mechanisms and force all "desired" war declarations to be scripted (using the infamy = 0 parameter which can be passed to the war and reverse_war commands).
Thanks for taking the time to read this, and hopefully there'll soon be a solution. I'm sure users of vanilla would appreciate the fix as well.
 

Attachments

  • cb_test_infamy_modifier.zip
    2,2 KB · Views: 4
  • 2
Reactions:

Divine

Programmer
Super Moderator
33 Badges
Dec 26, 2005
565
929
  • Semper Fi
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • March of the Eagles
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • For the Motherland
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • 500k Club
  • Magicka: Wizard Wars Founder Wizard
  • Magicka 2 - Signup Campaign
  • Stellaris Sign-up
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Diplomacy
  • 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
Patch 2.5.2 issue: infamy_modifier does not work-- at all.

One of the key issues addressed with infamy in patch 2.5.2 was the ability to vary the total amount of infamy gained from a war individually by CB type via a new CB parameter infamy_modifier, which is supposed to be a multiplier/factor applied to any Threat which might be gained from that type of war. This new parameter is used in several vanilla CBs, as heavily advertised with patch 2.5.2. However, infamy_modifier does NOT work.

...

Good observation and information. I've been doing some test-cases in the dev-version and I've managed to somewhat reproduce your scenario. However the game seems to read the infamy_modifier for me (which is functionally used as a multiplier). The culprit to why I gained infamy was that there's a value in defines that is forcing me to gain some minimum amount of infamy for every province conquered.

Can you try to modify the value
Code:
NInfamy - MIN_INFAMY_PER_WAR_PROVINCE
in common/defines.lua and set it to 0 and see if you still have trouble modifying the infamy values. If there's still an issue in the live version I'll have to fetch that version to see where it is wrong.
 
  • 4
Reactions:

zijistark

HIP Lead
58 Badges
Jan 29, 2013
5.118
3.070
zijistark.com
  • Crusader Kings II
  • Stellaris: Apocalypse
  • Knights of Honor
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Pre-order
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Semper Fi
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Crusader Kings II: The Old Gods
  • Cities in Motion
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis III: Chronicles
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Rights of Man
  • Victoria 2
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings III
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Death or Dishonor
  • 500k Club
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
Good observation and information. I've been doing some test-cases in the dev-version and I've managed to somewhat reproduce your scenario. However the game seems to read the infamy_modifier for me (which is functionally used as a multiplier). The culprit to why I gained infamy was that there's a value in defines that is forcing me to gain some minimum amount of infamy for every province conquered.

Can you try to modify the value
Code:
NInfamy - MIN_INFAMY_PER_WAR_PROVINCE
in common/defines.lua and set it to 0 and see if you still have trouble modifying the infamy values. If there's still an issue in the live version I'll have to fetch that version to see where it is wrong.

Beers, Divine-- I now owe you at least a couple more. Thanks for the swift reply. Spot-on diagnosis, and indeed, your suggested solution is fully-functional for the live version (2.5.2).

To sum up, in order for lower (or, almost any, in practice) values of `infamy_modifier` in CBs to make any difference to actual Threat gain, add this to your mods' define overrides, folks:

Code:
NDefines.NInfamy.MIN_INFAMY_PER_WAR_PROVINCE = 0

Since my last post included a picture show too, here's the final screenshot after declaring and winning the same war with the cb_test_infamy_modifier CB which I previously referenced -- after overriding MIN_INFAMY_PER_WAR_PROVINCE as suggested:



( No threat gained whatsoever; not even a 'Holy Roman Invasion of Flanders -- 0.00%' on the Threat tooltip breakdown )

Total success, and again, thanks for the swift and poignant diagnosis, Divine.
 

Rylock

Field Marshal
59 Badges
Mar 10, 2008
11.618
2.427
  • Crusader Kings II: Charlemagne
  • Stellaris - Path to Destruction bundle
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Semper Fi
  • Victoria: Revolutions
  • Heir to the Throne
  • Hearts of Iron III
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III
  • 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: Chronicles
  • Shadowrun: Hong Kong
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Reapers Due
  • PDXCon 2017 Awards Winner
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Necroids
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Pride of Nations
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Victoria 2
  • Europa Universalis III Complete
  • Europa Universalis III Complete
So that means MIN_INFAMY_PER_WAR_PROVINCE overrides any infamy_modifier setting in a CB?

That's...not exactly great. I would have assumed the infamy_modifier multiplier would apply after all other calculations.
 
  • 1
Reactions:

zijistark

HIP Lead
58 Badges
Jan 29, 2013
5.118
3.070
zijistark.com
  • Crusader Kings II
  • Stellaris: Apocalypse
  • Knights of Honor
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Pre-order
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Semper Fi
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Crusader Kings II: The Old Gods
  • Cities in Motion
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis III: Chronicles
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Rights of Man
  • Victoria 2
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings III
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Death or Dishonor
  • 500k Club
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
So that means MIN_INFAMY_PER_WAR_PROVINCE overrides any infamy_modifier setting in a CB?

That's...not exactly great. I would have assumed the infamy_modifier multiplier would apply after all other calculations.
I agree that [future, perhaps] application of infamy_modifier after all other Threat calculations would be a design featuring more utility and flexibility whilst much more commonly "working as expected" for scripters.
 

ngppgn

Field Marshal
19 Badges
Jan 29, 2011
3.508
653
  • Crusader Kings III
  • Imperator: Rome
  • Imperator: Rome Deluxe Edition
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Stellaris
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Res Publica
  • Crusader Kings II
  • Heir to the Throne
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Conquest of Paradise
  • Divine Wind
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Crusader Kings II: The Old Gods
Something that Galle pointed out in another thread, and that I'd like to report in case it's a bug rather than a misuse.

When you create a new character you can use the command dna = <string> to specify the dna of a character. Now one would think that the game could let a RHS to be a valid argument for the dna command (e.g. dna = ROOT, dna = event_target:my_target). but this is not the case, instead, the game try to apply the name of the scope as the dna (for example try to use "ROOT" or "event_target:my_target" as a dna string. Just wanted to note here in case this is a non-intended behaviour of the code.
 

blackninja9939

Experienced Programmer - Crusader Kings 3
76 Badges
Aug 28, 2013
2.338
5.136
  • Crusader Kings III
  • Stellaris: Federations
  • Battle for Bosporus
  • Stellaris: Necroids
  • Europa Universalis 4: Emperor
  • Europa Universalis IV
  • Crusader Kings III: Royal Edition
  • Crusader Kings II
  • Crusader Kings II: Holy Fury
  • Imperator: Rome - Magna Graecia
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Synthetic Dawn
  • Surviving Mars
  • BATTLETECH
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Monks and Mystics
  • Tyranny: Archon Edition
  • Europa Universalis IV: Rule Britannia
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Colonel
  • Stellaris Sign-up
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Stellaris: Lithoids
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Shadowrun Returns
  • Imperator: Rome Deluxe Edition
  • Prison Architect
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Crusader Kings II: Conclave
  • Crusader Kings II: The Republic
  • Victoria 2
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Stellaris
  • Mount & Blade: Warband
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sword of Islam
Something that Galle pointed out in another thread, and that I'd like to report in case it's a bug rather than a misuse.

When you create a new character you can use the command dna = <string> to specify the dna of a character. Now one would think that the game could let a RHS to be a valid argument for the dna command (e.g. dna = ROOT, dna = event_target:my_target). but this is not the case, instead, the game try to apply the name of the scope as the dna (for example try to use "ROOT" or "event_target:my_target" as a dna string. Just wanted to note here in case this is a non-intended behaviour of the code.
I do believe that is the intended use as you are setting the dna to be that string not copying it from a scope, hence there is a suggestion for a copy_dna and set_dna commands in the suggestions thread
 

name_here

Major
77 Badges
Jun 18, 2012
611
135
  • Victoria: Revolutions
  • Tyranny - Tales from the Tiers
  • Crusader Kings II: Jade Dragon
  • Sword of the Stars II
  • Sengoku
  • Semper Fi
  • Rome Gold
  • Cities in Motion
  • Europa Universalis IV: Res Publica
  • Majesty 2
  • Magicka
  • Hearts of Iron III Collection
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis IV: Conquest of Paradise
  • 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
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Europa Universalis III Complete
  • Europa Universalis III
  • Europa Universalis IV: Cossacks
  • Europa Universalis III Complete
  • Surviving Mars
  • BATTLETECH
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Tyranny: Archon Edition
  • Crusader Kings II: Reapers Due
  • Stellaris
  • Crusader Kings II: Conclave
  • Europa Universalis III Complete
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Stellaris: Necroids
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • 500k Club
  • Rome: Vae Victis
  • Europa Universalis IV
So that means MIN_INFAMY_PER_WAR_PROVINCE overrides any infamy_modifier setting in a CB?

That's...not exactly great. I would have assumed the infamy_modifier multiplier would apply after all other calculations.

If I'm understanding this correctly, MIN_INFAMY_PER_WAR_PROVINCE sets a floor on infamy gain after modifiers are applied. That's the behavior I'd expect from the name, and it sounds potentially useful to me. That said, the default value should most definitely be low enough that CBs with a modifier of 1 generally exceed the minimum.
 
  • 2
Reactions:

zeress

Retired CK2+ Dev
67 Badges
Mar 4, 2012
2.359
650
  • PDXCon 2017 Awards Winner
Here's something that may just be something as innocuous as an oversight on the tool tip front, but I figured I should ask and see what the consensus may be.

Currently as a Merchant Republic you cannot build a trade post in a province that is also on any pre-defined trade route, like the Silk Road, unless you own the whole province. This goes counter to the stated intention of the written tool tip as so:

Screenshot 2016-04-20 22.45.33.jpg


It stipulates that you may build a TP in any province, even foreign ones, as an MR. Most importantly it does not imply that MRs should be locked out of building a TP there, quite the opposite in fact.
It only explains that the owner can also build a TP there. If we examine the actual checks portion of the tooltip however, we can clearly see a "Directly Owns Province" as being part of the implied AND section of the allowance.

If one were to look at the Build TP description of a coastal province without a trade route, you would see almost the exact same tooltip, except for one important aspect:

Screenshot 2016-04-20 22.45.22.jpg


The "Directly Owns Province" check is completely gone in this case, but the text description at the top reads the same nonetheless.

What is the intended behaviour here? Should MRs be able to build a TP in a province on a trade route they do not fully control, or is this simply an incorrect tool tip and is in fact intended that they cannot build there?

Any help or input would be greatly appreciated :)
 

Divine

Programmer
Super Moderator
33 Badges
Dec 26, 2005
565
929
  • Semper Fi
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • March of the Eagles
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • For the Motherland
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • 500k Club
  • Magicka: Wizard Wars Founder Wizard
  • Magicka 2 - Signup Campaign
  • Stellaris Sign-up
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Diplomacy
  • 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
Here's something that may just be something as innocuous as an oversight on the tool tip front, but I figured I should ask and see what the consensus may be.

Currently as a Merchant Republic you cannot build a trade post in a province that is also on any pre-defined trade route, like the Silk Road, unless you own the whole province. This goes counter to the stated intention of the written tool tip as so:

View attachment 172016

It stipulates that you may build a TP in any province, even foreign ones, as an MR. Most importantly it does not imply that MRs should be locked out of building a TP there, quite the opposite in fact.
It only explains that the owner can also build a TP there. If we examine the actual checks portion of the tooltip however, we can clearly see a "Directly Owns Province" as being part of the implied AND section of the allowance.

If one were to look at the Build TP description of a coastal province without a trade route, you would see almost the exact same tooltip, except for one important aspect:

View attachment 172014

The "Directly Owns Province" check is completely gone in this case, but the text description at the top reads the same nonetheless.

What is the intended behaviour here? Should MRs be able to build a TP in a province on a trade route they do not fully control, or is this simply an incorrect tool tip and is in fact intended that they cannot build there?

Any help or input would be greatly appreciated :)
That does seem a little bit off with the current tooltip. I think it might be working as designed so the Merchant Republics have to fight other rulers for control of the trade route provinces which would imply that the descriptive text doesn't tell the whole truth. However I'm poking the dev-team to take a quick look on it.

Edit: @zeress Actually it seemed like they wanted wanted the coastal province in the same ocean rule to take precedence over the other rules. So I took the liberty of fixing that. So coastal provinces in the same ocean as the Merchant Republic should, in an upcoming patch, now always be a valid placement for a trade post regardless of the trade route status.
 
Last edited: