Jump to content

Event Question (FE8; I Know, I Know, But Try)


Kngt_Of_Titania
 Share

Recommended Posts

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 0xB0
CALL label38

MUS1 0x18
CAM1 0xF9
CUMO 0xF9
STAL 60
CURE
_0x0420 0x2
_SETVAL 0x7 0x1
_SETCONDITION 0x1 0xC 0x7
_SETVAL 0x7 0x2
_SETCONDITION 0x2 0xC 0x7
ENIF 0x0
_SETVAL 0x2 0x9EC
ELSE 0x3
ENIF 0x1
_SETVAL 0x2 0x9ED
ELSE 0x3
ENIF 0x2
_SETVAL 0x2 0x9EE
ENIF 0x3
TEXTSTART
TEXTSHOW 0xFFFF
TEXTEND
REMA
ENIF 0x4

CALL label26
ENIF 0x63
_0x0228 0x7
ENDA

label38:
_0x2E21
_SETCONDITION 0x0 0xC 0x2
CALL label26
ENIF 0x0
ENDA


label26:
_0x1929
_0x0620 0xC2
_0x0221 0xFFFF
_0x0228 0x7
ENDB

Edited by Kngt_Of_Titania
Link to comment
Share on other sites

My brain is made of approximate cotton, but. . .if you play the chapter normally, under several different conditions, does she say different things?

Link to comment
Share on other sites

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 by CT075
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by Kngt_Of_Titania
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...