Giter Site home page Giter Site logo

xwing-data's Introduction

X-Wing Data

Build Status npm version

An easy-to-use collection of data and images from X-Wing: The Miniatures Game by Fantasy Flight Games.

What's included

This repository contains data and images for the following components:

  • Ships
  • Pilots
  • Upgrades
  • Conditions
  • Core Sets and Expansion Packs
  • Reference Cards
  • Damage Decks

There are two top-level directories; data and images.

data

The data folder contains all X-Wing data in JSON format.

images

The images folder contains images for each card, product, faction, etc.

Usage

You can use this data to build your own apps, squad builders, web sites, etc.

The easiest way to do this is via Bower, Yarn, npm or as a Git submodule:

  • Yarn: yarn add xwing-data
  • npm: npm install xwing-data
  • Bower: bower install xwing-data
  • Git submodule: git submodule add https://github.com/guidokessels/xwing-data.git

Bugs / Issues

Please open a ticket on Github.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request ๐ŸŽ‰

When adding images please use TinyPNG to reduce their filesize as much as possible without affecting image quality.

Projects

A list of projects that use this content:

Want your project listed here? Let us know!

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.

Contributors

The first version of the data was based on Geordan Rosario's squad builder in 2014, found here: https://github.com/geordanr/xwing.

License

MIT


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

xwing-data's People

Contributors

ajmath avatar guidokessels avatar haslo avatar hoggles avatar jds0102 avatar jmthompson2015 avatar lvisintini avatar mathematicalconscience avatar mu0n avatar philipdouglas avatar sandrem avatar sheepeatingtaz avatar shiftregister-vg avatar spiegela avatar tjakubo avatar urbknu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xwing-data's Issues

Maneuver Data

The maneuver data is confusing just from a look. It took pulling up the reference card to figure out what was referencing what. Is there something that could be added to the documentation to assist with understanding each ships maneuver data.

My other question is that the data seems inconsistent. For a lot of ships the first array in the maneuver array represents the 5 movement. Then they go bottom to top after that. It becomes inconsistent for example on the lambda shuttle which only has enough arrays as there are movement rows and represents bottom to top. Is there a reason under the organization decision?
I figured out what it meant now. It is to represent the zero row even though it doesn't exist on the reference card. The Tie Fighter helped me figure this out. Documentation would be helpful here. Is it something that you would like help with?

suggestion: condition cards

While looking through the repo saw I that you were asking for suggestions on how to handle condition cards but i can't find it anymore. My first thought was to handle it similar to bombs where you'd have an "effect" or "assigns" field but it's not a 1:1 relationship so that probably doesn't work well. I'm wondering if a new file is more appropriate. Upgrades or pilots that are able to assign a condition could have an "assigns" field that maps to the name inside conditions.js or use the existing grants with "type": "condition", "name": "I'll Show You The Dark Side"

conditions.js:
[ { "name": "I'll Show You the Dark Side", "text": "...", "xws": ?, "id": ? } ]

Ship images

Hello,

I'm working on setting up a repository with ship images at xwing-ship-images. So far I only have the T-70 X-wing and the TIE/fo Fighter, though I'm planning on going through all of the ships.

Would you be interested in merging this into xwing-data once all ships are ready?

If yes, is the current naming format fine or would you need another structure? I'm currently just naming them after the "xws" property for each ship in ships.js.

Thanks,
Andrei

Add Project

I'm using your project in my X-wing overlay creator: https://github.com/sheepeatingtaz/xwingoverlayer

It's still in early stages, but our store wants to start streaming stuff so I imagine it will develop quickly!

On a related note, are there plans to include images of the damage deck in the data files? I'd like to use them in the above project, but can't seem to find them anywhere!

Add support for upgrade cards that remove slots or actions from a ship

This could take the form of a revoke clause. For example, the TIE Shuttle card would be formatted:

{
    "text": "Your upgrade bar loses all [Torpedo], [Missile] and [Bomb] upgrade icons and gains 2 [Crew] upgrade icons. You cannot equip a [Crew] Upgrade card that costs more than 4 squad points.",
    "name": "TIE Shuttle",
    "points": 0,
    "slot": "Title",
    "ship": [
      "TIE Bomber"
    ],
    "id": 221,
    "xws": "tieshuttle",
    "image": "upgrades/Title/tie-shuttle.png",
    "grants": [
      {
        "type": "slot",
        "name": "Crew"
      },
      {
        "type": "slot",
        "name": "Crew"
      }
    ],
    "revokes": [
      {
        "type": "slot",
        "name": "Torpedo"
      },
      {
        "type": "slot",
        "name": "Missile"
      },
      {
        "type": "slot",
        "name": "Bomb"
      }
    ]
  }

Thoughts?

