• 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.
Where is the


It's the defines file named as "defines" however I just called it powerful vassals in my comment for clarity.

Hmm..
Is it a complete defines file or does it just include the few lines you quoted ?
If not, then that file should go into the "defines" folder, as far as i recall.*

* not playing CK2 for a few months
Cheers and sorry in case of me misremembering and just wasting space.
 
Alright here we go....

Code:
k_syrakousai = {
    color = { 42 140 225 }
    color2 = { 55 42 225 }
 
    capital = 343 # Siracusa
 
    creation_requires_capital = yes
 
    title = "TYRANNOS"
    title_female = "TYRANNOS"
    foa = "TYRANNOS"
    foa = "TYRANNOS"
 
    dignity = 10
 
    # Cannot be held as a secondary title
    primary = yes
 
    dynasty_title_names = no     # Will not be named "Seljuk", etc.
 
        allow = {
            culture = greek
            OR = {           
                religion = hellenic_pagan
                }
            }
        }

So this is my code for the custom nation of Syrakousai.
This is the Flag I am using for the nation of Syrakousai, which works perfectly.
Syracuse.png
Here it is in game before I create the title.

ck2_42.png

Here is the flag that shows up when I am Pagan.

ck2_45.png

And this is what pisses me off the most about the whole thing too, because the flag shows up perfectly here....
ck2_43.png


I just have one question for you CK2, WHAT THE FU-
 
So, I have a question again.
Does anyone remember how much of a memory impact setting a variable has?

Because I'm planning to make use of them to the fullest, with ~400 different variables out of which up to 8 can be assigned to a province at one time. Problem is, the "active" ones can change, so over the course of a game a province might end up having 400 variables assigned, out of which a whopping 392 are at value 0, because they aren't needed anymore.
So, with all the "zombie" variables staying forever with no way to clear them even though they have become utterly useless, I am afraid I might compromise memory - though the wiki says "usually negligible", I think my usage might not be usual...
Can anyone estimate if I am just being pessimistic, or if this would be the problem I imagine?

The whole problem would obviously disappear if there was a way to clear variables. Frankly, I am still more than astonished that Paradox chose to not allow that.
 
Can a culture have things that a religion has? For example, could I give the Norse culture the ability to sail up/down rivers and take concubines even if they're a religion besides Germanic?

It appears that I can't give cultures religious attributes or religions cultural attributes but I don't know if I'm just doing something wrong.


Another thing I was modding was the old god events when I found this one bellow the Sea King/Queen event, I tried activating the event in game but it doesn't seem to do anything.

