Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Fire Emblem Ultimate Tutorial.doc
Скачиваний:
0
Добавлен:
01.07.2025
Размер:
7.86 Mб
Скачать

Chapter 50: Events – The Layout

How do we actually make our events? Well, there are different ‘sections’ for different types of codes. We need to know the layout of the events, and then make the actual events. We do all of this in a simple text file. If you by some chance don’t know how to make a text file, I can tell you how to do it on windows. Either A) right-click on a folder, do New-> Text Document (it might say Notepad File or something maybe), then rename it to something that makes sense like “Chapter X events”, B) go to program files in the start menu, then go to Accessories, then load Notepad, and save the file, or C) copy an existing text file, rename it, and open that.

Now I’m going to post my template; don’t be alarmed.

//Made by markyjoe1990 of Youtube

//Modified by Nintenlord

//Modified by Blazer

#define DISABLE_TUTORIALS

#include EAstdlib.event

EventPointerTable(0x??,Pointers)

org 0x????????

Pointers:

POIN Turn_events

POIN Character_events

POIN Location_events

POIN Misc_events

POIN BallistaData BallistaData

POIN BadEN BadEH BadEN BadEH

POIN GoodEN GoodEH GoodEN GoodEH

POIN Opening_event Ending_event

Turn_events:

CODE 0x00

Character_events:

CODE 0x00

Location_events:

CODE 0x00

Misc_events:

CauseGameOverIfLordDies

CODE 0x00

Ballista_events:

CODE 0x00

Opening_event:

ENDB

Ending_event:

MNCH 0x??

ENDA

GoodEN:

UNIT Empty

GoodEH:

UNIT Empty

BadEN:

UNIT Empty

BadEH:

UNIT Empty

#ifdef _FE7_

#define TileMap(TCN,X1,X2,L1,L2,TilePointer) "CODE TCN X1 X2 L1; CODE L2 0x00 0x00 0x00; POIN TilePointer"

#endif

org 0xC9C9C8+(4*0x??) // - Pointer to tile map changes

POIN TileChanges

org 0x????????

TileChanges:

TileMap(0x00,X1,X2,Y1,Y2,TilePointer)

CODE $FF

CODE $00

CODE $00

TilePointer:

CODE (Tile hex)

CODE $00

MESSAGE Events end at offset currentOffset

//The map for this chapter is at offset: ????????

This template includes:

  • all main structure events

  • getting rid of the tutorial

  • Including the stlb

  • the format for tile map changes

  • event table repointing

  • normal and hard mode enemies (no differentiation between E/H modes to save space/I forgot which is which…)

Please copy that to your text file and take a good look at it. I’m going to explain everything from top to bottom.

“//” denotes a comment. Anything after that is ignored, but can be seen. Thus all the comments there that say who have edited the template are rightfully ignored by the program.

#define DISABLE_TUTORIALS - disables the tutorials. I covered this in a MUCH earlier chapter. Once you disable the tutorials once, you don’t need to do it again.

#include bla.event – this includes the standard definitions so that you don’t have to waste space defining them all in one text file. You can include other definitions (like your own) as well.

EventPointerTable(0x??,Pointers) – this is to repoint the pointer in the event table (you can also do it manually using a hex editor or the Event Reference module). 0x?? is the ‘reference byte’ for the events. To know what this is, you can go into the Chapter Data Editor and scroll down to where it says ‘Event Data Pointer’ or something like that. I’ll show you a screen real quick:

It’s called ‘Event Data Reference’ (I was close). The byte is 0x65, so that’s what I use. The text ‘Pointers’ is a pointer itself. What this does is go to entry 0x65 in the event table and repoint the pointer there to wherever the ‘Pointers’ data is.

org 0x???????? – this is uh… we’ll say it’s a code that says where to put data. Anything that comes after it (but before the next org) goes at this offset. For our events, we need a bunch of freespace. We’ve been through this before. Note that when you put your offset, you don’t need the ‘0x08’ in front of it. Personally I am using 0xCB3800 although this is not typically free space so I don’t suggest using it yourself.

Pointers:

POIN Turn_events

POIN Character_events

POIN Location_events

POIN Misc_events

POIN BallistaData BallistaData

POIN BadEN BadEH BadEN BadEH

POIN GoodEN GoodEH GoodEN GoodEH

POIN Opening_event Ending_event

These pointers are the header we were talking about. As said before, the EventPointerTable code repoints a pointer in the event table to wherever this data is—and we specified where this data is with the org code. The pointers themselves are the base 16 pointers for FE7 events. FE6 and FE8 have a slightly different format, IIRC.

Anyway, POIN is a code that makes a pointer. It’s going to make a pointer of each word there (a word is separated by a space, of course). So if we make a pointer to “Turn_events”, there has to be some events labeled “Turn_events”. Verily, there is.

Turn_events:

CODE 0x00

Before I explain what turn events are, let me explain what it means to put a name and a colon after it. It’s making a ‘label’ or a ‘group’ or an ‘event’. Because you use the same thing for units, I don’t want to call them events, so I am going to call it a label. Back to the POIN code above, it points to this Turn_events, which has some code beneath it. Right now all it has is a CODE 0x00—CODE 0x00 is a nullifier that signifies the end of these events. The actual events we’d put here are events that take place during a certain turn—for example, for a scene at the opening, you could have a scene on turn 1, and for a scene on turn 4, you’d use turn events. I won’t actually teach you what codes to use here/how to make turn events until later though.

From here on out I’m going to be less detailed on my explanations, so here we go:

Character events – talks/conversations between characters

Location events – villages, shops, doors, chests, etc., any events that take place on a certain tile

Miscellaneous events – other types of events. Includes “after-events” and chapter goal conditions.

Ballista events – events for ballista units

Opening event – the events for the opening scene. If battle preparations are on, then it loads this automatically, and the event ends with “ENDB”. If battle preparations are off, you need to have a turn event on turn 1 that uses the opening event, and the event ends with “ENDA” (you also have to manually load units onto the map).

Ending event – the event at the ending scene. This is only directly used if you have a seize event with event ID 0x03.

GoodEN – Ally unit data for Eliwood* normal mode.

GoodEH – Ally unit data for Eliwood hard mode.

BadEN – Enemy unit data for Eliwood normal mode.

BadEH – Enemy unit data for Eliwood hard mode.

*Also used for Lyn’s mode

The stuff at the bottom is all for tile changes, except for the message at the end, which just says where the events end after they are inserted. You’ll see what I mean when you assemble events. As for a map’s tile changes, you’ll have to see another chapter on that. :P

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]