This has got to be easy: Printing assembly parts

The player is wearing a military uniform, which has the parts of jaunty hat, two lieutenant bars, and shoes. During a battle, the enemy strips off items from the player’s inventory, like amulets, coin pouches, his hat, one of his lieutenant bars, etc.
However, I cannot get a list of the parts of the uniform. Inventory only says ‘military uniform’. I was expecting a list of the uniform’s parts to be indented beneath military uniform.

I’ve seen this done somewhere in the docs, but can’t find it now. What’s the magic incantation for this? Any help is appreciated.

1 Like

Something like this could work:

Rule for printing inventory details of the military uniform:
	say " (comprising [list of things incorporated by the military uniform])[run paragraph on]".

(That’s just a list in parenthesis, rather than indented with each on a new line, but I think that’s only a little more work).


Yes, assemblies with incorporation - or making something “part of” something else - is considered to be permanent and thus doesn’t get called out by the parser as something to interact with. The player must infer it’s there (like they can assume a TV has an on/off switch) or it must be told in the parent object description “The TV has an on/off switch.”

@DeusIrae explained how to do it, you could also do something tricky like make a kind of wearable item that can be a supporter so bars and badges can be “on” the clothing and called out as such by the parser - just use an adjective to restrict what can be supported on a garment - a medal is “pinnable” but a framed painting is not - you can only put “pinnable” things on a wearable clothing item.

A thing can be pinnable.

Check putting something on the uniform:
    if the noun is not pinnable:
        say "That can't be attached to your uniform." instead.
1 Like

Yes, it was the incorprated word that I was missing. I also like the pinnable option as an alternative. The things on the uniform and the items within the inventory will change as the battle progresses. I call it a Strippable Battle: the player loses things during battle. When he is seen later (by an NPC), the player will look shredded from the battle.

Thanks to both of you.