Page 1 of 1

Unit id

Posted: Wed Apr 29, 2020 5:37 pm
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)

Re: Unit id

Posted: Wed Apr 29, 2020 5:50 pm
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)

Re: Unit id

Posted: Wed Apr 29, 2020 7:12 pm
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.