Jump to content

Event Assembler Questions Thread


CT075
 Share

Recommended Posts

Sorry, I'd forgotten that this was a thing. I tried messing with the events a little while ago, but got no results, so I'm back for more help on stuff I didn't understand.

##Controls how units move right after getting loaded to the map.
REDA, 0, 64, -game:FE8 -priority:reinforcementData
##Position to move the unit to.
New position, 0, 12, coordinate:2 -preferredBase:10
##Flags of the movement.
Flags, 12, 4, -preferredBase:2
##Speed of the movement.
Speed, 16, 8
##Unit this unit is resquing. 0 if there is none.
Rescuing character, 24, 8
0xFFFF, 32, 16, -fixed
##Amount of time to pass before executing this code.
Delay, 48, 8, -preferredBase:10

REDA [newX, newY] 0000000000000000b /*translate to hex if necessary*/ speed 0 /*0xFFFF this parameter is fixed and should not be assembled*/ 0x10

or, without the comments

REDA [XX,YY] flags speed 0 0x10

you're missing a parameter on the new script.

So what goes in flags and in what format, what format does speed follow and can I just throw any number in there, and how, if at all, can/should I mess with the 0 and 0x10? Alternately, how do I load units without REDA? Any way to do that would be much preferred; REDA doesn't seem to be needed to just put units on the map.

Edited by SmashedFish
Link to comment
Share on other sites

  • Replies 3.3k
  • Created
  • Last Reply

Top Posters In This Topic

Got another question, this time with tile changes.

So I'm trying to make my village make a gate after the event is finished, but I'm getting some rather...interesting results when the event triggers.

I first enter the village as its shown in the Screen 1 image, the event happens and everything's good.

post-5097-091391200 1337295321_thumb.png

Except when it comes time for the map change to occur, the village spaces end up turning into these odd, distorted blocks of pixels, as seen in Screen 2. But...I do know that SOMETHING is being done right, since there is a tile change occurring when it's supposed to, and it is changing the tiles that I am asking it to change; its just not changing them to the correct tiles...or any recognizable tiles at all.

post-5097-049612300 1337295328_thumb.png

I made sure to check the coordinates of the tiles I wanted to generate using the tileset reference and everything is where it should be.

Here is the code I am currently working with for my prologue map changes:

#define TileMap(changeID,Xcoordinate,Ycoordinate,Length,Height,offset) "CODE changeID Xcoordinate Ycoordinate Length Height 0x00 0x00 0x00 offset"

org 0xC9C9CC+(4*0x37)

POIN TileChanges

org 0xDA00F0

TileChanges:

TileMap(0x00,0x01,0x08,0x01,0x01,Village)

CODE 0xFF

CODE 0x00

CODE 0x00

Village:

CODE 0x80 0x00

CODE 0x00

The code for all the events for this chapter are in my previous posts; I didn't feel like I needed to post that document again.

Anyway, I fell like my problem is coming from me not using the right pointers in the map changes document. I will admit, the "org 0xC9C9CC+(4*0x37)" I just kind of left as is, based on a tutorial I was following, and I'm not exactly sure if I actually should have had this pointing to something else. So that's one possible culprit, another being "org 0xDA00F0", which I used as a pointer for the changes. I had assumed that this area in memory was empty space, but I don't know if I had actually put this pointer in the right place, or what. I guess it all boils down to the fact that I'm still trying to figure out exactly how all these pointers are supposed to work. If it is indeed a problem with the pointers, I don't know what I can do to fix it at this time.

Also if it helps, I have the reference tileset I'm using for this map included as well.

post-5097-063707400 1337295346_thumb.png

And I feel like I should mention that this chapter, which is the prologue chapter, is using 0x38, which is CH 11-E's map changes, as a source for map changes, and these changes, read as 0x37-0x38 in the Event Table References module, is pointing to 0x8DA00F0, which I used intending it to be empty space.

Edited by sallas09
Link to comment
Share on other sites

Can you go to 0xDA00F0 in hex editor and screenshot how it looks after that offset?

Also, probably not relating to your current problem, village gate closing should always be 1x1 change. Otherwise the game can't pick between the gate closing and village destroying tile changes properly.