Spelling errors in upgrades.js

  • Id 10 (Squad Leader) - Ability text - "my" should read "may"
  • Id 131 (Bossk) - Ability text - "perfrom" should read "perform"
  • Id 137 (Extra Munitions) - Ability text - "euip" should read "equip"
  • Id 199 (XX-23 S-Thread Tracers) - Ability text - "aqcuire" should read "acquire"
  • Id 237 (R5-P8) - Ability text - "you and the attack each" should read "you and the attacker each"
  • Id 244 (Black One) - Ability text - "1\nenemy" should read "1 enemy" (unclear if this was intended to be a newline character; however, the card does not have a newline character at this location and the presence of the \n causes issues when importing the JSON into MS Excel so would be grateful if you could fix accordingly)

New setup script?

There is a few ways to integrate xwing-data into other projects:

  1. Bower: bower install xwing-data
  2. Yarn: yarn add xwing-data
  3. npm: npm install xwing-data
  4. Git submodule: git submodule add https://github.com/guidokessels/xwing-data.git
  5. Downloading a zip of the whole repo and edit/change whoever you want.

While those are good, I feel that setting up xwing-data would require the developer jumping through hoops and doing workarounds to get to the data into the desired application environment and be able to "serve" the images.

via Bower/Yarn/npm you would need to access the node_modules folder and, depending on the environment, it's location may no be easy to determine.

