<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 <title>An Anglican Geek - All Categories</title>
 <link href="http://anglicangeek.com/feeds/all_categories.xml" rel="self"/>
 <link href="http://anglicangeek.com/"/>
 <updated>2012-05-04T07:46:08-07:00</updated>
 <id>http://anglicangeek.com/feeds/all_categories</id>
 <author>
   <name>Drew Miller</name>
   <email>ego@anglicangeek.com</email>
 </author>
 
 <entry>
   <title>Using NuGet and WebActivator to Deliver HTTP Modules</title>
   <link href="http://anglicangeek.com/20111112/using-nuget-and-webactivator-to-deliver-http-modules.html"/>
   <updated>2011-11-12T00:00:00-08:00</updated>
   <id>http://anglicangeek.com/20111112/using-nuget-and-webactivator-to-deliver-http-modules</id>
   <content type="html">&lt;p&gt;&lt;a href='http://www.mattwrock.com'&gt;Matt Wrock&lt;/a&gt; posted a &lt;a href='http://code.msdn.microsoft.com/Installing-an-HttpModule-27d7c6e1'&gt;code sample&lt;/a&gt; showing how to use the PreApplicationStartMethod (PASM) attribute and DynamicModuleUtility.RegisterModule to deliver HTTP modules easily, without requiring the consuming developing to modify the target app&amp;#8217;s web.config. It&amp;#8217;s a great technique, and one I&amp;#8217;ve used extensively as well, particularly with libraries I distribute via NuGet packages. Matt had one concern though: discovery. He was worried that the consuming developer might have questions about why a behavior is happening (for instance, if the module is significantly changing the app&amp;#8217;s rendered markup), but not find any trace of why (becuase the module registration is tucked away in the library&amp;#8217;s PASM. It&amp;#8217;s a reasonable concern, at least for some heavy-hitting modules and especially if the auto-registered module is just one component of the library (although, I&amp;#8217;d caution against that practice). Fortunately, with NuGet and our own &lt;a href='http://blog.davidebbo.com'&gt;David Ebbo&lt;/a&gt;&amp;#8217;s WebActivator package, there&amp;#8217;s a better way.&lt;/p&gt;

&lt;p&gt;So, we have two goals. We want the the HTTP module to work after doing nothing more than installing a NuGet package, and we want the consuming developer to easily discover the module&amp;#8217;s registration. Like PASM, the WebActivator NuGet package allows you to run code before an app starts. (It also allows you to run code after it starts, and when it shuts down.) The advantage it has over PASM is, as a NuGet package, you can make it dependency of your own package, which means it will be installed into the target app. This, in turn, means you can move the start-up code out of your library and into the target app in a source code file, where the consuming developer can easily discover it. (There are lots of other reasons you might want to use WebActivator, as well, but I&amp;#8217;ll stay focused to the matter at hand.)&lt;/p&gt;

&lt;p&gt;Using WebActivator to &amp;#8220;bootstrap&amp;#8221; your library, whether to register an HTTP module or to register MVC routes, is so common we have some guidance and conventions around how to do it.&lt;/p&gt;

&lt;p&gt;First, create the folder .\Content\App_Start in your NuGet package. This is where your library&amp;#8217;s start-up code is going to go. (I&amp;#8217;ll assume you already know how to create a NuGet package, and understand how the Content folder is used; if not, you might want to read more about &lt;a href='http://preview.docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package'&gt;creating and publishing NuGet packages&lt;/a&gt;). Unlike other App_ folders, this one isn&amp;#8217;t a special ASP.NET folder. But, by following this convention, consuming developers will have some idea where to look to find your library&amp;#8217;s start-up code. Even if they aren&amp;#8217;t aware of the convention, the descrptive name will aid discovery.&lt;/p&gt;