Link to comment
Share on other sites

I amended the code so that only the gate tile changes now, yet it still changes to a mess of pixels, unsurprisingly.

But more importantly, here is a screenshot of my ROM in HxD, with the information at 0xDA00F0 highlighted.

post-5097-006465000 1337358922_thumb.png

Also, here is location 0xDA00F0 of another copy of the ROM, which has not received the map changes event.

post-5097-009883300 1337358927_thumb.png

The highlighted areas in both screens are the same area in the editor, with the first screenshot showing edited information for the map changes, and the second screenshot showing no change at all.

Hope this helps.

Link to comment
Share on other sites

I amended the code so that only the gate tile changes now, yet it still changes to a mess of pixels, unsurprisingly.

But more importantly, here is a screenshot of my ROM in HxD, with the information at 0xDA00F0 highlighted.

post-5097-006465000 1337358922_thumb.png

Also, here is location 0xDA00F0 of another copy of the ROM, which has not received the map changes event.

post-5097-009883300 1337358927_thumb.png

The highlighted areas in both screens are the same area in the editor, with the first screenshot showing edited information for the map changes, and the second screenshot showing no change at all.

Hope this helps.

Link to comment
Share on other sites

Something is causing EA to think Village = 8. Make sure you aren't defining Village anywhere else. If nothing else works use the latest version.

EDIT:

I just realized that this is wrong:

#define TileMap(changeID,Xcoordinate,Ycoordinate,Length,Height,offset) "CODE changeID Xcoordinate Ycoordinate Length Height 0x00 0x00 0x00 offset"

The parameter offset should be in a POIN code, not in CODE code. The correct version looks like this:

#define TileMap(changeID,Xcoordinate,Ycoordinate,Length,Height,offset) "CODE changeID Xcoordinate Ycoordinate Length Height 0x00 0x00 0x00; POIN offset"

Or, if you are using the latest version:

#define TileMap(changeID,Xcoordinate,Ycoordinate,Length,Height,offset) "BYTE changeID Xcoordinate Ycoordinate Length Height 0x00 0x00 0x00; POIN offset"

which is better because you aren't forced to put coordinates in as 0x numbers. Latest version of EA comes with correct TileMap macro in EAstdlib.

Edited by Nintenlord
Link to comment
Share on other sites

Hey, i'm new to the site, and after looking around, I really like what everyone does here. I've used this site for ages because of the dependable character data it gives.

So now i've taken a step into a new realm: modding Fire Emblem 8. I've done well learning Nightmare, I can use Tiled well and input maps etc. however, i've come to event editing and had some problems. In fact, I can't even get any units to load on the map for some reason. I've checked the Ultimate Tutorial on more than one occasion (aware that it was about FE7) watched and read through Arch's event tutorial multiple times (mostly episodes 2,3, and 15, the FE8 one) and i STILL cannot locate the source of the problem. It's started to frustrate me a tad, but If I can get one to load, It'll be easier for me to do other things with the game. Please help, if you have the time. :)

I have attached the file that I add using the event assembler.Chapter 1.txt

Link to comment
Share on other sites

You've done well to put in so much effort

make sure your co-ordinates are in the right form and you're using the latest version of the EA, to start

also just since you're a new hacker I feel compelled to say you should constantly back up your ROM

also do your events in general work, or just not loading the units, or what

Link to comment
Share on other sites

I have several copies of the ROM, just in case. That's good advice though, thank you.

