I6: Forcing inventory order

Is there a way to make certain objects always appear before others in the player’s inventory, regardless of the order in which they’re moved to the player? I ask because when the player checks their inventory after obtaining a toolbelt with which to hold assorted things, they get this:

Just a nitpick, but the syntax makes it look (to some) like the janitor’s uniform is inside the tool belt, while of course it’s not. I experimented around with the various "_BIT"s for listing nouns, but none of them give the effect I’m looking for. I want the player’s uniform to come first before all other worn objects, so it looks more like:

How can this be achieved?

I’m not sure, but did you try moving objects around? I think I’ve read this affects the order in which they are displayed. So, I would try to either move the uniform to void and back to player, or do so with everything but the uniform, and see if it has any effects.

I tried that first, but it just results in the same outcome since the routines all happen at the same time and not in any particular order.

You can specify the order of items in an inventory listing by giving every object a list_together.

[from the DM4, pg 213]

Constant KEY_GROUP = 1;

Object -> -> brass_key “small brass key”
with …
list_together KEY_GROUP;

If there’s only one object in a group, that’s fine.

That didn’t do it, either. I want the player’s uniform to always come before the other clothing items, and giving it its own group didn’t do that. Is there a way to have Inform do reverse inventory order, where the most order of items goes from least- to most-recently-picked-up, instead of vice versa like usual? My game has the InvSub replaced with the Lurking Horror-style two-sentence inventory, if this helps.

I think a solution can be worked out using WORKFLAG_BIT. First print the uniform’s name. Then give all of the player’s possession except the uniform the workflag attribute, and make a list of those possessions using WORKFLAG_BIT.

Ooh, that might do it! I’m honestly too beat to try it out right now, but I’ll test it tomorrow. Thanks in advance.