October 3
Plowing right along, now that the delicate things are done with! Mostly anyway...
The result stats tab is now fully setup, except with reserved spots for sections such as handling gear and buffs, where those tabs don't even exist/function yet. With this, the v3 Armory is now almost as functional as the initial release three and a half years ago .
I've begun work on the URI generation as mentioned before, and have ended up making some adjustments based on things I have learned/worked out since that Dev Log.
The previous Set Links were unwieldy for numerous reasons, not least of which being their length. But it was also a problem that they contain characters that are not really supposed to be in URI. Pasting unshortened links fails since these symbols confuse web pages/programs about where the link ends, and aggravates some browsers due to the symbols not being encoded (which is why I had to ditch using the address bar to begin with).
The v3 Set Links will use only "safe" characters, and are still targeted to be significantly shorter than the old links, even with the extra data that they now have to carry. To jump right into it, I'll just paste the section of the Set Link that v3 can successfully generate so far, and then go over how it's made/functions piece by piece:
/Armory/#00_300~01_A.2.1s.Z8.1i.D.0.0.uy.jK.jP.iU.ik.20z.2M.0.1C.2X.Z8.uy.0.0
The /Armory/ bit is just to show what the full URI will roughly look like. The first thing to note is that the v3 URI continue to take the shortcut of using hash values instead of actually being proper URI. Given that this works, I don't have any realistic reason to change it at this point. However, everything past the hash looks completely alien, compared to the last URI, which looks like this for the "same" section of data:
/Armory/#(`version`+2.03,`stats`+[7885,172,1183,1205,1105,1194,90]
The key difference in the structure is that I have abandoned JSON for the purposes of the URI. It was very convenient for the process of saving/loading, but not so convenient in any other category. The new format is pretty much a series of blocks of data, that are in turn composed of other blocks of encoded data. These blocks are numbered (I will explain this below), but like with the old Set Links, the order the blocks are in does not actually matter, just like with the JSON data.
The "outermost" layer of blocks are these:
00_ = Version Data
01_ = Base Stat Data
02_ = Skill Rank Data
03_ = Transformation Path Data
04_ = Equipment Data
05_ = NX Equipment Data
06_ = Buff Data
Each block is identified via those prefixes, and the blocks are separated with the ~ character. When read, the read function can simply perform .split("~") to isolate these blocks.
00_ Version Data:
00_300
Version data is recorded for the purposes of identifying the overall structure of the URI in the event of a major shift or a change that otherwise would break all old URI. It checks this value to know which format to read it in. Version is stored as a series of three Base 62 digits. The first digit is the overall version number, 3 in this case. The second digit is the update number, and the third digit is the patch number for the update. Overall, this results in Version 3.00.00 being saved as 300, and applies a maximum cap of 61 to each number, due to the one digit limit.
01_ Base Stat Data:
01_A.2.1s.Z8.1i.D.0.0.uy.jK.jP.iU.ik.20z.2M.0.1C.2X.Z8.uy.0.0
The Base Stats as recorded on the Base Stats tab. Shocking. Having seen the v3 Base Stats tab in previous Dev Log posts, you will have noticed the much longer list of stats it now requires for proper calculation. This is why this section of the URI is actually longer than the previous, despite the much more efficient format.
Each value is separated by a period, which is probably immediately obvious. What isn't so obvious is the order that they are in. The Armory itself also happens to face this issue. The very first value of the set, A in this case, declares the format the data is in. Effectively, this is just telling it what order everything is stored in.
The next value is the character ID, stored in Base 62 (Expect nearly everything to be stored in Base 62 whenever possible...). This one is required for the Armory to reference the correct set of Base Stats, and also happens to conveniently resolve a standing issue where Twin Sword sets load as Lann even if they are from a Vella set. The value after is the character level, used for gear/skill/stat requirements and VIP bonus calculation. The values after are just the stats, and I doubt that the order they are in is all that interesting. Just know that they are indeed all in Base 62, and capped to 3 digits as a failsafe (which is still a maximum value of 238,327...)
02_ Skill Data:
This will be Skill Rank Data, but I have not yet constructed anything final code-wise. Storing these is rather simple comparatively, at least. The final format will likely be this one:
02_##R##R##R
Where ## is the skill's ID, always set as a two digit Base 62 number (since the skill ID may actually exceed 61 in the future), followed by the skill's rank value as a single Hexadecimal value (16 ranks, 16 digits, its perfect).
Since the skill rank data is always three digits per skill, this both allows for it to not care about the order the data is in, AND allows me to omit max skill ranks, as previously mentioned in other logs about space efficiency.
I have nothing at all ready to talk about/demonstrate for the remaining four sections, so I'll save that for the next Dev Log covering URI.
Incidentally, this is as far as I can go with coding the Set Link right now. To make it any further constructing these, I need to make the Gear tab functional. To make that properly functional, I must also in turn make the Item List tab, the Right Click Menu, and the Preview Window functional. Of these, two of them don't even exist. Fortunately, the Item List actually exists AND properly generates item lists, albeit with no events attached.
My next thing to do is going to be creating the Preview Window and enabling its functionality. The sheer amount of custom CSS and HTML it has is extreme, so I don't know if I want to keep it exactly as is, despite how good of a job it does at emulating look of the ingame tooltips. I may create a v3-style tooltip using just the basic templates and see how it looks, before I commit to one style or the other.
Due to this bit of tough decision making to do, no ETA on the next Dev Log, except Saturday at latest.