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

Mr_B0narpte

Field Marshal
12 Badges
Mar 15, 2009
4.687
324
  • Arsenal of Democracy
  • Cities in Motion
  • Darkest Hour
  • For The Glory
  • Hearts of Iron III
  • Rome Gold
  • Victoria 2
  • Rome: Vae Victis
  • 500k Club
  • Pride of Nations
  • Rise of Prussia
  • Hearts of Iron IV Sign-up
As in

landunit =
{ id = { type = 12000 id = 1 }
name = "I Cuerpo de Ejército"
location = 667 # Buenos Aires
division =
{ id = { type = 12000 id = 5 }
name = "Supreme HQ"
type = hq
model = 0
strength = 100
}
 

Mr_B0narpte

Field Marshal
12 Badges
Mar 15, 2009
4.687
324
  • Arsenal of Democracy
  • Cities in Motion
  • Darkest Hour
  • For The Glory
  • Hearts of Iron III
  • Rome Gold
  • Victoria 2
  • Rome: Vae Victis
  • 500k Club
  • Pride of Nations
  • Rise of Prussia
  • Hearts of Iron IV Sign-up
Ahh ok, so two different countries can have units with the same IDs?
 

Pang Bingxun

Field Marshal
2 Badges
Nov 22, 2011
5.596
185
  • Arsenal of Democracy
  • 500k Club
Ahh ok, so two different countries can have units with the same IDs?

No, please not. The type is different for each counry. At least it should be.

Any ID that the country in question doesent already have, so in other words, check what its highest numbered ID is, anything above that should be free.

That is a relatively foolproof solution. There are however cases where many ids below the highest one are not used. Sometimes there is a system, sometimes there is not. :mad:
 

alufdufe

Major
79 Badges
Aug 15, 2005
505
0
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • 500k Club
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Steel Division: Normandy 44
  • Europa Universalis IV: Mandate of Heaven
  • Knights of Honor
  • Europa Universalis IV: Third Rome
  • Stellaris: Nemesis
  • Europa Universalis IV: Art of War
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • 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: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Hearts of Iron Anthology
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III Collection
  • Europa Universalis IV: Res Publica
  • Rome Gold
  • Semper Fi
Each unit is defined by both the type and ID. You can have duplicate ID #'s, but there can only be 1 of each combination of type and ID.
In the later campaign games some countries use multiple types. You might have one for land units, one for ships, and one for air units.
I find the highest number for the type and start numbering from there. You can use the holes, but invariably I'll find 4 available numbers when I need 5.