Adventures In Modding

As I am wont to do, I relieve stress with gaming.

The current fixation is a revisitation with Skyrim.

Found myself raiding and looting some old Dwarven ruins for metal with which to level my smithing skill. Unfortunately, the stuff is very heavy and I need a lot of it. Putting it in piles to come back to later would be wonderful

I am the Dragonborn. I can bend space and time, wield the elements and rend opponents to grape jelly with the power of my voice alone. However, the simple mechanics of a sack elude me. Bethesda calls this a “gameplay mechanic”. I call it bullshit.

So, I go to look for a mod.

Most were just not right for me. Spells to conjure a dimensional storage chest (hokey). Craftable items that are linked to one central, hidden chest (Think Cloud Storage).

I just wanted a damned sack.

So, I made one.

  • Go into the creation kit.
  • Duplicate a large sack container.
  • Toggle it to not respawn, thus replace stuff I put into it with random leveled items.
  • Named it “Placed Sack”

All well and good but this is a static item that cannot be picked up and put into your inventory. It has to be placed either by code or in the creation kit.

  • Go back into creation kit
  • Duplicate a random item I can pick up (Gold Ore in this case)
  • Named it “Empty Sack”. It would be the item I carry in my inventory.
  • Made a recipe so it could be crafted with (2) Linen Wrap and (1) Leather Strip at any tanning rack.
  • Used an external tool to replace the mesh and texture with that of a large sack so it looked like a sack and not a lump of gold ore in the inventory screen

Now all the remained was tying those things together.

Attached the following script to the “Empty Sack” object.

Scriptname EmptySack extends ObjectReference  

Container Property PlacedSack Auto
Actor Property PlayerRef Auto

Event OnContainerChanged(ObjectReference NewContainer, ObjectReference OldContainer)
If NewContainer == None
ObjectReference SackRef = PlayerRef.PlaceAtMe(PlacedSack, 1, true, false)
PlaceInFrontOfPlayer(SackRef, 80,0,0)
Debug.Notification("Placed a sack on the ground")

Function PlaceInFrontOfPlayer(ObjectReference targetItem,float distanceOffset, float heightOffset,  float angleOffset)
float playerAngleZ = PlayerRef.GetAngleZ()
float angZ = playerAngleZ + angleOffset
float posX = PlayerRef.GetPositionX() + distanceOffset  Math.Sin(playerAngleZ)
float posY = PlayerRef.GetPositionY() + distanceOffset 
float posZ = PlayerRef.GetPositionZ() + heightOffset
targetItem.TranslateTo(posX, posY, posZ, 0.0, 0.0, angZ, 99999)

In plain english, If this item is taken out of inventory and dropped on the ground, it spawns the “Placed Sack” container I previously mentioned then deletes itself.

This is wonderful! A sack! On the ground! In front of me! I can put things in it and take them out again. If I go to another area and wait 31 in-game days then come back, it is still there with my stuff!

Now, I need to figure out how to pick the damned thing up when I am done with it.

Attached the following script to the “Placed Sack” object.

Scriptname PlacedSack extends ObjectReference  

MiscObject Property EmptySack auto 
Actor Property PlayerRef auto

Event OnActivate(ObjectReference akActionRef)
If PlayerRef.IsSneaking()

Function PickUpSack()
Debug.Notification("Picked up sack")
RemoveAllItems(PlayerRef, false, false)

In plain english, if the sack is “opened” while I am in sneak mode (crouching), it will empty anything it still contains into my personal inventory, give me a new “Empty Sack” object, then delete itself.

I have managed to replicate one of mankind's simplest inventions in Skyrim.

Keeps me off the streets.

Friday Morning

On the way to the office this morning, at a stoplight, I heard a familiar and annoying noise. It was automotive and I knew it lead to annoyance.

I could not place it to save my life.

I knew my car should be vibrating violently but it wasn't. It was running so smoothly I had to look at the RPM gauge to be sure it was still running.

Therefore, it had to be another car and a trick of acoustics made it sound as if it were coming from mine.

A glance across the intersection, next to the CVS, a slight haze of smoke caught my eye. In the midst of that smoke was one of the last surviving examples of a Yugo still on the road. The noise puzzle was complete. It was a busted motor mount. I know this because my ex had one and it once had a broken mount that I had to repair.

