We're Getting There...
Hey Folks! Making progress on restoring mods today.
When I started this morning, the game would crash upon trying to load Kaaven's "Mod of Doom." Usually as a result of trying to load a null, blank, or invalid ID from the mod system. I think a bug was introduced in the remapping code when it was converted from Flash to Haxe, which basically caused all IDs to remap to "0" in mods. Which, apart from not loading the correct data, also caused an index out of range error in most arrays (which assume in-game IDs of 1 or greater).
Once I had that sorted out, the game could load the mod, but all images were replaced by the big red "X" (missing image). For most of the afternoon, this was my focus.
The issue here was due to the way the new engine handles images. Previously, the game would load all images first, store them in memory, then load mods that point to those images. The new engine loads images as-needed, though, so I had to do a bit of preparation before mods loaded. Mainly, to load the img directory (if available), and record all of the images available for that mod. Then, store the path where each of those images could be found.
Once that was done, the game once again could load the appropriate image for each item (and other asset). In theory, anyway.
As you can see in today's image, that's not totally true. We see Kaaven's starting suitcase item, seemingly complete with description, contents, and other stats. But all of the images are Flixel icons. Note that these are not big red "X" sprites. My first hunch is that the game tried to load a bitmap from the wrong file location, or that the bitmap conversion failed. I'll have to look into that tomorrow.
Still, not bad! Today felt like an appropriate amount of progress for the effort, so I'm not too upset.