百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
X

xwing-data2

> 编程语言
开源

这是一个易于使用的数据和图像集合,来自 Fantasy Flight Games 发行的《X-Wing: The Miniatures Game (Second Edition)》游戏。

99 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

这是一个易于使用的数据和图像集合,来自 Fantasy Flight Games 发行的《X-Wing: The Miniatures Game (Second Edition)》游戏。

X-Wing Data 2

An easy-to-use collection of all data from X-Wing: The Miniatures Game (Second Edition) by Atomic Mass Games.

If you're looking for data and images of X-Wing First Edition, you can find that here: xwing-data.

XWS ids

Every ship, pilot, upgrade, etc. has a xws field that contains a unique id. These ids are used in the X-Wing Squadron Specification (or XWS). Note that ids are only unique per card type (as explained below): a pilot can safely have the same id as an upgrade, for example.

New XWS ids are generated using the following steps:

  1. Take the English-language name as printed on the card
  2. Lowercase the name
  3. Convert non-ASCII characters to closest ASCII equivalent (to remove umlauts, etc.)
  4. Remove non-alphanumeric characters
  5. If the pilot has a standardized loadout, add the expansion name as a suffix (eg wampa-battleofyavin)
  6. Check for collisions with other ids of the same type, and add expansion suffixes until there is no more collision

Expansion suffixes per type: Pilots: pilotname-shipname-factionname-expansionname-productsku Upgrades: upgradename-slotname-expansionname-productsku Conditions: conditionname-expansionname-productsku

XWS ids have to be unique per type (pilot/upgrade/condition/etc) and do not collide with ids of other types. So there can be a hansolo pilot and a hansolo upgrade, but there cannot be two upgrades with the hansolo xws id (regardless of the slot of those upgrades). One of those cards would get the -slotname suffix (for example: hansolo-gunner).

Scripts

There are a few scripts that make it easier to work on the data.

You can run these scripts using npm or yarn.

Scripts to update data

Script Description
yarn ts-node ./scripts/amg/parser.ts Scrape ship_points.xlsx and upgrade_points.xlsx for points and format legality (Excel sheets creaed from AMG PDFs using https://www.ilovepdf.com/pdf_to_excel

Scripts to work with the repository

Script Description
yarn run format Format all .json files in the data folder using Prettier
yarn run changelog A...B Generate a changelog between commits A and B, to be used in the release description on GitHub.
Example usage: yarn run changelog 1.24.0...1.25.0
yarn run validate:json Validate that all .json files contain valid JSON
yarn run validate:tests Run all unit tests
yarn run validate:tests:watch Run all unit tests in watch mode

Creating a pull request

Before opening a pull request, see the following checklist:

  1. Use sensible commit messages. Good: add rebel fangs. Bad: create fang-fighter.json
  2. Ensure there are no merge conflicts with master (rebase on top of master or merge it into your branch)
  3. Ensure tests pass: yarn run validate:tests
  4. Use a sensible PR message, eg add pride of mandalore rebel content. PR messages can be the same as commit messages for single-commit PRs.

Creating a release

Go through these steps to create a new release:

  1. Bump the version number in package.json and data/manifest.json according to the Versioning rules listed below
  2. Push the package.json and data/manifest.json changes to GitHub and/or merge them to the master branch
  3. Create a new release on GitHub and use the following:
    • Tag version: The tag you just created
    • Target: master branch
    • Release title: The version number
    • Describe this release: The output of the yarn run changelog PREVIOUS_VERSION...HEAD command (replace PREVIOUS_VERSION with the latest available tag)
  4. All done! :tada:

Versioning

This project uses SemVer. Given a MAJOR.MINOR.PATCH version number, we will increment the:

  • MAJOR version when existing content is changed in such a way that it can break consumers of the data
  • MINOR version when new content is added in a backwards-compatible manner, or existing content is changed in a backwards-compatible manner
  • PATCH version when fixing mistakes in existing content

History

See the Releases tab in Github.

License

MIT


Star Wars: X-Wing and all related properties, images and text are owned by Atomic Mass Games, Lucasfilm Ltd., and/or Disney.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言