Seeing what a character is wearing

Of course you can keep asking questions! As tove said way back when, the whole coding part of the forum runs on people asking questions whenever they have them.

The main question is pretty straightforward! If you want to check if Jill has something in her inventory, you just use “has,” like “if Jill has an override chip:”. “Has” means that a person carries or wears it–see §13.4 of the documentation.

So you could write:

instead of taking Jill's control band when Jill is wearing Jill's control band:
	if Jill has an override chip:
		say "Jill placidly allows you to slide the control band off her arm.";
		now the player has Jill's control band;
	otherwise:
		say "Jill says, 'I can't let you take that!'"

Note that I changed the check to “Jill’s control band” specifically–otherwise that code will prevent you from taking any control band while Jill wears hers. Also I included a special clause to handle successfully taking the band, because the “can’t take people’s possessions rule” would block taking the band even if this rule didn’t.

(You’ll also need a rule to allow the player to give Jill the chip, since the “block giving rule” ordinarily causes people to refuse anything you try to give them!)

If you want that to apply to any control band Jill might be wearing, you could do something like this:

Instead of taking a control band (called the bracelet) when Jill wears the bracelet:
if Jill has an override chip:
	say "Jill placidly allows you to slide [the bracelet] off her arm.";
	now the player has the bracelet;
otherwise:
	say "Jill says, 'I can't let you take that!'"

Another thing is to be careful about when you’re defining things and kinds. In your code you’ve got “A control band is a kind of thing,” which is fine, and then “Jill’s band is a kind of control band,” which defines a special kind of control band called “Jill’s band” but doesn’t create any instances of it. Then when you say “Jill wears Jill’s control band” this creates a separate thing called “Jill’s control band,” which Inform doesn’t even realize is supposed to be one of those kinds! Probably you only need one of those kinds, and you might want to say
Jill wears a control band called Jill's control band.
or something like that.

So with arms and wearing things on them, I suspect that your instinct is correct that you don’t need this. It introduces a lot of complexity that doesn’t seem like it’s part of the game. It might be reasonable to have “arms” or “arm” be implemented as something the player can refer to, but unless you’ve got a very good reason for it there’s probably not anything to be gained by delving into what’s worn on what part of the body.

One possible way to do it would be:

Understand "arms" or "arm" as a person.

So “x arms” would get you the description of Jill. Or if you have arms as a separate kind of thing you could try:

Instead of examining arms: try examining a random person that incorporates the noun.

which would redirect the examining action, which might be enough. (You have to say “a random person that incorporates the noun” because Inform doesn’t know that there’s one and only one person incorporating any given pair of arms.) This should allow you to refer to “Jill’s arms,” because the arms get automatically named “Jill’s arms,” but I’m getting super weird results where if I type “x jill’s arms” it fails but if I type “x jill’s” it gives me a disambiguation result. I don’t know what’s up with that. Anyway, it’s almost certainly best not to get into details with the arms.

(If you do want to look into wearing things on things, you can look at the “What Not To Wear” example in the documentation, and Shadow Wolf’s Layered Garments extension if you want to get super elaborate. Which you probably don’t!