more /root/Help/Get order of rooms from LGM.thread
2008-12-18 14:43:44tgmg
I am not sure where to post this as it is a plugin dev issue but technically it is using LGM so...

I am working on dolphin and trying to get the room order.

for (Room o : gmFile.rooms)
Orders them by id, but I need them ordered by the order of which they will be displayed in game (the order they are in the tree)

please help.
2008-12-18 19:51:57IsmAvatar
If you glance at the GM file format, you'll notice that resources are stored twice. Once in id order, and again in tree order. In order to get the tree order, you need to get the tree, not the resource list. You may find ResourceMenu to be a useful reference.

In fact, GM actually stores rooms 3 times - once for the resource list, once for the tree, and once for execution order. I discussed possibly holding a list for execution order with Clam and Quadduc, but they shot it down, since it gets overwritten by the compiler anyways, according to tree order.