I haven't gotten any events to work at all because I don't have any units on the map. (although i haven't tried any conversation-type events)

I can't command anything because no units exist on the map at all.

I'm fairly certain that I have the correct copy of EA, but i'm not sure how i would tell what version it is.

Link to comment
Share on other sites

ORG 0x8BA0000
ThisChapter:
POIN TurnBasedEvents

Don't add 0x8000000 to offsets in EA, EA does it for you in almost every case if necessary. Always use the same offsets you'd use in hex editor.

Link to comment
Share on other sites

ORG 0x8BA0000
ThisChapter:
POIN TurnBasedEvents

Don't add 0x8000000 to offsets in EA, EA does it for you in almost every case if necessary. Always use the same offsets you'd use in hex editor.

okay. I changed it, but still no dice. It says "symbol BA0000 is not in scope" . And i made sure to double-check that the location for the chapter 1 events was the same offset in Nightmare, so that isn't the problem either.

Edited by TytoCorvus
Link to comment
Share on other sites

Got another issue, this one seeming kind of strange, but maybe it's just due to my lack of expertise in pointers and where data for the game is stored in memory, but here goes.

Simply put, my game is not correctly loading Damian(the paladin boss of ch. 16x/17x) as a unit. If I load him as an ally, he appears, moves to where he's supposed to go, and then disappears. But more interestingly, if I load him as an enemy...he spawns as Eubans(paladin boss of ch. 21/22). I tried spawning a Damian and a Eubans, but I just end up with 2 Eubans(o.o?) on the field at once.

post-5097-094623800 1337742825_thumb.png

post-5097-049280800 1337742848_thumb.png

-both screens are taken from the same instance of gameplay.

Here's the code I'm using for this chapter:

//Made by markyjoe1990 of Youtube

//Modified by Nintenlord

#define DISABLE_TUTORIALS

#include EAstdlib.event

EventPointerTable(0x06,Pointers)

org 0xD80000

Pointers:

POIN Turn_events

POIN Character_events

POIN Location_events

POIN Misc_events

POIN BallistaData BallistaData

POIN Bad Bad Bad Bad

POIN Good Good Good Good

POIN Opening_event Ending_event

Bad:

UNIT Empty

Damian:

UNIT Damian Paladin 0x00 Level(1,Enemy,True) [2,3] [4,5] [KillerLance,HandAxe,BraveSword] [0x00,0x00,0x00,0x00]

UNIT Eubans Paladin 0x00 Level(1,Enemy,True) [2,3] [4,6] [KillerLance,HandAxe,BraveSword] [0x00,0x00,0x00,0x00]

UNIT Empty

Good:

UNIT Lyn_t BladeLord 0x00 Level(20,Ally,True) [11,3] [8,7] [braveSword,SolKatti,ChestKey] [0x00,0x00,0x00,0x00]

//UNIT Damian Paladin 0x00 Level(1,Ally,True) [2,3] [2,2] [KillerLance,HandAxe,BraveSword] [0x00,0x00,0x00,0x00]

UNIT Empty

Reinforcements:

UNIT Empty

Turn_events:

TURN 0x00 Opening_event [01,00] 0x0 0x00

CODE 0x00

Character_events:

CODE 0x00

Location_events:

CODE 0x00

Misc_events:

CauseGameOverIfLordDies

CODE 0x00

Opening_event:

LOU1 Good

ENUN

LOU1 Damian

//MNCH 0x15

ENUN

ENDA

Ending_event:

//STAL 1

//_Ox1

ENDA

BallistaData:

BLST

MESSAGE Events end at offset currentOffset

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

Basically all this code does is skip the tutorials, load Lyn, and load 2 enemies, which are supposed to be Damian and Eubans, but I somehow end up with 2 different Eubans.

I haven't loaded in any maps or map changes or any other code into this ROM(the only other changes I made are changing the prologue events pointer to D80000 and make the chapter load to map instead of dark). So there's very little code that's actually being changed in the ROM(I think?), but my guess is that the little data I am changing is somehow messing with his character data? I have a chapter jump command commented in my opening_events that jumps the game to Chapter 16x/17x, and when the 2nd turn of the chapter comes(when Damian is supposed to appear) He does not even appear, and neither do any of the enemy units that spawn alongside him, although his bit of dialogue still displays. I tested the main rom from which this one was copied by playing it through with no hacks and Damian loads normally(if this helps at all). I just do not see where this issue can be popping up, or how, or if there is other data that is thrown off from this change as well? I've been individually testing other select units to see if they too have been affected and haven't really found anything strange yet, however.

Any insight would be largely appreciated.

Link to comment
Share on other sites

okay, thank you for the advice Luffy. The map loads much quicker because the information is now placed in the correct place in the ROM. That must've been a problem as well. The unit, however, still won't load. Here's a copy of the code again.

GoodGuys:
UNIT Eirika 0x02 0x00 Level(1,Ally,False) [2,2] 0x00 0x00 0x00 0x00 [Rapier,Vulnerary] [0x00,0x00,0x00,0x00]
UNIT Empty

Opening_event:
_LOAD1 GoodGuys 0x0
ENUN


TurnBasedEvents:
TurnEventPlayer(0x00,Opening_event,1) 
TURN

CharacterBasedEvents:
CHAR

LocationBasedEvents:
LOCA

MiscBasedEvents:
AFEV

I didn't think that it required a move command in order to load, but i might be wrong completely. The screen goes black after the map is loaded, then comes back very quickly, which makes me think that it's trying to load something, but it doesn't succeed in loading Eirika for some reason. Remember, I'm editing FE8. Again, thank you for the help you've given me so far, it's appreciated beyond words. :)