&lt;p&gt;Second, add the dependency on WebActivator to your package&amp;#8217;s .nuspec file:&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='xml'&gt;&lt;span class='cp'&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;/span&gt;
&lt;span class='nt'&gt;&amp;lt;package&lt;/span&gt; &lt;span class='na'&gt;xmlns=&lt;/span&gt;&lt;span class='s'&gt;&amp;quot;http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd&amp;quot;&lt;/span&gt;&lt;span class='nt'&gt;&amp;gt;&lt;/span&gt;
  &lt;span class='nt'&gt;&amp;lt;metadata&amp;gt;&lt;/span&gt;
    &lt;span class='nt'&gt;&amp;lt;id&amp;gt;&lt;/span&gt;MySuperPackage&lt;span class='nt'&gt;&amp;lt;/id&amp;gt;&lt;/span&gt;
    etc...
    &lt;span class='nt'&gt;&amp;lt;dependencies&amp;gt;&lt;/span&gt;
      &lt;span class='nt'&gt;&amp;lt;dependency&lt;/span&gt; &lt;span class='na'&gt;id=&lt;/span&gt;&lt;span class='s'&gt;&amp;quot;WebActivator&amp;quot;&lt;/span&gt; &lt;span class='na'&gt;version=&lt;/span&gt;&lt;span class='s'&gt;&amp;quot;1.5&amp;quot;&lt;/span&gt; &lt;span class='nt'&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class='nt'&gt;&amp;lt;/dependencies&amp;gt;&lt;/span&gt;
  &lt;span class='nt'&gt;&amp;lt;/metadata&amp;gt;&lt;/span&gt;
&lt;span class='nt'&gt;&amp;lt;/package&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Finally, add a source code file named &amp;#60;library&amp;#62;.cs.pp to the App_Start folder, where &amp;#60;library&amp;#62; is the name of your library. The .pp is important, because &lt;a href='http://preview.docs.nuget.org/docs/creating-packages/configuration-file-and-source-code-transformations'&gt;NuGet is going to transform this file&lt;/a&gt;, which will allow you to include the target project&amp;#8217;s root namespace (while not critically important, that&amp;#8217;s the Visual Studio convention, and some IDE tools get ornery when it&amp;#8217;s not followed). To this file, add a WebActivator.PreApplicationStartMethod pointing to a start-up method, and add your start-up code to the start-up method.&lt;/p&gt;

&lt;p&gt;When the consuming develper installs the package, the source file will be created in ~/App_Start, and it will behave just as it would have in your library&amp;#8217;s PASM. Because it&amp;#8217;s in a source code file, it&amp;#8217;ll be easy for the consuming developer to find, and they can even quickly comment out if they need to, for instance to debug an issue. (This technique is also great for general configuration of your library, especially if, like me, you think forcing peope to configure apps in XML is rude.)&lt;/p&gt;

&lt;p&gt;Here&amp;#8217;s a complete example (using code from Matt&amp;#8217;s sample):&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='csharp'&gt;&lt;span class='k'&gt;using&lt;/span&gt; &lt;span class='nn'&gt;System&lt;/span&gt;&lt;span class='p'&gt;;&lt;/span&gt;
&lt;span class='k'&gt;using&lt;/span&gt; &lt;span class='nn'&gt;MyLibrary&lt;/span&gt;&lt;span class='p'&gt;;&lt;/span&gt;
&lt;span class='na'&gt;    &lt;/span&gt;
&lt;span class='na'&gt;[assembly: WebActivator.PreApplicationStartMethod(typeof($rootnamespace$.App_Start.MyLibrary.Loader), &amp;quot;LoadModule&amp;quot;)]&lt;/span&gt;

&lt;span class='k'&gt;namespace&lt;/span&gt; &lt;span class='err'&gt;$&lt;/span&gt;&lt;span class='nn'&gt;rootnamespace&lt;/span&gt;&lt;span class='err'&gt;$&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='n'&gt;App_Start&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='n'&gt;MyLibrary&lt;/span&gt;
&lt;span class='p'&gt;{&lt;/span&gt; 
    &lt;span class='k'&gt;public&lt;/span&gt; &lt;span class='k'&gt;class&lt;/span&gt; &lt;span class='nc'&gt;Loader&lt;/span&gt; 
    &lt;span class='p'&gt;{&lt;/span&gt; 
        &lt;span class='k'&gt;public&lt;/span&gt; &lt;span class='k'&gt;static&lt;/span&gt; &lt;span class='k'&gt;void&lt;/span&gt; &lt;span class='nf'&gt;LoadModule&lt;/span&gt;&lt;span class='p'&gt;()&lt;/span&gt; 
        &lt;span class='p'&gt;{&lt;/span&gt; 
            &lt;span class='n'&gt;DynamicModuleUtility&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='n'&gt;RegisterModule&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='k'&gt;typeof&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;MyDynamicModule&lt;/span&gt;&lt;span class='p'&gt;));&lt;/span&gt; 
        &lt;span class='p'&gt;}&lt;/span&gt; 
    &lt;span class='p'&gt;}&lt;/span&gt; 
