October 9, 2008

Hacking the Dungeons & Dragons Compendium ? Possible?

OK, it's late... so I'll be brief.

Can the D&D fanbase can make a better D&D Compendium than the one that is currently available? In all likelyhood "No", but if anyone is interested, here's what I found thus far (most of it elementary but its a start):

It all uses ASP.NET 2.0 with lotsO JavaScript and a SQL backend - access the Compendium directly using the .asp link here: http://ww2.wizards.com/dnd/insider/database.aspx

Of course, this would all be easier if the above file could be grabbed (curl maybe?) as source code.. but anyway...

In addition, as far as I can tell, the DDI web application relies on these additional resources:
  1. ProtoType framework from MIT - http://ww2.wizards.com/scripts/prototype.js
  2. The ASP.NET 2.0 inethandler - http://ww2.wizards.com/WebResource.axd?d=6V6Ch8RGMGD9e13a1kQ30A2&t=633468600649596329
  3. Several custom JavaScripts
    1. HITBOX.COM scripts
      1. http://www.wizards.com/global/hbx_onpage_standard.js
      2. http://www.wizards.com/global/hbx.js
    2. http://ww2.wizards.com/dnd/insider/tabs.js
    3. A smattering of embedded javascripts using script tags
  4. Four imported CSS stylesheets
    1. http://ww2.wizards.com/dnd/insider/database.css
    2. http://ww2.wizards.com/global/site.css
    3. http://ww2.wizards.com/global/reset.css
    4. http://ww2.wizards.com/dnd/insider/styles.css 
So... yes - its big. But the question remains: is it possible to reverse engineer the SQL database that database.aspx points to from the code bits linked above?


    1. Personally, I'd just put the content into a friendly passing MySQL database and whip up a simple Ruby on Rails front end. A days' work at the most, and it would still look and act better than the current version.

      But that, I guess, is what you get for using ASP instead of technology that works, eh? :D

    2. @Greywolf: I'm offended! No, really though, this is what happens when you cobble shit together.

      I regularly program with ASP.NET and find it to be a pretty powerful platform (coming from a Java/MySQL background even).

      Unless the System Admins for Wizards are total idiots, I doubt you can access either the db or the code. APSX files should have a code-behind page "pageName.aspx.vb" or "pageName.aspx.cs") that does all the work (otherwise they it should just be a plain ASP page). This would have the connection strings for accessing what is probably an MSSQL 2000/2005 db.

      However, just building a new db wouldn't be difficult, just time consuming (I hate data entry).

      The question is, why would you want to replicate the Insider's Compendium? I am sure we could architect a far superior version.

    3. @ Greywulf : yes - I would drop everything into a mysql db as well - if I were going to do such a thing. Data entry would take time - the rest would be tricking for old rusty coders like myself, or a day you all you young 20'somethins

      @ Madbrew : yeah, I tried hacking the ww2.wizards.com domain for a while last night from my un*x prompt to no avail - couldn't get the .asp code. But i'm not a very good h4XXorZ so maybe someone else would have better luck. Oh, and I never said I would want to replicate the Compendium.. that would break the GSL fershur... no no.. I would never want to make anything for free that would compete with DDI. No, not me. That could be illegal. I would never do something illegal. Even if I were to code it myself, or with help from you and greywulf and others, ... we would never code up something for free and then host it on a separate site without any indication of who did it. No way - not me. I would never do that...






      [runs and hides]

    4. IANAL, but you're treading on very thin ice here. I don't think it takes much to run afoul of cyber-terrorism laws.

      As to the rest, we wrote Obsidian Portal in Ruby on Rails with MySQL, but I won't say it's the only way to go. There are plenty of great sites that use PHP, Java, or even *gasp* .NET solutions.

      I don't think the problems that DDI/Gleemax have experienced are due to the language or toolset of choice.

    5. @ Micah : thanks for stopping by! I have no aversion to using .NET products save for the issue of cost. they are, as far as I understand, expensive to implement and not something for homebrew coders in general. If I were going to put together any kind of application, I kinda of thinking I would want to keep it 100% out in the open.

      There's acutally a new API from google that allows you to use Google Spreadsheets somewhat like a database. You can submit queries using their JavaScript API to any public (or even protected) google spreadsheet document, and get results much like you would expect using SQL. This way, all the code would be in JavaScript - and the only thing I would have to 'host' would be a spreadsheet or two on google docs. The JavaScript code could then be taken by anyone else wanting to have a version of the webapp on their own site. This approach seems attractive to me - just becuase it allows everyone to make use of it for free. Ahh.. pipedreams...

      -- now for a digression --
      Maybe this is what WotC should have done.. imagine a new twist on the DDI vision: which IMHO is solidly a 1999/2000 era concept (OOO! An online app with a database that people pay for). Lets take it one step further...

      lets build our own D&D compendium that is a Web2.0 Widget using javascript. Drag and drop it into any webpage, for free. Add you own content, link to DDI, pull stuff from indi sources. The javascript itself will pull data from one or more databases that could be user configurable. If WotC coded something like this - they would grab the attention of every part-time gamer D&D fan who has a facebook, myspace, blog, dodo, or whatever page. The web presence of a free Widgetized DDI would be huge (relatively). Their revenue would be generated from simply leaving OUT the critical data and fluff - the tool helps, but is missing things that make people want to buy the books. hmmm.. maybe this is what we should do....

      make an OpenDDI Widget...
      of course.. we could do this for d20 too. A little 200px wide, tall widget made just for blogs like this - that gives access to everything in the d20 universe...

    6. OH, i forgot.. here's the link.


      fer fucks sake I love google. its my new Jesus. OOO.. T-shirt idea - "Google, The New Jesus."

    7. @Jonathan I think the difference is that Google is here already, while we're still waiting for Jesus.......


      For an app that's (currently) as trivial as "searchable database that outputs a formatted table" the choice of language & platform is largely irrelevant. Each direction you could take has different strengths. Ruby on Rails has faster initial deployment, .NET/mono has stronger scalability, Perl is... well, it's Perl man!

      But each could achieve the desired end result, and in the hands of a half-competent trained monkey it should look, act and behave better than what's currently out there. Just being able to SORT the darned tables (what's that - 15 lines of javascript?) would be a great usability improvement.

      Personally, I'd still MUCH rather see something like the hypertext d20srd, but for the 4e era. Instead we have something which looks, acts and behaves like a bad web throwback from 1992. But hey, what do I know*?

      The Rules Compendium is better than the only current alternative, which is... well, nothing. But that doesn't mean it's necessarily //good//. Fans can, have, and probably will make much better, more usable and enjoyable web applications.

      * as an analyst programmer with around 20 years experience responsible for major-scale application deployments, probably quite a lot, actually.

    8. Wow. I've just checked and you can now sort the tables too.

      Damn. I take it all back. Those guys sure can code!

    9. This is slightly off-topic, but I discovered yesterday that I can copy and paste things from the Compendium into a Google Doc, formatting intact. Quite handy.


    By submitting your comment below, you agree to the blog's Terms of Service.