Kngt_Of_Titania Posted July 18, 2013 Share Posted July 18, 2013 (edited) So I'm trying to figure out why an AREA event in Chapter 6 FE8 is acting weird. More specifically, it's the event where the Bael gets close to the little girl, who then screams for help (this section of code is completely unmodified by me, btw). The girl has three quotes, which are Text IDs 0x9EC, 0x9ED, and 0x9EE seen below; so you'd think that they would go in order, right? Wrong! For some reason, the choice of text that she says is seemingly almost random, to the point where I think it might truly be determined by the number generator. For example, I have two savestates from the same attempt at my new chapter, identical except for a minor difference in how I dispatched the last couple of enemies -- yet, somehow, the text I see in both is different! I know what about 80-90% of the code does; for example, the underlined portion checks to see if the girl is alive (IIRC) and the italized portion checks to see if the Bael is the character in the AREA (and then essentially skips to the end of the code if it isn't). However, there's a small section that I can't quite figure out, which is the bolded part. I KNOW what it essentially says: > Check a condition > If the value is 1, use text 0x9EC > If the value is 2, use text 0x9ED > If the value is neither 1 nor 2, use text 0x9EE > Show text > REMA But for the love of god I have no idea what condition it might be (character alive, character present, event ID used, turn count, etc.). Can somebody with a little experience with Event Assembler for FE7 take an educated guess as to what condition it might correspond to? Because I'm a bit stumped. ~Ze Code~ label24:_0x3322 0xF9_SETCONDITION 0x63 0xC 0x0_0x3640 0xF9 0x918 0x604_SETCONDITION 0x4 0xC 0x0_SETVAL 0x2 0xB0CALL label38MUS1 0x18CAM1 0xF9CUMO 0xF9STAL 60CURE_0x0420 0x2_SETVAL 0x7 0x1_SETCONDITION 0x1 0xC 0x7_SETVAL 0x7 0x2_SETCONDITION 0x2 0xC 0x7ENIF 0x0_SETVAL 0x2 0x9ECELSE 0x3ENIF 0x1_SETVAL 0x2 0x9EDELSE 0x3ENIF 0x2_SETVAL 0x2 0x9EEENIF 0x3TEXTSTARTTEXTSHOW 0xFFFFTEXTENDREMAENIF 0x4CALL label26ENIF 0x63_0x0228 0x7ENDAlabel38:_0x2E21_SETCONDITION 0x0 0xC 0x2CALL label26ENIF 0x0ENDAlabel26:_0x1929_0x0620 0xC2_0x0221 0xFFFF_0x0228 0x7ENDB Edited July 18, 2013 by Kngt_Of_Titania Quote Link to comment Share on other sites More sharing options...
eclipse Posted July 18, 2013 Share Posted July 18, 2013 My brain is made of approximate cotton, but. . .if you play the chapter normally, under several different conditions, does she say different things? Quote Link to comment Share on other sites More sharing options...
CT075 Posted July 18, 2013 Share Posted July 18, 2013 (edited) someone experienced with fe7e vents would look at that and go "wtf" because that's equally weird, i haven't really the slightest idea either just based on what i know about coding, though (and i do'nt think i'm completely off-kilter), it's probably something like this (gonna start from near the beginning) // I'm making an educated assumption that the format for _SETCONDITION goes like this: // _SETCONDITION evID val1 val2 // and that it compares the two values with an equality test. I could be completely wrong about that, but // I think I'm at least right about the event ID // I don't know what this check is for, but if it's false the entire thing is skipped. if (val[0x0] == val[0xC]) { // _SETCONDITION 0x4 0xC 0x0 val[0x2] = 0xB0 // _SETVAL 0x2 0xB0 // I will take your word for what this does label38(); // CALL label38 setMusic(0x18); // MUS1 0x18 setCamera(0xF9); // CAM1 0xF9 // I forget what CUMO does but I know it does something on-screen wait(60); // STAL 60 // all I know is that CUMO and CURE are a matched pair // I don't know what this line does, probably initializes it as a text data pointer __init__(val[0x2]); // _0x0420 0x2 val[0x7] = 0x1; // _SETVAL 0x7 0x1 // I have no idea what this check is for, I initially thought it was a switch statement but it isn't. if (val[0x7] == val[0xC]) { // _SETCONDITION 0x1 0xC 0x7 // I'd thought that this line would be more like val[0x7] = val[0x2]; but that doesn't make // sense if you can also call _SETVAL 0x2 0x9EC... unless val[0x9EC] directly grabs the pointer // to the text value? But IMO that doesn't make sense either because that would mean that the // index for [0x2] would have to be in hardware memory (ie in the ROM) or the entire text pointer // table would have to be copied into a more dynamic portion of memory (which is also dumb // because that's terrible coding) val[0x7] = 0x2; // _SETVAL 0x7 0x2 // I don't know what the ENIF 0x0 does, it could potentially be related to something else earlier // that I'm not taking into account, but based on the other code snippets you've posted it // potentially has another entirely different meaning that we're not taking into account if (val[0x7] == val[0xC]) { // _SETCONDITION 0x2 0xC 0x7 val[0x2] = 0x9EC; // _SETVAL 0x2 0x9EC } else { val[0x2] = 0x9ED; } } else { val[0x2] = 0x9EE; } } // And then the rest you pretty much already know. Edited July 18, 2013 by CT075 Quote Link to comment Share on other sites More sharing options...
Alfred Kamon Posted July 18, 2013 Share Posted July 18, 2013 Hmm.... I think there are 3 quotes because there is more than one bael in that map. I don't know how the quotes are chosen, though. But it's pretty much sure that she doesn't say the same line twice, so the event should also check if said text has already been told? Dunno, just guessing. Quote Link to comment Share on other sites More sharing options...
Kngt_Of_Titania Posted July 18, 2013 Author Share Posted July 18, 2013 (edited) Hmm.... I think there are 3 quotes because there is more than one bael in that map. I don't know how the quotes are chosen, though. But it's pretty much sure that she doesn't say the same line twice, so the event should also check if said text has already been told? Dunno, just guessing. So I've done more testing of this, and here's what I found: Taking one of the savestates and doing absolutely nothing but burning different amounts of RNs (for those of you who don't know, you can burn RNs without attacking/doing any action by manipulating the movement arrow in the GBA FE games), I see her choice of speech changes. However, she can and DOES repeat the quotes (and it looks like it is dependent on RNs), and there's nothing in the event to stop her from doing so. I'll leave it alone in my hack for now, because it's not a big deal (mainly because, unless Vanessa blocks the spider, she only talks for two turns), and I can always "refine" it down the road. Edited July 18, 2013 by Kngt_Of_Titania Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.