• 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.
Well my mod is set in the days of the Roman Empire :D Its the Warrior of Rome mod. The localisation files,history files,dynasty file,changed the map a little and a few other gfx changes.

Ah, sorry - I assumed that if it was a public mod you'd be advertising it in your signature, so it must be something private. It's possible you've got some misattributed calls to the localisation file? I recall butchering my ability to declare war in EU3: DW that way.
 
Ah, sorry - I assumed that if it was a public mod you'd be advertising it in your signature, so it must be something private. It's possible you've got some misattributed calls to the localisation file? I recall butchering my ability to declare war in EU3: DW that way.

Oh no it is public,I just didnt consider putting it in my signature :) it's not released yet.
 
I keep getting noculture and noreligion in a bunch of provinces at start. I have completely new provinces, cultures, and religions. Does anyone know what's causing this?

Did you define it in provinces history files ?
 
I keep getting noculture and noreligion in a bunch of provinces at start. I have completely new provinces, cultures, and religions. Does anyone know what's causing this?

Check with validator, you can get this issue if you have for example an extra bracket or not enough brackets in cultures.txt thereby cutting off all cultures past the extra/missing bracket.
 
Would this code work if I wanted a scaling cost for the creation of this title?

Code:
decisions = {
#Formation of the Most Serene Republic of Genoa
		serene_republic_of_genoa = {
			is_high_prio = yes
			potential = {
				ai = yes
				is_republic = yes
				is_ruler = yes
				has_landed_title = c_genoa
				NOT = {
					num_of_king_titles = 1
				}
				OR = {
					ALLOW = {
						num_of_duke_titles = 2
						NOT = { num_of_duke_titles = 3}
						piety = 100
						treasury = 800
						war = no
					}
					ALLOW = {
						num_of_duke_titles = 3
						NOT = { num_of_duke_titles = 4}
						piety = 100
						treasury = 600
						war = no
					}
					ALLOW = {
						num_of_duke_titles = 4
						piety = 100
						treasury = 400
						war = no
					}
				}
			}
			effect = {
				k_genoa = { gain_title = ROOT }
				OR = {
					ALLOW = {
						num_of_duke_titles = 2
						NOT = { num_of_duke_titles = 3}
						treasury = -800
					}
					ALLOW = {
						num_of_duke_titles = 3
						NOT = { num_of_duke_titles = 4}
						treasury = -600
					}
					ALLOW = {
						num_of_duke_titles = 4
						treasury = -400
					}
				}
				prestige = 250
				piety = -100
			}
			revoke_allowed = {
				always = no
			}
			ai_will_do = {
				factor = 100                    
			}
		}
}
 
I haven't had much luck putting in effect conditions like that in decisions. If it doesn't work, try triggering an event as an effect of the decision, with if-limit statements.
 
Went right over my head (Well king of, I know what if-statements are in a programming sense anyways. Just not in CK2 engine purposes). Guess it's time to scurry the forums for an example of what you said. Thanks for the guideline
 
Went right over my head (Well king of, I know what if-statements are in a programming sense anyways. Just not in CK2 engine purposes). Guess it's time to scurry the forums for an example of what you said. Thanks for the guideline

You can find them in some of the event files. Here is what I would recommend for such an event:

Code:
namespace = doge

character_event = {
desc = "EVTDESC_doge.0"
picture = GFX_evt_council

is_triggered_only = yes

option = {
name = "EVTOPTA_doge.0" 
prestige = 500
if = {
limit = { num_of_duke_titles = 2 NOT = num_of_duke_titles = 3 }
scaled_wealth = -40.0
k_genoa = { grant_title = ROOT }
}
if = {
limit = { num_of_duke_titles = 3 NOT = num_of_duke_titles = 4 }
scaled_wealth = -20.0
k_genoa = { grant_title = ROOT }
}
if = {
limit = { num_of_duke_titles = 4 }
scaled_wealth = -10.0
k_genoa = { grant_title = ROOT }
}
} #close option
} #close event

Now I think that your decision should be something like:

