My players’ characters are planning to create a base/series of systems to monitor their base. I want to have them ‘program’ the base. Some examples are: something to alert the residents of incoming hazards, remote activation of traps, systems their base might include (such as a magical shield) that cannot run constantly, and a way to control these systems from some form of central control room.

I’m unsure if there are any spells or magic items that allow for this, or if I need to homebrew one myself. Does anyone know if there are any that could be used in this manner?

  • 2
    \$\begingroup\$ Welcome to the site! Be sure to take the tour! Can you specify what you mean by “series of systems to monitor the base”? What does that entail? \$\endgroup\$ Commented Feb 21, 2019 at 16:03

3 Answers 3


Your main tool is the 2nd level Ritual Spell, Magic Mouth

I'm going to borrow the basics from The Arcane Programmer Guide, but I highly recommend reading the whole thing if you want some properly comprehensive rules on this subject.

The essence of how Arcane Programming works, RAW, in 5th edition D&D, is that the spell Magic Mouth has the following very important properties:

  • It lasts until being dispelled
  • The Mouth can activate in response to any stimuli it can observe in range (30 feet) to the limit of what you stipulate
  • Nearby Mouths can react to the behavior of other nearby mouths
  • It can say up to 25 words, at the volume of your choosing, delivered over up to 10 minutes.

Using these principles, we can build logic gates.

A Basic Example

For example, to build a Remote Alarm:

  • Set a mouth near the area you want to monitor, instruct it that if it sees someone enter through that area, it should, very quietly, say the letter "A".
  • Set a mouth no more than 30 feet away from the first mouth; if it hears the letter "A", say the letter "B" quietly
  • Set a mouth no more than 30 feet away from the last mouth; if it hears the letter "B", say the letter "C" quietly
  • Another mouth, says "A" in response to "C"
  • Another mouth, says "B" in response to "A"
  • And so on, and so forth, until you reach your destination
  • At the destination, A mouth should be put near a lever, and it should respond if two things are true:
    • The lever is pulled up, and
    • It hears a letter "A", "B", or "C" (base it on whatever was the last mouth you set)
  • It should shout, as loudly as possible, "INTRUDER!", 25 times, once every 24 seconds (4 rounds)

We've created an alarm system that also has a safety switch: if you want to allow someone through, you push the lever down, let them through, and then raise the lever again.

A Clock

We can improve. For example, create two Magic Mouths. Instruct one to, when it hears "I", say "O", and the other, upon hearing "O", say "I". Then, speak in the same tone used to create the second one, "I", and now, both mouths will alternate between saying "I" and "O" over and over, indefinitely. You now have a clock.

So the alarm system mentioned earlier? Scatter monitoring mouths around the base, and put clocks in range of them. Then, their trigger is

When it hears the letter "I" and sees someone in their presence, say "A"

So now the alarm will trigger indefinitely, unless shut off. No more 10 minute time limit!

Logic Gates

OR Gate. When it hears the letter "A", or the letter "B", speak the letter "C"
AND Gate. When it hears the letter "A" and the letter "B" within a second, speak the letter "C"
XOR Gate. When it hears the letter "A" or the letter "B", but not both within a second, speak the letter "C"
NOT Gate. If it goes one second without hearing the letter "A", speak the letter "B"

Magical Defenses

Glyph of Warding spells are one-time-use only, but if there's an intruder inside the base, that's probably the situation they're called for. Glyph of Warding spells are also able to take complex instructions, so long as they're still primed to react to someone, so for example:

Glyph of Warding (Hold Person). When someone walks into an area, and the letter "D" has been heard in the last second, activate.

So like with the Alarm example, set up a magic mouth (or several...) to repeat, while a lever is up, the letter "D", and only stop while the lever is down. You now have a Glyph of Warding that will only trigger so long as the safety is off.


The limitation on this spell pretty much comes down to the physical limitations of the spell (which can be easily circumvented) and your own personal creativity. So experiment and read the guide I linked above, and figure out what you can do.

  • 9
    \$\begingroup\$ The especially wonderful thing about this approach is the image of what an Arcane Computer would be like; a chamber full of constantly moving mouths, thousands of voices muttering incomprehensible code-words to each other. (Just be careful what you say when you're nearby!) \$\endgroup\$
    – Maxander
    Commented Feb 21, 2019 at 19:42
  • 7
    \$\begingroup\$ @Maxander Campaign Idea: "The Buffer Overflow" - An interloper has abused an exploit in the Imperial Dungeonframe to concatenate a text string in the form of a multi-syllabic command word which takes an entire ten minutes to pronounce, dropping 24 other words from magic memory and jumping the register to an op-phrase contained in otherwise benign incantation. You must descend into the pwn'd dungeon and manually Powerword: KILL -SIGKILL the errant process before it finishes dialing the Abyss and $SUMMONs 4.29 billion demons (the maximum permitted by an unsigned 32-bit integer). \$\endgroup\$
    – Eikre
    Commented Feb 21, 2019 at 21:22
  • 7
    \$\begingroup\$ Didn't someone say, "Any sufficiently advanced magic is indistinguishable from technology."? \$\endgroup\$
    – Jack
    Commented Feb 22, 2019 at 0:08

Magic Mouth

2nd-level illusion

Casting Time 1 minute (Ritual)

Range 30 feet

Components V S M (Honeycomb, 10gp jade dust; consumed)

Duration Until dispelled

An object that isn't carried or worn delivers a message you speak to it under circumstances you describe. The message must be 25 words or less and take no longer than 10 minutes to deliver, and the circumstances that trigger the delivery must be visual and/or audible and occur within 30 feet of the object.

If the object has no mouth, or anything that resembles a mouth, of its own, a magical mouth appears on the object to deliver the message in the exact voice you gave it.

You can choose for the spell to end on its first delivery or to remain indefinitely.

You can have magic mouths that trigger when it sees/hears intruders or many other circumstances. Most importantly, you can have one magic mouth trigger another, so you can just have them say yes/no based on triggers and create logic gates out of it.

Idea completely taken from this guide on Giants In The Playground

  • 2
    \$\begingroup\$ I hate to say it, but you probably need to rewrite the guide into this answer. Link rot is a concern and the answer should stand alone without needing to link to another source and be dependent on that. \$\endgroup\$
    – NotArch
    Commented Feb 21, 2019 at 16:38

If your setting has electronics or some form of "magitechnology", then you could consider a non-magical, electronic approach to programmable wire systems.

The 2015 Unearthed Arcana "Modern Magic" introduces hacking tools. A character with hacking tools could reasonably perform the programming tasks that you had in mind.

Hacking Tools. This kit contains the hardware and software necessary to allow access into most computer systems and electronic devices. Proficiency with hacking tools lets you add your proficiency bonus to any Intelligence checks you make to connect to or make use of a computer system or electronic device. The kit fits snugly in a backpack or toolbox.

Note that characters can make the Intelligence check to operate hacking tools, even if they don't have proficiency with the kit.

  • 1
    \$\begingroup\$ ...of course, this also requires that you have computer systems and electronic devices to access. \$\endgroup\$
    – Ben Barden
    Commented Feb 21, 2019 at 18:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .