Visions of Aestia

17 Nov 2004

FOAF for campaigns

Filed under: Role-playing, Programming — JBowtie @ 5:26 pm

I wanted to write this down while I was thinking about it.

FOAF is supposed to capture relationships between people as RDF. You could easily use it to capture relationships between characters in a campaign setting.

Imagine if a character generator created FOAF entries as your campaign evolved? What a great DM tool!

d20 as RDF

Filed under: Role-playing, Programming, PlanetRDF — JBowtie @ 5:21 pm

A few weeks ago I had an epiphany regarding character generators.

See, the problem with serializing rules as XML is that RPG rules are rather loosely defined. Lots and lots of rules are written by reference to other rules (the same as lesser dominate, with a longer duration) or as an exception to the usual rules. Many rules create new stats or categories.

What’s more, lists of rules that fit certain categories often gain new members when a book is published, such as the list of bonus fighter feats that just gets longer and longer with every feat book.

So attempting to define a solid XML schema seems more and more a pipe dream the more books you own. What we really need is a way to extend rule definitions in a haphazard, reasonable way.

Enter RDF. With RDF, I’m just making short, disconnected assertions about a rule.

  • “Cleave is a feat.”
  • “Cleave is a fighter bonus feat.”
  • “Cleave is a prerequiste for Improved Cleave.”
  • “Cleave requires Power Attack”.

These sentences don’t have to be in the same book and some of these relationships can be inferred. This is really cool when you start thinking about all those wonky rule definitions.

  • “Sea elves are elves.”
  • “Sea elves have the racial trait water breathing.”
  • “Sea elves are not proficient in bows.”
  • “Subrace traits override standard racial traits.”

A character generator powered by RDF can automatically infer all the usual rules about elves, then add the two new rules. The last statement is necessary to resolve the contradiction (elves are proficient in bows, but sea elves are not).

Thinking about rules like this suddenly makes a lot of sense. And I think it’s key to doing things right in the long term.

Development News

Filed under: Programming — JBowtie @ 4:44 pm

A small selection of notes from around the web, with an attempt to highlight XML-related news.

Mono 1.0.4 is released.
This is mainly a bug fix release; the only notable bug fixed plugs a major memory leak in ASP.NET code.

Mono 1.1.2 (development branch) is released.
The compiler now supports anonymous methods. “Today Mono 1.1.2’s C# compiler supports anonymous methods, iterators, partial classes, static classes and inline warning control from the 2.0 specification. Generics are supported as well on the branched `gmcs’ compiler (included).”
It also includes the XQuery and ObjectSpaces support dropped by Microsoft.

NUnit 2.2.1 released.
This is mainly a bug fix release (not a full release!) Notable changes include a source code reorganization, making the test runners into DLLs to allow other projects to reuse them, and a fix to allow for better compatibility with the VS 2005 debugger.

Docbook v4.4 CR2 is out. 4.4 will probably be the last release before 5.0 is out; 5.0 will be based on RELAX NG instead of DTDs.

http://www.rdfdata.org/ - More and more sites are making RDF available, and not just as RSS. The RDFData site is collecting links to data sets and web services providers of RDF. Notable additions to the collection include Metapihi (50,000 New Zealand images with Dublin Core metadata), the 2001 CIA World Fact Book, and the DAML airport gateway.

Redland, the RDF application framework now has C# bindings.

SPARQL Query Language for RDF looks a little bit like SQL and appears to be very approachable. The W3C has just released a working draft;Redland has already added support for it.

Cornell Law School’s Legal Information Institute has announced the release of a new online edition of the United States Code, including all the Federal law passed by Congress currently in force. For the first time, the project team is also releasing the underlying XML version as a dataset for use in research.

Schematron is now a final Committee Draft. It is under review by the various national bodies and is expected to be the final version.

The XSLT standard library has released version 1.2.1. The library contains 100% XSLT templates that can be called to handle string, math, date, and URI processing. This release is a bugfix release.

The first public working draft of XForms 1.1 has been published. The current version shows greater integration with SOAP and XML Schema; email addresses and credit card numbers are now datatypes.

Winging it

Filed under: Role-playing — JBowtie @ 2:26 pm

I think one of the hallmarks of a good DM is the ability to wing it gracefully. Reading the ENWorld boards has got me thinking I’m getting good at it.

The +/-2 rule for modifiers is one of the best rules of thumb I ever came across. When in doubt, just add a bonus or penalty of +2 or -2 to account for oddball situations.

Mock tests

Filed under: Programming — JBowtie @ 2:19 pm

Well, the tests are real, it’s the objects that are mocked.

One of the problems I face when I introduce unit testing into a project that hasn’t made use of them is the incredible reliance on external sources. The project I’m on at the moment relies heavily on a (flaky) CMS to serve up most of the content we’re processing. Due to the unreliablity of the CMS, tests were failing every other run.

Using the Dynamic Mocks from NUnit 2.2 helped here; by using mock objects in place of the actual COM objects during testing, I had repeatable tests. Eventually the CMS was upgraded, but the ability to control the return values means we kept the mocks.

Powered by WordPress