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.
So. Here I am coding a war. (Event) I ran into a problem. I can't seem to specify religious wars properly. (Well I was doing it with crusades when that did not work i broke down to religious wars... I can't seem to make the thing target properly. (I guess)
Code:
option = {
name = "To War!"
war = {
target = FROM
casus_belli = religious
landed_title = d_antioch
}
}
I got the landed_title = TITLE thing from the history/wars file. Though that seems not to work at all. Anyone got any idea how we can fire a targeted cursade/jihad/holy war using events?
Daily tick is the game's internal calendar, one tick per day because character and province events are checked every so many days, depending on your defines.lua.
What have you changed lately? Like Baneslave said, some event (or decision) is being triggered with faulty effects. If this is a big mod you're working on, I'd backup the whole folder for your mod, and then start adding things back one at a time. It could really be anything.
Is there a way to add additional property or DNA slots to the game? Just adding a p10 layer to portraits.gfx works, but the moment you add rules for it under portrait_properties.txt, the game crashes. Anyone got a solution to this?
I've found 'num_traits' and 'num_of_traits' in the game's files. Does anyone know if there's a difference between the two?
I'm using the first one (num_traits) as a trigger to curb the number of traits, but have seen other events using "num_of_traits" instead so... :blink: I really don't know.
Daily tick is the game's internal calendar, one tick per day because character and province events are checked every so many days, depending on your defines.lua.
What have you changed lately? Like Baneslave said, some event (or decision) is being triggered with faulty effects. If this is a big mod you're working on, I'd backup the whole folder for your mod, and then start adding things back one at a time. It could really be anything.
Year is 260 and I have united the duchy of moray and the duchy of albany giving them both different rulers. Moray is renamed as is albany and each has a ruler,they are united under an elective monarchy and currently albany rules Caledonia.
@jezza: sorry, I don't know what to advise. Did you rename them just in localisation or elsewhere, too?
@Ugo: look in cultures.txt. Many cultures have a patronymic: so you would have to change it for each culture you're interested in. Erikson would be a suffix; you would have to delete that part and indicate that your patronymic should show as a prefix.
can someone tell me about global_flags and how they differ from province & character flags. I don't really understand in what circumstance you would use one.
can someone tell me about global_flags and how they differ from province & character flags. I don't really understand in what circumstance you would use one.
Province and character flags are limited to those characters, and are used only for things important to those characters. Global flags on the other hand apply to the entire world, and can be checked from any scope. The game uses this for the mongol invasions for example, to note that it has happened so the events cannot fire again.
Will there be trouble and what kind of, if I have duchies that cannot be created in game? Like Kingdom of Khazaria is, but on duchy level. Will the AI go crazy when it gets those counties and can't turn them into duchies?
Anyone know why adding code to facial hair slot in portrait_properties.gfx (to get better beard generation for random characters etc) messes up characters with dna from history files? So if I make dna for a Norman count set him to cleanshaven via dna his facial hair will be randomized instead of keeping his cleanshaven face.
Even adding something completely inocous like giving each beard a factor of 1 will randomize the dna of the history files characters... I don't think it's an issue with the rest of my mod (found here: http://forum.paradoxplaza.com/forum...ng-Characters-(more-realistic-and-historical) ) I believe it might be something with the core client?
Anyone know why adding code to facial hair slot in portrait_properties.gfx (to get better beard generation for random characters etc) messes up characters with dna from history files? So if I make dna for a Norman count set him to cleanshaven via dna his facial hair will be randomized instead of keeping his cleanshaven face.
Even adding something completely inocous like giving each beard a factor of 1 will randomize the dna of the history files characters... I don't think it's an issue with the rest of my mod (found here: http://forum.paradoxplaza.com/forum...ng-Characters-(more-realistic-and-historical) ) I believe it might be something with the core client?
You need to specify hair and beards according to culture. I was able to make all Saxon men (or at least most of them) sport mustaches in a test case. The trick is to put in modifiers that give zero chance for certain cultures, religions, or other aspects of a character. Look at this, based on Trovador's work:
Code:
# p4 beard #Enhanced Portraits by Trovador
4 = {
0 = {
factor = 1 # 1/3 of characters are shaved by default
modifier = {
factor = 2 #the '0' beard is actually a full beard for muslims
religion_group = muslim
}
modifier = {
factor = 4 #catholic priests shave more frequently
religion = catholic
OR = {
AND = {
is_ruler = yes
is_theocracy = yes
}
has_job_title = job_spiritual
}
}
modifier = {
factor = 4 #latin cultured rulers like to keep their roman heritage
culture_group = latin
NOT = { culture = occitan }
NOT = { culture = castillan }
NOT = { culture = portuguese }
NOT = { culture = muladi }
NOT = { culture = sefardi }
NOT = { culture = basque }#except for the occitans, who kept the iberian style
}
modifier = {
factor = 0.25 #norse, slavic and pagan characters need facial hair!
OR = {
culture_group = east_slavic
culture_group = west_slavic
culture_group = north_germanic
religion_group = pagan_group
}
}
}
1 = { #gordon freeman
factor = 1
}
2 = { #full straight beard
factor = 1
modifier = {
factor = 3
OR = {
culture_group = west_slavic
culture_group = east_slavic
culture_group = north_germanic
religion_group = pagan_group
}
}
}
3 = { #bifid beard
factor = 1
modifier = {
factor = 3
OR = {
culture_group = west_slavic
culture_group = east_slavic
culture_group = north_germanic
religion_group = pagan_group
}
}
}
4 = { #moustache and goatee
factor = 1
}
5 = { #moustache
factor = 1
modifier = {
factor = 50
culture = saxon
}
}
6 = { #full curly beard
factor = 100
modifier = {
factor = 0.01
NOT = { religion = orthodox }
NOT = { is_heresy_of = orthodox }
}
modifier = {
factor = 0.01
OR = {
religion = orthodox
is_heresy_of = orthodox
}
OR = {
is_ruler = no
is_theocracy = no
}
NOT = { has_job_title = job_spiritual }
}
modifier = {
factor = 3
OR = {
culture_group = west_slavic
culture_group = east_slavic
culture_group = north_germanic
religion_group = pagan_group
}
}
}
7 = { #thin moustache
factor = 1
}
}
I do not put a lot of faith in modifying DNA directly for each character. I think that modifying portrait_properties is a more productive route. I may of course be wrong in that assumption, so let me not discourage you in doing what you think is best. Good luck.
Will there be trouble and what kind of, if I have duchies that cannot be created in game? Like Kingdom of Khazaria is, but on duchy level. Will the AI go crazy when it gets those counties and can't turn them into duchies?
I don't know what you mean by "Will the AI go crazy"--I have in an earlier run of my mod removed all duchies from Iberia or rather make those that already existed titular. No problems. The AI is pretty resilient on matters of de jure hierarchy. You can have counties without either duchy or kingdom over them. The only problem that you run into is that only kingdoms and empires can have de jure laws. So in that case centralization and church laws (if Catholic) are locked in at whatever you set as 'default' in crown_laws.txt.
Thank you for your reply RedRooster81! I know what you mean I had very similar code in, the problem is I did custom dna for 99.99% of landed characters in 1066 to make them look just right, besides the portrait_properties stuff for random generated ones... but any beard code in the portrait_properties file, any beard code at all, messes up some of the facial hair of the characters with fixed dna... so for example Eustache de Boulogne might have a moustache specified in his dna file but lo and behold after putting in code very similar to one you posted somehow he'll end up with a beard.(obviously if I deny beards to Franks 100% he won't get one) I guess I'm going to give it another go, make it more similar to Trovador's code see if by some miracle that works somehow, if not I'll just try and finetune it somehow and give up on the characters that get randomized by the random gods...
You need to specify hair and beards according to culture. I was able to make all Saxon men (or at least most of them) sport mustaches in a test case. The trick is to put in modifiers that give zero chance for certain cultures, religions, or other aspects of a character. Look at this, based on Trovador's work:
Code:
# p4 beard #Enhanced Portraits by Trovador
4 = {
0 = {
factor = 1 # 1/3 of characters are shaved by default
modifier = {
factor = 2 #the '0' beard is actually a full beard for muslims
religion_group = muslim
}
modifier = {
factor = 4 #catholic priests shave more frequently
religion = catholic
OR = {
AND = {
is_ruler = yes
is_theocracy = yes
}
has_job_title = job_spiritual
}
}
modifier = {
factor = 4 #latin cultured rulers like to keep their roman heritage
culture_group = latin
NOT = { culture = occitan }
NOT = { culture = castillan }
NOT = { culture = portuguese }
NOT = { culture = muladi }
NOT = { culture = sefardi }
NOT = { culture = basque }#except for the occitans, who kept the iberian style
}
modifier = {
factor = 0.25 #norse, slavic and pagan characters need facial hair!
OR = {
culture_group = east_slavic
culture_group = west_slavic
culture_group = north_germanic
religion_group = pagan_group
}
}
}
1 = { #gordon freeman
factor = 1
}
2 = { #full straight beard
factor = 1
modifier = {
factor = 3
OR = {
culture_group = west_slavic
culture_group = east_slavic
culture_group = north_germanic
religion_group = pagan_group
}
}
}
3 = { #bifid beard
factor = 1
modifier = {
factor = 3
OR = {
culture_group = west_slavic
culture_group = east_slavic
culture_group = north_germanic
religion_group = pagan_group
}
}
}
4 = { #moustache and goatee
factor = 1
}
5 = { #moustache
factor = 1
modifier = {
factor = 50
culture = saxon
}
}
6 = { #full curly beard
factor = 100
modifier = {
factor = 0.01
NOT = { religion = orthodox }
NOT = { is_heresy_of = orthodox }
}
modifier = {
factor = 0.01
OR = {
religion = orthodox
is_heresy_of = orthodox
}
OR = {
is_ruler = no
is_theocracy = no
}
NOT = { has_job_title = job_spiritual }
}
modifier = {
factor = 3
OR = {
culture_group = west_slavic
culture_group = east_slavic
culture_group = north_germanic
religion_group = pagan_group
}
}
}
7 = { #thin moustache
factor = 1
}
}
I do not put a lot of faith in modifying DNA directly for each character. I think that modifying portrait_properties is a more productive route. I may of course be wrong in that assumption, so let me not discourage you in doing what you think is best. Good luck.
I think the actual solution to the issue is to simply remove the "DONT_REFRESH_IF_VALID" flag in portraits.gfx. You can see that beard (and hair) layers have a ":h:y" after them, unlike all the other layers. Try removing the ":y" part and see if that helps!
I haven't actually tested this, but it seems like a likely cause. Worth a try, at the very least!
EDIT: Or if you want to -keep- the predefined beards for characters, you may have to do the exact opposite, I dunno.