A mood to match the overcast settled over me. Memories of being inside, outside and underneath a car as broken as the relationship that obligated me to be there in the first place.

Not the way I wanted to start a Friday morning.

Rather than let unpleasant memories from twenty plus years ago invade my head, I thought of the earlier part of the morning. Grabbing my laptop bag and heading out. Sidekick was on the floor in the living room doing her morning yoga. She was in some oddball pose with arms outstretched. So, I bent down, shook her left hand and said, "Good morning to you, Smithers. Glad you could make it". Her giggling was the last thing I heard as I walked into the sunroom on my way to the driveway.

Mood instantly elevated.

No real end to the story. It's just stuck in my mind still.

An attempt at content

Note: if you are one of the few individuals left who are afraid of Skyrim spoilers - a game released six years ago - skip this.

Undertook another play-thru of Skyrim as something to unwind with of an evening.

Arrived at one of the more irritating points of the "Get all the Daedric Artifacts" portion - Boethiah's Calling.

You have to lure a companion and kill them at an altar and that's something I've always found hard to do1. Generally, I settle on, Eola, as she becomes a companion at the conclusion of the other Daedric quest I hate doing - "I ate a priest and all I got was this lousy ring".

She has one eye and her hobby is eating dead people. Not exactly someone a thinking person would want behind them in a dungeon hurling fireballs, okay?

On this play-thru, I wanted to do something different. I wanted to sacrifice Amaund Motierre.

Amaund is a smarmy, social-climbing politician who plays a pivotal role in The Dark Brotherhood quest line's apogee - The assassination of the Emperor.

Without going into verbose detail, it leads to the Dark Brotherhood's near extermination due to a betrayal and drags your butt all over Skyrim. Eventually, you fulfill the contract. As you do, the Emperor makes one final request - Please kill the smarmy, social-climbing traitor who's paying you to do this - A request I typically honor via a dagger to Amaund's throat.

This lacks a certain panache though. Betrayal deserves betrayal in return. Why not simply gain Amaund's trust then lead him to his death?

You can't. He isn't a companion NPC. He isn't coded to behave that way.

Normally, on PC, this is not an issue. You can "reprogram" NPC behavior via the debug console..

NPCID.setfac 5C84D 1
NPCID.setrelationshiprank player 4
player.setrelationshiprank NPCID 4

.. and you are off to the races.

But not in Amaund's case.

Amaund is not a normal NPC. He does not exist in the game world before his part in the quest line starts2. He isn't even the same NPC, by reference ID, each time he appears. He only assumes the one listed by the wiki at the conclusion of the quest. Attempts to toggle companion behavior via the console do not produce the requisite dialog option.

I tried every trick I could think of to get this behavior to happen and failed.

This left me with the following options..

  1. Hit the nexus and find a followers mod that can facilitate this.
  2. Fire up the creation kit and write the mod myself.

So..I stabbed him in the throat again and moved on.

Get your affairs in order, Eola.

  1. I am cognitively aware that this is a game and these are not real people. Even so, it is difficult for me to step over that particular moral boundary. I do it, of course, but there's always that part of me that thinks, "What a dickheaded thing to do", afterward.

  2. He can be spawned into the world at any point via console commands but wanders aimlessly, gives stock responses in a voice not his own (as his voice actor obviously never recorded the defaut dialog) and cannot be conversed with.

True to Prediction

True to my about section, this blog has been severely neglected.

Oddly, I live a somewhat eventful life so you'd think I would have plenty to write about.

The problem is none of those events rate documenting.

My efforts to lead a interesting life generally end in disaster so I try to avoid that.

As I ramble on here, I am trying to come up with some sort of information to relay that is more exciting than, "I'm redecorating the sunroom soon and replacing our floodlights with LEDs".

Coming up empty.

Probably best if I stop here.

I Don't Have Time For This

"What time is it?"

A simple question that used to have a simple answer.

  • Look at watch or clock
  • Done

