Unique NPC Names

How would I make it possible to allow player’s to specify NPC names?
Also how do I store user input into variables?

Here is some code I currently have:

NPCOne Name is some text that varies. NPCOne Name is usually "Pearl". [Here is where I would like user to specify NPCOne Name value] NPCOne is a female person. The printed name of NPCOne is "[NPCOne Name]". [this does work] Understand "[NPCOne Name]" as NPCOne. [exception thrown here] [I need this last command so they can do actions on an NPC with the printed name rather than real name]

Right now the last line does not compile. I have tried switching “[NPCOne Name]” to “[NPCOne]” since [NPCOne] gives you printed name
but it gives a stack overflow exception.
Also, as you can see, I don’t know how to get user input and store it in NPCOne Name.

Any help is greatly appreciated :slight_smile:

Check example 408 “Fido” in the manual (ch. 8.3. in the Recipe Book or 19.8. in Writing with Inform).

Because the players’s ability to name things in the game fits perfectly under the “Vehicles, Animals, and Furniture” category. Of course.

It’s under animals because it’s about a dog, but because it’s about naming, it’s also cross-referenced from Adaptive Prose / 2.3. Using the Player’s Input.

Did you find somewhere else it should sensibly be linked from?

Well, I don’t have a dog.

But I did name my bicycle.


I’m not at my Mac right now, but I remember looking under “Using the Player’s Input” and not seeing it. But sometimes I miss things. I’ll check again tomorrow.

I see. It says “See Animals for a dog which the player can re-name.” I missed it because was scanning the list of examples, and Fido wasn’t listed there I didn’t go back to the text above, I just looked somewhere else.

So it’s a usability issue, not an organizational issue. Sort of. Personally I’d probably change Fido so it wasn’t an example about an animal, or place it directly in 2.3 and cross-reference it from 8.3.

I also looked for it under 9.12, “Cameras and Recording Devices,” thinking that’s where the featureless cubes from Spellbreaker/Balances might be found. I even searched the documentation for “burin” (not found) and “featureless cube” (found in “Depth,” which is listed in Recipe Book 10.5, “Volume, Height, Weight” – but it’s not a cube you can write on)