Punctuation within object names

I was hoping to have an object in a game I’m working on include an exclamation mark in the name (both in the source and used as the printed name) and to then allow the player to include the exclamation mark when referencing the objection. The object I’m making is an album, called Slap! which uses the exclamation mark which is why I feel it’s important to try and include it. However when I have tried to create the object with Here is a thing called Slap! by Chumbawamba the exclamation mark is offset by a space creating the name Slap ! by Chumbawamba, meaning the player can reference the object as Slap, or Slap !, but not as Slap!. Is there an easy way to remedy this?

I think the easiest way to do this is to just strip the exclamation points from the player’s command so it doesn’t matter whether or not they include the ! – fortunately, there’s a built-in extension to make this easy (you also will probably want to tweak the printed name of the object to get the spacing right). Here’s what that might look like:

Include Basic Screen Effects by Emily Short.  

After reading a command: remove exclamation points.

The test chamber is a room. 

A thing called Slap! by Chumbawamba is in the Test Chamber.  The printed name is "Slap! by Chumbawamba".  
3 Likes