I'll let you know when they get back to me. I'm hoping they won't be too concerned since I'm not reproducing rules.
JSON format reasonable for the ids in the list?
i hope for you they'll be lenient, since you won't compete with warroom. i believe they do not have very much retorsion power if you do not explicitly use/steal their IP : logos, extracts of rules, ...
also, JSON would be perfect, and an explanation of the rule for constructing the URL (specially about handling min/max units and attachments) since i did not try to reverse-engineer this, that would be too tedious for those 800+ references.
Here's a mapping of codes to army list entries and theme lists:
https://conflictchamber.com/ccmap.jsonIt's set up so that each code maps to a particular option (e.g., "2u" is the code for min Exemplar Vengers, "2v" is the code for max Exemplar Vengers; weapon attachments have a separate code for 1, 2, and 3 models). This may not seem terribly elegant at first, but it ends up allowing a more compact representation assuming that all entry codes are fixed-length.
The codes can be converted into integers as follows:
export function decodeCharSingle(str: string, offset: number): number {
let c = str.charCodeAt(offset);
if (c >= "0".charCodeAt(0) && c <= "9".charCodeAt(0)) {
return c - "0".charCodeAt(0);
}
else if (c >= "a".charCodeAt(0) && c <= "z".charCodeAt(0)) {
return 10 + (c - "a".charCodeAt(0));
}
else if (c >= "A".charCodeAt(0) && c <= "Z".charCodeAt(0)) {
return 36 + (c - "A".charCodeAt(0));
}
else if (c == "-".charCodeAt(0)) {
return 62;
}
else if (c == "_".charCodeAt(0)) {
return 63;
}
else {
return -1;
}
}
export function decodeChar(str: string, offset: number): number {
return (decodeCharSingle(str, offset) * 64) + decodeCharSingle(str, offset + 1);
}
A list stored in URL format always starts with the character 'b'. The second character should be decoded as a single character as above; the 0x10 bit is set if the list is a Steamroller bit, and the mask 0x0f identifies the faction of the list from the following mapping:
factions: {
1: {
wmh: 1,
n: "Cygnar"
},
2: {
wmh: 1,
n: "Protectorate of Menoth"
},
3: {
wmh: 1,
n: "Khador"
},
4: {
wmh: 1,
n: "Cryx"
},
5: {
wmh: 1,
n: "Retribution of Scyrah"
},
6: {
wmh: 1,
n: "Mercenaries"
},
7: {
wmh: 2,
n: "Trollbloods"
},
8: {
wmh: 2,
n: "Circle Orboros"
},
9: {
wmh: 2,
n: "Skorne"
},
10: {
wmh: 2,
n: "Legion of Everblight"
},
11: {
wmh: 2,
n: "Minions"
},
12: {
wmh: 1,
n: "Convergence of Cyriss"
}
}
The next two characters are the point size of the list as decoded above.
After that, the list itself begins. From here on out, every code is read as two characters. The list may start with the theme list code "_-" followed by a code identifying the theme list (see the themes mapping in ccmap.json), the contract code "_Z" identifying a mercenary contract (which right now is exclusively Operating Theater, so "_Z" will always be immediately followed by "07"). Next comes the caster if one is chosen (the caster
must come first in a list), followed by the rest of the list. Entries that are attached to another entry (e.g., warjacks, command attachments, etc) are always attached to the closest
prior entry that can accept them.
The code "__" separates lists in a list pairing.
Let me know if you have any questions, but I think that specifies everything.