How to make a backdrop or something invisible/hidden.

Hey everyone.

I was wondering, since something being visible or invisible is a definition in the standard rules, and not a “state” liked described or undescribed. How can i make something universally “invisible” to the player?

Say i have a backdrop, that i don’t want referenced when the player tries to examine something with a similar name, because the player isen’t aware of it yet. How can i make it so the player only can interact with that backdrop, once it is visible to him?

One thing is making the player unable to interact with it, but what i want is for the backdrop to be completely gone from players vision, as in not there at all, but everywhere when the player learns about it.

This is what i tried, but the player still gets the prompt: “Which do you mean…” once the player tries to examine something with a similar name.

A magical-spell is a kind of backdrop.
A magical-spell can be learned or unlearned.
A magical-spell is usually unlearned.

Every turn:
	repeat with knowledge running through all magical-spells:
		if knowledge is unlearned:
			now knowledge is undescribed;
			now knowledge is unmarked for listing;
			now knowledge is unmentioned;
		otherwise:
			now knowledge is marked for listing;
			now knowledge is mentioned;
			now knowledge is described.
			

Does the player mean examining something that is a backdrop: it is very unlikely.
Does the player mean taking something that is a backdrop: it is very unlikely.
Does the player mean casting something that is a backdrop: it is likely.

Thanks for the help.

If you don’t want the player to interact with it at all, remove it from play. Put it back when the player learns about it. That’s by far the easiest plan.

If you just want to omit it from room descriptions, make it scenery. (Or undescribed, but that’s rarely helpful.)

The every turn rule you wrote is really not going to help anything. There’s no point to setting an object undescribed every turn – that flag sticks until you change it. And the “unmarked for listing” and “unmentioned” flags are only used inside the looking action or other object-listing activities. It’s meaningless to set them every turn.

As zarf says, the easiest is to move it into play when the player learns of it.
Another alternative is to make it privately-named, with conditional understand clauses.

Less reliable, because it can show up in “all” and disambiguation. By the time you’ve tested all that out, it’s a lot of code.

Hm, I didn’t know that. Should it show up in disambiguation when there are no tokens to understand it by?

If the player types a verb that requires a noun, with no noun specified, the game can still sometimes try to fill one in. This is often a good thing (“TAKE” with one thing present takes it) but can also reveal even privately-named things.