character_event = {
id = TOG.3323

hide_window = yes

is_triggered_only = yes

min_age = 16
capable_only = yes
prisoner = no

trigger = {
has_dlc = "The Old Gods"
OR = {
trait = viking
trait = ravager
}
OR = {
religion = norse_pagan
religion = norse_pagan_reformed
}
}

option = {
name = OK
change_variable = { which = viking_raids value = 1 }
}

Anyone know what this does?
 
Last edited:
Can I please get some help with my flag issue? I just can't figure out why the Flag which should be Syrakousai, is not sticking to the base file when I am Pagan.
 
Can I please get some help with my flag issue? I just can't figure out why the Flag which should be Syrakousai, is not sticking to the base file when I am Pagan.
NEVER MIND I FIGURED OUT THE ISSUE!!!!! It was a conflict with Patrum Scuta.
 
Can a culture have things that a religion has? For example, could I give the Norse culture the ability to sail up/down rivers and take concubines even if they're a religion besides Germanic?

It appears that I can't give cultures religious attributes or religions cultural attributes but I don't know if I'm just doing something wrong.

Some things can be set for both religions and cultures (e.g. "seafarer = yes"), while others (including "allow_rivermovement = yes") can only be set for one of the two.

Another thing I was modding was the old god events when I found this one bellow the Sea King/Queen event, I tried activating the event in game but it doesn't seem to do anything.

character_event = {
id = TOG.3323

hide_window = yes

is_triggered_only = yes

min_age = 16
capable_only = yes
prisoner = no

trigger = {
has_dlc = "The Old Gods"
OR = {
trait = viking
trait = ravager
}
OR = {
religion = norse_pagan
religion = norse_pagan_reformed
}
}

option = {
name = OK
change_variable = { which = viking_raids value = 1 }
}

Anyone know what this does?

It is a hidden event that adds to the character's viking_raids variable, triggered (if I remember correctly) when you loot a settlement. At certan thresholds, this causes a trait upgrade.
 
Some things can be set for both religions and cultures (e.g. "seafarer = yes"), while others (including "allow_rivermovement = yes") can only be set for one of the two.

I'm guessing there's no way to mod it so that it would allow it to be applied to cultures?

Oh well, looks like I'm gonna just play Germanic or make a norse-catholic mix mod or something, Thanks anyways.




Oh wait, I just realized that I could just make every religion have the "allow_rivermovement = yes" thing I suppose.
 
Last edited:
So, I have a question again.
Does anyone remember how much of a memory impact setting a variable has?

Because I'm planning to make use of them to the fullest, with ~400 different variables out of which up to 8 can be assigned to a province at one time. Problem is, the "active" ones can change, so over the course of a game a province might end up having 400 variables assigned, out of which a whopping 392 are at value 0, because they aren't needed anymore.
So, with all the "zombie" variables staying forever with no way to clear them even though they have become utterly useless, I am afraid I might compromise memory - though the wiki says "usually negligible", I think my usage might not be usual...
Can anyone estimate if I am just being pessimistic, or if this would be the problem I imagine?

The whole problem would obviously disappear if there was a way to clear variables. Frankly, I am still more than astonished that Paradox chose to not allow that.

The impact is most likely negligible. Each variable seems to take only four bytes. They seem to be stored as integers; with the decimal point being (for display/scripting purposes) shifted three numbers to the left to represent fractions. Their limit seems to be a bit above 2 millions, which yields 2 billions if you count the part of the integer that is used to represent fractions. And the maximum amount a normal integer can store is exactly a bit over 2 billions. A normal integer takes 4 bytes, so that is, then, most probably what each variable takes as well.

There are about 1400 provinces in the game (actually less, since I didn't remove the sea zones from that number); setting 400 variables for them would yield 560,000 variables having been set. With each variable taking up 4 bytes, this means a bit over 2mb of memory usage. That is extremely unlikely to cause any problems. If there were any problems, they would come from save games becoming too big to parse, but even that seems unlikely to me.

Furthermore, variables do seem to be cleared when set to 0. I can't seem to find any variable stored in a saved game that is 0, for instance.
 
The impact is most likely negligible. Each variable seems to take only four bytes. They seem to be stored as integers; with the decimal point being (for display/scripting purposes) shifted three numbers to the left to represent fractions. Their limit seems to be a bit above 2 millions, which yields 2 billions if you count the part of the integer that is used to represent fractions. And the maximum amount a normal integer can store is exactly a bit over 2 billions. A normal integer takes 4 bytes, so that is, then, most probably what each variable takes as well.

There are about 1400 provinces in the game (actually less, since I didn't remove the sea zones from that number); setting 400 variables for them would yield 560,000 variables having been set. With each variable taking up 4 bytes, this means a bit over 2mb of memory usage. That is extremely unlikely to cause any problems. If there were any problems, they would come from save games becoming too big to parse, but even that seems unlikely to me.

Furthermore, variables do seem to be cleared when set to 0. I can't seem to find any variable stored in a saved game that is 0, for instance.
Oh!
Well, that's a major relief then. Thx for calculating that for me :)
Yeah, I would assume 2MB wouldn't hurt much, even though I'm not 100% sure that they take excactly as much space as a "normal" integer. I remember reading about the memory print of flags vs modifiers vs variables somewhere... they have their name to store as well. But anyway, I feel almost confident enough to risk it now ^^
That last part is interesting, but I doubt that it really works that way. For example, if some calculation means that prosperity_value would end up as zero, but later would be increased again - then the variable would first disappear, and the latter operation fail? Doesn't really seem right.

So yeah, thx a lot for answering, but I feel a tiny bit confused now so I'm gonna do a think I rarely do, and bother someone official:
@Meneth or @blackninja9939, can someone confirm that this is correct, and I won't run into trouble using this many variables? And do variables indeed get cleared when set to zero?
 
Oh!
Well, that's a major relief then. Thx for calculating that for me :)
Yeah, I would assume 2MB wouldn't hurt much, even though I'm not 100% sure that they take excactly as much space as a "normal" integer. I remember reading about the memory print of flags vs modifiers vs variables somewhere... they have their name to store as well. But anyway, I feel almost confident enough to risk it now ^^
That last part is interesting, but I doubt that it really works that way. For example, if some calculation means that prosperity_value would end up as zero, but later would be increased again - then the variable would first disappear, and the latter operation fail? Doesn't really seem right.

So yeah, thx a lot for answering, but I feel a tiny bit confused now so I'm gonna do a think I rarely do, and bother someone official:
@Meneth or @blackninja9939, can someone confirm that this is correct, and I won't run into trouble using this many variables? And do variables indeed get cleared when set to zero?
Variable set to 0 get removed from a save game yes, if you do any effect with them in game then they just change it from 0.
For example if you make a simple event or run the effect change_variable = { which = "test_var" value = 10 } on a character then even if you have not explicitly set the variable it still gets changed by 10 as if you had set it as 0 to begin with. Same with any other variable commands or conditions.

As for using lots of variables, I think it will be highly unlikely you manage to cause a crash by using lots of them. You might bloat your save a bit but unlikely to levels here it corrupts or cannot be loaded.
 
Oh!
Well, that's a major relief then. Thx for calculating that for me :)
Yeah, I would assume 2MB wouldn't hurt much, even though I'm not 100% sure that they take excactly as much space as a "normal" integer. I remember reading about the memory print of flags vs modifiers vs variables somewhere... they have their name to store as well. But anyway, I feel almost confident enough to risk it now ^^

I'm glad I could help :)

True, they have their name to store, I had forgotten that. How much memory that would take would heavily depend on how variable name strings are stored internally.

That last part is interesting, but I doubt that it really works that way. For example, if some calculation means that prosperity_value would end up as zero, but later would be increased again - then the variable would first disappear, and the latter operation fail? Doesn't really seem right.

I am not entirely sure, but I think "changing" a variable that is undefined would define it, and then add the value. Likewise, I think checking an unset variable returns 0.
 
Variable set to 0 get removed from a save game yes, if you do any effect with them in game then they just change it from 0.
For example if you make a simple event or run the effect change_variable = { which = "test_var" value = 10 } on a character then even if you have not explicitly set the variable it still gets changed by 10 as if you had set it as 0 to begin with. Same with any other variable commands or conditions.

As for using lots of variables, I think it will be highly unlikely you manage to cause a crash by using lots of them. You might bloat your save a bit but unlikely to levels here it corrupts or cannot be loaded.

Thanks for clearing that up!
 
Variable set to 0 get removed from a save game yes, if you do any effect with them in game then they just change it from 0.
For example if you make a simple event or run the effect change_variable = { which = "test_var" value = 10 } on a character then even if you have not explicitly set the variable it still gets changed by 10 as if you had set it as 0 to begin with. Same with any other variable commands or conditions.

As for using lots of variables, I think it will be highly unlikely you manage to cause a crash by using lots of them. You might bloat your save a bit but unlikely to levels here it corrupts or cannot be loaded.
Thx a lot! That's why you gotta love Paradox, even the devs take time to answer questions :)
It seems I am save then, excellent. I can see the wiki was updated as well, that's good because the caveat there got me worried in the first place.

Well, so you were right after all Andrelvis. Thanks again to you as well, next time I'll trust your judgement ^^
 
For some reason when I change the viking traits to "religious = no" they still get removed upon a characters religious conversion, is there something I need to change besides that?
 
For some reason when I change the viking traits to "religious = no" they still get removed upon a characters religious conversion, is there something I need to change besides that?

You need to edit the potential block as well. If at any point the character doesn't meet the requirements in there, the trait will be removed.
 
Are there specific events for artifacts in-game or is it a generic "looking for cultural/religious artifact that the player meets the requirements to use" the reason I'm wondering this is that I was going to make it so that Norse characters could equip the Germanic artifacts even if they were another religion. But I'm wondering if I need to edit any of the artifact events so that they could get them via the artifact hunt events.
 
Are there specific events for artifacts in-game or is it a generic "looking for cultural/religious artifact that the player meets the requirements to use" the reason I'm wondering this is that I was going to make it so that Norse characters could equip the Germanic artifacts even if they were another religion. But I'm wondering if I need to edit any of the artifact events so that they could get them via the artifact hunt events.

Some artifacts have specific events, but much of the artifact "generation" done through event MNM.9008 (mnm_artifact_events.txt), which has a huge list of random artifacts possible to be obtained. Mjolnir, for instance, can only be acquired through that event. And yes, a requirement to get it there is to be of Germanic religion (either reformed or not).
 
What do you have to do to reduce the max holdings in a province? As a test, I edited the history file for the province of Rome to "max_settlements = 1", but upon loading up the 1066 scenario, it still had 4 occupied holdings and 3 empty ones.