Unit id

Post Reply
User avatar
Maxbirykov2004
Posts: 1022
Joined: Mon Mar 30, 2020 12:50 pm
Location: Belarus

Unit id

Post by Maxbirykov2004 »

After Stratego posted some information with units id, i think to do this topic. My idea is to do Data base to unit id.
English units have 100 number (100-199)
Spanish 200 number (200-299)
And other faction units have they numbers...
About universal (buildings, artillery, ships) i think about numbers 000 to buildings (001-99.). To ships 1000 (1001-1099). To artillery 1100 (1100-1199)
Last edited by Maxbirykov2004 on Wed Apr 29, 2020 6:45 pm, edited 6 times in total.
User avatar
L4cus
Posts: 2358
Joined: Fri Jan 31, 2020 7:51 pm
Location: Perú

Re: Unit id

Post by L4cus »

What i do is change some characteristics of existing json without changing the id of them, changing the buildlist too(all units able to produce)
Extra ecclesiam nulla salus...
AOD, a new variant...
viewforum.php?f=230
Stratego (dev)
Site Admin
Posts: 15753
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit id

Post by Stratego (dev) »

After Stratego posted some information with units id, i think to do this topic. My idea is to do Data base to unit id.
English units have 100 number (100-199)
Spanish 200 number (200-299)
2 things
1. 100 unit range will not be enough for all english units - 1000 at minimum per nation imho.
2. i thought the same way as you do and made such ID intervals in all my games (aof/aos/aow) BUT! turns out there is absolutely NO ADVANTAGE to have these theroetical ID ranges, moreover it was more HARD to put in a new unit to the end because i had to find the end of each section.

so i suggest giving ID-s as they come starting from eg. 100, regardless of the unit nation, unit type, even TECHS can be mixed with ID-s.

but feel free to choose any - only one restriction: ID-s must be between 0..2 147 482 , bigger ID will cause crashes.
Post Reply

Return to “units”