Home Creators Posts Import Register Favorites Logout

Content

That wasn't as bad as I was afraid it would be. Mostly because I prepared for it carefully in stages 6 and 7.

Stage 8 prototype 


Druid

This time I've made a druid, and included an animal companion page. Well... a plant companion, in this case.

You'll notice a big change in the layout: the inventory page has disappeared! I've merged the inventory onto other pages, with a little judicious rearrangement. I think it works out nicely.


Library

The big technical change this time is that the code has been separated into two parts:

  • At build time, a script that turns sources into library files.
  • At run time, a library that uses the data to build a character sheet.

Making a library like this is a vital step towards integrating it into other applications. The most important application is my website, but other applications are possible.

The code is transpiled using Babel. This allows me to write in the newest, shiniest version of JavaScript, while publishing it in a form that can be run on a wide set of platforms.


Open Source

As part of my commitment to open source, the library has been published to NPM as a package that anybody can download and use to make character sheets. Of course, it's a long way from being ready.

Dyslexic Character Sheets at NPM


Next steps

Stage 9: JSON API

The API for this library is still very simple. You have to tell it exactly which units to include, in what order. Basically, you need to know your way around the library in order to use it. This is what programmers call "tightly coupled", meaning the library and the code that use it need to know too much about each other.

So the next step is to replace this with an API that's less tightly coupled. It'll accept a JSON format that has more game-focused values. You want to tell it what ancestry, background and class you're playing, but not internal technical details. The library needs to be able to work out stuff like that for itself. A part of this will be inferring some units based on combinations of others, in order to deliver the exact set of icons, fonts etc needed for a specific character, and no others.

I'll need to explore the design space of APIs, but it's likely the solution will be based on the JSON-API standard, which should make it easy for me to ship linked data - such as uploaded images - as part of the request package.

Stage 10: Integrate with a web service

This should be a fairly simple one: hook the library up to a Node.js web server that can deliver its character sheets on demand. The client side delivers a character description, in valid JSON, and the web server delivers the response in HTML.

Stage 11: Selection form

In order to craft your character, you need a form where you can select options. Stage 11 involves making the library build script also generate HTML forms that can be embedded into a web page (or anywhere), and which generate data in the format that comes out of stage 9.

Stage 12: Real data

The actual release of Pathfinder 2nd Edition is less than a month away now. I'm not going to complete stages up to 11 before then, but hopefully I can at least get stage 9 done. Either way, as soon as that book and/or PDF arrive, I'm going to descend into it and probably not emerge for a long long time.

Comments

Reisengard

Hey! Nice job, but if I may say, and maybe it's just my own preference, I do like the full page inventory more

Anonymous

I really like this :) Only thing I don't like so much is inventory... I need much more space :D But more important is that I'd like more to have Character's "properties" divided by Character's "abilities"... This also makes much more easy to cope with cases in which the character does not have his/her usual equipment (many cases for this), you simply have to change the equipment page with another one.