Violent abuse of Moore's Law has changed this up a bit.

  • Look at smartphone.
  • Check office and personal email while you're at it.
  • Also check to-do list and calendar.
  • Suddenly remember that you forgot to tell someone at the office something important.
  • Call office.
  • Notice Mother's number in the quick dial list and realize you haven't called in weeks.
  • Call Mom.
  • Call customer to answer question asked in another glanced at email because hammering out a email response with your thumb is a royal pain.
  • Remote into a server to see why it sent you the panicked email you glanced at before making all the damned calls.
  • Become aware of the passage of large chunks of time.
  • Ask self, "What time is it?"

To break this cycle, I dug out two of my watches. Both had dead batteries and thus were taken to a jeweler to have new ones installed.

The results of this trip will not be chronicled. Suffice it to say, it was a mistake1

One fifteen minute visit to Amazon followed by two day's shipping and handling later, I am wearing a Seiko Kinetic. No winding. No battery replacement. No, "I'm at work 24/7", rabbit hole.

And I couldn't be happier.

  1. I now have a Mondaine I need to take to a real jeweler to have the backplate reattached. Fortunately, the air-headed eye-candy staffing the place was outsmarted by the Seiko and it managed to escape it's companion's fate.

Hello, my name is Redacted

This morning, I was looking over a massive to-do list belonging to some guy named Tom.

Why? I'm not sure. My name is not Tom. It is something else entirely and I am not about to tell you or anyone else what it is so don't ask.

I, unlike this Tom person, was not a slave to to-do lists, scheduled appointments, unscheduled appointments or random emergencies.

I was just a guy in his underwear sipping coffee on a Saturday morning.

There's was a phone on the desk. It kept beeping and ringing. I felt sorry for the people attached to the names that appeared on it. They were looking for Tom. Judging by the sheer number calls, they seemed anxious to get ahold of him. I didn't answer because, as I said, I'm not Tom. I'd just be wasting their time. Mine too.

I saw a stack of checks and a wadded up deposit ticket. Wadded up because there was not enough space on the ticket to itemize them.

The checks were endorsed and they added up to a pretty hefty sum.

That's when I decided that I, redacted, was going to go to the bank.

Tom was not here but his money was. Tough break, Tom.

The people at the bank assumed Tom was dead because he hadn't been there for so long. Inexplicably, they let me have his money. This was good because the story I concocted between the parking lot and the front door sounded an awful lot like a story concocted between a parking lot and a front door. I'm not particularly good at telling stories. Especially stories involving felonies.

I headed off towards Staples. I only drove for a block or so before I realized I didn't have to go there. It was an item on Tom's to-do list. His responsibility. Not mine.

Feeling a little guilty about taking his money but not guilty enough run his errands, I decided to compromise.

I went here
Shooting Range
It had paper and gadgets that do things to paper. Close enough.

After buying some toys from the shop above the shooting range, I headed back.

Tom was still missing.

I decided that the unease I felt about poking through his things was kind of silly seeing as I took his money.

I wiggled the mouse on his desk and the screen came to life. No password.

Most people leave embarrassing little breadcrumbs in their computers. Things like midget porn, or worse, unfinished novels. His had nothing of the sort. His browser history was filled with links to technical sites. There was a bookmark folder containing links to .govs for every state with information for payroll and sales taxes. The folders in his home directory contained massive amounts of code and documentation.

One of the bits of documentation, still open in Word, only said, "Let's be honest with each other. You're not going to read a single damned word of this. Here", followed by an 800 number. Further down the page was, "jkwehflerghwrehgrug5ou4wy54".

I may have had no idea where he was but I was getting a very clear picture of why he went there.

There's a Mac and a Linux server here. I'm not going to bother rooting around in them. I've seen enough.

I've seen enough of Tom to know that he will eventually be back. The comments in his code and notes describe a man who hates everything he does but knows others depend on it so he can't just walk away. His is the life of a Boy Scout as narrated by Dante.

I'd leave an inspirational note or maybe a POST-IT with a smiley face drawn on it but something tells me he'd only crumple it up and toss it aside.

Then he'd notice the missing checks.

Continuing the analog trend

I keep voluminous notes. Even more now than in the past as I am both getting older and have a work life filled with distractions and interruptions.

This has always been a trial for a variety of reasons.

