Skirmish Interchange Format

By kingargyle, in Imperial Assault Skirmish

21 minutes ago, cramill said:

FYI, I have access to the database for ia-armies.com and I have been the one updating the cards in the database. The source that you found on github for ia-armies.com is a work in progress rewrite of the site, but it hasn't been touched in a while. The owner of the site and repo hasn't been responsive to anything I've sent him. I've been considering finishing some of the features and submitting a pull request to the github to see if he does anything with it, but I'm not very hopeful...

Unfortunately if he has stopped development of the project, you might be able to just fork his source code, finish up the features, and then launch your own site with the new functionality. I'd try reaching out to him first and see what happens, but since he released the source code, it is fair game to work on from my perspective.

Good luck, I'd love to see the site support the format.

I just posted this in another thread, but I'm re-posting it here because it's more pertinent to this discussion anyway:

Quote

I'm terribly sorry that it's taking me so long to get onto this! I've been working on a pretty significant update to improve the Power Token functionality, and I was stumped for quite a while, but I think I've got it sorted out now.

I'll post here when I do get on the JSON project. And yes, I will! Promise! I absolutely love the idea of being able to import and export save files with Vassal and the various squad-building sites/programs out there. As Qui Gon Jinn said, "[Making this happen is] the will of the Force, I have no doubt of that."

So yeah, it's still on my radar. I definitely have not forgotten about this project. :)

On 27/10/2017 at 8:21 PM, werdnaegni said:

