TheMaskedRaider Posted August 15, 2012 Share Posted August 15, 2012 Hello again, this will hopefully be my last question. What is the codefor triggering the map changes that have been made through Tiled? Is it this nonsense: #define TileMap(changeID,Xcoordinate,Ycoordinate,Length,Height,offset) "CODE changeID Xcoordinate Ycoordinate Length Height 0x00 0x00 0x00 offset" org 0xC9C9CC+(4*0x??) POIN TileChanges org OffsetOfTileChanges TileChanges: TileMap(TileChangeID,StartingX,StartingY,Length,Height,PointerToCode) CODE $FF CODE $00 CODE $00 Or is it something simpler than that? Quote Link to comment Share on other sites More sharing options...
Primefusion Posted August 15, 2012 Share Posted August 15, 2012 Since you're using Tiled I highly suggest reading this topic: http://serenesforest...showtopic=26486 Quote Link to comment Share on other sites More sharing options...
TheMaskedRaider Posted August 15, 2012 Author Share Posted August 15, 2012 I have. Got the map inserted and everything. Its just the map changes actually happening in game I'm having a problem with. Quote Link to comment Share on other sites More sharing options...
TheMaskedRaider Posted August 16, 2012 Author Share Posted August 16, 2012 There have been no responses so I might have to rephrase my question. What do I have to put into the event editor to get the map changes to happen? The map works as do events I just want the gosh durn village gate to close. Should I just disassemble the actual event codes and mess with them? Cause that is what seems to be happening. Quote Link to comment Share on other sites More sharing options...
Primefusion Posted August 16, 2012 Share Posted August 16, 2012 I didn't reply because I had to go to work. I don't just bum around FE forums all day you know. Anyway, if you want to tile changes using EA here's an example with some comments: #include EAstdlib.event EventPointerTable(0x14, TileChanges) // So the 0x14 is the byte that determines which chapter tile changes get overwritten. In this case I'm overwriting Ch. 3's. // The "TileChanges" part tells the ROM where to start reading tile changes. ORG 0x00D0A8E0 // This is where you put an offset to write your changes to. TileChanges: // Here you're basically stating how many changes you have. The actual tiles come later. TileMap(0x01, 5, 2, 3, 3,Ruins) // Notice how the first byte is unique for each change. This is the tile change ID which is separate from other IDs. TileMap(0x00, 6, 4, 1, 1,Gate) // The next two numbers is the coordinates of the first tile that will change. The ROM changes from left to right, top to bottom. TileMap(0x02, 2, 5, 1, 3,Snags) // This means that the upper left most tile is your starting tile. TileMap(0x03, 12, 9, 1, 3,Snags) // The other two numbers declare the size of your change. First one is width, second one is height. // The final thing is a pointer that tells the ROM where to look and see what tiles to change to. ALIGN 4 // I've found that in order to not have EA tell you there's a byte alignment problem you need an ALIGN 4 both before and after the TileMapEnd macro. TileMapEnd // This tells the ROM that there's no more changes. End of list. ALIGN 4 Gate: BYTE 0x80 0x00 0x00 0x00 // Here's where you put what tiles you're change to. Use the GBA Reference tilesets to find out what hex numbers to use (2 bytes per tile). // The column byte goes first, then the row byte. // When you've put all your tiles in you need to end the tile list with 2 bytes of 0x00, // I should probably mention that this is a village gate. Ruins: SHORT 0x0E1C 0x0E20 // Notice how I'm using SHORT here instead of byte. It's just another way to do the same thing. Keep in mind that SHORT and WORD are byte reversed aka Little Endian. SHORT 0x0E24 0x0E9C SHORT 0x0EA0 0x0EA4 SHORT 0x0F1C 0x0F20 SHORT 0x0F24 0x0000 Snags: SHORT 0x001C 0x009C SHORT 0x002C 0x0000 // One last thing to mention is that in the TileChanges label I have the Ruins change first. Always make sure the ruins go before the closed gate or // you'll be sad when you save a village and it breaks down instead of closing its gate. That's about as detailed as I can get. Feel free to ask for clarification. Quote Link to comment Share on other sites More sharing options...
Nintenlord Posted August 16, 2012 Share Posted August 16, 2012 If you use Tiled, you need to do very little in EA to get tile changes happen in game. With villages, doors and breaking walls, you don't need to add anything since those tile changes happen automatically. For other map changes, these codes cause tile changes to happen: [spoiler=Codes] Map Change map FE7: MAC1 *Map change ID* *Apply or remove* Triggers a map change. Parameters: Map change ID = Map change to trigger. Apply or remove = Whether to apply or reverse the map change. FE7: MACC [Position X, Position Y] FE6: MACC [Position X, Position Y] Triggers a map change. Parameters: Position = Position of the map change. Position of the map change. FE7: MAC2 *Map change ID* Unknown FE6: MAC2 Value Triggers a map change. Parameters: Map change ID = Whether to apply or reverse the map change. Unknown Value FE7: MAC3 *Map change ID* Unknown Triggers a map change. Parameters: Map change ID = Whether to apply or reverse the map change. Unknown FE7: MACE Value No clue. Parameters: Value Use whichever works. Quote Link to comment Share on other sites More sharing options...
TheMaskedRaider Posted August 16, 2012 Author Share Posted August 16, 2012 (edited) That's completely understandable. I was seeking advice and wasn't sure if I worded my question correctly s'all. If I have trouble I'll ask again but I think this looks clear enough. Thank you again good sir. Thank you as well Nintenlord. Edited August 16, 2012 by TheMaskedRaider Quote Link to comment Share on other sites More sharing options...
TheMaskedRaider Posted August 27, 2012 Author Share Posted August 27, 2012 (edited) Hello again. So I was finally able to try putting the map changes to work, but they don't. I'm honestly not sure what is happening. Here is the code for the chapter, not a true chapter since I have been doing all of this on a test map. #define DISABLE_TUTORIALS #include EAstdlib.event EventPointerTable(0x1B,Pointers) ORG 0xD82480 Pointers: POIN TurnEvents POIN CharacterEvents POIN LocationEvents POIN MiscEvents POIN TerrainEvents TerrainEvents POIN Bad Bad Bad Bad POIN Good Good Good Good POIN OpeningEvent EndingEvent Bad: UNIT 0x99 0x39 0x0 Level(4,Enemy,False) [11,1] [11,1] [0x1F,0x28,0x0,0x0] [0x3,0x3,0x1,0x0] UNIT Keys: UNIT 0xA0 0x39 0x0 Level(4,Enemy,True) [13,17] [13,17] [0x1F,0x78,0x0,0x0] [0x0,0xA,0x0,0x0] UNIT 0xA0 0x39 0x0 Level(4,Enemy,True) [13,16] [13,16] [0x1F,0x69,0x0,0x0] [0x0,0xA,0x0,0x0] UNIT Good: UNIT 0x1 0x0 0x1 Level(1,Ally,False) [14,16] [14,16] [0x14,0x6B,0x6B,0x0] [0x0,0x0,0x0,0x0] UNIT 0x1A 0x0E 0x1 Level(1,Ally,False) [16,16] [16,16] [0x1,0x0,0x0,0x0] [0x0,0x0,0x0,0x0] UNIT 0x19 0x38 0x1 Level(1,Ally,False) [15,16] [15,16] [0x14,0x6B,0x0,0x0] [0x0,0x0,0x0,0x0] UNIT 0x04 0x38 0x1 Level(1,Ally,False) [15,15] [15,15] [0x14,0x6B,0x0,0x0] [0x0,0x0,0x0,0x0] UNIT 0x2F 0x28 0x1 Level(2,Ally,False) [15,17] [15,17] [0x14,0x1,0x6B,0x0] [0x0,0x0,0x0,0x0] UNIT 0x30 0x29 0x1 Level(1,Ally,False) [17,15] [17,15] [0x1,0x14,0x6B,0x0] [0x0,0x0,0x0,0x0] UNIT 0x11 0x1D 0x1 Level(1,Ally,False) [17,16] [17,16] [0x4A,0x0 ,0x0,0x0] [0x0,0x0,0x0,0x0] UNIT 0x20 0x34 0x1 Level(1,Ally,False) [17,17] [17,17] [0x14,0x6B,0x0,0x0] [0x0,0x0,0x0,0x0] UNIT TurnEvents: TURN 0x00 OpeningEvent [1,0] 0x00 0x00 TURN CharacterEvents: CHAR LocationEvents: Door(12,12) Chest(BlueGem,7,15) LOCA 0x3 [2,10] 0xF LOCA MiscEvents: CauseGameOverIfLordDies AFEV 0x0 EndingEvent 0x2 AFEV TerrainEvents: BLST ALIGN 4 OpeningEvent: HIDEMAP MUS1 0x6B SHOWMAP. STAL 32 BACG 0x0D FADU 4 SHOWMAP TEX1 0x822 FADI 16 FADU 16 TEX1 0x823 MORETEXT 0x824 REBU MUEN 4 REMA LOU1 Bad Keys CAM1 0x89 MOVE [1,21] [10,2] ENUN TEX1 0x826 REMA STAL 32 ENUN FADI 16 HIDEMAP BACG 0x0D MUS1 0x6B FADU 16 SHOWMAP TEX1 0x825 MUS1 0x32 MORETEXT 0x827 REMA LOU2 Good ENUN ENDA EndingEvent: MUS1 0x38 FADI 16 BACG 0x2F FADU 16 TEX1 0x82B MORETEXTIFTACTF 0x82C 0x82D REMA MONE 0x01 5000 MoveToChapter(0x2) MESSAGE Events end at offset currentOffset All I am trying to do is make the door open, but it isn't happening.We inserted the changes so that shouldn't be it either #include EAstdlib.eventEventPointerTable(0x1A, TileChanges)POIN TileChangesORG 0xD823A0TileChanges:TileMap(0x01,7,15,1,1,Chest1)TileMap(0x00,12,12,1,1,Door1)ALIGN 4ALIGN 4Chest1:BYTE 0x04 0x00 0x00 0x00Door1:BYTE 0xD4 0x0C 0x00 0x00 The EA wasn't letting the map change to be assembled when I had TileMapEnd in the code, so I am not exactly sure what I should do at this point.I have done everything the tutorial has told me to do and nothing is happening. at this rate the doors will be unarmed NPC knights. Here is a dropbox for the tiled map if it has anything to do with that. https://www.dropbox.com/s/e3ukbuhf94l2m5k/CH4TEST.tmx Edited August 27, 2012 by TheMaskedRaider Quote Link to comment Share on other sites More sharing options...
zahlman Posted August 28, 2012 Share Posted August 28, 2012 If you use Tiled, you need to do very little in EA to get tile changes happen in game. With villages, doors and breaking walls, you don't need to add anything since those tile changes happen automatically. Is that because of something extra Tiled does for you? Because I've seen a lot of hacks where villages don't close properly after being visited... Quote Link to comment Share on other sites More sharing options...
Nintenlord Posted August 28, 2012 Share Posted August 28, 2012 (edited) Hello again. So I was finally able to try putting the map changes to work, but they don't. I'm honestly not sure what is happening. Here is the code for the chapter, not a true chapter since I have been doing all of this on a test map. #define DISABLE_TUTORIALS #include EAstdlib.event EventPointerTable(0x1B,Pointers) ORG 0xD82480 Pointers: POIN TurnEvents POIN CharacterEvents POIN LocationEvents POIN MiscEvents POIN TerrainEvents TerrainEvents POIN Bad Bad Bad Bad POIN Good Good Good Good POIN OpeningEvent EndingEvent Bad: UNIT 0x99 0x39 0x0 Level(4,Enemy,False) [11,1] [11,1] [0x1F,0x28,0x0,0x0] [0x3,0x3,0x1,0x0] UNIT Keys: UNIT 0xA0 0x39 0x0 Level(4,Enemy,True) [13,17] [13,17] [0x1F,0x78,0x0,0x0] [0x0,0xA,0x0,0x0] UNIT 0xA0 0x39 0x0 Level(4,Enemy,True) [13,16] [13,16] [0x1F,0x69,0x0,0x0] [0x0,0xA,0x0,0x0] UNIT Good: UNIT 0x1 0x0 0x1 Level(1,Ally,False) [14,16] [14,16] [0x14,0x6B,0x6B,0x0] [0x0,0x0,0x0,0x0] UNIT 0x1A 0x0E 0x1 Level(1,Ally,False) [16,16] [16,16] [0x1,0x0,0x0,0x0] [0x0,0x0,0x0,0x0] UNIT 0x19 0x38 0x1 Level(1,Ally,False) [15,16] [15,16] [0x14,0x6B,0x0,0x0] [0x0,0x0,0x0,0x0] UNIT 0x04 0x38 0x1 Level(1,Ally,False) [15,15] [15,15] [0x14,0x6B,0x0,0x0] [0x0,0x0,0x0,0x0] UNIT 0x2F 0x28 0x1 Level(2,Ally,False) [15,17] [15,17] [0x14,0x1,0x6B,0x0] [0x0,0x0,0x0,0x0] UNIT 0x30 0x29 0x1 Level(1,Ally,False) [17,15] [17,15] [0x1,0x14,0x6B,0x0] [0x0,0x0,0x0,0x0] UNIT 0x11 0x1D 0x1 Level(1,Ally,False) [17,16] [17,16] [0x4A,0x0 ,0x0,0x0] [0x0,0x0,0x0,0x0] UNIT 0x20 0x34 0x1 Level(1,Ally,False) [17,17] [17,17] [0x14,0x6B,0x0,0x0] [0x0,0x0,0x0,0x0] UNIT TurnEvents: TURN 0x00 OpeningEvent [1,0] 0x00 0x00 TURN CharacterEvents: CHAR LocationEvents: Door(12,12) Chest(BlueGem,7,15) LOCA 0x3 [2,10] 0xF LOCA MiscEvents: CauseGameOverIfLordDies AFEV 0x0 EndingEvent 0x2 AFEV TerrainEvents: BLST ALIGN 4 OpeningEvent: HIDEMAP MUS1 0x6B SHOWMAP. STAL 32 BACG 0x0D FADU 4 SHOWMAP TEX1 0x822 FADI 16 FADU 16 TEX1 0x823 MORETEXT 0x824 REBU MUEN 4 REMA LOU1 Bad Keys CAM1 0x89 MOVE [1,21] [10,2] ENUN TEX1 0x826 REMA STAL 32 ENUN FADI 16 HIDEMAP BACG 0x0D MUS1 0x6B FADU 16 SHOWMAP TEX1 0x825 MUS1 0x32 MORETEXT 0x827 REMA LOU2 Good ENUN ENDA EndingEvent: MUS1 0x38 FADI 16 BACG 0x2F FADU 16 TEX1 0x82B MORETEXTIFTACTF 0x82C 0x82D REMA MONE 0x01 5000 MoveToChapter(0x2) MESSAGE Events end at offset currentOffset All I am trying to do is make the door open, but it isn't happening.We inserted the changes so that shouldn't be it either #include EAstdlib.eventEventPointerTable(0x1A, TileChanges)POIN TileChangesORG 0xD823A0TileChanges:TileMap(0x01,7,15,1,1,Chest1)TileMap(0x00,12,12,1,1,Door1)ALIGN 4ALIGN 4Chest1:BYTE 0x04 0x00 0x00 0x00Door1:BYTE 0xD4 0x0C 0x00 0x00 The EA wasn't letting the map change to be assembled when I had TileMapEnd in the code, so I am not exactly sure what I should do at this point.I have done everything the tutorial has told me to do and nothing is happening. at this rate the doors will be unarmed NPC knights. Here is a dropbox for the tiled map if it has anything to do with that. https://www.dropbox.com/s/e3ukbuhf94l2m5k/CH4TEST.tmx If you are using Tiled to make map changes, then you don't need any of this: #include EAstdlib.eventEventPointerTable(0x1A, TileChanges)POIN TileChangesORG 0xD823A0TileChanges:TileMap(0x01,7,15,1,1,Chest1)TileMap(0x00,12,12,1,1,Door1)ALIGN 4ALIGN 4Chest1:BYTE 0x04 0x00 0x00 0x00Door1:BYTE 0xD4 0x0C 0x00 0x00[/size] which, frankly speaking, EA won't accept as anything due to how butchered it is. If you make tile changes in Tiled, you only need to invoke the changes in event script using codes such as these: [spoiler=Codes] Map Change map FE7: MAC1 *Map change ID* *Apply or remove* Triggers a map change. Parameters: Map change ID = Map change to trigger. Apply or remove = Whether to apply or reverse the map change. FE7: MACC [Position X, Position Y] FE6: MACC [Position X, Position Y] Triggers a map change. Parameters: Position = Position of the map change. Position of the map change. FE7: MAC2 *Map change ID* Unknown FE6: MAC2 Value Triggers a map change. Parameters: Map change ID = Whether to apply or reverse the map change. Unknown Value FE7: MAC3 *Map change ID* Unknown Triggers a map change. Parameters: Map change ID = Whether to apply or reverse the map change. Unknown FE7: MACE Value No clue. Parameters: Value assuming map changes you do don't happen automatically, such as with villages, chests and such do. Is that because of something extra Tiled does for you? Because I've seen a lot of hacks where villages don't close properly after being visited... That probably has more to do with this: http://serenesforest.net/forums/index.php?showtopic=32004 Tiled inserter doesn't rreally do anything special behind the scenes, it merely converts Tile map to GBA FE map and tile changes. Edited August 28, 2012 by Nintenlord Quote Link to comment Share on other sites More sharing options...
TheMaskedRaider Posted August 28, 2012 Author Share Posted August 28, 2012 If you are using Tiled to make map changes, then you don't need any of this: #include EAstdlib.eventEventPointerTable(0x1A, TileChanges)POIN TileChangesORG 0xD823A0TileChanges:TileMap(0x01,7,15,1,1,Chest1)TileMap(0x00,12,12,1,1,Door1)ALIGN 4ALIGN 4Chest1:BYTE 0x04 0x00 0x00 0x00Door1:BYTE 0xD4 0x0C 0x00 0x00[/size] which, frankly speaking, EA won't accept as anything due to how butchered it is. If you make tile changes in Tiled, you only need to invoke the changes in event script using codes such as these: [spoiler=Codes] Map Change map FE7: MAC1 *Map change ID* *Apply or remove* Triggers a map change. Parameters: Map change ID = Map change to trigger. Apply or remove = Whether to apply or reverse the map change. FE7: MACC [Position X, Position Y] FE6: MACC [Position X, Position Y] Triggers a map change. Parameters: Position = Position of the map change. Position of the map change. FE7: MAC2 *Map change ID* Unknown FE6: MAC2 Value Triggers a map change. Parameters: Map change ID = Whether to apply or reverse the map change. Unknown Value FE7: MAC3 *Map change ID* Unknown Triggers a map change. Parameters: Map change ID = Whether to apply or reverse the map change. Unknown FE7: MACE Value No clue. Parameters: Value assuming map changes you do don't happen automatically, such as with villages, chests and such do. Tiled inserter doesn't rreally do anything special behind the scenes, it merely converts Tile map to GBA FE map and tile changes. The code up top got butchered when I posted it. And I understand those MACC MAC1 codes and all but the problem is that the changes that are supposed to happen automatically are not. I open the door and the door is still there. Open a chest, get the item but the chest is still closed. everything should work according to what everyone is saying. The only reason we tried inserting the map changes in with EA was because simply doing it in Tiled was not working either. Quote Link to comment Share on other sites More sharing options...
TheMaskedRaider Posted August 31, 2012 Author Share Posted August 31, 2012 Okay so I really need help. Nothing is working even though everything seems to be in order. The tiled map is correct, and I disassembled my events and everything looks to be where it should, but it still isn't working Once again the problem lies not with big map changes, but with supposedly automatic ones such as doors. I will be providing very large screen shots to illustrate what is happening and the like. The events work by the way I get items with the chests and I hear the door unlock sound when I unlock doors Screenshots: Quote Link to comment Share on other sites More sharing options...
TheMaskedRaider Posted September 3, 2012 Author Share Posted September 3, 2012 Just saying I still have a problem. none of the MACC MAC1 stuff works. Nothing that has been prescribed works. Something is wrong and someone is bound to know what it is. Quote Link to comment Share on other sites More sharing options...
Agro Posted September 3, 2012 Share Posted September 3, 2012 Have you tried Arch's method of tile changing instead? Using Mappy instead? Quote Link to comment Share on other sites More sharing options...
SimSimma Posted September 3, 2012 Share Posted September 3, 2012 When your inserting your map are you telling the inserter where to put your map changes? for example in this image above i have written the pointers to replace chapter 2's map and map changes. once you do this mac1 and the other codes should trigger your changes. your problem sounds similar to when my map changes weren't working when i first used tiled, until I realised I wasn't using the correct map change pointers for the correct maps Quote Link to comment Share on other sites More sharing options...
TheMaskedRaider Posted September 3, 2012 Author Share Posted September 3, 2012 When your inserting your map are you telling the inserter where to put your map changes? for example in this image above i have written the pointers to replace chapter 2's map and map changes. once you do this mac1 and the other codes should trigger your changes. your problem sounds similar to when my map changes weren't working when i first used tiled, until I realised I wasn't using the correct map change pointers for the correct maps How do I get the correct numbers for that cause I tried and it doesn't work 0xC9C9CC + (4 * 0x1b) = 0xC9CA34 for example Am I supposed to put that offset into nightmare? Or just do nothing? This is what I have by the way. I am replacing Ch4's map and map changes. Unfortunately seem to be screwing up some where cause it don't work. Quote Link to comment Share on other sites More sharing options...
Primefusion Posted September 3, 2012 Share Posted September 3, 2012 How do I get the correct numbers for that cause I tried and it doesn't work 0xC9C9CC + (4 * 0x1b) = 0xC9CA34 for example Am I supposed to put that offset into nightmare? Or just do nothing? This is what I have by the way. I am replacing Ch4's map and map changes. I would just use Nightmare and put the offset where you wrote the tilechanges to into the appropriate field. Less of a headache IMO. Example: 0xD09FC0 is where my tilechanges are located and Nightmare will fix the pointer for you. Quote Link to comment Share on other sites More sharing options...
TheMaskedRaider Posted September 3, 2012 Author Share Posted September 3, 2012 Alright So How do I tell where my map ends and map changes start? There is the map. Are the map changes from tiled written to the same location? Quote Link to comment Share on other sites More sharing options...
TheMaskedRaider Posted September 3, 2012 Author Share Posted September 3, 2012 Okay so I found out where it wrote the map changes and then tried just putting that offset in. No dice. Quote Link to comment Share on other sites More sharing options...
Primefusion Posted September 3, 2012 Share Posted September 3, 2012 Alright So How do I tell where my map ends and map changes start? I don't know how Tiled and it's inserter do it but if you're using the .MAR inserter and EA you can put this at the end of your map changes file: MESSAGE Events end at offset currentOffset And EA will tell you where your map changes end. I'm beginning to believe you accidentally overwrote your changes or something. Your doing everything everyone else has been doing for a long time but coming up short. I would start the insertion process over again and pay special attention to where you're writing data to. Quote Link to comment Share on other sites More sharing options...
TheMaskedRaider Posted September 3, 2012 Author Share Posted September 3, 2012 YES! I got it to work! The problem was I was inserting the change into the wrong pointer. I feel dumb. Thank you gentlemen ever so much. I cannot psychically fathom the amount of thanks you deserve. 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.