Countdown Timers tutorial - Printable Version +- FF6 Hacking (https://www.ff6hacking.com/forums) +-- Forum: Hacks, Resources and Tutorials (https://www.ff6hacking.com/forums/forum-1.html) +--- Forum: Narshe School (https://www.ff6hacking.com/forums/forum-14.html) +---- Forum: Event Editing (https://www.ff6hacking.com/forums/forum-26.html) +---- Thread: Countdown Timers tutorial (/thread-1426.html) |
Countdown Timers tutorial - madsiur - 01-29-2012 Here's a short written tutorial on how to use countdown timers properly with command A0. You should already know how to create/modify events for understanding what follows. First of all, that event command has 5 bytes as parameters. The first two are the length of the timer and the last three are the offset of the event to jump to in case the timer expire while on a map. Here's an example: A0 60 54 5E 42 00: timer 0 length = 5460 (approximately 6 minutes) Jump to CA/425E in case timer expire (CA/0000 + 00/425E) Now the high byte of the offset to jump to can have flags and depending which bits are set it mean different things. Note that there are 4 countdown timer that could be used simultaniously (timer 0 to 3). Here is the meaning of each flag: Code: 0x10 Countdown will override game clock display in menu. (1) So for the same example, A0 60 54 5E 42 68 would mean: timer 2 length = 5460 (approximately 6 minutes). jump to CA/425E in case timer expire (CA/0000 + 00/5E42). Digits for the countdown display while on the map. Enables exit menu/battle on timer expiration. Now I'll explain briefely how to branch with a countdown timer in a battle that is invoked with command 4D. Let's say you have started your timer by talking to an NPC. (Yes... another example...). The offsets are fictive: Code: CA/0000 4B 1A 0A (Display message 0A1A: "Hurry! Celes is in danger!") And you have a boss battle somewhere else invoked by command 4D which can be triggered by an event tile or a boss NPC. This example is in bank F1 but it could be anywhere where there is events... Here's how to branch properly: Code: F1/0000 4D 52 3F (Invoke battle with enemy set 52, background 3F) With this example it's a game over if the party is annihiliated and if the timer expire during battle. I tested it. The only thing left that I'm not sure about are random battles but I presume the game makes the same checks for those too. It would have to be verified. This is pretty much everything there is to know about countdown timers. Have a nice timer event! Here is my first succesful timer attempt. The video only shows the possibles outcomes: The 4 outcomes of a countdown timer... RE: Countdown Timers tutorial - SSJ Rick - 01-29-2012 nicely done RE: Countdown Timers tutorial - Angelo26 - 01-29-2012 Thank You Thank You Thank You!! This has been bothering me for eons now! What I was missing is the check for "If timer expires, go to game over". RE: Countdown Timers tutorial - Gi Nattak - 01-29-2012 Yes, very nice job explaining the timer in detail, today is now officially a great day! =D Thanks much. RE: Countdown Timers tutorial - madsiur - 02-03-2012 Here are a few things I should add: I believe only timer 0 can be displayed on the screen. The other 3 timers can be use simultaneously though. As for the branching after a battle, you don't have to branch to an automatic game over for the check #1 and check #2. You could branch to any other part of event that could later lead to a game over or to an event that does not call a game over. I was just showing the structure of the branching with battle event bit #40 and #45. Finally, it seems random battles that take place when a timer is activated check for bit #40 and #45 as well. I had a game over when the timer expired during a random battle. I don't know how it's possible to make it branch elsewhere after a random battle if the timer expire however. And thank you guys for the compliments, it's nice seeing that some tutorials help others, even veterans event creators |