Tuesday, December 24, 2019

MapTool Savage Worlds Adventure Edition (SWADE) Framework

Much time has passed since I worked on the Savage Worlds framework for MapTool. I am resurrecting the project for two reasons: RPTools recently announced they were adding HTML5/CSS3 and JavaScript to the MapTool Virtual Tabletop and Pinnacle Entertainment Group released the Savage Worlds Adventure Edition (SWADE).

SWADE has some significant rules changes which call for adjusting the old framework. However, the old framework was developed over the years and had become something of a Frankenstein monster of old and new ways of doing things in MapTool MTScript. I attempted to rewrite it once for Savage Worlds Deluxe Edition (SWD) but abandoned the project due to poor design desitions regarding internationalization which slowed the framework to a crawl.

The other factor was the introduction of HTML5, CSS3, and JavaScript into MapTool MTScript. This adds tremendous capabilities for the character sheet and other frames/dialogs giving me the ability to code dynamic screens. It also will make things much easier to code.

Before beginning the rewrite, I started a design document while I awaited the changes to MapTool. It fairly extensive (45 pages long) and is not yet complete. However, it is complete enough to begin coding. I'll continue updating the document as I reach new design decisions based on lessons learned from the new MapTool implementation.

The new framework will feature two primary Lib tokes: Rules and Setting. With luck, the rules should remain the same between Savage Settings. The Setting tokens will contain setting specific rules, edges, hindrances, stats, vehicles, and HTML themes. The setting token will also hold any internationalization required. Thus you'll have a French Setting token and an English Setting Token for the same ruleset. This bypasses my earlier problems with internationalization.

I've also decided to implement an Avatar system so no matter how many of your PC tokens are scattered across maps they will all interact with a single set of data. The PC tokens thus become very light with a single property naming the data store. Extra tokens work much the same way except the hold temporary data on them so you can summon 12 goblins to a map, they will all start with the same basic data but temporary changes to state, gear, power points, etc. will be kept with the Avatar without update the primary data token.

There are many other changes as well that you'll find in the design document. Feel free to give it a read and let me know what you think in the comments below.