Problem inserting maps with TMX2EA

I am currently learning to insert maps created in Tiled through .event files using tmx2ea.

The configuration of properties I prefer to do it manually in the .event file that is generated, which shows this:

//Map Installer generated by TMX2EA.exe

#include eastdlib.event

SetChapterData(ChapterID,ObjectType,0,PaletteID,TileConfig,map_id,Map,0,0,0)
Map:
#incbin "Test_1_data.dmp"

The map I am trying to replace is the one in the FE7 tutorial, replacing the previous fields with the following:

ChapterID: 0x00
ObjectType: 0x10
PaletteID: 0xEA
TileConfig: 0x12
map_id: 0x04

The rest of the values can be maintained by default and Map as I read in the tutorial, should refer to the changes in the map, and therefore take the value 0x00.

The problem I have is that when making the assembly, I get the following error:

File Test_1.event, Line 5, Column 15: Didn't reach end, currently at LeftParenthesis(()

I am practically sure that it is because some of the data is not well introduced, but after several tests I have not been able to find out which one it is.

You need to include the definition for SetChapterData.

#ifndef ChapterDataTable
  #ifdef _FE8_
    #define ChapterDataTable 0x8B0890
  #endif
  #ifdef _FE7_
    #define ChapterDataTable 0xC9A200
  #endif
#endif
#define SetChapterData(ChapterID,ObjectType1,ObjectType2,PaletteID,TileConfig,MapID,MapPointer,Anims1,Anims2,MapChanges) "PUSH; ORG ChapterDataTable+(ChapterID*148)+4; BYTE ObjectType1 ObjectType2 PaletteID TileConfig MapID Anims1 Anims2 MapChanges; EventPointerTable(MapID,MapPointer); POP" 
1 Like

Now my file looks like this:

//Map Installer generated by TMX2EA.exe

#ifndef ChapterDataTable
  #ifdef _FE8_
    #define ChapterDataTable 0x8B0890
  #endif
  #ifdef _FE7_
    #define ChapterDataTable 0xC9A200
  #endif
#endif

#include eastdlib.event

#define SetChapterData(0x00,0x10,0,0xEA,0x12,0x04,0x00,0,0,0) "PUSH; ORG ChapterDataTable+(ChapterID*148)+4; BYTE ObjectType1 ObjectType2 PaletteID TileConfig MapID Anims1 Anims2 MapChanges; EventPointerTable(MapID,MapPointer); POP"
Map:
#incbin "Test_1_data.dmp"

It no longer fails to assemble it but I can not make it show in the game.
As i said im working on FE7 so I have tried eating the first lines of code, leaving only:

#define ChapterDataTable 0xC9A200

But I have not achieved anything either.

The tutorial im following don’t have an example file to take as reference, so i’m a little bit lost with this…

EDIT: I checked the assembled rom with the Chapter Data Editor inside Nightmare and the prologue remains unchanged, so I assume that one of the pointers must be wrong.

EDIT 2: I fixed the code but it continues without work, it looks like this:

//Map Installer generated by TMX2EA.exe

#include eastdlib.event

#ifndef ChapterDataTable
  #ifdef _FE8_
    #define ChapterDataTable 0x8B0890
  #endif
  #ifdef _FE7_
    #define ChapterDataTable 0xC9A200
  #endif
#endif
#define SetChapterData(ChapterID,ObjectType1,ObjectType2,PaletteID,TileConfig,MapID,MapPointer,Anims1,Anims2,MapChanges) "PUSH; ORG ChapterDataTable+(ChapterID*148)+4; BYTE ObjectType1 ObjectType2 PaletteID TileConfig MapID Anims1 Anims2 MapChanges; EventPointerTable(MapID,MapPointer); POP"

#define SetChapterData(0x00,0x10,0,0xEA,0x12,0x04,Map,0,0,0)
Map:
#incbin "Test_1_data.dmp"

I have found the solution to the problem. The problem was in the mode in which I used TMX2EA, it does not work with dragging the map on the executable, what you have to do is open it and let it scan the subfolders, otherwise it does not generate the Master Map Installer.

As I just wanted to add one map, in the buildfile I added the .event of this (of the map I wanted to insert), and doing so did not work.

2 Likes