Hi everyone! I’m brand new to Inform 7 and have had some great success getting started with my game. However, I’ve encountered my first major stumbling block and the documentation has not gifted me an answer, so I have to turn to you guys.
My game involves several people that wear identical nondescript clothing items. That is: Joe wears a shirt, Chris wears a shirt, and Bob wears a shirt. Their shirts share the same properties and names. Joe does not wear “Joe’s shirt”; he just wears “shirt”. I want the player to be able to collect and stack the nondescript items for the player’s own use.
I am encountering an issue when trying to remove pieces of clothing from these NPCs. Without fail, using
undress <clothing> from <NPC> will only work on the first NPC brought into the scene. Otherwise, it will act as if the clothing isn’t there. I suspect this has to do with the clothing being nondescript and not unique.
Here is a test script demonstrating the problem:
"Garment Test" by Ukai The Barracks is a room. The player is in the Barracks. [Garments] A garment is a kind of thing. A garment is wearable. A garment can be head-worn, face-worn, torso-worn, legs-worn, groin-worn, hand-worn, or feet-worn. A flak jacket is a kind of garment. A flak jacket is torso-worn. Understand "flak jacket", "jacket", and "flak vest" as flak jacket. The flak pants are a kind of garment. The flak pants are legs-worn. Understand "flak pants", "pants", and "trousers" as flak pants. A flak helmet is a kind of garment. A flak helmet is head-worn. Understand "flak helmet", "helmet", and "flak hat" as flak helmet. [People] Solid Snake is a man in the barracks. "Solid Snake is ready for battle." The description of Solid Snake is "He is really good at hiding in boxes." Solid Snake is wearing a flak jacket, flak pants, and a flak helmet. Master Chief is a man in the barracks. "Master Chief is ready for battle." The description of Master Chief is "This guy is tough." Master Chief is wearing a flak jacket, flak pants, and a flak helmet. [Undressing] Undressing is an action applying to two touchable things. Understand "undress [something] from [someone]" as undressing. Check undressing: if the noun is not wearable: say "It's not clothing. You can't undress it." instead; else if the second noun is not wearing the noun: say "[the second noun] isn't wearing that." instead. Carry out undressing: if the noun is wearable: say "You undress his [noun]."; now the noun is nowhere.
And here is the issue in action:
Garment Test An Interactive Fiction by Ukai Release 1 / Serial number 230430 / Inform 7 v10.1.2 / D Barracks Solid Snake is ready for battle. Master Chief is ready for battle. >showme Barracks - room yourself - person Solid Snake - man flak jacket (worn) - flak jacket flak pants (worn) - flak pants flak helmet (worn) - flak helmet Master Chief - man flak jacket (worn) - flak jacket flak pants (worn) - flak pants flak helmet (worn) - flak helmet >actions Actions listing on. >undress flak pants from chief [undressing the flak pants] Master Chief isn't wearing that. [undressing the flak pants - failed the Check undressing] >undress flak pants from snake [undressing the flak pants] You undress his flak pants. [undressing the flak pants - succeeded] >
As you can see, we cannot remove the flak pants from Master Chief because he is not the first actor in the scene. Solid Snake is, and thus we have no issues removing his pants.
Any suggestions are appreciated!