Just an update, Tabletop Admiral now has an option at the bottom (as long as you're logged in) to download a .json version of your list.

I think that's the wrong way to go. The guy had the right idea to use hashes in URIs. There's nothing simpler than copying and pasting an URI rather than downloading a JSON file. IMHO there should be a common encoding API that can encode all the card IDs of a list into a code, then decode the generated code back into IDs which can reference the JSON common defs and rebuild the original list. Also the generated code can easily be shared during tournaments, using its equivalent QR code representation. I'm not sure if I explained well my idea in English.

Edited by Golan Trevize
42 minutes ago, Golan Trevize said:

I think that's the wrong way to go. The guy had the right idea to use hashes in URIs. There's nothing simpler than copying and pasting an URI rather than downloading a JSON file. IMHO there should be a common encoding API that can encode all the card IDs of a list into a code, then decode the generated code back into IDs which can reference the JSON common defs and rebuild the original list. Also the generated code can easily be shared during tournaments, using its equivalent QR code representation. I'm not sure if I explained well my idea in English.

I was asked by the person making the interchange format to do it in JSON, so that's what I did. I'm happy to do something else if that's better, but once it leaves my site, I have no control or knowledge as to what needs to happen, so whoever is running the conversion or whatever will have to direct me.

On 12/26/2017 at 10:39 AM, Golan Trevize said:

I think that's the wrong way to go. The guy had the right idea to use hashes in URIs. There's nothing simpler than copying and pasting an URI rather than downloading a JSON file. IMHO there should be a common encoding API that can encode all the card IDs of a list into a code, then decode the generated code back into IDs which can reference the JSON common defs and rebuild the original list. Also the generated code can easily be shared during tournaments, using its equivalent QR code representation. I'm not sure if I explained well my idea in English.

Json is a standard interchange format. There is no need to decode, given the exact url for the JSON one could get the list just as easy. I know of nobody that actually uses QR codes, and you can even get the specific JSON url for a squad if somebody provided it. It is all on the implementor to handle that.

6 hours ago, kingargyle said:

Json is a standard interchange format. There is no need to decode, given the exact url for the JSON one could get the list just as easy. I know of nobody that actually uses QR codes, and you can even get the specific JSON url for a squad if somebody provided it. It is all on the implementor to handle that.

Yes I get that, it's true as long as the implementor provides such a capability and a server that replies with the json in standard format. Tabletop Admiral is able to achieve the same encoding everything you need in the URI. You don't even need to do a http get to convert the URI into a json. You don't need an implementor because once you got the URI there is no server call needed, the URI is the list itself. You only need to know how to translate a list of cards in json standard interchange format into a Uri (encoding) and the Uri back to the original json (decoding). That encoding/decoding can be a standard as well. You assume that anyone who wants to employ the json standard discussed here, has server capacity to respond to all the http requests generated by people retrieving lists at all times. Imagine the Startactics IA app, should the implementor host a server for sharing JSONs? Or should the app produce an hash that can be parsed by however uses the standard interchange format? I think if you can go infrastructure-less you must go infrastructure-less.

QR codes is just one of the fancy things you can get for free.

Edited by Golan Trevize
2 minutes ago, Golan Trevize said:

Yes I get that, it's true as long as the implementor provides such a capability and a server that replies with the json in standard format. Tabletop Admiral is able to achieve the same encoding everything you need in the URI. You don't even need to do a http get to convert the URI into a json. You don't need an implementor because once you got the URI there is no server call needed as the URI is the list itself. You only need to know how to translate a list of cards in json standard interchange format into a Uri (encoding) and the Uri back to the original json (decoding). That encoding/decoding can be a standard as well. You assume that anyone who wants to employ the json standard discussed here, has server capacity to respond to all the http requests generated by people retrieving lists at all times. Imagine the Startactics IA app, should the implementor host a server for sharing JSONs? Or should the app produce an hash that can be parsed by however uses the standard interchange format? I think if you can go infrastructure-less you must go infrastructure-less.

QR codes is just one of the fancy things you can get for free.

Yeah, Yet Another Squad Builder does something similar, but JSON is still the standard for XWS, so I modeled the IA Skirmish Data format off that. Regardless, I published the spec, and people are starting to adopt it... TableTop Admiral, and X-Streamer are the first, and there is work being done to implement it for the Vassal module as an import option. As for Startactics, all they would need to do is Support Exporting to IA Skirmish as a file, or copying it to the clip board. the files then could be imported into any application that supported the format. No server needed.

12 minutes ago, kingargyle said:

Yeah, Yet Another Squad Builder does something similar, but JSON is still the standard for XWS, so I modeled the IA Skirmish Data format off that. Regardless, I published the spec, and people are starting to adopt it... TableTop Admiral, and X-Streamer are the first, and there is work being done to implement it for the Vassal module as an import option. As for Startactics, all they would need to do is Support Exporting to IA Skirmish as a file, or copying it to the clip board. the files then could be imported into any application that supported the format. No server needed.

Dude, we are saying the same thing. Just saying you can avoid file handling and go with an easier 128 chars hash plus copy and paste. You still need the Json standard interchange format underlying.

Edited by Golan Trevize
Just now, Golan Trevize said:

Dude, we are saying the same thing. Just saying you can avoid file handling and go with an easier 128 chars hash plus copy and paste.

The project I run is open source, so by all means, please feel free to document the technique, or even provide sample implementations. I'll gladly include it as a supported format to encode the JSON.

https://github.com/kingargyle/iaskirmish-data

3 minutes ago, kingargyle said:

The project I run is open source, so by all means, please feel free to document the technique, or even provide sample implementations. I'll gladly include it as a supported format to encode the JSON.

https://github.com/kingargyle/iaskirmish-data

Sure, I can't at the moment because I'm on vacation. But once I'll be back I'll put in place an encoder. I guess a java library should suffice (I saw we have a json reader/writer written in java), right?

Just now, Golan Trevize said:

Sure, I can't at the moment because I'm on vacation. But once I'll be back I'll put in place an encoder. I guess a java library should suffice (I saw we have a json reader/writer written in java), right?

Yep. I wrote the Java implementation. Somebody was supposed to be working on a PHP implementation as well for the reader and writer. The whole reason I made the project open source was so the community could expand upon the initial idea.

Just now, kingargyle said:

Yep. I wrote the Java implementation. Somebody was supposed to be working on a PHP implementation as well for the reader and writer. The whole reason I made the project open source was so the community could expand upon the initial idea.

Idea is great! Thanks for the amazing job.

I just ordered Imperial assault so I not yet in a position to help with logic for any application.

However I would suggest using unique id's for properties that are chosen from a fixed list.

For instance instead of "faction" : "imperial | rebel ..." go for "faction" : 1 | 2 ...

This avoids any confusion and misspelling. You could then add the fixed lists (with ids) to the top or bottom of this json or even a separate file.

It would ve nice to have an app or site to share this data.

You could also add a json format for sharing custom maps. For instance an array of "row" objects with tile and column info.

I've only just now found this thread.

I have been independently working on scraping the data from http://cards.boardwars.eu to add it to a comprehensible JSON dataset.

I named it imperial-assault-data (You can find the latest release here )

The first release was on 27 Feb 2018 and it now includes entries for all the components available in the game.
The images have been aligned and resized to fit standard dimensions as well. Also, they all have round transparent corners.

I have also coded up an implementation of the iaspec canonical names as defined by @kingargyle.
The results can be inspected/reviewed in https://github.com/lvisintini/imperial-assault-data/pull/11

The structure of the whole dataset is also checked with JSON schema validation and tests

Currently there is a lot of data that could be added, but that will come in later releases.

Please, raise comments and issues as they find them.