Edited by TytoCorvus
Link to comment
Share on other sites

the fade might have to do with CDE settings or possibly FE8 needs some sort of code for the map opening to look right kinda like how FE7 needs this "OOBB" (out of beginning black) code

I also think you need like a REDA pointer or something don't you? Though it doesn't have to actually move them. Ugh, I've only done FE8 events like once so I'm not too familiar, I'm sure NL can come up with a quick and precise answer though lol

Link to comment
Share on other sites

Thanks for the help, NL! Another guy on the hack team used it in his set of events which I have decided to go along with:

[spoiler=New events]#define ConvoEvent(textID) "MUSI; TEXTSTART; TEXTSHOW textID; TEXTEND; REMA; MUNO; _0x228 0x7; ENDA"

#define Text(text) "TEXTSTART; TEXTSHOW text; TEXTEND; REMA"

#define ReinforcementEvent(unitPtr) "_SETVAL 0x2 (unitPtr|0x8000000); GOTO $9EE290; _0x228 0x7; ENDA"

#include EAstdlib.event

EventPointerTable(0x07,ThisChapter)

ORG 0x00E4718C

ThisChapter:

POIN TurnBasedEvents

POIN CharacterBasedEvents

POIN LocationBasedEvents

POIN MiscBasedEvents

POIN Dunno Dunno Dunno

POIN Tutorial

POIN TrapData TrapData

POIN Allied Enemies

POIN $0 $0 $0 $0 $0 $0

POIN BeginningScene EndingScene

TurnBasedEvents:

TurnEventPlayer(0x0,BeginningScene,1)

TurnEventPlayer(0x0,EndingScene,2)

Allied:

UNIT Eirika Mage Eirika Level(1,Ally,False) [1,3] 0x00 0x00 0x00 0x00 [Fire,Vulnerary,0x0,0x0] NoAI

UNIT Seth Myrmidon Eirika Level(1,Ally,False) [1,4] 0x00 0x00 0x00 0x00 [ironSword,Vulnerary,0x0,0x0] NoAI

Enemies:

UNIT ONeill Bandit ONeill Level(1,Enemy,False) [10,9] 0x00 0x00 0x00 0x00 [steelAxe,0x0,0x0,0x0] NoAI

UNIT Gilliam Bandit Gilliam 0x02 [9,7] 0x00 0x00 0x00 0x00 [ironAxe,0x0,0x0,0x0] NoAI

UNIT Franz Bandit Franz 0x02 [10,8] 0x00 0x00 0x00 0x00 [ironAxe,0x0,0x0,0x0] NoAI

UNIT

CharacterBasedEvents:

CharacterEventBothWays(5,LOLTALK,Eirika,Seth)

CHAR

LocationBasedEvents:

LOCA

MiscBasedEvents:

DefeatBoss(EndingScene)

AFEV

Dunno:

//DO NOT TOUCH

WORD $00

Tutorial:

//DO NOT TOUCH

WORD $00

TrapData:

ENDTRAP

ALIGN 4

BeginningScene:

ReinforcementEvent Allied

ENUN

ReinforcementEvent Enemies

ENUN

Text 0x090E

REMA

ENDA

LOLTALK:

Text 0x090F

REMA

_SETVAL 0x3 Thunder

_GIVEITEMTO Eirika

ENDA

EndingScene:

