Make a random fantasy generator in Powershell

Got an idea for a fantasy campaign when a friend complained about lazy opinion pieces masquerading  as hard-hitting social criticism in the media.

take any opinion and add one of the following phrases for instant keks:

  • “and that’s ok”
  • “and here’s why”
  • “and this is why it should be”
  • “and it’s beautiful”
  • “and that’s a good thing

you now have the title of your article

That listicle automatically triggered my autism into a fantasy parody. I’d call the game Progressives and Pozzitives or PnP. You’d get a mission every week from a government official along with a stack of gold and your goal is convince people the situation is fine and normal.

I decided to rig up a generator in Powershell. I first thought about the inputs. They should be in arrays:

prog and poz seeds

That’s easy enough to do in powershell:

$monsterArray =”Bandits”,”Mindflayers”,”Dragons”,”Elves”,”(((ELVES)))”,”rat-men”

The get-random commandlet also let me pick from an array at random:

array objects and random working

But now I needed to find a way to put all the strings together. Whacking them into the terminal seems like the best way for a cheap laugh. Write-host also concatenates the string outputs.

write-host “$(Get-Random -Maximum $monsterArray) $(Get-Random -Maximum $actionArray) $(Get-Random -Maximum $phraseArray)”

You can run it yourself for output:

  • rat-men are massing to raid the capital and it’s beautiful
  • Mindflayers are abducting children and that’s a good thing

 

shitty ENTERPRISE QUALITY code:

$monsterArray =”Bandits”,”Mindflayers”,”Dragons”,”Elves”,”(((ELVES)))”,”rat-men”
$actionArray =”are killing farmers”,”are poisoning the water”,”are abducting children”,”are summoning demons”,”are trying to assassinate the king”,”are massing to raid the capital”
$phraseArray =”and that’s ok”,”and here’s why”,”and this is why it should be”,”and it’s beautiful”,”and that’s a good thing”,”and why we need to get with the times”

write-host “$(Get-Random -Maximum $monsterArray) $(Get-Random -Maximum $actionArray) $(Get-Random -Maximum $phraseArray)”

 

Plenty of things you can expand it with in here: https://www.dandwiki.com/wiki/100_Adventure_Ideas_(DnD_Other)

“An ogre regards a party member as the perfect mate” & “and that’s ok” is especially nice.
I am trying to think of an alt-right fantasy equivalent generator, but many on that DnD wiki need no alteration: “Suspicion arises that the inhabitants of a town are gradually being replaced by impostors”, “The characters are framed for a genocide they didn’t cause”, “Suddenly an entire country turns black”.

 

 

 

Advertisements

9 thoughts on “Make a random fantasy generator in Powershell

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s