/xwing-ffg2xws

Converts an X-Wing squad from FFG's squadbuilder to XWS2.

Primary LanguageJavaScript

xwing-ffg2xws

A simple Node module that takes a X-Wing squad in the FFG Squadbuilder format and returns the matching XWS2 JSON object.

Installation

Install using yarn or npm:

$ yarn add xwing-ffg2xws
$ npm install xwing-ffg2xws --save

API

convert(squad, map)

  • squad An object representing the squad (example)
  • map An object that contains a map from FFG to XWS (We recommend to use the map file from xwing-data2)
  • Returns: Object A XWS representation of the squad (XWS spec)

An error will be thrown if the squad is invalid or if the squad cannot be converted.

License

MIT


Star Wars, X-Wing: The Miniatures Game and all related properties are owned by Fantasy Flight Games, Lucasfilm Ltd., and/or Disney.