ff3:ff3us:tutorial:events:background

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
ff3:ff3us:tutorial:events:background [2018/05/05 22:38]
lockirby2 [Starting an event]
ff3:ff3us:tutorial:events:background [2018/05/05 22:58]
lockirby2 [Event Commands]
Line 54: Line 54:
 {{:ff3:ff3us:tutorial:events:bridge_event.png|}} {{:ff3:ff3us:tutorial:events:bridge_event.png|}}
  
-Finally, there's the entrance event.  Whenever you enter a map, an event is called to initialize the map.  This is necessary to initialize NPCs that walk on a fixed path, among other things.  Narshe's entrance event is shown to be 2D0E7, or CC/D0E7.  If you're clever, you might notice that this entrance event affects 9 NPCs and opens the secret cave if the party has discovered it.+Finally, there's the entrance event.  Whenever you enter a map, an event is called to initialize the map.  This is necessary to initialize NPCs that walk on a fixed path, among other things.  Narshe's entrance event is shown to be at 2D0E7, or CC/D0E7.  If you're clever, you might notice that this entrance event affects 9 NPCs and opens the secret cave if the party has discovered it.
  
 {{:ff3:ff3us:tutorial:events:entrance_event.png|}} {{:ff3:ff3us:tutorial:events:entrance_event.png|}}
  
 ===== Event Commands ===== ===== Event Commands =====
-Each event command causes "something" to happen in the event.  That "something" can be rather diverse.  You've already seen the event command that causes a dialogue box to be displayed, but event commands can also make the screen flash or give a character status effects, etc.  Every command consists of a single byte followed by some parameters.  The first byte indicates what the command does, and the parameters give the game extra information that the command needs to function.  For example, take our command to display a dialogue box.  Earlier, we saw in the Event Script that this command is $4B.  We can use this information to look up the command in the Event Commands Document and learn more about it.+Each event command causes "something" to happen in the event.  That "something" can be rather diverse.  You've already seen the event command that causes a dialogue box to be displayed, but event commands can also make the screen flashgive a character status effects, etc.  Every command consists of a single byte followed by some parameters.  The first byte indicates what the command does, and the parameters give the game extra information that the command needs to function.  For example, take our command to display a dialogue box.  Earlier, we saw in the Event Script that this command is $4B.  We can use this information to look up the command in the Event Commands Document and learn more about it.
  
-In the Event Command Document, we see that command $4B has two parameters.  Each parameter is also one byte in size.  The document tells us to refer to command $48 to find out what the parameters do.  Command $48 also displays a text box, but it does not force the player to confirm the text box before continuing the event.  Both commands need two parameters in order to tell the game //which// text box to display and //where// to display it.  The document shows a couple examples of how this works.+In the Event Command Document, we see that command $4B has two parameters.  Each parameter is also one byte in size.  The document tells us to refer to command $48 to find out what the parameters do.  Command $48 also displays a text box, but it does not force the player to confirm the text box before continuing the event.  Both commands need two parameters in order to tell the game //which// dialogue to display and //where// to display it.  The document shows a couple of examples of how this works.
  
-If you wanted to display text box $0123, you would flip the two bytes around, as shown in the example.  Therefore, our two parameter bytes are 23 and 01.  If you see 4B 23 01 in the hex editor, it might mean "Display text box $0123 at the top of the screen inside a text box, and wait for the player to press A before continuing the event" The second example is meant to demonstrate how to move the text box elsewhere on the screen.  The document shows a list of values that we can add to the last byte depending on where we want the textbox to be.  For example, we need to add $C0 to the last byte to display text at the bottom of the screen without the blue background.  Therefore, 4B 23 C1 might mean "Display text box $0123 at the bottom of the screen outside a text box, and wait for the player to press A before continuing the event".+If you wanted to display text box $0123, you would flip the two bytes around, as shown in the example.  Therefore, our two parameter bytes are $23 and $01.  If you see 4B 23 01 in the hex editor, it might mean "Display text box $0123 at the top of the screen inside a text box, and wait for the player to press A before continuing the event" The second example is meant to demonstrate how to move the text box elsewhere on the screen.  The document shows a list of values that we can add to the last bytedepending on where we want the textbox to be.  For example, we need to add $C0 to the last byte to display text at the bottom of the screen and without the blue background.  Therefore, 4B 23 C1 might mean "Display text box $0123 at the bottom of the screen and outside a text box, and wait for the player to press A before continuing the event".
  
-That's a lot of info to process, and if you're unfamiliar with this process, you may need to reread the above example several times to digest it.  The good news is that a large number of event commands are structured in a similar fashion.  If you can understand each piece of information above, you can reuse that knowledge when figuring out the other event commands.+That's a lot of info to process, so you may need to reread the above example several times to digest it.  The good news is that a large number of event commands are structured in a similar fashion.  If you can understand each piece of information above, you can reuse that knowledge when figuring out the other event commands.
  
-In general, the Event Command Document is built around the examples.  Often the first example is the most straightforward, and the later ones introduce complications or make a specific point.  Each parameter's purpose is explained alongside the example.  If you understand what the first example is doing, you should be able to build off of it afterwards.  It's fairly common for bytes to be reversed from what you'initially expect, as in the example above.  We were trying to display text box $0123, and we had to reverse it to 23 01 when we were figuring out the parameters.  Keep this in mind when interpreting the examples.+In general, the Event Command Document is built around its examples.  Oftenthe first example is the most straightforward, and the later ones introduce complications or make a specific point.  Each parameter's purpose is explained alongside the example.  If you understand what the first example is doing, you should be able to build on it afterwards.  It's fairly common for bytes to be reversed (AKA inverted) from what one would initially expect, as in the example above.  We were trying to display text box $0123, and we had to reverse it to 23 01 when we were figuring out the parameters.  Keep this in mind when interpreting the examples.
  
 Now you have all the nuts and bolts out of the way, so you can move on to [[ff3:ff3us:tutorial:events:basic|creating an event.]] Now you have all the nuts and bolts out of the way, so you can move on to [[ff3:ff3us:tutorial:events:basic|creating an event.]]
  • ff3/ff3us/tutorial/events/background.txt
  • Last modified: 5 years ago
  • (external edit)