• 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.720
352
  • 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
}
 
Ahh ok, so two different countries can have units with the same IDs?
 
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:
 
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.