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

Denniss

CORE developer
38 Badges
Jun 15, 2005
3.371
43
www.matrixgames.com
  • Mount & Blade: Warband
  • Victoria: Revolutions
  • Semper Fi
  • Sword of the Stars II
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • 500k Club
  • Europa Universalis IV: Pre-order
  • Rise of Prussia
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Common Sense
  • Achtung Panzer
  • Surviving Mars
  • Age of Wonders III
  • Surviving Mars: Digital Deluxe Edition
  • Shadowrun Returns
  • Surviving Mars: First Colony Edition
  • Surviving Mars: First Colony Edition
  • Deus Vult
  • Cities in Motion
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Commander: Conquest of the Americas
  • Darkest Hour
  • Arsenal of Democracy
  • East India Company Collection
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Majesty 2
When using delete_unit or switch_allegiance with -1/-2/-3 and percentage you always have some display problems with the event messages. Some other event messages are duplicated and you always get the message "our army" has been deleted/switched sides.

Just start a 1936 game as FRA and fire event 2800 (VIC creation) to see the problem, event deleted whole army/airforce and switches 90% of the navy to VIC.

AFAIR there's no message problem without a percentage i.e. just a single division/unit is affected.


BTW should switch_allegiance affect just single divisions or whole armies/fleets? When used with percentage it seems to switch whole armies/fleets, don't remember what happens without percentage.
 
Upvote 0
I triggered the event by console and I did not see any problem. It seems to work as intended. It deletes 100% of land and air units and 90% of the navy is given to Vichy

# Delete the original French Army and Airforce
command = { type = delete_unit which = -1 when = 100 }
command = { type = delete_unit which = -3 when = 100 }

# French Navy Switch mostly to Vichy
command = { type = switch_allegiance which = -2 where = VIC when = 90 }

If when=0 then a single division is deleted/switched allegiance, when=x , x% of the units are deleted/switched.
 
Events do work but I said the event messages are borked.
Hover with your cursor over the historical option a and you'll see 2x "Grant Independence to Vichy France" and 2x "100% of our army corps will disband". What's missing is the disbanding of 100% air force and the switch allegiance message for the navy.

The same event but original delete_unit and switch_allegiance replaced with
Code:
		command = { type = delete_unit which = -1 when = 50 }
		command = { type = delete_unit which = -2 when = 50 }
		command = { type = delete_unit which = -3 when = 50 }
		command = { type = switch_allegiance which = -1 where = VIC when = 50 }
		command = { type = switch_allegiance which = -2 where = VIC when = 50 }
		command = { type = switch_allegiance which = -3 where = VIC when = 50 }
I get 3x vichy independence, 3x 50% of army corps disband and a single 50% army corps join VIC.