[RPG] Can Programmed Illusion respond to its environs, or must it perform the same thing every time

dnd-5eillusionspells

Programmed Illusion:

You create an illusion of an object, a creature, or some other visible phenomenon within range that activates when a specific condition occurs. The illusion is imperceptible until then. It must be no larger than a 30-foot cube, and you decide when you cast the spell how the illusion behaves and what sounds it makes. This scripted performance can last up to 5 minutes.
When the condition you specify occurs, the illusion springs into existence and performs in the manner you described. Once the illusion finishes performing, it disappears and remains dormant for 10 minutes. After this time, the illusion can be activated again.
The triggering condition can be as general or as detailed as you like, though it must be based on visual or audible conditions that occur within 30 feet of the area. For example, you could create an illusion of yourself to appear and warn off others who attempt to open a trapped door, or you could set the illusion to trigger only when a creature says the correct word or phrase.
Physical interaction with the image reveals it to be an illusion, because things can pass through it. A creature that uses its action to examine the image can determine that it is an illusion with a successful Intelligence (Investigation) check against your spell save DC. If a creature discerns the illusion for what it is, the creature can see through the image, and any noise it makes sounds hollow to the creature.

I suppose this really revolves around what the spell description means by "scripted performance". Is this a script as in like a play, where it is acted out verbatim from start to finish, no matter how it is triggered? Or is it "scripted" in the sense of a bash script, where parameters can be specified such that it can respond to the environment? Can you have a conversation with this illusion? Can you have it refer to the weather or the time of day?

The thespian interpretation is supported by the fact that it calls it a "performance".

The computational interpretation is supported by the fact that the spell is called "programmed illusion". Also, the major image spell is able to carry on conversations, so it would seem silly to not allow programmed illusion to do that as well.

My instinct is that the spell would be worded differently if it was intended to be able to respond to the environment, but I am not sure.

Which is it?

Best Answer

Like a performance script

The program referred to is just an ordered set of instructions. This is like a play and a bash script—in that bash with no input statements or system calls can’t have any variation in execution.

Programmed illusion has no allowance for interactions or inputs after the trigger that begins it, and no provision for detecting variations in its trigger either. It can only execute its pre-programmed visuals and sounds, insensitive to conditions, since it has no flow control features.

The real virtue of programmed illusion—and the meaning of its name—is that it can do things without the caster’s ongoing direction. Other illusions are generally static or require the caster to be an active puppeteer. The “program” in programmed illusion allows for a non-static illusion that can execute a complex series of activities without the involvement of the caster, something new in an illusionist’s arsenal.