• 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.
I'm trying to figure out the limitations of holding graphics. Holdings can have different graphics based on culture. Is this hardcoded to be just culture, or could be based on other factors as well?

Great Works seem to have a strip, instead of just a single image, allowing for the art to change if the Great Work reaches a new stage. They also have a changing background based on terrain.

Is there any way for castle, city and temple holdings to have the same modularity as Great Works? I would love for the image to change if the buildings in the holding are upgraded and for terrain to be represented in the background of the graphics.
 
I'm trying to figure out the limitations of holding graphics. Holdings can have different graphics based on culture. Is this hardcoded to be just culture, or could be based on other factors as well?

Great Works seem to have a strip, instead of just a single image, allowing for the art to change if the Great Work reaches a new stage. They also have a changing background based on terrain.

Is there any way for castle, city and temple holdings to have the same modularity as Great Works? I would love for the image to change if the buildings in the holding are upgraded and for terrain to be represented in the background of the graphics.

As far as I know you can only set one holding graphic for for each <culturegfx> (or <culturegfx>_<religiongfx>, for temple holdings). Family palaces do have multiple frames that imply some kind of "evolution", but MRs are a hardcoded mess and whatever triggers the "evolution" isn't defined in the files (or, if it is, I sure can't find it anywhere sensible...).
 
  • 1
Reactions:
I'm trying to figure out the limitations of holding graphics. Holdings can have different graphics based on culture. Is this hardcoded to be just culture, or could be based on other factors as well?

Great Works seem to have a strip, instead of just a single image, allowing for the art to change if the Great Work reaches a new stage. They also have a changing background based on terrain.

Is there any way for castle, city and temple holdings to have the same modularity as Great Works? I would love for the image to change if the buildings in the holding are upgraded and for terrain to be represented in the background of the graphics.
If I remember correctly, there is some allowance for backgrounds like coast/ocean and desert. It might just be for trade posts though, I'd have to look again to remember.
 
Does anyone know how to make sure the AI will always take a decision as soon as possible? I'm trying to make such a decision, but the AI is refusing to take it.

Code:
become_strong = {
        is_high_prio = yes
        potential = {
            date < 937.1.1
        }
        allow = {
            independent = yes
            NOT = {
                OR = {
                    has_character_modifier = became_strong
                    has_character_modifier = didnt_become_strong
                }
            }
        }
        effect = {
            random_list = {
                90 = {
                    add_character_modifier = {
                        name = didnt_become_strong
                        duration = -1
                    }
                }
                10 = {
                    add_character_modifier = {
                        name = became_strong
                        duration = -1
                    }
                    spawn_unit = {
                        owner = ROOT
                        province = capital_scope
                        home = capital_scope

                        troops = {
                            archers = { 200 200 }
                            light_infantry = { 500 500 }
                            heavy_infantry = { 250 250 }
                            light_cavalry = { 50 50 }
                        }

                        attrition = 1.0
                        maintenance_multiplier = 0
                        cannot_inheret = yes
                    }
                }
            }
        }
        ai_will_do
        {
            factor = 1
        }
    }

For context, I'm trying to make shattered worlds consolidate faster by giving one in ten AI rulers some extra troops at the start of the game, but that requires them to actually take the decision.
 
Does anyone know how to make sure the AI will always take a decision as soon as possible? I'm trying to make such a decision, but the AI is refusing to take it.

Code:
become_strong = {
        is_high_prio = yes
        potential = {
            date < 937.1.1
        }
        allow = {
            independent = yes
            NOT = {
                OR = {
                    has_character_modifier = became_strong
                    has_character_modifier = didnt_become_strong
                }
            }
        }
        effect = {
            random_list = {
                90 = {
                    add_character_modifier = {
                        name = didnt_become_strong
                        duration = -1
                    }
                }
                10 = {
                    add_character_modifier = {
                        name = became_strong
                        duration = -1
                    }
                    spawn_unit = {
                        owner = ROOT
                        province = capital_scope
                        home = capital_scope

                        troops = {
                            archers = { 200 200 }
                            light_infantry = { 500 500 }
                            heavy_infantry = { 250 250 }
                            light_cavalry = { 50 50 }
                        }

                        attrition = 1.0
                        maintenance_multiplier = 0
                        cannot_inheret = yes
                    }
                }
            }
        }
        ai_will_do
        {
            factor = 1
        }
    }

