Functions like getAllUniqueIds(typeId) which returns an array would be quite useful (if typeId=0 you get all unique ids on the field).
Actually the only way I found is here
General
Ideas for CS2D - READ THE FIRST POST (OP)!
Weapon balance.
saint- has written
1uP: how many of them is active though?
Shrepard: bots are scripted in Lua, you can improve them yourself (or search in the file archive for improved bots)