Wednesday, October 23, 2019

The Dwarves of Northaxe

I recently ran a one-shot D&D adventure, in our DM's absence, using Crimson Dragon Slayer d20 rules. Posting here as a way to share the results with my group.

My dwarves (and I am taking liberties with DM Mike's world) generally have a few social attributes:
Full name: rarely used in normal speech.


  • Nickname: a short name, often used among friends, and to save time (dwarves love efficiency).
  • Clan name: this is a nickname used only among clan members, or truly close friends. A non-clan member using your clan name without permission is considered grossly impolite at best, and an unforgivable insult at worst. Often clan names will follow a pattern; for example, Mountainbelly clan names are always gemstones.
  • Beards: beards are not limited to male dwarves.


Players picked their own nickname and described their beards and personalities.

Cast of Characters:

Krobatryd Ironforged (Alex)
Major (Army, Sapper), Geologist
Fighter, 3
Primary: Constitution
Clan: Mountainbelly
Nickname: Batty
Clan Nickname: Garnet
Beard: Knee length, red. Peppered with small braids and carved gemstones.
Eldest of the dwarven command group. First saw action during the late days of the goblin wars. Lawful, committed to discipline and protecting her troops.

Garmotryd Merryshoulder (Matt)
Captain (Army, Cavalry), Botanist
Cleric, 2
Primary: Intelligence
Clan: Mountainbelly
Nickname: X
Clan Nickname: Tigereye
Beard: Black with vines woven in.
Born during the Goblin Wars. Clerical powers are drawn from the Mountain Heart, and leans toward Nature.

Norguibelyn Mountaincloak (Rab)
Lieutenant (Marine, Infantry), Historian
Fighter, 2
Primary: Dexterity
Clan: Stormspine
Nickname: Norg
Clan Nickname: Boots
Beard: Auburn/fall brown, red and blonde. Beaded with small human bones.
On loan to the Mountainbelly Marine detachment. Norguibelyn is Ulara's superior, by rank, and does not trust the duergar. Wrote the history of the adventure in reverse, attempting to drive an outcome?

Ulara Coalhewer (Jessica)
First Sergeant (Marine, Reconnaissance), Chemist
Thief, 2
Primary: Dexterity
Clan: Mountainbelly
Nickname: Spectre
Clan Nickname: Pearl
Beard: Lil' goatee
Ulara is a displaced duergar, who was taken in my the Mountainbelly clan. The duergar are not trusted, in general, but Ulara has proven worthy, rising in the ranks of the Royal Marines by taking on the most dangerous missions offered. Ulara's loyalty to the Mountainbelly matriach is unquestioned. The name "Pearl" is a cruel joke, as pearls are not considered gemstones by the dwarves.

Fotgruhilda Mountainbelly (NPC)
Cadet (Army, Infantry), Agriculture
Clan: Mountainbelly
Nickname: Hilda
Clan Nickname: Opal
Daughter of the Mountainbelly Martriarch, by way of a blood bond. A young human of fourteen summers. She is extremely pale, yet not sickly looking. When she mentions her age to other dwarves, they are generally confused, as fourteen years is very young for a dwarf.

The Adventure:

The dwarves were brought together by the Mountainbelly Matriarch. Northaxe is prospering. Their mining industry is strong, and the fleet of airships is raising the kingdom's prestige and wealth throughout the world. They are so prosperous, that they are running out of room. Mountainbelly has decided to take upon herself the job of finding new areas to settle. She has assembled a team to investigate a disused cavern. What is down there? Is it worth the effort of tunneling to it? Can dwarves survive there?

It is Opal's coming of age time, and she is to accompany the party in this expedition. There were twenty retainers (low ranking enlisted, several corporals, and some sergeants) sent to carry supplies and perform needed work.

The passage is narrow, and winds badly, making travel slow and difficult. Eventually a large cavern is found. There is a spring here, and mushrooms of the lumber variety. 'Captain X' determined that other vegetation could be grown here as well. The spring created a large pond, which held fish. The party made camp here. There seemed to be some danger from poor ventilation, so fires were kept to a minimum. A guard was set from among the enlisted, and the night passed without incident.

Two passages left this cavern. 'Spectre' followed one, and found it to be safe, continuing deeper into the mountain. The party followed (leaving four privates behind). As the stone began to change, 'Batty' was able to detect traces of silver in the rock. They found a new cavern, which had some moths and bats, plus lichen. The air smelled strongly (to a dwarf) of iron. Making camp again, a guard was set. The party woke to find 'Norg's' armor ruined. Tell-tale signs of a rust monster were visible. The privates on watch were given extra carry duty.

Spectre followed the exit, down again. Tracks of the rust monster were present. A small hole was found, which seemed to be a rust monster nest. Spectre was able to use bat guano and other agents to create an explosive, which was dropped into the nest. A boulder was found to block the hole, and the party continues down. There was some archaic graffiti, which seemed to warn of the rust monster nest, but the wording was strange.

Finally, they came to an area of a cave in. Batty was able to determine that this cave in was intentional. Along with Norg they remembered that during the Goblin Wars there was a passage sealed off, to prevent a back door into Northaxe. Could this be that passage?

The party decided to retrace their path to the first large cavern and try the other passage. They left a sergeant and some privates to begin building defenses. They camped in the iron-smelling room. Batty took remaining ruined armor and laid it in the entrance, in case another rust monster came.
Later, everyone woke, a bit dazed. An odd powder covered their faces. The guards were asleep, powdered as well. Three enlisted were missing, as was 'Opal'. There were clear tracks leading back to the cave in. Following quickly, they got to the cave in, and the troops left were dead; clearly ambushed. Inspection of the cave in showed a concealed, but difficult to traverse, passage. The commanders (PCs) followed.

On the other side all was quite. There was graffiti near the cave in with hash marks, as though someone was counting time. The counting seemed to go on a long time before ending... The graffiti near the cave in got to be angrier, cursing the dwarves above. Beyond, a roughly dwarven figure shuffled just outside of visual range. Spectre moved ahead, and saw a giant spider lurking. Holding an action, when the spider charged, Spectre struck it. Batty came up, slaying the spider with a critical hit.

The "dwarf" lurched forward, proving to be a skeleton. Batty shouted orders at the skeleton, which was in military garb. It became confused, and stopped. More skeletons appears behind it, as well as a wight, showing the rank of colonel. The wight shouted, "this is your fault!' and fired an arrow at Batty. It then threw down the bow, lifted its sword and advanced.

The fight went quickly. Captain X wounded a skeleton with holy power, but was then struck down. The skeletons did not go easily, until Batty slew the wight, which caused the skeletons to collapse. Beyond the party's vision, they heard a great rattling of bones. As they approached they saw inert skeletons laying everywhere, as well as Opal and the three privates tied up, but alive.

Epilogue:

Messengers were sent back to the surface to describe what was found, and what had happened. Among the purged undead, an aged, rotten journal was found, attributed to Colonel Tudratin Longhelm. The journal discusses how the cavern had been sealed off to prevent goblins from using the obscure passage as a backdoor into Northaxe. He and a battalion of volunteers stayed as a rear guard. Few knew of the passage, nor of the mission to guard it. Time wore on, and the goblins never came. Provisions began to run out, as well as fuel for fires. The dwarves began to go mad, and Longhelm began to blame his leadership for deserting him and his soldiers. His sense of betrayal began to warp his reason. He ordered his soldiers to begin digging their way out, but it was too late. Starvation and exposure took their toll. Longhelm went early, but his insanity and rage led him to become of the undead; a spirit of vengeance. He began turning his troops. He was still capable of some reason, and continued the journal for some time into his undeath. The digging continued, but the purpose was lost. The cavern was all they knew, so they stayed.

Further searching found the cavern holding Longhelm was massive. Another fissure was found, also caved in, which likely leads out of the mountain. The goal of the mission seems satisfied. The passage does lead to areas of use, and life could be sustained on this new frontier, but what do we say about what happened here?

Monday, August 19, 2019

Powershell 7 on Ubuntu, the Weird Way?

So, I work in Powershell for most everything, in a 99.999% Windows environment, but recently gained access to spin up development servers. Lo and behold, there were Linux servers available. I am a Debian/Ubuntu guy, so I was able to get a Run Level 3 Ubuntu server up in no time. My intention is to test Powershell 7 with my Windows DEV environment, but naturally, there were some hurdles.

First, I try to get Powershell 7, per the instruction at Microsoft.

# Download the Microsoft repository GPG keys
wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb

# Register the Microsoft repository GPG keys
sudo dpkg -i packages-microsoft-prod.deb

# nothing happens

# Update the list of products
sudo apt-get update

#dpkg: error processing archive packages-microsoft-prod.deb (--install):
# cannot access archive: No such file or directory
#Errors were encountered while processing:
# packages-microsoft-prod.deb

# Install PowerShell
sudo apt-get install -y powershell

#Reading package lists... Done
#Building dependency tree
#Reading state information... Done
#E: Unable to locate package powershell

# Start PowerShell
pwsh

#No command 'pwsh' found, did you mean:
# Command 'posh' from package 'posh' (universe)
# Command 'push' from package 'heimdal-clients' (universe)
# Command 'pdsh' from package 'pdsh' (universe)
# Command 'ppsh' from package 'ppsh' (universe)

#pwsh: command not found

Clearly that did not work. Sadly, wget and/or packages.microsoft.com are blocked from my new server. wget exists, but there is some conflict. Hmm.

wget -S --spider https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
Spider mode enabled. Check if remote file exists.
--2019-08-19 14:40:34--  https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
Resolving packages.microsoft.com (packages.microsoft.com)... 40.76.35.62
Connecting to packages.microsoft.com (packages.microsoft.com)|40.76.35.62|:443... failed: Connection refused.


But wait.. I was able to download Powershell 7 for Windows, so why not just download the .deb file and do it manually? One download and an sftp session later, and here I go:

#Use the actual package name
sudo dpkg -i powershell_6.2.0-1.ubuntu.16.04_amd64.deb
sudo apt-get install -f


Well, that was easy. Hey, how come...?

$ which powershell
$ which powershell-preview
$ which pwsh


I guess I need to find it? I am a bit lazy, so:

sudo find / -name pwsh
/opt/microsoft/powershell/7-preview/pwsh


So, add that to your PATH variable:

$ PATH=$PATH:/opt/microsoft/powershell/7-preview
$ echo $PATH
/home/vdev2/bin:/home/vdev2/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/microsoft/powershell/7-preview
$ which pwsh
/opt/microsoft/powershell/7-preview/pwsh


So...

$ pwsh
PowerShell 7.0.0-preview.2
Copyright (c) Microsoft Corporation. All rights reserved.

https://aka.ms/powershell
Type 'help' to get help.

PS /home/dave>


That whole copyright/help section is a bit of a pain, though. Doing a quick info pwsh however, show me we can throw standard Powershell arguments at the Linux version.

$ pwsh -NoLogo
PS /home/vdev2>


So, we can change our .bashrc file to contain that switch and never see it again, and add an alias so we can use powershell, if we want:

alias pwsh='pwsh -NoLogo'
alias powershell='pwsh -NoLogo'

Then reload our profile, and we are done.


$ exec bash
$ pwsh
PS /home/vdev2>


Viola!

Monday, August 12, 2019

Powershell 5, 6, 7 -- Where am I?

So, I'm testing out Powershell Core (6.2.2) and Powershell 7 (7.0.0-preview.2) on a Windows system, and it occurred to me that I might want to know which version I am in while working. This seemed simple enough.

For more information, see the RTPSUG intro to 6.2/7.0 here.

I had already noticed that 6.2 and 7.0 do not use my 5.1 $PROFILE, so why not have the profile change the shell prompt?

function Global:prompt { "PS 5 | $PWD>" }

Add that to my 5.1 profile, and I get:

PS 5 | A:\>

I went to create a profile for 6.2 (basic instructions here), and added:

function Global:prompt { "PS 6 | $PWD>" }

And got:

PS 6 | A:\>

Nice. I then went to 7.0 and I see:

PS 6 | A:\>

Well... It seems that the way I installed 6.2 and 7.0 (or the default manner of the shell) has the two versions sharing a $PROFILE. So, we need to do this the way I should have done from the beginning. I change my two profiles to have the following:

function Global:prompt{ "PS $($PSVersionTable.PSVersion.Major)>" }

$PSVersionTable.PSVersion is a System.Version variable. So now I get the correct major version programmatically.

Although, there is an even better way to handle this...

Here are the two profile locations:

PS 5 | C:\Users\david\bin>$profile
C:\Users\david\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1

PS 6 | C:\Users\david\bin>$PROFILE
C:\Users\david\Documents\PowerShell\Microsoft.PowerShell_profile.ps1


I have many functions I use, and variables defined in my 5.1 profile. Do I want to replicate everything, every time? No. So, instead, let's do this to my 6.2/7.0 profile:

$PROFILE = "C:\Users\david\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1"
. $PROFILE


This re-assigns my 6.2/7.0 $PROFILE value to match that of my 5.2 $PROFILE value. I then dot-source my profile, and my 5.1 profile is loaded into whichever version I use.

Friday, August 2, 2019

Raspberry Pi 4 and Luks Encrypted Disks

I recently got a Raspberry Pi 4, which is USB-C compatible. I have a 1TB external drive, which was encrypted on a Mint 19 system (which is sadly no longer mine). "Cool! I can use it with my new Pi!"

First, I am asked for my passphrase, then:

Error: pcmanfm bd_crypto_luks_open_blob called but not implemented

Hmm...

I installed Disk-Manager, thinking that was the issue, but nope. This is an encrypt/decrypt problem. I found my first clue here.
Below error appears in Lubuntu 18.04 LTS

bd_crypto_luks_open_blob called, but not implemented

when opening Luks Encrypted volume using PCManFM, the Lubuntu File Manager.

To overcome this error, open a terminal window and enter the commands below:

$ sudo apt install libblockdev-crypto2 <enter>
$ systemctl restart udisks2.service <enter>


Ok. Restart the disk, enter the passphrase  and...

Error: Luks Encrypted error storing passphrase in keyring (the name org.freedesktop.secrets was not provided by any service files)

So, then I found this semi-related post...
I can confirm that sudo apt install gnome-keyring solves the problem on KDE. Looks like the problem is with node-keytar.

Now I was able to decrypt the disk and access it. However, I do not have permissions for the contents. I don't want to make any real changes to the drive, so I decided to open in a GUI file manager with elevated privileges.

sudo pcmanfm

This is not ideal, but slightly more convenient to traverse the drive.

Sunday, July 21, 2019

Chromium Browser for Linus (Debian)

https://tutorials-raspberrypi.com/google-chrome-for-raspberry-pi/

sudo apt-get install chromium-browser --yes

Operates similarly to Chrome, but feels a bit faster, particularly on a Raspberry Pi.

Wednesday, April 3, 2019

Linux Powershell $PROFILE

One of my favorite things in Windows Powershell is the $PROFILE. I always refer to the How-To Geek article for creating it.

But what about $PROFILE in Linux Powershell?

PS /home/david> Test-Path $PROFILE
False
PS /home/david> New-Item -Path $PROFILE -Type File -Force

    Directory: /home/david/.config/powershell

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
------          3/29/19  10:26 AM              0 Microsoft.PowerShell_profile.ps1

PS /home/david> $PROFILE
/home/david/.config/powershell/Microsoft.PowerShell_profile.ps1


That was easy, but what do we do with this?

Well, for one thing, I notice that my terminal while in Powershell is named "Untitled".



That's an easy fix:

PS /home/david> Set-Content -Path $PROFILE -Value '$Host.UI.RawUI.WindowTitle = "Powershell"'
PS /home/david> Get-Content $PROFILE
$Host.UI.RawUI.WindowTitle = "Powershell"
PS /home/david> .$PROFILE


Now it looks like a shell should:


You could also add a function, allowing you to rename the terminal on demand. Add to your $PROFILE in an editor:

function Rename-Shell{
    param([string]$Name)
    $Host.UI.RawUI.WindowTitle = $Name
}


Then reload your $PROFILE and add a new title:

PS /home/david> .$PROFILE
PS /home/david> Rename-Shell -Name 'My Terminal'



Your  $PROFILE loads every time you start Powershell and imports the contents. If you change the $PROFILE you can reload it by "dot sourcing" (the .$PROFILE mentioned above). You can set variables, create functions, assign aliases... $PROFILE is a Powershell script, so if you can script it, you can add it.

Tuesday, April 2, 2019

Linux Powershell Issues: History

So, my Mint system has Powershell. "Let's see how it works," I say.

david@mint ~ $ powershell
PowerShell 6.1.3

https://aka.ms/pscore6-docs
Type 'help' to get help.

PS /home/david> Get-Location
Error reading or writing history file '/home/david/.local/share/powershell/PSReadLine/ConsoleHost_history.txt': Access to the path '/home/david/.local/share/powershell/PSReadLine/ConsoleHost_history.txt' is denied.
ưm
Path
----
/home/david


Well, that's no good. It ran the Get-Location command, but I certainly don't want to see all that red every time I perform an action in the shell. Fortunately, the error shows us where our history file is.

david@mint ~ $ ls -l /home/david/.local/share/powershell/PSReadLine/ConsoleHost_history.txt
-rw-r--r-- 1 root root 336 Mar 28 11:04 /home/david/.local/share/powershell/PSReadLine/ConsoleHost_history.txt


Why does root own my history file? I installed Powershell as root, but that still seems odd. Well, there's no going back, so let's take over the file.

david@mint ~ $ sudo chown david /home/david/.local/share/powershell/PSReadLine/ConsoleHost_history.txt
[sudo] password for david:
david@mint ~ $ sudo chgrp david /home/david/.local/share/powershell/PSReadLine/ConsoleHost_history.txt
david@mint ~ $ ls -l /home/david/.local/share/powershell/PSReadLine/ConsoleHost_history.txt
-rw-r--r-- 1 david david 336 Mar 28 11:04 /home/david/.local/share/powershell/PSReadLine/ConsoleHost_history.txt


Now, back to the shell:

david@mint ~ $ powershell
PowerShell 6.1.3
Copyright (c) Microsoft Corporation. All rights reserved.

https://aka.ms/pscore6-docs
Type 'help' to get help.

PS /home/david> Get-Location

Path
----
/home/david

PS /home/david> Get-History

  Id CommandLine
  -- -----------
   1 Get-Location