r/dndnext•
monkeyjay

A fun tool from my last session: let your players "write programs" for constructs.

Story

I asked a player to "write a three-line program" for a construct. It was not a very well-thought out program. Chaos ensued.

Background: I'm running a campaign in Eberron, where magic is closer to tech rather than spooky and scary. The PCs were heading into a cult temple to investigate some stuff.

Once inside the entrance (after successfully lying about being new recruits) they walked past two "Steel Defenders" (in the form of Pteranodons) which the guard implied they had to kiss on the head as they walked past (it's a stupid cult with stupid arbitrary rituals).

The artificer in the group wanted to try and "fix" one of them. So he rolled an insanely high Arcana check and I let him "boot up" the thing and follow him around but made it clear that it wasn't a new party member (there are 7 players in the party +he already has a steel defender) it was just hanging out.

The rest of the party went off to find red robes to change into, while the artificer really wanted to get the Pteranodon to imprint him as the new master so he could control it. So I got him to give me an Animal Handling (Intelligence) check and again he rolled really high. Prioritising fun over mechanics I said "Ok, you can program an algorithm into it, but you only have 3 lines". Bear in mind that there are progrmmers in our group, but this player was not one of them and is known for making interesting decisions in character so I had a feeling it wouldn't be the best program (I likely would not have offered this to one of the more program-inclined players).

The player was on the spot and came up with:

  • Look for someone in a red robe
  • When you hear the command "Get 'em"
  • Attack

As you can see, it's slightly... ambiguous, so other players (who were in character all putting on red robes) were trying to give advice during this, but they all let the artificer finish it.

Of course the first thing that happened was the Pteranodon locked eyes with a random cultist that was sweeping the halls, and one of the other players in another room loudly asked where the artificer was and could someone go and "get 'em". The pteranodon promptly started attacking the poor cultist, killing him in one hit. Another cultist saw this, panicked and ran off while someone dropped "get 'em" into a sentence again and they pteranodon tore off down the corridor into a dining hall. Chaos.

We left the session soon after but I wanted to share what I though a fun little "mini game" for the players with possibly hilarious consequences.

Posted Feb 5, 2021, 11:00 PM UTC

467
ElusivePanda•

I'm a developer myself, I kid you not, telling me I have 3 lines to get this construct to do what I want will have my brain spinning for hours wondering how I could've optimized the syntax here and there to save a couple char.

See: https://codegolf.stackexchange.com/

14
Enderking90•

see the obvious answer is to just code everything in a single line.

6

Time to bust out the old reliable 3 laws of robotics!

12
CNHardplace•

For the sake of humanity upvote this guy. ^

3
-Fyrebrand•

That's a very cool idea! It reminded me somewhat of the Gambit system in Final Fantasy XII, if you've ever played that. If you're unfamiliar, basically you can optionally "program" your party members to perform certain actions on defined targets, according to conditions you set ahead of time. Something like "Attack the closest enemy," "Use ranged Fire spell on flying enemy," or "Heal ally under 50% HP." Each statement has to be assigned an order of priority, so whatever condition is highest on the list, if it's triggered, they will always perform that action instead of any other.

If adapted for D&D, I think it would be fun to give players something like that to play around with temporarily. It's easy to goof up the logic and have an automaton mindlessly do something stupid due to oversights in the order of operations, so it would be good for a laugh. "Enemy" or "ally" is probably too vague of a target outside of a video game though, so maybe require the players to be more specific about that.

6
One_Mix_9101•

I'm stealing this for my modern campaign >:D

3
HexivaSihess•

Oh man, that sounds like so much fun, as a program-inclined player.

3