MoveToChapter 0x01

MESSAGE Events end at offset currentOffset

//The map for this offset is at 01000000

Running it gives me these:

[spoiler=New Errors]Errors with Gold's code when assembled to 0x00E4718C using the patch:

Finished.

Messages:

Events end at offset currentOffset

9 errors encountered:

File: Main Code Helpers.txt, Line: 128: Redefining ConvoEvent: #define ConvoEvent(textID) "MUSI; TEXTSTART; TEXTSHOW textID; TEXTEND; REMA; MUNO; _0x0228 0x7; ENDA"

File: Main Code Helpers.txt, Line: 129: Redefining ReinforcementEvent: #define ReinforcementEvent(unitPtr) "_SETVAL 0x2 (unitPtr|0x8000000); GOTO $9EE290; _0x0228 0x7; ENDA"

File: Convo Helpers.txt, Line: 15: Redefining Text: #define Text(text) "TEXTSTART; TEXTSHOW text; TEXTEND; REMA"

File Hope this works. (Gold).txt, Line 62, Column 1: No code named ReinforcementEvent found.

File Hope this works. (Gold).txt, Line 64, Column 1: No code named ReinforcementEvent found.

File Hope this works. (Gold).txt, Line 66, Column 1: No code named Text found.

File Hope this works. (Gold).txt, Line 71, Column 1: No code named Text found.

File Hope this works. (Gold).txt, Line 78, Column 1: No code named MoveToChapter found.

File Hope this works. (Gold).txt, Line 35, Column 1: Symbol Franz isn't in scope

So, what needs to be done from here?

Link to comment
Share on other sites

9 errors encountered:

not errors, should just be warnings

File: Main Code Helpers.txt, Line: 128: Redefining ConvoEvent: #define ConvoEvent(textID) "MUSI; TEXTSTART; TEXTSHOW textID; TEXTEND; REMA; MUNO; _0x0228 0x7; ENDA"

File: Main Code Helpers.txt, Line: 129: Redefining ReinforcementEvent: #define ReinforcementEvent(unitPtr) "_SETVAL 0x2 (unitPtr|0x8000000); GOTO $9EE290; _0x0228 0x7; ENDA"

File: Convo Helpers.txt, Line: 15: Redefining Text: #define Text(text) "TEXTSTART; TEXTSHOW text; TEXTEND; REMA"

see note 1

File Hope this works. (Gold).txt, Line 62, Column 1: No code named ReinforcementEvent found.

File Hope this works. (Gold).txt, Line 64, Column 1: No code named ReinforcementEvent found.

File Hope this works. (Gold).txt, Line 66, Column 1: No code named Text found.

File Hope this works. (Gold).txt, Line 71, Column 1: No code named Text found.

File Hope this works. (Gold).txt, Line 78, Column 1: No code named MoveToChapter found.

not entirely sure but i'd assume it's a problem with your definitions file (that I'm noticing isn't actually being explicitly included)

File Hope this works. (Gold).txt, Line 35, Column 1: Symbol Franz isn't in scope

[1]

the macro is defined as Text(offs), not "Text offs". Notice the parentheses. In general, any #define macro that isn't a code will have it's parameters in parentheses, separated by commas. Or:

// this is not correct
Text 0xDEADBEEF
ReinforcementEvent UnitGr

// this is what it should be
Text(0xDEADBEEF)
ReinforcementEvent(UnitGr)

[2]

always, always, always include the EAstdlib first. before any other defines, make sure that's the first non-comment non-whitespace line in your file.

Link to comment
Share on other sites

Just thought I'd say

"Franz" is spelled wrong in the FE8 definitions, unless Smashed and I both have an old version

it's spelled "Frantz"

it's a minor thing but maybe fix it and add backwards compatibility just in case for those who are too scared to add their own definitions or simply aren't aware of the issue *shrug*

Link to comment
Share on other sites

Thanks a bunch! I've taken your advice and help from Blazer and I've managed to work out all the errors. :)<br><br>Let's see where we go from here, then.<br><br>Edit: Err, not quite. It gets to the map of the prologue and freezes. The water moves and all, but units won't load, etc.<br>

Edited by SmashedFish
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...