&lt;span class='p'&gt;}&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;em&gt;References&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href='http://docs.nuget.org'&gt;NuGet Docs&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='https://bitbucket.org/davidebbo/webactivator/wiki/Home'&gt;WebActivator Wiki&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content>
 </entry>
 
 <entry>
   <title>House Rule: Fighter Weapon Affinity</title>
   <link href="http://anglicangeek.com/20110428/house-rule-fighter-weapon-affinity.html"/>
   <updated>2011-04-28T01:00:00-07:00</updated>
   <id>http://anglicangeek.com/20110428/house-rule-fighter-weapon-affinity</id>
   <content type="html">&lt;p&gt;&lt;em&gt;This is a house rule for B/X (Moldvay/Cook) D&amp;amp;D and Labyrinth Lord.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When a Fighter reaches 3rd level, he can choose to start an affinity for a specific type of weapon (e.g., longsword, battle axe, spear, two-handed sword, et. al.). This affinity gives him an additional +1 to attack rolls with the weapon, and allows him to roll a second D6 for damage and take the better die.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>House Class: Archer</title>
   <link href="http://anglicangeek.com/20110428/house-class-archer.html"/>
   <updated>2011-04-28T00:00:00-07:00</updated>
   <id>http://anglicangeek.com/20110428/house-class-archer</id>
   <content type="html">&lt;p&gt;&lt;em&gt;This is a house class for Basic/Expert (Moldvay/Cook) D&amp;amp;D or Labyrinth Lord.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Requirements&lt;/strong&gt;: DEX 12&lt;br /&gt; &lt;strong&gt;Prime Requisite&lt;/strong&gt;: DEX&lt;br /&gt; &lt;strong&gt;Hit Dice&lt;/strong&gt;: D6&lt;br /&gt; &lt;strong&gt;Maximum Level&lt;/strong&gt;: None&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;An Archer is a fighting class that specializes in ranged combat with a bow or crossbow.&lt;/p&gt;

&lt;p&gt;An Archer fights as a Cleric of the same level, except that the Archer fights as a Fighter with either a bow &lt;em&gt;or&lt;/em&gt; a crossbow. An Archer progresses in level as a Fighter.&lt;/p&gt;

&lt;p&gt;An Archer may choose to spend a round aiming instead of fighting. There are two possible bonuses from aiming, and the player must choose which when she declares the character is aiming. They are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The player can roll two dice instead of one when attacking the next round, and take the better roll&lt;/li&gt;

&lt;li&gt;The player can roll two D6 for damage, and take the better roll&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An Archer may only aim when not in melee and when not being targeted by other ranged attacks.&lt;/p&gt;

&lt;p&gt;When an Archer aims at a target that is unaware of the impending attack, and is either still or moving slowly, the attack causes an additional 4 points of damage. Opponents that are in melee are generally moving too erratically to be sniped in this manner.&lt;/p&gt;

