(Edit: I rewrote my entire post as I kept adding new things through 10+ edits so it turned into a mess to read
Oh wow nice! I missed your edits before, sorry!
Regarding the sheet:
I've made a script for exporting all events from EDU and merging them with the sheet. I've also merged the local & compiled commands and added EDU events
I made a backup of the sheet before in case something went wrong. So what needs to be done is the following:
- Merge duplicate events (some got duplicated, like lines 7 & 8 )
- Add DES and ETA indexes for all worlds they're available in. My export only shows the DES and ETA for the worlds they're used in, but in a lot of cases they're available in more worlds and should thus be added.
- Name all the unnamed events
Please let me know if something went wrong with the export. I'll help out with these things when I got a chance
I pushed a commit where Ray1Map now uses the new sheet with EDU support. If you ever want to test your changes, just download the sheet as .csv and replace the file in the repo and it'll work. I haven't checked every level, but so far it seems the Quiz games works with these EDU values too!
I looked into it and turns out the educational game adds an additional 32-bit HP value used only for the voice-line event. This is because the normal HP value is 8-bit, so a max value of 255 which isn't enough for all voice line indices. The HitPoints is always equal to (32BitHitPoints % 256), which makes sense.
I've updated Ray1Map to use this value. It wasn't included in the export though, but I'm not going to re-export anything since it'd just be a huge list of 600+ voice line events. We should probably just have 1 of them in the sheet anyway tbh. For the letters it's probably good making separate entries though.
Regarding upper/lower case:
I added basic memory loading support for EDU and it seems I was completely wrong with how the upper/lower-case is handled. I thought it was the HitPoints, but apparently the HitPoints value determines the color palette, just like the colored tings etc.
You can see it by editing the HitPoints value in real-time while loading from memory. Not really sure if we can easily add support for this in Ray1Map though... Currently it's done through a hack based on the DES names, which only works in Designer :/
You mentioned saving causes the letters to be uppercase, right? I checked and the only values which change when saving, without making any edits, are the runtime values... Odd that it would use one of those. It's like if the developers just changed the frame
in their editor, set the animation speed to 0 and compiled the level...
Regarding the alpha:
I have no clue what that is. My guess was it was related to the letters (alpha=alphabet?) but I could be completely wrong. It consists of structs of 255 bytes each and appear in every level file (alongside a WLDMAP file, which is fixed data).
Edit: I pushed a commit to Ray1Map where, through slightly hacky code, I made it use the runtime animation frame
index leftover from Ubisoft's editor to handle the upper/lower case. So it should work correctly now.
Edit 2 (or way more than 2 if you count all my million edits previously
): I now changed the way multi-colored events are handled in Ray1Map to be a bit more generic. It should now work with memory loading as well as EDU (so letters appear in the correct color now). Once again the code is a bit hacky, but it's the best we can do since we create all graphics before loading the level, while the game creates them each time they're drawn on screen.