Institutions modding

From Europa Universalis 4 Wiki
Revision as of 01:11, 23 July 2018 by StanArio (talk | contribs) (Added a basic description of Institution modding.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Institutions

<name> = {
	penalty = <float> # factor of technology cost. penalty .5 is 50% maximum penalty

	bonus = {
	   <modifier(s)>
	}


	historical_start_date = <date>
	historical_start_province = <int>
    
        history = {
            <trigger>
        }
    
	
	can_start = {
	    <trigger>
	}
	start_chance = <int?>		#in 100 for when a province can_start
	
	on_start = <event id>
	
	can_embrace = {
            <trigger>
	}
    
    embracement_speed = {
		modifier = {
			factor = <float> #how fast is the institution embraced. percent per year?
			<condition>
		}
                .....

	}
	
	ai_will_do = { #Cost of embracing institution must be lower than this factor * last month's regular income, and higher if loans are needed. (Or it has a more than long term goal...)
		factor = <int?>
		
		modifier = {
			factor = <float>
			<condition>
		}
                .....
	}
}

Some observations on working with this. History must be set to some trigger that will not be true when the game begins to have the new institution not already be embraced.

The can_start trigger when satisfied will check the start_chance and if the roll on start chance passes the threshold, the on start event will be fired and the % embraced of the institution will be set to 100% in the province.(unsure if can_embrace is checked in this)