For context, I'm trying to make shattered worlds consolidate faster by giving one in ten AI rulers some extra troops at the start of the game, but that requires them to actually take the decision.

If this is only meant for game start, don't use decisions, but instead make an event that fires on_startup.
Decisions are evaluated at most once every month, but spread out over that one month so to avoid the game hanging every first day every month. That means one AI in thirty will consider decisions every 1st of the month, one in thirty AI will do so the 2nd of the month, and so forth.
 
  • 2
Reactions:
Does anyone know how to make sure the AI will always take a decision as soon as possible? I'm trying to make such a decision, but the AI is refusing to take it.

Code:
become_strong = {
        is_high_prio = yes
        potential = {
            date < 937.1.1
        }
        allow = {
            independent = yes
            NOT = {
                OR = {
                    has_character_modifier = became_strong
                    has_character_modifier = didnt_become_strong
                }
            }
        }
        effect = {
            random_list = {
                90 = {
                    add_character_modifier = {
                        name = didnt_become_strong
                        duration = -1
                    }
                }
                10 = {
                    add_character_modifier = {
                        name = became_strong
                        duration = -1
                    }
                    spawn_unit = {
                        owner = ROOT
                        province = capital_scope
                        home = capital_scope

                        troops = {
                            archers = { 200 200 }
                            light_infantry = { 500 500 }
                            heavy_infantry = { 250 250 }
                            light_cavalry = { 50 50 }
                        }

                        attrition = 1.0
                        maintenance_multiplier = 0
                        cannot_inheret = yes
                    }
                }
            }
        }
        ai_will_do
        {
            factor = 1
        }
    }

For context, I'm trying to make shattered worlds consolidate faster by giving one in ten AI rulers some extra troops at the start of the game, but that requires them to actually take the decision.
Whizzer is absolutely correct, but for future reference there's also an error in your code. You need an = after ai_will_do.

Furthermore, again for future reference, you can generally increase an AI's likelihood to take a decision by increasing the factor, though I don't know if raising it beyond 1 (equivalent to 100% I think?) makes any difference.
 
  • 2
Reactions:
Whizzer is absolutely correct, but for future reference there's also an error in your code. You need an = after ai_will_do.

Furthermore, again for future reference, you can generally increase an AI's likelihood to take a decision by increasing the factor, though I don't know if raising it beyond 1 (equivalent to 100% I think?) makes any difference.

And that wasn't the only problem with the script.
ai_will_do higher than one makes no difference for decisions, since it represents a likelihood between 0 and 100%. In factions, however, AI only joins the faction with the highest value of all available factions, so there it does make a difference.
 
  • 3
Reactions:
Hello guys. I've been obsessed with EU4 modding recently, and finally got everything the way I wanted. Now I started playing CK2 again...

I've always been under the impression, that CK2 is more moddable, than EU4. Something about scopes being more extensive, than EU4?

Is this true?
 
I've not modded EU4 in many years (and not very extensively even then), but it most likely comes down to what you're trying to do since the games are rather different beasts and some things might be trivial in one game but effectively impossible in the other (e.g. CK2 does not support having colonizable provinces; a province either has a holder at all times, or it does not (or you create an elaborate workaround to have some "Non-character characters" that hold them and that are blocked from effectively everything)).
 
I've not modded EU4 in many years (and not very extensively even then), but it most likely comes down to what you're trying to do since the games are rather different beasts and some things might be trivial in one game but effectively impossible in the other (e.g. CK2 does not support having colonizable provinces; a province either has a holder at all times, or it does not (or you create an elaborate workaround to have some "Non-character characters" that hold them and that are blocked from effectively everything)).
I mean, like in general. I've modded both games a little bit, but only recently really got into EU4 modding making this mess of a grand campaign mod.

The folder structures, events, and so forth are pretty much identical, but I'm just pondering where I've gotten this impression that CK2 somehow had more "in-depth" modding capabilities. Maybe it had something to do with some PREVPREVPREV scopes or such, that enable more in-depth event structures in CK2? Or maybe it had something to do with provinces, how it's possible to create more elaborate variables or something?
 
