• 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.
We don't use floats or doubles but a FixedPoint based on an int32, using the last three digits as decimals. So you can have a value from -2,147,483.648 to 2,147,483.647
Thanks, that answers the question. Incrementing by 0.001 would be the ideal, then.
The use of only = as operator has little to do with the triggers and effects but with how the engine parser works. Not impossible to change (some said so, but I proved them wrong) but changing how all triggers work and their localisation - that would take a lot of work.
Would it perhaps be possible to have an "is_equal = { var1 var2 }" command specifically for variables? Equality does come up rather a lot for variables.
 
Would it perhaps be possible to have an "is_equal = { var1 var2 }" command specifically for variables? Equality does come up rather a lot for variables.

Hm, I guess.

EDIT: Done.
 
Last edited:
<3

Moved to "implemented in upcoming patch":
  • Ability to set graphical culture for characters, both in history and through commands

None of what I've done so far is in the new patch. I will gather some of the simpler fixes and port them over to the next patch. All major changes I do down the line though will probably have to wait until the next expansion/DLC patch.
 
None of what I've done so far is in the new patch. I will gather some of the simpler fixes and port them over to the next patch. All major changes I do down the line though will probably have to wait until the next expansion/DLC patch.
I'll rename the section to "implemented in an upcoming patch". Does that sound good?

Moved:
  • More raid related conditions/scopes (E.G: is_raiding = yes, raiding = ROOT, on_action for when loot is returned)
On_action is crossed out since that isn't implemented (yet).
 
I'll rename the section to "implemented in an upcoming patch". Does that sound good?

Moved:
  • More raid related conditions/scopes (E.G: is_raiding = yes, raiding = ROOT, on_action for when loot is returned)
On_action is crossed out since that isn't implemented (yet).

Sounds good. I also renamed them to is_looting and is_looting_in to be more in line with in-game localisation.
 
I made a small mod to add extra settlements in a province (over the vanilla limit) but there are some limitations due to the commands currently available.

I used the commands build_castle/city/temple to overpass the holding limit but the mechanism could be improved by implementing a "add a holding slot to a province" command. Also, a "destroy a settlement in a province" command (random and specific) would further improve the customization of a province. IIRC, those commands are already listed in the OP...!

There is a major flaw in my mod and it is due to the fact that not all provinces have 7 defined baronies in the landed_titles file. To solve this problem, I could use a condition that checks how many defined baronies there are in a province (so I can prevent the events from firing if the num_of_settlements = num of defined baronies).
 
How about the ability to script opinion of characters and other things like 'traitor' and 'reason to get jailed'? E.g. Magnus is a murderer because he murdered Knud in 1134, but characters don't remember this if you start in 1135 which would otherwise be punishable by law. King X divorced Queen Y in year A, as the script say, but Y's family wouldn't act accordingly if you started at a later start date a few years later. Duke Friedrich was commonly known as a traitor since the Great Saxon rebellion, but there is no way to have this scripted. The Hvide family are valiant supporters of one particular branch of the Danish Royal family, but this is not scriptable.

I think we need some kind of way to script in opinion modifiers to character in certain years and such.
 
How about the ability to script opinion of characters and other things like 'traitor' and 'reason to get jailed'? E.g. Magnus is a murderer because he murdered Knud in 1134, but characters don't remember this if you start in 1135 which would otherwise be punishable by law. King X divorced Queen Y in year A, as the script say, but Y's family wouldn't act accordingly if you started at a later start date a few years later. Duke Friedrich was commonly known as a traitor since the Great Saxon rebellion, but there is no way to have this scripted. The Hvide family are valiant supporters of one particular branch of the Danish Royal family, but this is not scriptable.

I think we need some kind of way to script in opinion modifiers to character in certain years and such.

You can script any effects in the character history files, see for example Rurik's starting army and fleet. So adding opinions should work - however I tested this and apparently the opinion effect can't take a charcater id as an argument... I will fix that though.
 
