• 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.
If a Character dies, can their ID be re-used by the Game? I noticed a random guy had a "faulty" name even though I have not touched his culture/title/etc. I looked him up in the Save File via his ID, and I have two people with the same ID, one being this guy, and the other being an Irish Count from one of my Mods... The Irish guy appears to be dead, but I cannot see the "death" entry (might just have missed it, though).
I don't think so; the IDs seem to be assigned one at a time by an incremented global object. Might be a bug?
 
character_flags are permanent, but can be removed using clr_character_flag = FLAG_NAME

The problem is, trying to modify the Script I posted above, for some reason I cannot get it to clear them... :/ Might be a glitch at my end, though.

Btw, another really useful thing are event targets. You still need to set flags for stuff, but I have found event targets to be much more easy to identify than say FROMFROM, because you can name them (e.g. target_ambitious_consort). Makes coding much easier if you can't memorize who PREVPREVPREVPREV was ^^

Hmmm, very interesting... Thanks, fellas! Seems like flags might be the way forward.
 
Maybe use the "on_settlement_looted" on_action, and add a Province Modifier for however long suitable, and then check for that? (That's assuming the malus itself is not a "normal" Modifier? If so, has_province/holding_modifier might do the trick)

As to Variables, can't a Value be written to them? According to the Wiki you can run...
Code:
ROOT = {
  export_to_variable = { which = myvar value = stewardship who = FROM }
}
I assume you could use "Wealth" for Value; the question is, can you compare a Variable to another Variable... It does not look like it from the Wiki, but maybe give it a try?

If that won't work, a rough solution would be character_flags relative to increments of your Value (assuming you know a rough idea of what they might be).
If there's not a specific command to compare 2 variables, you can subtract one from the other, and compare that to 0.
 
You can co check_variable = { which = var1 which = var2 } and that checks if var2 is bigger than var1, you can also add which = <scope> to check var2 of said scope against var1 of the current scope.
 
If there's not a specific command to compare 2 variables, you can subtract one from the other, and compare that to 0.
You can co check_variable = { which = var1 which = var2 } and that checks if var2 is bigger than var1, you can also add which = <scope> to check var2 of said scope against var1 of the current scope.
Okay good, so then my problem seems to be this: Since I can only compare variables, how do I make the treasury into a variable? Maybe I am overlooking something...
 
Can someone help me out with moding difficulty, in the static modifiers? Or anywhere else for that matter. Here is a link to the question I asked a few days ago.

Basically, I want to add, preferably in the difficulty settings a bonus that will increase the size of the demesne without suffering any penalties, but only for the AI !

Now I know I can just do it in defines, and play while ignoring it, but it would be too tempting, and not precise, since it is often rounded up. Besides, it is not a very elegant solution is it.
 
Can someone help me out with moding difficulty, in the static modifiers? Or anywhere else for that matter. Here is a link to the question I asked a few days ago.

Basically, I want to add, preferably in the difficulty settings a bonus that will increase the size of the demesne without suffering any penalties, but only for the AI !

Now I know I can just do it in defines, and play while ignoring it, but it would be too tempting, and not precise, since it is often rounded up. Besides, it is not a very elegant solution is it.
The problem might be that the defines are in lua, while static modifiers aren't.
Have you tried using this line
Code:
demesne_size = 1
instead?
From what I read in the wiki, that should be the "normal" modifier, so it should work in static_modifiers.
 
The problem might be that the defines are in lua, while static modifiers aren't.
Have you tried using this line
Code:
demesne_size = 1
instead?
From what I read in the wiki, that should be the "normal" modifier, so it should work in static_modifiers.

And the award goes to Lord Peter. Thank you. Indeed, I guessed that the reason is the difference between lua and static modifiers txt file. But I did not knew what is the correct syntax for demesne in txt files. Pretty obvious one actually. Thank you very much, this really helped a lot.
 
Okay good, so then my problem seems to be this: Since I can only compare variables, how do I make the treasury into a variable? Maybe I am overlooking something...
export_to_variable = { which = "var1" value = treasury } should work
 
Under the current version (post-Monks), does anyone know how to set an event to trigger for a character that has no parents? (as in, they're just a randomly-created courtier) In the previous version I could do "father = NONE" as a trigger, but now the game won't recognize it. Doing a testevent causes the console to spam "One of these must be true:" over and over about 20 times, and the game doesn't even recognize any event past it. Although it's strange that this doesn't cause the game to blank-event...
 
This might have been answered already somewhere but if yes I cant find it.

What is the difference between wealth and treasury modifiers?
From what I can tell by looking at the wiki, the difference seems to be that wealth is "int", while treasury is "double", meaning that wealth does not seem to take into account fractions of gold coins. But I haven't tested this, so I can not guarantee it's right.

Edit: I was assuming you meant conditions.
Interestingly, for commands, the wiki lists the exact opposite: wealth is "double" here, while treasury is "int". Seems pretty strange, but the wiki says so.
 
Last edited:
From what I can tell by looking at the wiki, the difference seems to be that wealth is "int", while treasury is "double", meaning that wealth does not seem to take into account fractions of gold coins. But I haven't tested this, so I can not guarantee it's right.

Edit: I was assuming you meant conditions.
Interestingly, for commands, the wiki lists the exact opposite: wealth is "double" here, while treasury is "int". Seems pretty strange, but the wiki says so.

Oh well.
*flips coin*
wealth it is then.
 
I'm getting burnt out whenever a new patch or expansion comes out. My mod worked perfectly (kinda) until M&M came out. Now I get this error message on startup:
[gfx_dx9.cpp:1450]: Error create vertices -2005530516 8 0 28
What does it mean? Something with the map it seems.
 
@Meneth is there a way to scope from one of the army scopes to all the units within the army?
 
Not that I know of.
That's a shame. Can the new any_controlled_unit take the location condition? Also, with the new set_tactic command, can you use this command from within a random_army scope to set it for all flanks? Or will you need to try and scope around to the flank in particular?