The left hand I was born favoring was slammed in a car door when I was three. This left me to make do with a decidedly less coordinated right hand. Despite this, I managed to achieve a measure of legibility throughout grade school. This was brought to an abrupt halt by a Nazi death camp matron turned penmanship teacher in the fifth grade. Being brutally steered onto the "right path" reduced my writing to a series of scribbles. When I would look at my paper, I was torn on what I hated more - The paper or her. The answer was her but that was a little uncomfortable for me to process at that age

Gradually, things improved in the handwriting department until the next roadblock was reached. My right hand was broken multiple times and decades of typing introduced carpal tunnel into the mix.

I resorted to keeping them electronically. First with a mini-cassette recorder. This never worked out because I felt ridiculous talking to myself. Next was a Palm Pilot. This was actually a good experience until Palm was sued and forced to release the abysmal Graffiti2. Next was Microsoft OneNote followed by EverNote and the various iOS solutions. Then back to where I am now - OneNote again. These things are serviceable but force you to conform to their idea of productivity. Conformity is not a skill I have ever managed to hone.

Today, I am going to head to the office supply store, work load permitting, and pick up a variety of notebooks. I've recently been easing back into the handwritten thing again but easing, like conformity, is something I am not good at. This will have to happen like my learning to swim did - Being thrown in a river and told, "You better figure it out quick". My survival beyond childhood is a minor miracle.

Once purchased, the note-taking apps will be deleted with the exception of OneNote as many of those are shared with others. I'm kind of stuck with it in that respect. My private design notes will be transferred over though.

In the space of two days I have decided to eliminate e-book documentation and electronic note taking.

Stay tuned for my next post where I will doubtless discuss my decision to trade my BMW for a horse and wagon.

Seeing the forest for the dead trees

Recently, I was trying to trace the exact moment my enthusiasm died.

  • I started writing code well over thirty years ago. This was the obvious data point to look at first. Was it a product of time?

  • I've spent the last sixteen of those thirty plus writing business software. This is about as stimulating as cold oatmeal. Was it boredom?

  • After a particularly trying support call, I leaned back in my chair and realized that I have spent sixteen years not so much developing software as running a race I was destined to lose. Idiocy not only outpaces technology, it runs laps around it. Was it cynicism?

All of these are obvious explanations. But they don't answer the question. The question is, "When did it happen?"

Turns out, the answer is 2001.

I was writing a PalmOS application and I kept having to switch out of a buggy editor and read a PDF as that was the only format of PalmOS documentation I could get my hands on. I had tried printing it out once but trying to wrestle nearly 2000 pages of print-out was a no-go. For weeks, my life was..

  • Switch out of buggy editor
  • Search through a stupid PDF for what I was looking for.
  • Switch back to buggy editor.
  • Restart editor as it would more often than not crash or render chunks of code invisible.
  • Find my place in the code.
  • Repeat the process.

I was desperate for this documentation to be printed out and bound in volume I could plop on the desk beside me.

The more I thought about it, most of the irritating moments have involved electronic documentation. MSDN, I'm looking at you.

This lead to thinking about the happiest moments I've had coding.

Sitting with a mountain of books piled up next to me, pouring through each and making notes.

It's the damned books. That's what's missing. That's the big "Why".

Used to be, when you got a new compiler, it come with a mountain of manuals. Computers also came with a mountain of books or they were available to be purchased. Every nook and cranny of a system was documented. You could squirrel yourself away and pour over every word.

Yes, you can do the same thing now with e-books. Your entire library can fit in your hands. I bought my iPad Air largely for this reason.

But it's not the same.

The books leave traces of your journey within them. Every dog-ear, tear, coffee ring and scribbled margin note acts as a record of your journey.

I can grab one of my old reference manuals off the shelf, look at these things and remember exactly what I was working on at the time. Even if it was decades in the past. They're like the lines on your face. They tell stories.

A e-book reader is just a sterile device that will become outdated and tossed in a recycle bin. It's contents are equally impersonal.

It's this sterility, more than anything, that ruined it for me. No breadcrumbs left behind save a Kindle or two in a landfill.

I think I'm going to visit and put this theory to the ultimate test.