edo9300 / edopro

A script engine for "yu-gi-oh!" and sample gui (former "ygopro")
Other
286 stars 76 forks source link

Question regarding Base64 Deck URIs. #171

Closed RillingDev closed 4 years ago

RillingDev commented 4 years ago

I am the author of yugioh-deck-tool, a web application that more or less mimics the deck builder of EDOPro. I was wondering if there is some form of loose specification for Base64 Deck URIs EDOPro uses (The structure of ydke://foo!bar!fizz) so that myself and authors of different tools which currently consume .ydk files can make use of those URIs as well.

Only somewhat related, but I currently have a similar feature which however only targets encoding to individual URL query parameters (https://github.com/FelixRilling/yugioh-deck-tool/blob/development/packages/core/src/core/business/service/DeckUriEncodingService.ts).

edo9300 commented 4 years ago

ydke structure is pretty simple, it consists if 3 base 64 strings identifying relatively deck, extra and side, separated by ! (as it's not part of the base64 alphabet, those base64 strings represent an array of ints consisting of the card codes, you can find a ts implementation of the parsing here

AlphaKretin commented 4 years ago

Just for the record, I don't have any issue with that code being used as a reference. 👍 The relevant bit is the ToPasscodes function, once you've extracted the three segments.

RillingDev commented 4 years ago

Thank you for the help and the reference!