r/hoi4•
YWAK98alum

Fate of Yugoslavia: Help Reading Event File Syntax?

Question

So I'm trying to get a little more systematic about reading HOI4 event files, but I'm really struggling with it. Specifically trying to learn via looking at the Fate of Yugoslavia event(s) triggered by the German focus tree:

# Fate of Yugoslavia

country_event = {

id = yugoslavia.7

title = germany.98.t

desc = {

  text = yugoslavia.7.d

}

picture = GFX_report_event_german_inspect_troops

is_triggered_only = yes

#Nope

option = {

  name = yugoslavia.7.a
  ai\_chance = { 
  	factor = 5
  }
  GER = { country\_event = { id = germany.111 days = 1 } 
  	effect\_tooltip = {

create_wargoal = {

type = annex_everything

target = YUG

}

  	}
  }

}

#Alrighty

option = {

  name = yugoslavia.7.b
  ai\_chance = { 
  	factor = 10
  	modifier = {

factor = 0

is_puppet = yes

  	}
  	modifier = {

factor = 0

any_other_country = {

is_major = yes

OR = {

has_guaranteed = YUG

is_in_faction_with = YUG

}

}

  	}
  }
  custom\_effect\_tooltip = GAME\_OVER\_TT
  GER = {
  	add\_political\_power = -75		
  	add\_named\_threat = { threat = 5 name = GER\_fate\_of\_yugoslavia }
  	every\_country = {

limit = {

is_subject_of = YUG

OR = {

original_tag = BOS

original_tag = HRZ

original_tag = CRO

original_tag = MAC

original_tag = SLV

original_tag = KOS

original_tag = MNT

original_tag = HUN

original_tag = ROM

}

}

GER = { annex_country = { target = PREV transfer_troops = no } }

  	}
  	annex\_country = { target = YUG transfer\_troops = no }
  	hidden\_effect = {

set_global_flag = GER_fate_of_yugoslavia_annex_YUG

news_event = { hours = 6 id = news.169 }

  	}
  	GER\_yugoslavia\_modify\_mefo\_bills\_or\_economy\_of\_conquest = yes
  	GER\_seize\_gold\_reserves\_in\_europe\_peacefully = yes
  	add\_to\_variable = { var = GER\_mefo\_bill\_counter value = -10 }
  }

}

}

# Fate of Yugoslavia

country_event = {

id = yugoslavia.8

title = germany.98.t

desc = {

  text = yugoslavia.8.d

}

picture = GFX_report_event_german_inspect_troops

is_triggered_only = yes

#Fuck that

option = {

  name = yugoslavia.8.a
  ai\_chance = { 
  	factor = 10
  }
  GER = { country\_event = { id = germany.111 days = 1 } 
  	effect\_tooltip = {

create_wargoal = {

type = annex_everything

target = YUG

}

  	}
  }

}

#Sure thing

option = {

  name = yugoslavia.8.b
  ai\_chance = {
  	factor = 10
  	modifier = {

factor = 0

any_other_country = {

is_major = yes

OR = {

has_guaranteed = YUG

is_in_faction_with = YUG

}

}

  	}
  	modifier = {

factor = 0

is_puppet = yes

  	} 
  }
  trigger = { 
  	YUG = { 

OR = {

owns_state = 103

owns_state = 104

owns_state = 109

owns_state = 804

}

  	} 
  }
  GER = {		
  	add\_political\_power = -25
  	add\_named\_threat = { threat = 3 name = GER\_fate\_of\_yugoslavia }
  	CRO = {

if = {

limit = { YUG = { owns_state = 103 } }

transfer_state = 103

}

if = {

limit = { YUG = { owns_state = 104 } }

transfer_state = 104

}

if = {

limit = { YUG = { owns_state = 109 } }

transfer_state = 109

}

if = {

limit = { YUG = { owns_state = 804 } }

transfer_state = 804

}

  	}
  	puppet = CRO
  	annex\_country = { target = YUG transfer\_troops = no }
  	hidden\_effect = {

set_global_flag = GER_fate_of_yugoslavia_puppet_CRO_annex_YUG

news_event = { hours = 6 id = news.169 }

  	}
  	GER\_yugoslavia\_modify\_mefo\_bills\_or\_economy\_of\_conquest = yes
  	GER\_seize\_gold\_reserves\_in\_europe\_peacefully = yes
  	add\_to\_variable = { var = GER\_mefo\_bill\_counter value = -10 }
  }

}

}

# Fate of Yugoslavia

country_event = {

id = yugoslavia.9

title = germany.98.t

desc = {

  text = yugoslavia.9.d

}

picture = GFX_report_event_german_inspect_troops

is_triggered_only = yes

#No way

option = {

  name = yugoslavia.9.a
  ai\_chance = { factor = 2 }
  GER = { country\_event = { id = germany.111 days = 1 } 
  	effect\_tooltip = {

create_wargoal = {

type = annex_everything

target = YUG

}

  	}
  }

}

#Seems fair

option = {

  name = yugoslavia.9.b
  ai\_chance = { 
  	factor = 10
  	modifier = {

factor = 0

any_other_country = {

is_major = yes

OR = {

has_guaranteed = YUG

is_in_faction_with = YUG

}

}

  	}
  	modifier = {

factor = 0

is_puppet = yes

  	} 
  }
  GER = {
  	add\_named\_threat = { threat = 2 name = GER\_fate\_of\_yugoslavia }
  	CRO = {

if = {

limit = { YUG = { owns_state = 103 } }

transfer_state = 103

}

if = {

limit = { YUG = { owns_state = 104 } }

transfer_state = 104

}

if = {

limit = { YUG = { owns_state = 109 } }

transfer_state = 109

}

if = {

limit = { YUG = { owns_state = 804 } }

transfer_state = 804

}

  	}
  	puppet = CRO
  	puppet = YUG
  	hidden\_effect = {

set_global_flag = GER_fate_of_yugoslavia_puppet_CRO_YUG

news_event = { hours = 6 id = news.169 }

  	}
  }

}

}

So for example, in this string here:

ai_chance = {

  	factor = 10
  	modifier = {

factor = 0

any_other_country = {

is_major = yes

OR = {

has_guaranteed = YUG

is_in_faction_with = YUG

}

}

  	}
  	modifier = {

factor = 0

is_puppet = yes

I gather that the "factor = 0" syntax means that the chance drops to 0 if any other major country has guaranteed or is in a faction with Yugoslavia. But the base "factor" of 10 ... does that simply mean it only has a 10% chance of happing anyway? And if so, is that flat? Is there any way to determine whether diplomatic pressure, relations, the existence of a NAP, or anything else modifies the chance? What would I be looking for to see that? Is it maybe even in a completely different file?

More generally, trying to learn to read this syntax better. Specifically, trying to figure out what does or doesn't influence the chance other than faction or major guarantees killing it completely.

Posted Nov 14, 2025, 1:49 PM UTC

32
Loading comments…