lushen124 Posted September 3, 2015 Share Posted September 3, 2015 So I'm seeing some flakiness with AFEV not always firing for me. I'm trying to make it so that I get an event triggered when one of the snag's in my chapter are destroyed, which I can do by making a "death quote" for the snag "unit" in the death quote table. This allows me to add a pointer and a eventID to trigger when it happens. Right now I'm using event ID 0x23 and some random guy's death quote event to test. So in Nightmare, I have this: In my events, I have this snippet: Misc_events: CauseGameOverIfLordDies DefeatAll(AllEnemiesDefeated) AFEV 0x0 ResetBossDeathQuote 0x02 // After the first boss goes down, no other quotes play. We need to reset them. AFEV 0x0 IncrementCasualties 0x22 // We mapped other deaths to 0x22, 0x65 is still the game over flag for Lords. AFEV 0x0 SnagKill 0x23 // Going to experiment with this one. Does killing Snag cause an event to be fired? End_MAIN ... SnagKill: ENUF 0x23 // Unset the flag so that it can trigger again (there's 2) // Log a debug message for now. TEX6 0x5 [0,0] 0x054E // Display "Snag" in a yellow box _ASM0x42 0x83181 ENDA So, the good news is that when destroying the snag, the random guy's death quote does go off, which means that I should be able to get the AFEV to fire, but it doesn't, for some reason. I know this becuase A) the debug log doesn't show up after the death quote and B) the second snag broken doesn't show the death quote (meaning the event ID did trigger and ENUF wasn't hit) and C) if I break the second snag first, the death quote still plays, so both snags look at the same DQ entry. Yes, I can just put the code I want in the pointer to the death event, but that means I need to create a new snag unit death quote for every chapter I do this in, which is a pain. So is there something I'm missing about AFEV that I should know? I've found some event IDs that I know just don't work properly (presumably because they're used by the game in some unknown way) including 0x50, 0x51, 0x52, 0x64 (presumably everything between 0x52 and 0x64 too). I also found that anything above 0xA5 (or at least 0xA5 - 0xB1) doesn't actually carry over between chapters, unfortunately (and I think 0xA7 or something actually just flat out doesn't work). I'm aware of the big chunk used by the game for future events between 0x66 and 0x9D, so I'm trying to avoid touching those, since I'm only messing with Lyn mode at the moment. Quote Link to comment Share on other sites More sharing options...
Avril Lavigne Posted September 3, 2015 Share Posted September 3, 2015 Everyone is getting this new looking Nightmare, kind of cool. Anyways, I'm not sure if your Nightmare requires a 0x before the number, but try putting 0x23 instead of just 23. And to answer your question about the snag death, I'm really not sure if it works. Quote Link to comment Share on other sites More sharing options...
Agro Posted September 4, 2015 Share Posted September 4, 2015 (edited) Yes, I can just put the code I want in the pointer to the death event, but that means I need to create a new snag unit death quote for every chapter I do this in, which is a pain. What do you mean by this? If you set it to "any chapter" it will still fire the death event in every chapter. My experience is that if you're having trouble with the Trigger IDs in death quotes, just do it as an event instead. P.S. smart thinking giving the snag a death quote! I'd never even considered doing that. Edited September 4, 2015 by Agro Quote Link to comment Share on other sites More sharing options...
lushen124 Posted September 4, 2015 Author Share Posted September 4, 2015 (edited) What do you mean by this? If you set it to "any chapter" it will still fire the death event in every chapter. My experience is that if you're having trouble with the Trigger IDs in death quotes, just do it as an event instead. P.S. smart thinking giving the snag a death quote! I'd never even considered doing that. Correct, any chapter means the events attached to it will fire off every chapter, but the problem is I may not want the same thing to happen every chapter. ;) Hence, if I go down this route, that's a snag for each chapter (and each snag is attached to 1 chapter). Not a huge problem, but just a pain (partially because I didn't allocate much more extra space for my table. :p) What I don't understand is that the other one in my example works. IncrementCasualties fires off properly when 0x22 is attached to real characters and ResetBossDeathQuote works when attached to the boss's 0x2 death event, and the event code runs in both of those cases. Yet, 0x23 for whatever reason doesn't. If this method didn't work I expected the DQ table to not have been accessed instead of AFEV not working, but instead, now it's AFEV that's not triggering, and the death quote works just fine. >_< EDIT: I'll just deal with it when the time comes. I'll just lock this entry to Ch. 1. If somebody still wants to chime in, feel free (because I still prefer AFEV if possible). But for now: Edited September 4, 2015 by lushen124 Quote Link to comment Share on other sites More sharing options...
Agro Posted September 4, 2015 Share Posted September 4, 2015 Here's one thing you can try: have a flag e.g. 0x08 that says if you want the death quote to fire or not. If 0x08 is true, then death quote fires. If false, it doesn't. At the start of the chapter you want it to fire on, ENUT 0x08. Quote Link to comment Share on other sites More sharing options...
lushen124 Posted September 5, 2015 Author Share Posted September 5, 2015 Here's one thing you can try: have a flag e.g. 0x08 that says if you want the death quote to fire or not. If 0x08 is true, then death quote fires. If false, it doesn't. At the start of the chapter you want it to fire on, ENUT 0x08. Sure, but that means that in the chapter you do turn it on, you always run the same code. e.g. If you have it in chapter 1 to spawn reinforcements defined at some offset, it will do the exact same thing in chapter 3 and any other chapter you turn it on. I ended up just moving more stuff around and allowing for more death quote entries in the table, so now I have Snag DQ for Ch. 1 specifically. If I use it again, I'd create another one for, say Snag DQ for Ch. 3, and it would point to a different event unique to Ch. 3. So now, I have this: So that the pointer to "death event" only fires in Chapter 1, and it points to event code in the Chapter 1 events. That aside, I found some more interesting quirks about Misc_events. I was running into some oddities trying to get the AREA code to work. I slapped it on the end of everything in the Misc_events and, for whatever reason, it just wouldn't fire. Then I wondered if there was a limit to how many things you can have in there, so I moved it up to the top (swapped positions with CauseGameOverIfLordDies) and now it works. The weird thing is that it still causes game over if the lord dies, so now I really don't know why it works now, unless the order of Misc_events is important. To be more explicit, this works: Misc_events: AREA HordeStarted BeginHorde [0,9] [14,29] // Crossing the line to the first clearing starts the horde. DefeatAll(AllEnemiesDefeated) AFEV 0x0 ResetBossDeathQuote 0x02 // After the first boss goes down, no other quotes play. We need to reset them. AFEV 0x0 IncrementCasualties PlayableCharacterDied // We mapped other deaths to 0x22, 0x65 is still the game over flag. CauseGameOverIfLordDies End_MAIN But this didn't (and still doesn't, I just checked): Misc_events: CauseGameOverIfLordDies DefeatAll(AllEnemiesDefeated) AFEV 0x0 ResetBossDeathQuote 0x02 // After the first boss goes down, no other quotes play. We need to reset them. AFEV 0x0 IncrementCasualties PlayableCharacterDied // We mapped other deaths to 0x22, 0x65 is still the game over flag. AREA HordeStarted BeginHorde [0,9] [14,29] // Crossing the line to the first clearing starts the horde. End_MAIN So it's possible the AFEV not firing was also due to an ordering issue... I'll have to retry that one again. Quote Link to comment Share on other sites More sharing options...
Agro Posted September 5, 2015 Share Posted September 5, 2015 It's funny that you mention that... I had the same problem not so long ago and couldn't for the life of me figure out why it wasn't working. I wonder if it was because my ordering was out too. It's definitely something worth looking into... 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.