Code:
decisions = {


serene_republic_of_genoa = { 
is_high_prio = yes
potential = {    
ai = yes    
is_republic = yes    
is_ruler = yes    
has_landed_title = c_genoa    
NOT = {        
num_of_king_titles = 1    
}
}
allow = {        
OR = { AND = { scaled_wealth = 40.0 num_of_dukes = 1 NOT = { num_of_dukes = 2 } AND = { num_of_duke_titles = 3 NOT = { num_of_duke_titles = 4 } scaled_wealth = 20.0 } AND = { num_of_duke_titles = 4 scaled_wealth = 10.0 }
}
effect = {      
character_event = { id = doge.0 days = 1 }      
add_trait = ambitious #for a bonus?
}  
} #End decision genoa...
} #END OF FILE


What I am thinking is that the allow on the decision should work as I wrote it. I think that scaled_wealth might work better in terms of setting up the conditions though you can use regular old 'wealth' if you want. But as I have it, being only Doge of Genoa, you need forty months' revenue (scaled_wealth = 40.0) to proclaim yourself Serene Doge, while if you have four ducal titles, you only need 10 months' revenue. Of course do with it as you will. :)
 
Last edited:
Well I was kind of on the right track after your first post (was peeking at Wiz's custom empires).

That should work great in theory, I'll give it a whirl in a little bit.

Also thank you for explaining what scaled_wealth means exactly. I had asked it before but got no reply. I like your idea with the scaled wealth a lot better than rigid numbers.

What is the difference then between wealth and treasury?

EDIT: I think you are missing some end brackets after allow on the decision part, or I am misreading it.
 
Last edited:
Well I was kind of on the right track after your first post (was peeking at Wiz's custom empires).

That should work great in theory, I'll give it a whirl in a little bit.

Also thank you for explaining what scaled_wealth means exactly. I had asked it before but got no reply. I like your idea with the scaled wealth a lot better than rigid numbers.

What is the difference then between wealth and treasury?

I did edit the second reply twice, but make sure all my closing parenthesis match up.

AFAIK wealth and treasury is the same. Treasury was used in EU3 and maybe still be in the code; wealth I think is what was implemented in CK2. Really I don't know. You could PM SolSara or Doomdark. I use wealth and scaled_wealth and it seems to work fine.

I did some testing on scaled_wealth and it seems to represent monthly income.

If you look in the patch notes, there is a mention in one of the 1.05 patches that a new trigger called yearly_income or something exists now, so it will only trigger events when your yearly income on the title creation tab is say 80 gold or something.

But in your case, I think that an AI Genoese republic should declare itself a 'crowned republic' when it has a certain level of wealth, ideally if you are implementing trade routes or something. Historically, by the end of the Crusades Genoa could pull off what you suggested with the decision, but after the wars with Venice and the events of 1453, she really became a vassal of Spain (Andrea Doria's alliance with Karl V to provide galleys in exchange for trade concessions--actually mortgaging the silver fleets to pay for it).

What would be cool is what I thought of, creating trade leagues like in EU3: Barcelona and later Aragon favored Pisa for a while then Genoa, and so you could give benefits like adding income to all the trading partners and aid in war, which was the big concern for kings.
 
Yeah I noticed Wiz using treasury instead of wealth in his mod, so I wasn't sure what the difference was. Makes sense.

num_of_dukes is the same as num_of_duke_titles? You seemed to be using them interchanging.

Sorry for the myriad of questions, just trying to understand the code itself rather than copy paste (one of the worst things you can do when coding!) :)

Certainly some interesting ideas you have there too. Outside of the scope of my own mod though but interesting nonetheless for future endeavors myself and a friend have in plans.

EDIT: This is what I went with:
Code:
		serene_republic_of_genoa = { 
			is_high_prio = yes
			potential = {    
				ai = yes    
				is_republic = yes    
				is_ruler = yes    
				has_landed_title = c_genoa    
				NOT = {        
					num_of_king_titles = 1    
				}
			}
			allow = {        
				OR = { 
					AND = { 
						scaled_wealth = 40.0 
						num_of_duke_titles = 2 
						NOT = { num_of_duke_titles = 4 }
					} 
					AND = {
						scaled_wealth = 30.0 
						num_of_duke_titles = 4 
						NOT = { num_of_duke_titles = 6 } 
					} 
					AND = { 
						num_of_duke_titles = 6 
						treasury = 350
					}
				} 
			}
			effect = {      
			character_event = { id = doge.0 days = 1 }      
			#add_trait = ambitious #for a bonus?
			}  
		}
 
Last edited:
You're right. It should be num_of_duke_titles. Hope it works.

I did ask Johan Monday on reddit about future content on republics, trade, etc., and he said they were thinking about it. apg already implemented trade goods (but no actual trade AFAIK), so you may want to see what he is planning for his new economic mod. Trade leagues could be an interesting thing, once a republic has certain technologies. Chatnoir17 released a Hanseatic League mod that's given me ideas for what to do with the Mediterranean which is much more my interest than the North Atlantic. You should be able to create a trading duchy or kingdom I think with the right focus. I was thinking of making modifiers like EU3's factions that would limit territorial expansion if you decide to focus on commerce, maybe giving the republican CBs and suppressing the usual feudal ones, with Barcelona in mind in particular.
 
Decision isn't working (I commented out the ai and republic bit to test, and while the decision appears as useable, clicking it doesn't do anything)

Here is the matching event as placed in its' own .txt file in /events
Code:
namespace = doge

character_event = {
	desc = "EVTDESC_doge.0"
	picture = GFX_evt_council

	is_triggered_only = yes

	option = {
		name = "EVTOPTA_doge.0" 
		prestige = 250
		piety = -100
		k_genoa = { grant_title = ROOT }
		if = {
			limit = { 
				num_of_duke_titles = 2 
				NOT = {
					num_of_duke_titles = 4 
				}
			}
			scaled_wealth = -40.0
		}
		if = {
			limit = { 
				num_of_duke_titles = 4 
				NOT = {
					num_of_duke_titles = 6 
				}
			}
			scaled_wealth = -30.0
		}
		if = {
			limit = { 
				num_of_duke_titles = 6 
			}
			treasury = -350.0
		}
	}
}

The decision fires, however it does not trigger the event.

EDIT: Figured it out. event id was missing
 
Last edited: