• 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.
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.
AFAIK it's used for some AI weights (perhaps on CBs?), and maybe for some undocumented hardcoded interactions, but overall it doesn't seem to have been widely-used by the devs in the visible text files. If you're writing your own events, you could include weightings for rationality/zeal/etc in the way the AI chooses event options.
 
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.)

Around 2k raiders for an unreformed germanic. Well, I should playtest it some more, I just did it once to check what happens when spawning troops and then I was really disapointed.
 
AFAIK it's used for some AI weights (perhaps on CBs?), and maybe for some undocumented hardcoded interactions, but overall it doesn't seem to have been widely-used by the devs in the visible text files. If you're writing your own events, you could include weightings for rationality/zeal/etc in the way the AI chooses event options.

I do use it on some checks, I like how it keeps things mysterious unlike if this character has that trait he's going to be a pain or if I'm paranoid these events around rumours of plots are probably fake.

I wondered if things like greed could be one of the key on why some AI farm gold but refuse to build buildings,... I guess the AI will keep some of its mysteries :)
 
Do I need to declare namespace only in event files or everywhere an ID is used, like for exemple in on_actions?
 
I'm a bit confused by a thing on the wiki about opinion modifiers.

For the condition has_opinion_modifier, it says Checks if the scoped character has the given opinion modifier towards who character. This I understand.

Now, for reverse_has_opinion_modifier, it says Similar to has_opinion_modifier, but with the scopes reversed. I can't make sense of it. Maybe let's pick the exemple it offers:
Code:
reverse_has_opinion_modifier = {
    who = ROOT
    modifier = opinion_supported_pope
}

Where does it check for the opinion_supported_pope?
 
Code:
reverse_has_opinion_modifier = {
    who = ROOT
    modifier = opinion_supported_pope
}

Where does it check for the opinion_supported_pope?
This code snippet evaluates to "true" if ROOT has opinion_supported_pope towards the scoped character.
 
  • 1
Reactions:
Does a random list always pick one of the options even if there's no fallback option? I want to have two possible outcomes, each weighted depending on traits etc but I'm not sure how to go with this.
 
Does a random list always pick one of the options even if there's no fallback option? I want to have two possible outcomes, each weighted depending on traits etc but I'm not sure how to go with this.
In most cases, yes.

The exception can be if there are modifiers to each option that specifically prohibit it (i.e. factor = 0) from being picked if something is true. If, for some reason, those modifiers in every single option evaluate to true, then the game will pick nothing, and nothing will happen.
 
  • 1
Reactions:
I don't get how "owed_favor_activated_by" is supposed to work with titles or provinces. Isn't that supposed to check that somebody is repaying a favor currently by say voting like the other character? I guess it could point at the title owner but how about province?

On scopes that use something like where... I have only seen used with special scopes like ROOT etc. Would it work with other scopes?

I'm not sure how to use PREV.

Code:
            FROM = {
                location = {
                    ROOT = {
                        job_spymaster = {
                            set_job_action = {
                                action = action_organize_spies_mystics
                                where = PREVPREVPREVPREV
                            }
                        }
                    }
                }
            }

It is meant to find the location of FROM and set ROOT's spymaster to do the job action there for... genuine intents. Does the first PREV points at set_job_action or job_spymaster, ie. do I need 3 or 4 PREV? rereading the wiki, I'm confused on this.
 
I'm not sure how to use PREV.

Code:
            FROM = {
                location = {
                    ROOT = {
                        job_spymaster = {
                            set_job_action = {
                                action = action_organize_spies_mystics
                                where = PREVPREVPREVPREV
                            }
                        }
                    }
                }
            }

It is meant to find the location of FROM and set ROOT's spymaster to do the job action there for... genuine intents. Does the first PREV points at set_job_action or job_spymaster, ie. do I need 3 or 4 PREV? rereading the wiki, I'm confused on this.

The first PREV points back to the previous scope, so that would be ROOT. PREVPREV thus is location, PREVPREVPREV is FROM, and PREVPREVPREVPREV is whatever scope came before that.
 
  • 1
Reactions:
Thanks, I think I get it... set_job is a command, job_spymaster is the current scope and so the previous is ROOT. That saved me a good lot of time loading and playtesting!
 
Hello everyone. does anybody know how to edit special units? I want to edit the Qizilbash units for Persia and I can't find the code. all i want to do is allowing the player to create them anywhere. (they can only be created in azerbaijani and turkish provinces)
 
Hello everyone. does anybody know how to edit special units? I want to edit the Qizilbash units for Persia and I can't find the code. all i want to do is allowing the player to create them anywhere. (they can only be created in azerbaijani and turkish provinces)

I suspect you might be looking for the EU4 modding subforum...
 
Is there a way to set up a matrilineal betrothal from script? I can't seem to find anything about it on the wiki.
 
Is there a way to set up a matrilineal betrothal from script? I can't seem to find anything about it on the wiki.

I was never able to find it in CK2game.exe, nor get the game to respond to anything I tried in script. The same goes for a trigger for matrilineal betrothals.
 
What is necessary for the game to recognize files for merging?

For exemple 00_tribal, does it need numbers, or even tribal or does it just read at the begining of the file
Code:
tribal = {
to know it's about tribal buildings and the name doesn't matter?
 
What is necessary for the game to recognize files for merging?

For exemple 00_tribal, does it need numbers, or even tribal or does it just read at the begining of the file
Code:
tribal = {
to know it's about tribal buildings and the name doesn't matter?

The latter is correct. The game will try to merge things as much as possible, but there are many things, such as events and decisions that cannot be merged and instead have to be overwritten entirely, done by overwriting the entire source file.

Filenames come into play when it comes to loading order, which is relevant for traits, but not many other things (in fact, nothing comes to mind right away).
 
  • 1
Reactions:
Filenames come into play when it comes to loading order, which is relevant for traits, but not many other things (in fact, nothing comes to mind right away).
Filename is important if you want to overwrite only certain specific items in a file. Eg: Overwriting only one specific event or only one loc key, leaving the rest of the massive text file unchanged. You need to experiment to discover whether you need a 00000_ or zzzzz_ prefix, and it's not supported in every folder, but it's very useful in the locations where it is supported.
 
  • 1
Reactions:
Filenames come into play when it comes to loading order, which is relevant for traits, but not many other things (in fact, nothing comes to mind right away).

There are a few more:

- Localisation; first entry loaded wins if there are duplicates, so if you just want to add override strings they need to go first.

- Religion features (the categories); when opening the reformation screen or randomizing features, the order depends on the order in which they were defined and loaded. Tested with dummy lists of features where all but one entry in one category requires something specific in another category and making that category load before/after.

- Possibly governments; the first valid government will be selected, so I'd imagine the load order decides what you get if you are eligible for governments in different files. I've not tested this one, however.
 
  • 1
Reactions: