• 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.

unmerged(54749)

Second Lieutenant
Mar 11, 2006
128
0
www.bang-europe.org
is this event scripting correct?
I have tested it for a 5 years period with no result.

Code:
#############################
# Roman Legio to BYZA                 #
############################# 

# Legion I, 
character_event = {
	id = 211202
	
	picture = "event_mercenaries"

	trigger = { 
		condition = { type = ruler }
		condition = { type = gold value = 100 }
		condition = { type = prestige value = 50 }
		condition = { type = not value = { type = capital condition = { type = is_besieged } } }
	}

	mean_time_to_happen = {
		months = 200

		modifier = {
			condition = { type = ai }
			condition = { type = difficulty value = 2 }
			factor = 0.9
		}
		modifier = {
			condition = { type = ai }
			condition = { type = difficulty value = 3 }
			factor = 0.8
		}
		modifier = {
			condition = { type = ai }
			condition = { type = difficulty value = 4 }
			factor = 0.75
		}
		modifier = {
			condition = { type = not value = { type = prestige value = 100 } }
			factor = 2.0
		}
		modifier = {
			condition = { type = gold value = 1000 }
			factor = 0.8
		}
		modifier = {
			condition = { type = culture value = byzantine }
			factor = 0.5
		}
		modifier = {
			condition = { type = title value = BYZA }
			factor = 0.1        #reduced to fire the event
		}
		modifier = {
			condition = { type = not value = { type = title value = BYZA } }
			factor = 4.0
		}
		modifier = {
			condition = { type = atwar }
			factor = 0.1            #reduced to fire the event
		}
	}

	action_a = {#Let us raise a new Roman Legion!
		ai_chance = 70
		effect = { type = gold value = -100 }
		effect = { type = add_regiment
				tech_prov = 64
				culture = byzantine
				mercenaries = yes
				strength = {
					light_cav = 200
					heavy_cav = 50
					heavy_inf = 3000
					archers = 75
					pikemen = 25
					militia = 150
				}
		}
	}
	action_b = {#We have enough legions, more would means more taxes!
		ai_chance = 30
	}
}



[post=5663501]and same as [/post]
 
I can't see anything wrong with it, but I would suggest for testing to reduce the

Code:
mean_time_to_happen = {
		months = 200

To something very much lower, the event may fire now every 200 months or every 16 to 17 years.

Set it to, 1 month and then see if it fire's
 
I set MTTH at 2 months


I added this trigger condition to the previous code
Code:
 		condition = { type =  title value = BYZA } }

also hope it's correct to have this for the event in the event_text.csv

Code:
EVT_211202_NAME;Raise a new Legio for the Empire;;;;;;;;;;;;;X
ACTIONNAME211202A;Let us raise a new Roman Legion!;;;;;;;;;;;;;X
ACTIONNAME211202B;The Roman Empire is already well defended;;;;;;;;;;;;;X

anyway it WORKs