Generates sequential four-character object IDs from a starting rawcode. Does not check existing map IDs for collisions; keep generator ranges separate from other objects. The starting ID is a seed: next() advances before returning an ID.
let ids = new IdGenerator('x000')
let firstId = ids.next()
Use one shared generator for a range, rather than repeatedly constructing generators with the same seed.
public constant UNIT_ID_GEN = new IdGenerator('x000', false)public constant HERO_ID_GEN = new IdGenerator('HM00', false)public constant ABIL_ID_GEN = new IdGenerator('AM00')Declaration shown above.
Configurable. Override it in your map’s config package.
public constant BUFF_ID_GEN = new IdGenerator('BM00', false)public constant ITEM_ID_GEN = new IdGenerator('IM00', false)public constant UPGD_ID_GEN = new IdGenerator('RM00', false)