Rebel modding

From Europa Universalis 4 Wiki
Jump to navigation Jump to search

File format[edit | edit source]

The rebel types are found in /Europa Universalis IV/common/rebel_types/*.txt

# All rebels in province scope
# For siege_won_trigger, siege_won_effect
# FROM = owner
# ROOT = province
# For Other
# FROM = owner
# ROOT = Homecountry
<rebel_type> = {

	color = { R G B }

	area = <nation/nation_rebel_tag/nation_religion>
	government = <government type>	# Government desired. monarchy/republic/theocracy/anti/any
	religion = <religion>
	defection = <culture/culture_group/religion/any/none>	# Will not defect.
	defect_delay = <float>			# Held provinces will auto-defect after 18 months, regardless of accept/enforce demands.
	independence = <culture/culture_group/religion/any/none>	#What will gain independence (note: ai does not seem to get these rebels if not set to 'none')
	unit_transfer = <bool>			#yes/no | Units switch allegiance after enforcing demands.
	gfx_type = <culture_province/culture_owner>
	will_relocate = <bool>			#yes/no | Units will relocate if they have sieged all provinces nearby and has to move over sea.
	
	resilient = <bool>			#yes/no | Disbands on retreat
	reinforcing = <bool>			#yes/no | whether the rebels reinforce themselves
	general = <bool>			#yes/no | whether they have a general
	smart = <bool>			#yes/no | Does, or does not assault forts, tactically withdraw from battle, etc.
	
	artillery = <float> 	#decimal percentage of army makeup
	infantry = <float>
	cavalry = <float>
	
	morale = <float>

	# Possible handle actions
	handle_action_negotiate = <bool>			#yes/no
	handle_action_stability = <bool>			#yes/no
	handle_action_build_core = <bool>			#yes/no
	handle_action_send_missionary = <bool>			#yes/no	
	
	# The rebel type with the highest modifier for this province gets picked
	spawn_chance = {
		factor = 1
		modifier = {
			factor = 0.5
			<triggers>
		}
	}
 
 	# This is checked for EACH province in the Area of Operations
	movement_evaluation = {
		factor = 1
		modifier = {
			factor = 0.5
			<triggers>
		}
	}
 
 	# Province Scope
 	siege_won_trigger = {
		<trigger>
 	}
	siege_won_effect = {
		<effects>
	}
	
	# Country scope
	can_negotiate_trigger = {	#whether the player is allowed to negotiate
		<triggers>
	}
	
	# Country scope
	can_enforce_trigger = {         #any 'demands_enforced_effect' effect will not run unless the trigger evaluates to true
		<trigger>
	}
	
	# Localisation for their demands
	demands_description = "<localisation>"
	
	# Country Scope	
	demands_enforced_effect = {
		<effects>
	}
}

Localisation[edit | edit source]

New rebel types need the following localisation keys defined:

<rebel_type>_name: "<name of the rebels>"
<rebel_type>_army: "<name of the rebels> Army"
<demands_description>: "<very short description of their demands, like Increased Privileges>"
<demands_description>_desc: "<detailed description of their demands>"
Documentation EffectsTriggersModifiersScopesVariablesLocalisationCustomizable localizationRun files
Scripting Scripted functionAdvisorsAgesBookmarksBuildingsCasus belliColonial regionsCountriesCultureDecisionsDefinesDiplomatic actionsDisastersEmpire of ChinaEstatesEventsFactionsGovernmentGreat projectsHistoryHoly Roman EmpireIdea groupsInstitutionsMercenariesMissionsModifiersNation designerOn ActionsParliamentPeace treatiesPoliciesRebel typesReligionSubject typesTechnologyTrade companiesTrade goodsUnits
Map MapNation designerRandom New WorldTrade nodes
Graphics 3D ModelsInterfaceGraphical AssetsFontsParticlesShadersUnit models
Audio MusicSound
Other Console commandsChecksumJoroDox mod making toolMod structureTroubleshootingThe ValidatorRun files
Guides Adding a provinceSave-game editingScripting Tutorial