• 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 just though of this tidbit in the 2.8 patch notes. Might be useful, might not be.

Added AI flags "ai_flag_refuse_marriage" and "ai_flag_refuse_concubinage". If set, the AI will never marry the character off or accept them being made into a concubine, except if they're the person the character is getting married to/made consort of
 
  • 1
Reactions:
Does empire scope to the de jure or de facto liege title?
 
Thanks. Is there a way to check how many event troops a character has?
 
It's not 100% clear if it means an AI ruler who himself has that flag will refuse to get married himself, but it seems like it should work that way. I'll try it. Thanks.

A character with that flag will ignore it if they are the character getting married, and if character A has the flag and asks character B for a marriage (to B or B's courtier C) B will not care about the flag on A.
 
  • 1
Reactions:
So they'll still initiate marriage requests for themselves on their own, just refusing incoming marriage requests for themselves?

They might even accept incoming requests (I know for sure they can end up married when landed, not who initiated the requests when I've seen it happen); the flags are only intended for courtiers so that you can't steal e.g. Chinese strategists with a marriage.
 
  • 1
Reactions:
Why is the validator reporting an error? I'm guessing it's because I'm putting a condition within what it thinks is a command, but why does it think it's a command when the scopes are supposed to work both for trigger and effects?


1755002751905.png
 
Why is the validator reporting an error? I'm guessing it's because I'm putting a condition within what it thinks is a command, but why does it think it's a command when the scopes are supposed to work both for trigger and effects?

You seem to be confused about something. Commands (or effects) and conditions (or triggers) are not at all the same as scopes. You're working in immediate, which is an effect/command-context. de_jure_vassal_or_below is a trigger/condition, which can therefore not be used there.

What are you trying to do here?
 
  • 1
Reactions:
I am indeed.

I'm trying to translate this part of a CB ai_will_do into an event to check that this works as I intend it to; the dwarf trait allows me to know if it worked. I had cut portions as the validator didn't like them but I understand now it wasn't the problem.

Code:
        modifier = { # Pushing to expand towards de jure zone
            factor = 2
            OR = {
                de_jure_liege_or_above = ROOT # is ROOT (attacker) the de jure liege of the target title?
                ROOT = {
                    dejure_liege_title = { de_jure_vassal_or_below = FROM } # is the de jure liege of ROOT and FROM the same?
                }
            }
        }

This is meant to push the AI to conquer its de jure territory, or territory of a higher tier title than ROOT's so it can create it.
 
That's very useful, thanks!
 
But does anyone have confirmation whether or not a negative-fertility ruler will, or won't, refrain from marrying a courtier? I know a courtier can't refuse, but will the ruler even bother if he himself has negative fertility?
Does anyone know the answer to this?
Probably your best bet is to set up a test scenario (base game + console commands) and let the game run for a few decades. If 100 rulers of various tiers all have -1000% fertility and none of them are married after multiple decades, you have your answer. Same if some/all of them did get married.
 
  • 1
Reactions:
Why would an the first flag give an error in the log, while second does not, for spread of christianity here in this file? Would like help fixing this.
trigger = {
any_demesne_province = {
has_province_flag = spread_of_christianity
has_province_flag = melting_pot_target
}

Error log states this:
[triggerimplementation.cpp:13549]: Script Assert! assert: "Scope.GetProvince()", type: "none", location: " file: events/WtWSMS_melting_pots_events.txt line: 601"
[triggerimplementation.cpp:13549]: Script Assert! assert: "Scope.GetProvince()", type: "none", location: " file: events/WtWSMS_melting_pots_events.txt line: 700"
[triggerimplementation.cpp:13549]: Script Assert! assert: "Scope.GetProvince()", type: "none", location: " file: events/WtWSMS_melting_pots_events.txt line: 997"
[triggerimplementation.cpp:13549]: Script Assert! assert: "Scope.GetProvince()", type: "none", location: " file: events/WtWSMS_melting_pots_events.txt line: 1777"
[triggerimplementation.cpp:13549]: Script Assert! assert: "Scope.GetProvince()", type: "none", location: " file: events/WtWSMS_melting_pots_events.txt line: 2262"
[triggerimplementation.cpp:13549]: Script Assert! assert: "Scope.GetProvince()", type: "none", location: " file: events/WtWSMS_melting_pots_events.txt line: 2362"
[triggerimplementation.cpp:13549]: Script Assert! assert: "Scope.GetProvince()", type: "none", location: " file: events/WtWSMS_melting_pots_events.txt line: 500"
[triggerimplementation.cpp:13549]: Script Assert! assert: "Scope.GetProvince()", type: "none", location: " file: events/WtWSMS_melting_pots_events.txt line: 801"
[triggerimplementation.cpp:13549]: Script Assert! assert: "Scope.GetProvince()", type: "none", location: " file: events/WtWSMS_melting_pots_events.txt line: 900"
[triggerimplementation.cpp:13549]: Script Assert! assert: "Scope.GetProvince()", type: "none", location: " file: events/WtWSMS_melting_pots_events.txt line: 2160"
[triggerimplementation.cpp:13549]: Script Assert! assert: "Scope.GetProvince()", type: "none", location: " file: events/WtWSMS_melting_pots_events.txt line: 2464"
[triggerimplementation.cpp:13549]: Script Assert! assert: "Scope.GetProvince()", type: "none", location: " file: events/WtWSMS_melting_pots_events.txt line: 2564"
 

Attachments

  • WtWSMS_melting_pots_events.txt
    154,4 KB · Views: 0
Why would an the first flag give an error in the log, while second does not, for spread of christianity here in this file? Would like help fixing this.
trigger = {
any_demesne_province = {
has_province_flag = spread_of_christianity
has_province_flag = melting_pot_target
}

Error log states this:
[triggerimplementation.cpp:13549]: Script Assert! assert: "Scope.GetProvince()", type: "none", location: " file: events/WtWSMS_melting_pots_events.txt line: 601"
[triggerimplementation.cpp:13549]: Script Assert! assert: "Scope.GetProvince()", type: "none", location: " file: events/WtWSMS_melting_pots_events.txt line: 700"
[triggerimplementation.cpp:13549]: Script Assert! assert: "Scope.GetProvince()", type: "none", location: " file: events/WtWSMS_melting_pots_events.txt line: 997"
[triggerimplementation.cpp:13549]: Script Assert! assert: "Scope.GetProvince()", type: "none", location: " file: events/WtWSMS_melting_pots_events.txt line: 1777"
[triggerimplementation.cpp:13549]: Script Assert! assert: "Scope.GetProvince()", type: "none", location: " file: events/WtWSMS_melting_pots_events.txt line: 2262"
[triggerimplementation.cpp:13549]: Script Assert! assert: "Scope.GetProvince()", type: "none", location: " file: events/WtWSMS_melting_pots_events.txt line: 2362"
[triggerimplementation.cpp:13549]: Script Assert! assert: "Scope.GetProvince()", type: "none", location: " file: events/WtWSMS_melting_pots_events.txt line: 500"
[triggerimplementation.cpp:13549]: Script Assert! assert: "Scope.GetProvince()", type: "none", location: " file: events/WtWSMS_melting_pots_events.txt line: 801"
[triggerimplementation.cpp:13549]: Script Assert! assert: "Scope.GetProvince()", type: "none", location: " file: events/WtWSMS_melting_pots_events.txt line: 900"
[triggerimplementation.cpp:13549]: Script Assert! assert: "Scope.GetProvince()", type: "none", location: " file: events/WtWSMS_melting_pots_events.txt line: 2160"
[triggerimplementation.cpp:13549]: Script Assert! assert: "Scope.GetProvince()", type: "none", location: " file: events/WtWSMS_melting_pots_events.txt line: 2464"
[triggerimplementation.cpp:13549]: Script Assert! assert: "Scope.GetProvince()", type: "none", location: " file: events/WtWSMS_melting_pots_events.txt line: 2564"
I looked at the event file, and I can't see any obvious errors. It's probably worth running this through the Validator... but if this is from a huge total conversion like WTWSMS then that may be challenging.

I think the error is actually occurring for any_demesne_province, not has_province_flag. (The referenced line is always the first line in the any_demesne_province block, and the text of the error suggests that you're trying to do something on a nonexistent province.)

But I don't know what's actually wrong here. I found other examples of any_demesne_province = { ... has_province_flag = ... } being used (eg. ...\events\religious_events.txt, event id 39401), so the syntax seems valid.

Have you accidentally broken the mod, so that there are no valid provinces?! It might actually be a good idea to try the Validator.

Might also be worthwhile to validate your game installation - maybe you've got a corrupted file.

You could also try "rephrasing" it, to see what happens. Eg: any_demesne_title = { tier = COUNT location = { has_province_flag = ... } }. But I'd be surprised if you got a different result.
 
  • 1
Reactions: