I6: player.description ...?


In my current game project, at the beginning of the game, I set a custom player.description. Later in the game, there are multiple items of clothing one can put on, none of which are exclusive – say, a hat, a coat, and a pair of shoes.

How do I update player.description to reflect what the player is currently wearing?

I can’t simply update/overwrite the description each time the player puts on a piece of clothing because it would overwrite the description and not accurately reflect other things that are being worn.

After checking the manual, I also can’t seem to append/concatenate text. What I had in mind was a daemon that would append updates to the player’s description. For example (pseudo code): “You look great! You are wearing” if (hat has worn) “a spiffy hat”, if (gloves has worn) “some nice gloves” … etc. I could easily do this with print statements, but not with the description.

The forum won’t let me search for either “player” or “description” (too common) and I’ve kind of hit a wall here. Any suggestions?

Thanks in advance!

The description can be a routine:

[ PlayerDescription;
  ! Print out whatever you want the player to look like
[ Initialise;
  player.description = PlayerDescription;
  ! etc

The description can be a method. It doesn’t have to be text. Here’s an actual description of an NPC from an unfinished game I’m intermittently working on:

description [; print "Fawn's beauty is of an ethereal nature. At times her delicate features seem almost translucent. Her clothing is suitable for hiking"; if ((dark_glasses in fawn) && (pink_scarf in fawn)) print ", although the dark glasses and the pink scarf are more in the category of fashion accessories"; if (nautilus in fawn) print ". She's holding the nautilus rather tightly in both hands"; "."; ],
The final line, with the bare period, always runs. That’s why there’s no period after the first sentence. This is a pretty standard I6 technique. You may know it already.

Awesome, both you guys nailed it. I went with Cas’ solution just because it fit the structure I already had in place. Thanks for the quick response and the good advice! I am learning something every day about Inform!