Fixed. You can now script opinions in history files.
 
Last edited:
Thanks a lot. Can also see over the add_friend and add_rival? They don't seem to work in the history files. Scripted friends/rivals won't show up on either character.

- Friends and rivals can now be added and removed with add_friend, add_rival, remove_friend and remove_rival.
This is from the patch notes 2.1 that do say it should be possible, but I haven't been able to do so yet.

If this is WAD then I would suggest it be added moddability to add friends and rivals to history files.
 
Another scripting idea/request, some sort of trigger checking if a character has a valid reason to either imprison, execute or banish someone. Currently if you want to check this you have to check for each possible opinion.
 
Some things I've been asking about for a long time, since I spoke to Doomdark about some of them when SoI came out, relating to portrait stuff for modding:
  • Ability to script hiding beards, like this:
Code:
eye_color_index = 9
		eye_color = {
			{ 120 74 46 }
			{ 34 103 36 }
			{ 86 74 46 }
			{ 36 32 24 }
		}
		
		headgear_that_hides_hair = { 10 }
		[I]headgear_that_hides_beard = { 10 }[/I]
	}
  • Ability to create portrait_property_culture.txt files that override the default portrait_properties.txt files per culture (No need to 'encapsulate' rules for each piece, or do tricky workarounds for different rules per culture)
  • Ability to add complete new properties lines for portraits (for people who want to make visual icons on portraits, or have stuff like jewelry or Holy Order clothing added without touching the default arrangement by simply adding a new .dds and a new line in the .gfx and properties file)
Code:
# p11 Icons
11 = {
	0 = {
		factor = 100
		modifier = {
			pregnant = yes
		}
	}
}
  • Expand the christian_portraits = yes into more than just pagan vs. non-pagan. Example section from 00_graphicalculturetypes.txt:
Code:
turkishgfx = {
	skin_tone = 2
	[I]muslim_portraits = yes
	whatever_religion_group_you_want_portraits = yes[/I]
}
  • Allow the ability to make merchant clothes for cultures other than western christians (e.g. merchant_clothing_muslim) or, de-hardcode the merchant line and move it to the .gfx file by having an arrangement maybe similar to this:
Code:
spriteType = {
		name = "PORTRAIT_westerngfx_merchant_male_clothing"
		texturefile = "gfx\\characters\\western\\western_male\\merchant_male_clothing.dds"
		noOfFrames = 12
		norefcount = yes
	}

Super-optional:

  • Ability to enter a hard-date into the 00_graphicalculturetypes.txt file to trigger portrait switches based on the date. In an ideal situation, the game would dump the old .dds files loaded into the VRAM and refresh with new ones. This could be used to simulate changes in fashion over time for some of us ambitious modders: Example:

Code:
byzantinegfx = {
	skin_tone = 1
	portrait_change_1 = { year = 1000 } (This would then repoint to something like byzantinegfx_1.gfx or something like that)
}
 
Suggestion for moddability of a realm k_, d_, c_ & b_ line you could use in the history files to place a character you want to be in a special location or realm without having to use 'employer=' which you'd have to change every time upon the death of the character holder. I want it timeless.

Say I want a female character to be in b_fontevraud (an historical abbey for women), but since this barony lacks history list I would still like this person to be in this barony by default at every start date she is alive without having to add a history list and an employer for every couple of years I want her to stay there.

Another example: I got a landless family which I wish to stay within the realm of k_jerusalem, but it doesn't matter which court they happen to be in as long as it's in the realm of k_jerusalem. So I would add a line which would give them residence in any court over baron within the k_jerusalem. Currently only religion and culture determines which court they would be in upon start by default or the very exact 'employer='.