Using git submodule means that the whole data is exported as a whole and then you need to add symlinks here and there to get the data where you want (which I don't "like" that much and symlinks are not supported in all operative systems)

I don't feel that downloading a zip file is from an engineering perspective

I have a django project and I have `git submodule`` into and "external_assets" folder.
After that created a symlink from the static files folder (from which files files are publicly served) to the xwing-data/images folder and there is a bit more code to make the image paths in the data match the new location for the images.

Is anyone else getting this experience as well.

I think that far, all environments, you may want to:

  • read and JSON parse the data files
  • make the images public or easy to access.

Maybe we could create a setup script that takes 2 roots, one for data and one for images.
The script would then copy all images into the image root and then copy all data into the data root.
The image paths in the data directory are then suffixed with the new images path.

That way, the next time you update that xwing via git/Bower/Yarn/npm, you can always run something like npm setup <data_root> <image_roort> and the whole think is copied again into your project.

Is this something that is even remotely interesting to anyone else but me?

Ship Data mismatch with XWS

There appears to be a ship data mismatch between the Ship.json file and data produced by the Yet Another Squad builder for the ship name.

For the Tie Advance prototype, the xwing-data ship.json has the XWS reference as tieadvprototype where as Yet Another Squad Builders export has it as tieadvancedprototype. This is causing XStreamer to not be able to locate appropriate ship information like Shields, Hull value, and a few other pieces of information.

Not sure who is wrong, so figure I'd start here first.

Huge ships xws

It seems that the huge ships with "fore" and "aft" sections get the wrong xws identifier, "raiderclasscorvettefore" should just be "raiderclasscorvette" for example

Dual-card pilot image storage is inconsistent

The dual-card huge pilots are stored like this:

xwing-data/images/pilots/Galactic Empire/Raider-class Corvette/raider-class-corv-aft.png
xwing-data/images/pilots/Galactic Empire/Raider-class Corvette/raider-class-corv-fore.png

and

xwing-data/images/pilots/Rebel Alliance/CR90 Corvette (Aft)/cr90-corvette-aft.png
xwing-data/images/pilots/Rebel Alliance/CR90 Corvette (Fore)/cr90-corvette-fore.png

The Raider has two images in the same directory; the CR90 has one image in each of two directories. Can these be made consistent?

Properly represent Dual Upgrade Cards

At the moment we have the two sides of each dual upgrade card represented as separate upgrade cards, which isn't really correct. From a squad builder perspective, for example, the player selects both cards but has the option to flip it, to show the two different sides.

I propose to modify the upgrade card schema to allow a card to be either a single upgrade (as now - no breaking fix) or a dual card, to which two card objects are attached.

I will raise a pull request but comments welcome in the meantime...

Support for Second Edition?

X-Wing Second Edition was announced today and it contains updated rules, cards, and ship maneuvers.

Does it make sense to update xwing-data to reflect the second edition cards & maneuvers? Or does it make more sense for the second edition stuff to live in a different data repository so that all of the first edition data is still available? The second edition doesn't come out until September 2018, so there's plenty of time to figure it out and update our apps appropriately.

I have opinions about how I might want to update my Dial Vision app for the second edition, but I'm interested to hear what other developers think who also use xwing-data.

Title for ship

Sorry for raising the issue, probably its information that I dont know how to find but, How do I know that the ship accepts a "title".

Like "Black One" for T-70

JSON schema

Hi guys,

I'm currently writing a JSON schema for this data.
Is meant to help to make sure the data is formatted consistently and to also act as some sort of documentation on how to make updates to it.

Should I proceed? would something like that be considered for pulling into the repo?

Cheers
lvisintini

Interpreting the Maneuver Arrays in the .js files

Hello,

I noticed that the maneuver arrays in the .js files are arrays of arrays of integers. In the overall array, it appears that the position reflects the speed. In the inner arrays, positionally from left to right it appears that to denote the kind of maneuver and it's direction. The positions roughtly correspond to the following order: {left turn, left bank, straight, right bank, right turn, kturn, left sloop, right sloop, left troll, right troll} Finally, the integer itself denotes the color of the maneuver, where 0 = not present, 1 = white, 2 = green, and 3 = red. So for the entry regarding the JumpMaster 5K:

[[],
 [2, 2, 2, 1, 1],
 [2, 2, 2, 1, 1, 0, 1, 3],
 [0, 1, 1, 1],
 [0, 0, 1, 0, 0, 3]]

Interpreting this as,

No 0 speed maneuvers;
Speed 1: left turn green, left turn green, straight green, right bank white, right turn white;
Speed 2: left turn green, left turn green, straight green, right bank white, right turn white, no k-turn, left sloop white, right sloop red;
Speed 3: no left turn, left bank white, straight white, right bank white;
Speed 4: no left turn, no right turn, straight white,no right bank, no right turn, kturn red

Obviously there are no templates for speed 4 turns or banks but the values are still there for consistency. This reflects the JM5K dial upon visual inspection.

Am I interpreting this correctly? I'm aiming to build a model that can simulate movement of an X-Wing ship across a simulated 2d plane.

Maul/Ezra crew exception

Need a mechanism for handling the Ezra Maul (Scum) crew exception. In addition, a scope is required as the Maul card states that the restriction can be ignored if your squad contains 'Ezra Bridger'. In the future such exceptions could be limited to the pilot scope.

Maul restriction: "Scum only. Ignore this restriction if your squad contains 'Ezra Bridger'"

Possible solution to extend 'grants', already used on pilots and upgrades, to include 'type':'upgrade', 'id':, and 'scope':'squad'/'pilot' (perhaps implicit if not squad)?

example on Ezra Crew

  {
    "image": "upgrades/Crew/ezra-bridger.png",
    "text": "When attacking, if you are stressed, you may change 1 of your [Focus] results to a [Critical Hit] result.",
    "name": "Ezra Bridger",
    "unique": true,
    "points": 3,
    "slot": "Crew",
    "faction": "Rebel Alliance",
    "id": 215,
    "xws": "ezrabridger",
    "grants": [
        {
        "type":"upgrade",
        "id": 343, 
        "scope":"squad"
        }
    ]
  },

example on Ezra Pilot

{
    "image": "pilots/Rebel Alliance/Sheathipede-class Shuttle/ezra-bridger.png",
    "text": "When defending, if you are stressed, you may change up to 2 of your [Focus] results to [Evade] results.",
    "name": "Ezra Bridger",
    "xws": "ezrabridger",
    "ship": "Sheathipede-class Shuttle",
    "unique": true,
    "skill": 5,
    "points": 17,
    "faction": "Rebel Alliance",
    "slots": [
      "Astromech",
      "Crew",
      "Elite"
    ],
    "id": 275,
    "grants": [
        {
        "type":"upgrade",
        "id": 343, 
        "scope":"squad"
        }
    ]
  },

Sources ships should have quantities

Sources that have multiple ships included should include the quantity like in the pilots/upgrades dictionaries. An example would be in the Core Set below:

  {
    "id": 0,
    "name": "Core Set",
    "image": "sources/core-product.jpg",
    "thumb": "sources/core-thumb.jpg",
    "wave": 0,
    "released": true,
    "contents": {
      "ships": [
        "X-Wing",
        "TIE Fighter"
      ],
      "pilots": {
        "2": 1,
        "3": 1,
        "4": 1,
        "5": 1,
        "10": 2,
        "11": 2,
        "12": 2,
        "14": 1,
        "16": 1,
        "17": 1
      },
      "upgrades": {
        "1": 1,
        "3": 1,
        "4": 1,
        "8": 1,
        "12": 1
      }
    },
    "sku": "SWX01"
  }

Ships should be:

"ships": {
  "X-Wing" : 1,
  "TIE Fighter" : 2
},

Add support for slot _choices_ in upgrade card text

There is only one example of this that I know of, but the "Heavy Scyk" Interceptor card allows for a choice of multiple upgrade slots. To support this, we could extend the format of grants in a couple different ways:

...
    "grants": [
      { "type": "oneOf",
        "values": [
          {
            "type": "slot",
            "name": "Cannon"
          },
          {
            "type": "slot",
            "name": "Torpedo"
          },
          {
            "type": "slot",
            "name": "Missile"
          }
        ]
      },
      {
        "type": "stats",
        "name": "hull",
        "value": 1
      }
    ]
...

Thoughts?

Vcx-100 special arc

I propose adding "special arc" in the "firing arcs" key.

The main advantage for us in the X-Wing vassal crew would be to complete the upcoming feature of being able to construct on the fly any ship base (present and future) with this trait, even if it's not already in the module. It could also be constructed conditonally on having a docked attack shuttle.

Pilot Rey should be under Resistance

I believe pilot Rey (from Heroes of the Resistance) which is here

pilots/Rebel Alliance/YT-1300/rey.png

should be under

pilots/Resistance/YT-1300/rey.png

List of missing images

I'll use this list to keep track of missing card images:

Upgrades

  • R4-E1
  • Cruise Missiles

Pilots

  • Wookiee Liberator (Auzituck Gunship)
  • Lok Revenant (Scurrg H-6 Bomber)

Idea: Normalise text fields to use markdown instead of HTML

  1. Would remove inconsistencies of using <strong> and <b> tags.
  2. Would allow for nicer text formatting (We could use list and inline images)

We could argue that it would need additional processing on any application that uses this data, but this already happens for all the [Stop] and [Focus]

Use typographically correct quotes

A number of the data fields contain actual text from the cards. The cards use typographically correct quotation marks.

The data should use the correct quotes as well.

suggestion: merge "actions" and "grants" in upgrades.js

At the moment it's only the Millenium Falcon title which has an "actions" property, it feels like this would be better situated inside the existing "grants" array.

Grants already supports multiple types of grant, they all have a key of "slot" at the moment, so it could go in with a key of "action" instead.

To make parsing that array a bit easier, I would then suggest changing grants to something like:

"grants": [
  {
    "type": "slot",
    "name": "Bomb"
  }
]

Name could be anything though, either an xws string, or id number even.

Use consistent HTML

There is a mixed use of <strong>, <b>, <em, and <i> throughout the text

E.g:
Ion Cannon Turret uses <strong> while Cloaking Device uses <b>
Hound's Tooth uses <em> while Phantom uses <i>

I've not noticed any mixed use within one piece of text. It is easy to pick up however when converting from HTML to another syntax it adds an extra wrinkle.

Pulsed Ray Shield is Rebel and Scum only

The card says "Rebel and Scum only" but the data just limits it to Scum.

We need to let the faction field be a list, but that will break things that expect it to always be a string. Do you have a protocol for making backwards incompatible changes?

Add Project

First, thanks for the great data! I've created a package that exposes the data directory at modules. I did this more as an experiment but have since come to rely on it in an application I'm currently in development on. The repo for my "fork" is here: https://github.com/stevegood/xwing-data-module

Enjoy!

Wookie Commandos upgrade card requires multiple slots

Issue

Current Wookie Commands entry in upgrades.js suggests it requires a single Crew slot. Actual card requires two Crew slots.

  {
    "image": "upgrades/Crew/wookiee-commandos.png",
    "text": "When attacking, you may reroll your [Focus] results.",
    "name": "Wookiee Commandos",
    "xws": "wookieecommandos",
    "points": 1,
    "slot": "Crew",
    "faction": "Rebel Alliance",
    "id": 315
  },

A correction to this will require modifying current upgrade schema as it currently supports only one slot to be defined.

See upgrades.json

    "slot": {
      "description": "The slot used by this upgrade.",
      "$ref": "definitions.json#/definitions/slot"
    },

Recommendation

Remove the upgrades schema's entry for slot, and clone the entry for slots found in the pilots schema.

Here's an example of the change applied to the Wookie Commandos entry:

{
  "image": "upgrades/Crew/wookiee-commandos.png",
  "text": "When attacking, you may reroll your [Focus] results.",
  "name": "Wookiee Commandos",
  "xws": "wookieecommandos",
  "points": 1,
  "slots": [
    "Crew",
    "Crew"
  ],
  "faction": "Rebel Alliance",
  "id": 315
},

Attack type field

I'm rewriting r2-d7 to use this data set and have found that ships currently don't have any data about their attack type, ie Rear arc, 180 arc or turret. Without it, you can't full replicate all the data on each pilot card.

How about an "attack_type" field that can either be "turret", "frontback" or "180"? (Those are the names r2-d7 currently uses because that's what YASB calls them internally, but I'm open to changing them.) Should normal ships just not have an attack_type or is a "normal" value or similar better?

Explicit unique: false

Would you be open to explicitly setting "unique:false" in pilots.js and upgrades.js, instead of not having a value.

My use-case is specific to my own app (angular app using a filter to toggle between unique, not unique and either) but it may help others to be explicit.

Let me know and i'll get a PR open.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.