RPG Calculator Design Guide

RPG Calculator Toolkit is still in early planning. Initial tests have shown that the general design outline can be viable. In other to gather support for the project we will use this guide to discuss and document some of the ideas for the project.

Putting it in another way, most data in a RPG can be expressed in a spreadsheet with formulas linking back to different cells. I’ve actually tried expressing some things in Excel. However there are some drawbacks with this approach, first characters have multiples dimensions (for example he may have any number of weapons, and to each there may be a number of maneuvers). This means that each character could require several “plans”. The other problem is that there are several characters in a typical game, plus there are tens of effect or powers in use, each generated by some entity and affecting several of the characters. Modeling this in a spreadsheet is very hard.

The general concept of the project is to use XML store data, use Guile/Scheme to express the game formulas and expression, and have some interface driving commands to the Guile core. You can thing of this in the following way: XML defines a multi-dimensional spreadsheet for each character; Guile is used to express the game formula, keep track of effects and modifiers. In order to see the data, a GUI can query the XML structure and get the values calculated in Guile. The GUI can also give commands to change the state of the entire system.

The goal of RPG Calculator is provide a means to join the three parts: XML, Guile and a GUI. The general schematics for the system is shown in the figure below.

RPGCalc Concept

A small Core is used to link the two main libraries (XQilla and Guile). This core is also responsible for maintaining a set of XML DOM Trees and Scheme object. XQilla is used to provide XML parsing (using Xerces) and XPATH searching on the DOM objects. Guile is used to do all the math and calculation for the system. It also provides comands to be used by an external GUI.