So there’s a room in my current story where the protagonist comes across a room with some tablet computers in it. Right now I have a hardcoded instead rule that says “You’ve already got one” whenever the player tries to take the tablet. But while having a tablet computer is the default state of the game, it is possible to lose the thing, in which case an unscrupulous player might decide to rob these poor suckers and have their hacker friend crack the account open. So I’ve made tablets a kind of thing to begin with, but now I’m stuck trying to figure out how to set up an instead rule where the player tries to take one of the tablets in the library, and if they already have one the game says “you’ve already got one” and if they haven’t then a tablet appears in their inventory without the object leaving the room. The actual object in the room is actually a bit of scenery that describes multiple tablets left lying about, and not all of them should vanish if the player takes just one.
Look at the Recipe Book section 10.3, and specifically example 124 “Extra Supplies”.
How do I edit that so it creates a new tablet computer in the player’s inventory instead of moving one? There are multiple tablet computers in the game I’m currently writing. Writing, for example, “now there is a tablet computer in the player’s inventory” gives me an error message.
If you want there to be more than tablet computer in the game, then you have to create more than one originally. Like, if you put your original tablet down in the bathroom, walk over to this other room, get a tablet from there, head back to the bathroom, and pick up your old tablet–now you have two tablets. The way to do this would be to create some number of tablets off-stage or in an off-stage room, say The Depository, and when the player takes the tablet then you can write “Now the player carries a random tablet in the Depository.” (And if there are no tablets in the Depository, tell them something about how they’ve taken too many already.)
In general, creating new objects from scratch while the game is running can’t be done without an extension (which does some heavy I6 hacking). And you almost never really need to do this. If you want a supply of something, just create a bunch of objects outside the area of play and move them into play as needed.
Alright, it’s working now. Thank you both.