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

TroelsPoul

Sergeant
68 Badges
Jun 9, 2005
83
0
  • Crusader Kings II: Horse Lords
  • Sengoku
  • Victoria 2
  • 500k Club
  • Cities: Skylines
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Pride of Nations
  • Mount & Blade: Warband
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Europa Universalis: Rome
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis 4: Emperor
  • Europa Universalis IV
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Deus Vult
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Divine Wind
  • Hearts of Iron II: Armageddon
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Hearts of Iron III
  • Heir to the Throne
  • Impire
  • Europa Universalis III Complete
  • Magicka
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
In the pre-revolution times I was anoyed at the machine-tools removing event preventing me from building the machine-tools factory... Now I decided to figure out how to remedy it, but can it be made more elegant?
Code:
		command = { type = resource which = cattle value = 1 } 		# Correcting for the minimum-change of 1 unit.
		command = { type = resource_perc which = cattle value = -67 } 	# -(1-Removed)
		command = { type = resource which = cattle value = 99965 } 	#99999-Max*Removed-1
		command = { type = resource which = cattle value = -99964.99 } 	#To prevent rounding errors
		command = { type = resource_perc which = cattle value = 67 } 	# (1-Removed)
		command = { type = resource which = cattle value = -1 }

This removes 33% of the cattle above 100...