&lt;p&gt;An Archer may not wear armor heavier than studded leather.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reaching 3rd Level&lt;/strong&gt;: When an Archer reaches third level, she gains the &lt;strong&gt;Swift Volley&lt;/strong&gt; special ability. This ability allows the Archer to fire a second arrow &lt;em&gt;at the same target&lt;/em&gt; in a round, but at -3 penalty to the second attack roll. An Archer may only use Swift Volley when not in melee and when not being targeted by other ranged attacks.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(Expert-level class features will be presented in a future &amp;#8216;blog post.)&lt;/em&gt;&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Warhammer Fantasy Roleplay Meets a Grim End</title>
   <link href="http://anglicangeek.com/20090815/warhammer-fantasy-roleplay-meets-a-grim-end.html"/>
   <updated>2009-08-15T00:00:00-07:00</updated>
   <id>http://anglicangeek.com/20090815/warhammer-fantasy-roleplay-meets-a-grim-end</id>
   <content type="html">&lt;img src='/images/wfrp_cover.png' border='0' alt='' style='margin: 0pt 10px 10px 0pt; float: left; width: 222px; height: 292.5px;' /&gt;
&lt;p&gt;Last Wednesday, Fantasy Flight Games announced the third edition of Warhammer Fantasy Roleplay. To me, it was confirmation of something we Warhammer FRP fans have suspected since the FFG deal was first announced: Warhammer Fantasy Roleplay as we knew it is no more.&lt;/p&gt;

&lt;p&gt;WFRP was one of the first games I played when I ventured out of D&amp;amp;D&amp;#8217;s increasingly muddy waters back in &amp;#8216;86 or &amp;#8216;87, and next to D&amp;amp;D it&amp;#8217;s the game I&amp;#8217;ve played the most throughout the years. My soft-bound WFRP was one of my most prized possessions; it was the one book I&amp;#8217;d never lend away or let leave my side. It was the very last book to leave my old gaming collection, and nearly the first I acquired when I started to build one anew.&lt;/p&gt;

&lt;p&gt;I watched as WFRP drifted from publisher to publisher, all the way from Games Workshop, through Flame and later Hogshead, and finally to Black Industries/Green Ronin. I appreciate what Green Ronin did for the game, even if I&amp;#8217;m not a fan of the combat and magic changes in the second edition. Whatever else you want to say, it was clear the Green Ronin folks loved WFRP and did all they could to do right by it.&lt;/p&gt;

&lt;p&gt;And then, Black Industries was shut down. FFG acquired the license to all Games Workshop brands to produce board and role-playing games.&lt;/p&gt;

&lt;p&gt;And, now, WFRP is no more.&lt;/p&gt;

&lt;p&gt;To be fair, maybe FFG will produce a great game. I can&amp;#8217;t say, and I likely won&amp;#8217;t ever be able to say, because the announcement makes it clear that it won&amp;#8217;t be the sort of game I play: The massive Warhammer Fantasy Roleplay 3rd Edition box, which will retail for $99.95, contains everything a group of adventurers will need to play – four different rule-books, 36 custom dice, over 300 cards, counters, “character keeper” boxes, and much more. That&amp;#8217;s not Warhammer Fantasy Roleplay as I know it. It doesn&amp;#8217;t seem like a third edition; rather, it seems it will be a completely new game based on WFRP (in the same way WFRP was based on Warhammer Fantasy Battles).&lt;/p&gt;

&lt;p&gt;I&amp;#8217;m sad about this, but not for any reasonable reason. After all, I&amp;#8217;ll happily go on playing first edition WFRP in the same sandbox I&amp;#8217;ve been using for the last two decades. And, it&amp;#8217;s not as if I purchased any material from the second edition era (though I guess I should feel guilty about that now). But I&amp;#8217;m going to miss seeing it on the shelves, where it might win the hearts and minds of a new generation of gamers.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;m going to set up a one-shot WFRP session sometime very soon. The Old World&amp;#8217;s call is particularly strong today. The banners wave, high above the fray and the horns call me forward, to battle, this day.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>(Almost) There and Back Again</title>
   <link href="http://anglicangeek.com/20090729/almost-there-and-back-again.html"/>
   <updated>2009-07-29T00:00:00-07:00</updated>
   <id>http://anglicangeek.com/20090729/almost-there-and-back-again</id>
   <content type="html">&lt;img src='/images/phb6th.jpg' border='0' alt='' style='margin: 0pt 10px 10px 0pt; float: left; width: 222px; height: 292.5px;' /&gt;
&lt;p&gt;I was six or seven the first time I played a role-playing game. Some older boys (middle-schoolers, as I recall &amp;#8211; one of them the older brother of a friend) were playing on a folding card table in the middle of a neighborhood driveway. The books and the dice caught my attention, and the fantastic things the boys were describing firmly held it. I wanted to join in, in part because they were the older, cool kids, but also because they were talking about the same things I&amp;#8217;d been reading and imaging. I whined my way into their game that day, and then several times again throughout that summer.&lt;/p&gt;

&lt;p&gt;The book that drew my attention most was the original AD&amp;amp;D Players Handbook (pictured left). This was in 1982 or &amp;#8216;83, so I&amp;#8217;m guessing it was the 8th and final printing with that cover. It reminded me of the fantasy novels my father kept boxed in his room, well out of sight. I never really learned the original AD&amp;amp;D system; I only played it a few times, and then, when I was very young. But it left an indelible mark.&lt;/p&gt;

&lt;p&gt;Shortly before my eighth birthday, I got the itch to be the DM. I hadn&amp;#8217;t played D&amp;amp;D in several months, but I&amp;#8217;d spent countless hours sketching dungeons on graph paper and writing notes in the margins. I chanced upon the D&amp;amp;D &amp;#8220;red box&amp;#8221; (pictured right) at the on-base exchange store (remember when you could find D&amp;amp;D in &amp;#8220;normal&amp;#8221; stores?) and convinced my parents to buy it for me (whining was an important &amp;#8211; and often used &amp;#8211; tool for having my way when I was young). I pestered my friends (my own age, this time) until they agreed to give D&amp;amp;D a try. All but one hated it. So I ran &lt;em&gt;a lot&lt;/em&gt; of solo games in the early days.&lt;/p&gt;

&lt;p&gt;I would go on to buy all of the D&amp;amp;D boxed sets: Expert, Companion, Master, and Immortal (although I don&amp;#8217;t think we ever legitimately advanced beyond Companion). From there, I moved on to 2nd Edition AD&amp;amp;D, and continued all the way to 3.5e (and, yes, even 4e). Interspersed were stints with just about every major RPG across the different milieus, along with numerous indies (ever heard of Halmabreah or SLA Industries?).&lt;/p&gt;

&lt;p&gt;All of this is to relate two things: that role-playing has been a major part of my life, and that I missed playing the original D&amp;amp;D versions (the LBBs and supplements, Holmes Basic, and Moldvay/Cook Basic/Expert) when they were contemporary by just a few years. For the last year, I&amp;#8217;ve been following the various &amp;#8216;blogs and discussions about old school D&amp;amp;D. Initially, I wondered what the fuss was about. But as time passed, I found myself nodding in agreement more often than not, and remembering how much more I enjoyed running the &amp;#8220;red box&amp;#8221; than 3.5e (and 4e). While I doubt that any version of D&amp;amp;D will ever take the top RPG spot in my mind or heart, I thought it would be fun to run an OD&amp;amp;D game, if for no other reason than to to see if what I was thinking was merely nostalgia or if there was something substantive to all the talk. Just as I was about to buy all of the OD&amp;amp;D PDFs, WoTC took their marbles and ran home (shame on them).&lt;/p&gt;

&lt;p&gt;I&amp;#8217;m not sure if offerings like OSRIC, Swords &amp;amp; Wizardry, and Labyrinth Lord (pictured right) were already available when the OD&amp;amp;D PDFs were yanked, but I was busy enough at work at the time that I didn&amp;#8217;t explore OD&amp;amp;D alternatives. I was also actively running Shadowrun and preparing an Earthdawn game, so my RPG cup already runneth over. I put OD&amp;amp;D out of mind for a few months.&lt;/p&gt;

&lt;p&gt;These last two weeks we&amp;#8217;ve had a college-bound friend staying with us, and she noticed Bruce Cordell&amp;#8217;s latest 4e adventure on my kitchen counter (a most generous gift from his wife, who is a petsitter and recently took care of our Chessie). Our friend had never played D&amp;D; she&amp;#8217;d never been allowed to. She asked me to run a game. I wanted to say yes, but I had no desire to run 4e, or even 3.5e, and she wanted D&amp;amp;D specifically. I&amp;#8217;d recently read some things about Swords &amp;amp; Wizardry (I think on Jeff Rient&amp;#8217;s &amp;#8216;blog), so I downloaded the free core rules and ran our friend and my wife on a simple (but very old school) dungeon crawl.&lt;/p&gt;

&lt;p&gt;Man, was it fun.&lt;/p&gt;

&lt;p&gt;Yesterday, we transferred the characters to Labyrinth Lord and set up our second session. I wanted to compare the two systems in action. For the most part, I think I like the Moldvay/Cook D&amp;amp;D via Labyrinth Lord better than the white box D&amp;amp;D (plus supplements) via Swords &amp;amp; Wizardry. Except for the Thief class, that is. It&amp;#8217;s just got to go.&lt;/p&gt;

&lt;p&gt;Which brings me to the point of this &amp;#8216;blog post. I created this &amp;#8216;blog to record my experiences, house rules (such as the OD&amp;amp;D skill adjudication framework I&amp;#8217;m using), and campaign notes (I mostly run sandbox-style campaigns, and I thought it&amp;#8217;d be nice to share the sand with others). I hope someone finds this &amp;#8216;blog, and finds it useful.&lt;/p&gt;

&lt;p&gt;Good gaming.&lt;/p&gt;</content>
 </entry>
 
</feed>