Rindille Posted March 4, 2017 Share Posted March 4, 2017 I am trying to make a custom chapter. I inserted my map with Tiled successfully and followed the tutorial to write tile changes in EA script. Then I encountered this error: Spoiler Finished. Messages: Tutorials disabled Events end at offset 0xD80609 12 errors encountered: File pro_medallion_elieen.txt, Line 208, Column 2: Code POIN's offset $D80611 is not divisible by 4 File pro_medallion_elieen.txt, Line 209, Column 2: Code POIN's offset $D8061D is not divisible by 4 File pro_medallion_elieen.txt, Line 210, Column 2: Code POIN's offset $D80629 is not divisible by 4 File pro_medallion_elieen.txt, Line 211, Column 2: Code POIN's offset $D80635 is not divisible by 4 File pro_medallion_elieen.txt, Line 212, Column 1: Code WORD's offset $D80639 is not divisible by 4 File pro_medallion_elieen.txt, Line 215, Column 1: Code SHORT's offset $D80645 is not divisible by 2 File pro_medallion_elieen.txt, Line 218, Column 1: Code SHORT's offset $D80647 is not divisible by 2 File pro_medallion_elieen.txt, Line 219, Column 1: Code SHORT's offset $D80649 is not divisible by 2 File pro_medallion_elieen.txt, Line 220, Column 1: Code SHORT's offset $D8064B is not divisible by 2 File pro_medallion_elieen.txt, Line 221, Column 1: Code SHORT's offset $D8064D is not divisible by 2 File pro_medallion_elieen.txt, Line 222, Column 1: Code SHORT's offset $D8064F is not divisible by 2 File pro_medallion_elieen.txt, Line 223, Column 1: Code SHORT's offset $D80651 is not divisible by 2 No data written to output. I googled about this for a while, but sill couldn't find the solution. This is my EA script: Spoiler #define DISABLE_TUTORIALS #include EAstdlib.event EventPointerTable(0x06,Pointers) EventPointerTable(0x0E,TileChanges) ORG 0xD80160 Pointers: POIN Turn_events POIN Character_events POIN Location_events POIN Misc_events POIN TrapData TrapData POIN Bad Bad Bad Bad POIN Good Good Good Good POIN Opening_event Ending_event Bad: UNIT 0x67 0x39 0x00 Level(1,Enemy,0) [5,6][5,6][0x1F]PursueWithoutHeed UNIT 0x67 0x39 0x00 Level(1,Enemy,0) [9,5][9,5][0x1F]PursueWithoutHeed UNIT 0x67 0x2E 0x00 Level(1,Enemy,0) [6,10][6,10][0x2C] AttackInRange UNIT 0x67 0x2E 0x00 Level(1,Enemy,0) [8,10][8,10][0x32] AttackInRange UNIT 0x67 0x2E 0x00 Level(1,Enemy,0) [15,10][15,10][0x2C]AttackInRange UNIT 0x67 0x39 0x00 Level(1,Enemy,0) [16,12][16,10][0x1F]DestroyVillages UNIT 0x67 0x39 0x00 Level(1,Enemy,0) [14,12][13,11][0x1F]DestroyVillages UNIT 0x87 0x39 0x00 Level(3,Enemy,0) [15,11][15,11][0x28]AttackInRange UNIT TwoLordsAagin: UNIT Hector 0x03 0x03 Level(1,Ally,0)[4,2] [5,3] [0x8D] NoAI UNIT 0x03 0x02 0x00 Level(1,Ally,0)[4,2] [4,3] [0x44] NoAI UNIT TwoLords: UNIT Hector 0x03 0x03 Level(1,Ally,0)[3,5] [3,5] [0x8D] NoAI UNIT 0x03 0x02 0x00 Level(1,Ally,0)[2,5] [2,5] [0x44] NoAI UNIT Good: UNIT Erk 0x20 0x02 Level(1,Ally,0) [0,6] [1,6] [0x38] NoAI UNIT Eliwood 0x01 0x02 Level(1,Ally,0)[0,7] [1,7] [0x09] NoAI UNIT Turn_events: OpeningTurnEvent(Opening_event) TurnEventPlayer(0x00,TheyCome,2) END_MAIN //Turn events list here TheyCome: LOU1 Good ENUN STAL 20 TEX1 0x81B REMA ENDA Character_events: CHAR 0x07 EliAce 0x03 Eliwood 0x000000 CHAR 0x07 EliAce Eliwood 0x03 0x000000 CHAR 0x08 EliAron 0x03 Erk 0x000000 CHAR 0x08 EliAron Erk 0x03 0x000000 CHAR 0x09 AzelAce Hector Eliwood 0x000000 CHAR 0x09 AzelAce Eliwood Hector 0x000000 CHAR 0x0A AzelAron Hector Erk 0x000000 CHAR 0x0A AzelAron Erk Hector 0x000000 END_MAIN //All the chara events list here EliAce: TEX1 0x81D REMA ENDA EliAron: TEX1 0x81E REMA ENDA AzelAce: TEX1 0x81F REMA ENDA AzelAron: TEX1 0x820 REMA ENDA Location_events: Village(0x06,item1,2,10) Village(0x0B,item2,15,2) House(0x0C,talk1,9,2) House(0x0D,talk2,4,2) END_MAIN //All the location events list here item1: FADI 10 BACG 0x02 FADU 10 TEX1 0x821 REMA ITGV 0x6B ENDA item2: FADI 10 BACG 0x02 FADU 10 TEX1 0x822 REMA ITGV 0x28 ENDA talk1: FADI 10 BACG 0x0D FADU 10 TEX1 0x823 REMA ENDA talk2: FADI 10 BACG 0x0D FADU 10 TEX1 0x824 REMA ENDA Misc_events: CauseGameOverIfLordDies DefeatAll(Ending_event) END_MAIN Opening_event: FADI 10 BACG 0x13 FADU 10 TEX6 0x5 [00,00] 0x815 _ASM0x42 0x83181 FADI 10 BACG 0x31 LOU1 TwoLords ENUN FADU 10 TEX1 0x816 REMA MOVE Hector [4,2] MOVE 0x03 [4,2] ENUN DISA Hector DISA 0x03 STAL 20 FADI 10 LOU1 Bad ENUN BACG 0x35 FADU 10 TEX1 0x817 REMA LOU1 TwoLordsAagin ENUN TEX1 0x818 REMA TEX1 0x819 ENDA Ending_event: UnitClear CURF [4,2] STAL 20 FADI 10 BACG 0x35 FADU 10 TEX1 0x825 SHCG 0x38 STAL 20 TEXTCG 0x826 0x1 FADI 10 BACG 0x35 FADU 10 TEX1 0x827 REMA MoveToChapter(0x02) ENDA TrapData: ENDTRAP //Notes //Prologue map wrote in D80000 //Map change is chap2 change MESSAGE Events end at offset currentOffset //The map for this chapter is at offset: ???????? //Tile change TileChanges: TileMap(0x00,2,10,1,1,VillageGate) TileMap(0x01,15,2,1,1,VillageGate) TileMap(0x02,14,1,3,2,VillageDestroyed) TileMap(0x03,1,9,3,2,VillageDestroyed) TileMapEnd VillageGate: SHORT 0x0F18 VillageDestroyed: SHORT 0x0B90 SHORT 0x0B94 SHORT 0x0B98 SHORT 0x0C10 SHORT 0x0C14 SHORT 0x0C18 Could someone help me? Thank you vey much! Quote Link to comment Share on other sites More sharing options...
Tequila Posted March 4, 2017 Share Posted March 4, 2017 The error is saying that the tile change data isn't beginning on an offset divisible by 4 (called word-aligned, because a word is 4 bytes). This is because (I think) trap data isn't an even number of bytes long. You should be able to fix this by putting ALIGN 4 before your TileChanges label (line 207). Quote Link to comment Share on other sites More sharing options...
Rindille Posted March 4, 2017 Author Share Posted March 4, 2017 It worked. Thanks! :D There's another dumb question though... When my unit visited the village, the event happened and then...the village got destroyed. lol How to fix it in my script? I couldn't see anything wrong... Quote Link to comment Share on other sites More sharing options...
Tequila Posted March 4, 2017 Share Posted March 4, 2017 I think that the 'village saved' map tile change layer has to be above the 'village destroyed' map tile change layer in Tiled. Quote Link to comment Share on other sites More sharing options...
Rindille Posted March 4, 2017 Author Share Posted March 4, 2017 (edited) 14 hours ago, Tequila said: I think that the 'village saved' map tile change layer has to be above the 'village destroyed' map tile change layer in Tiled. I tried but still failed... :( Here's my Tiled screenshot. Spoiler Edited March 4, 2017 by Rindille Quote Link to comment Share on other sites More sharing options...
Tequila Posted March 4, 2017 Share Posted March 4, 2017 Try the other way around, then? I dunno, I've never done maps with tile changes. Quote Link to comment Share on other sites More sharing options...
Rindille Posted March 4, 2017 Author Share Posted March 4, 2017 1 hour ago, Tequila said: Try the other way around, then? I dunno, I've never done maps with tile changes. I think I tried all the layer orders and the village still destroyed...lol Maybe I'll just post another topic for this. Thanks for your help! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.