Maybe a 'location=c_vastergotland'? It might look something like this then:
Code:
451518 = {
	name="Rigitza"
	female = yes
	dynasty=487
        [COLOR="#FFFF00"]location=c_skane #only the court of c_skane[/COLOR]
	martial=7
	diplomacy=8
	intrigue=6
	stewardship=8
	religion="catholic"
	culture="danish"
	trait="hunchback"
	trait="amateurish_plotter"
	father=451514
	mother=451517
	1275.1.1={
		birth="1275.1.1"
	}
        [COLOR="#FFFF00"]1300.1.1={
                location=b_roskilde #specifically b_roskilde regardless if history list exist or not.
        }
        1301.1.1={
                location=k_denmark #anywhere in de jure k_denmark in a court of at least count tier
        }
        1302.1.1={
                location=d_jylland #anywhere in de jure d_jylland in a court of at least count tier[/COLOR]
        }
	1308.1.1={
		death="1308.1.1"
	}
}
It would only work if the county was the capital of someone's demesne so choosing a county in a king's demesne which wasn't his capital wouldn't work.

This would prohibit characters of certain cultures to wind up in a far of colony of someone of the same culture when it's really really unlikely they would be there.
 
Last edited:
It would be nice if any_realm_province and any_demesne province listed out each province as a separate decision (a la blinding/castrating) instead of just giving one decision for all provinces that fit the defined scope.
 
It would be nice if any_realm_province and any_demesne province listed out each province as a separate decision (a la blinding/castrating) instead of just giving one decision for all provinces that fit the defined scope.

I agree, but that should have a different name (maybe each_realm_province?) because one decision would be better in many cases.
 
Since Gars is apparently responding to this thread now, I have (quite) a few modding-related requests. Honestly, if even half of these get implemented, I would be very happy:
  • The big pie-in-the-sky one: models are currently stored in a proprietary format, making this the one area of CK2 that is completely unmoddable. It would be nice if CK2 could also support other 3D model formats so that modders could add their own.
  • Buildings cannot properly reference buildings that were defined after them, at least not in their potential block. This makes it difficult to have two mutually exclusive building chains, and then have the one that can no longer be pursued be removed from the building list once it's no longer buildable.
  • Merchant republic/patrician succession laws interact with gender laws in strange ways. If a patrician title is using anything but Absolute Agnatic succession, and the current heir is female, then it seems like some titles (the family palace and any county-tier titles) will go to her properly, while others (duchy titles, for certain) will go to whatever character would have been the heir under Absolute Agnatic (often the doge, if there is no male family member). This makes modding in Cognatic or Enatic merchant republics difficult without some rather exotic workaround techniques.
  • Related to the above, the matrilineal marriage restriction for patricians is hard-coded. It would be nice if this only applied when they were under Absolute Agnatic, or if there was some way to turn it off in DEFINES.
  • Any temporary title of baron tier will automatically be considered a patrician title for some reason. I'd actually rather you not fix this one, believe it or not, as it's nice to be able to add new patrician families on demand this way. But be aware.
  • Patricians who aren't the serving doge are currently considered feudal for some reason. Fixing this isn't critical, but it would be nice.
  • It would be nice to have titles that can be created dynamically and given a context-sensitive name like temporary titles are, but aren't actually temporary and don't expire upon making peace. There are tonnes of interesting things we could do with the ability to do this.
  • Conditions and on-actions relating to trying to pass a law. At the moment, as far as I know, there's no way to make events or decisions that key off the process of a law that's being voted on by vassals, which seems like a fertile area for potential political deals.
  • Similarly, conditions, on-actions, and commands relating to how electors cast their votes under feudal elective and tanistry.
  • Scopes for finding other provinces in the same trade zone as the source province.
  • killer and any/random_killed_character scopes. any_lover_even_if_dead, mother_even_if_dead, and the ability to scope to the former holders of a given title would all be nice as well.
  • Feudal elective succession law for the petty Anglo-Saxon kingdoms in the 867 start. This isn't modding related, I just insist on asking for it every time I get a chance to talk to someone who works at Paradox. ;)
 
Last edited: