also it's slightly infuriating how much stuff here falls into the category of "only used by the scripting engine"
it makes static analysis really hard or even impossible
Top-level
also it's slightly infuriating how much stuff here falls into the category of "only used by the scripting engine" 84 comments
the game obviously doesn't support it but there IS wii balance board support in this engine. it turns out the difficulty settings are Easy=0, Medium=1, Hard=2, Custom=3. that was... expected. oh good news! I thought this game was finally sensible in using UTF-8. NOPE! Parts of it are using UTF16-big endian. I just named some variables in this function as "head_gender" and "generic_head". the game canonically considers tuxedoes to be "dresses". FEMINISM WIN? found a bug. WFCommon::setAllSeenTutorial is supposed to go through all players and set that they have seen the tutorial, like the title explains. It iterates through all three players but only sets player 1, three times I'm gonna assume this is just leftovers from the general game engine. this version doesn't even support keyboards. (well, the engine does. the game itself just does nothing with the keyboard events) I'm gonna have to try injecting katakana into a puzzle solution. BOOOO nope. although I could have guessed that. I know what font it uses for the puzzles, and while it has a lot of characters you wouldn't expect, it doesn't include katakana. fools will spend hours writing a program to parse font descriptions rather than manually transcribe the following PNG (it's me. I'm fools) it has been zero days since I have broken the emulator I'm using to reverse engineer a game ugh. they're doing something "clever" here and I don't like it. I can parse the usual bundle (mostly) fine, but the SharedAssets one has perfectly formed indexes that point to wildly wrong offsets like it'll be "this file is 5 megabytes and located at 24mb into the file" and the file is 34 kilobytes I think they're doing something weird where SOMETIMES those fields mean completely different things, based on flags. the compressed size is ALMOST the size of the "ROM" (the .DOL file), and their engine does support loading resources out of "ROMs", but the offset is still out in 1.2 gigabyte land, on a console with 80mb of ram fun fact: the engine calls it a "ROM", although from what I can tell, this engine has never run on any console with ROMs (do not @ me about the fact there were technically PC ROMs, I know and I made some of them) why did these punks hardcode a font ID. WHERE ARE YOU GETTING ALL THESE FONTS, GAME? I've got a breakpoint on the font loading code and it keeps getting called on fonts I don't see getting loaded! I'm gonna have to figure out how to dump these fonts out of RAM. in an emulator with no scripting support. ugh what if I just extended the "conditions" function to add a new datatype, which is HUGE HEX STRINGS that get dumped to the log? Delightfully devilish, Foone! I'm now sorting fonts by how big they are, since I can see their load sizes and compare them against the files on the disk. A full boot of this game loads FIVE fonts. I know the IDs of three, and the names of TWO I found another by dumping all resources that were 2,528 bytes long and then hex editing them to see if they're a font buh suspicious okay so I figured out when and where that one is loaded so I miscounted. 6 fonts. I have names for three, IDs for 5, and source files for 4. I could get the final source file if I could parse the Weird Bundle, and I could get the filenames if I could parse the filename trie. ANYWAY I think I have what I need for my current hax this font file ALMOST makes sense. Like I'll look at 19 out of 20 characters and they'll match perfectly and then one will just be completely wrong. well I manually extracted the hidden font, good ol' GENERICFONT.FDX.PRD. NOPE! it's similarly aligned, so it's not the right one either. the fuck? okay after matching all the dumped textures with the fonts by process of elimination, this is the font I want: that symbol in the top left, which appears to render as "ss", is §. what the fuck are they doing, exactly? there is a SLIGHT chance that it's actually ß and they invented a new encoding that's a hybrid of utf-8 and MacRoman. But I really, really hope not why is this function being called with this->__vt set to 5? I'M PRETTY SURE YOUR OBJECT'S VTABLE IS NOT AT ADDRESS 5, GAME especially considering that this is PowerPC and it'd presumably generate an unaligned address fault, and OH YET THE WII HAS NO MEMORY MAPPED AT 0 So it's a 16-bit RGBA color format. You might say "I can do basic math, and 5+5+5+3 isn't 16", but guess what: it's weirder and worse than you imagine! it's two formats combined into one. well I tried to decode one these images and I got this. I think that's supposed to look like this, just guessing from the dumped textures. oh yeah it's a blocked format, because Nintendo hates the idea of storing pixels in an order that makes sense |
since I don't yet understand how the scripting engine works