There's not a condition for checking if someone has a bloodline or not. Would using any_owned_bloodline = { always = yes } work? That is, would that code only satisfy a trigger if the character does in fact have a bloodline?
 
There's not a condition for checking if someone has a bloodline or not. Would using any_owned_bloodline = { always = yes } work? That is, would that code only satisfy a trigger if the character does in fact have a bloodline?
Yes, that should work. (Indeed, it's the suggested method on the wiki.)

Note that you need to be a little more careful if you want to check that a character does NOT have a bloodline. NOT = { any_owned_bloodline = { always = yes } } would work, but any_owned_bloodline = { always = no } would not (because the game does not evaluate anything inside a non-existent scope).
 
  • 1
Reactions:
Just to be sure: there's no way to control what/when/if an AI goes raiding, right?

Is it possible to check the acceptance for some interactions? Namely, I aim to make an AI try to get another AI to accept an alliance offer and I would like to know if it's possible at all, ie. not send gifts if the answer will be no anyway, or if it's a lost cause that no swaying/chancelor lobbying could fix.
 
Just to be sure: there's no way to control what/when/if an AI goes raiding, right?

Pretty sure there isn't.

Is it possible to check the acceptance for some interactions? Namely, I aim to make an AI try to get another AI to accept an alliance offer and I would like to know if it's possible at all, ie. not send gifts if the answer will be no anyway, or if it's a lost cause that no swaying/chancelor lobbying could fix.

Hardcoded diplomatic interactions don't have their logic exposed for modding, so the only option option is to disable the hardcoded one and come up with a scripted workaround. Alliances might e one of the more plausible ones for that since the targets to check is a fairly small number of characters (fellow ruler that has an NAP with you or is a close relative of you, not in a vassal-liege relationship or on opposite sides in a war), it doesn't have to be checked extremely frequently.

The general vanilla logic can be found on the wiki, so you could attempt to replicate it and add/remove/change things to your liking in your custom targeted decision (e.g. you could have a chancellor event add an "Attractive alliance" opinion modifier that could give a nice boost). You might want to use an AI acceptance block as part of the targeted decision (though keep in mind it does not actually affect the AI's acceptance logic; you'll need normal AI weights for that).
 
  • 1
Reactions:
I guess I could write something up, and that could solve the black box that is political concern at the same time. Not sure how solid I could make the logic though but that's an interesting idea, thanks.
 
What do we know about rationality, zeal etc? I found a bit on the modifiers page of the wiki but that's very basic information.
 
Pretty sure there isn't.
Actually I thought some more about it and giving troops set to raiding mode will be used by the AI... So at least it's possible to control when the AI goes raiding.

Though I checked what the AI did with it and that was really a sorry sight. It got beaten by both Francias, then moved to raid England, lost a 3rd battle and then down with like 400 troops, it kept trying to raid desperately counts and dukes. The ships weren't following the troops anymore so it wasn't receiving money from the raid at all and it was losing money probably due to the ship maintenance.

Suddenly I'm not sure if telling the AI to go raid to amass gold is a smart thing to do.
 
Actually I thought some more about it and giving troops set to raiding mode will be used by the AI... So at least it's possible to control when the AI goes raiding.

Though I checked what the AI did with it and that was really a sorry sight. It got beaten by both Francias, then moved to raid England, lost a 3rd battle and then down with like 400 troops, it kept trying to raid desperately counts and dukes. The ships weren't following the troops anymore so it wasn't receiving money from the raid at all and it was losing money probably due to the ship maintenance.

Suddenly I'm not sure if telling the AI to go raid to amass gold is a smart thing to do.
How many troops did you give them? Did your raid-test AI have the "looters prefer coastal counties" culture/religion feature?

(In my games, viking raiders with 1-2k men seem to manage their raiders fairly effectively - keep their boats close, run away from doomstacks, etc. Similarly, land raiders with 1-2k men seem to understand that they can only get money from adjacent counties. Maybe your issue was that you tried to give sea-raiding troops to an AI who only understands how to land-raid.)