UPDATE: 2019 and I thought I'd revisit this (still unresolved) situation.
Q: Does anyone know / can explain the relationship between 'the order that bones are made in Blender', and 'their bone numbers' (after export to IQM)?
OBJECTIVE: To control the legs and torso seperately, so the legs can be animating slower (eg if walking slower), while having the upper body animate 'normally'. The way to do this is using 'bone range' in skel_build(). This means we need the bone numbers of 'the lower part of the body' to be all contiguous.
Having failed to change the bone numbers of my existing player model during export, I made some minimalist test armatures, to find out the relationship between 'the order that you make the bones in Blender', and 'their number after export'. But I still can't figure it out.
I tried making the skeleton in different orders, eg
1. starting at the foot, going up by extruding at the bone's tail
2. starting at the head, going down by extruding at the bone's head
It seems that the bones (as exported via the iqm exporter) are not numbered 'in the order that you made the bones in Blender', and while I'm sure there's some logic to it, I can't see it. I'd post details on my findings if it helps, but I thought I'd check out if anyone knows a way to 'do it right in Blender', so you don't need to reorder bones later.