House Event Doing Nothing

When a character enter a house it does nothing and just end the turn

Below is the script I use

Script

#define DISABLE_TUTORIALS
#include EAstdlib.event

EventPointerTable(0x06,Pointers)

ORG 0x1005E2C
Pointers:
POIN TurnEvents
POIN TalkEvents
POIN LocationEvents
POIN MiscEvents
POIN TrapDataEM TrapDataHM
POIN BadENM BadEHM BadHNM BadHHM
POIN Good Good Good Good //Same order as the above line, but we probably don’t need to differentiate between them
POIN OpeningScene EndingScene

BadENM:

Bandits:
UNIT 0x3E 0x39 0x00 Level(3,Enemy,False) [07,04] [07,04] [0x1F,0x6B,0x00,0x00] [0x00,0x00,0x00,0x00]
UNIT 0x3E 0x39 0x00 Level(5,Enemy,False) [05,04] [05,04] [0x1F,0x28,0x6B,0x00] [0x00,0x00,0x00,0x00]
UNIT

BadEHM:

Bandits:
UNIT 0x3E 0x39 0x00 Level(3,Enemy,False) [07,04] [07,04] [0x1F,0x6B,0x00,0x00] [0x00,0x00,0x00,0x00]
UNIT 0x3E 0x39 0x00 Level(5,Enemy,False) [05,04] [05,04] [0x1F,0x28,0x6B,0x00] [0x00,0x00,0x00,0x00]
UNIT

BadHNM:

Bandits:
UNIT 0x3E 0x39 0x00 Level(3,Enemy,False) [07,04] [07,04] [0x1F,0x6B,0x00,0x00] [0x00,0x00,0x00,0x00]
UNIT 0x3E 0x39 0x00 Level(5,Enemy,False) [05,04] [05,04] [0x1F,0x28,0x6B,0x00] [0x00,0x00,0x00,0x00]
UNIT

BadHHM:

Bandits:
UNIT 0x3E 0x39 0x00 Level(3,Enemy,False) [07,04] [07,04] [0x1F,0x6B,0x00,0x00] [0x00,0x00,0x00,0x00]
UNIT 0x3E 0x39 0x00 Level(5,Enemy,False) [05,04] [05,04] [0x1F,0x28,0x6B,0x00] [0x00,0x00,0x00,0x00]
UNIT

Good:

LyonUnit:
UNIT 0x08 0x65 0x00 Level(1,Ally,False) [01,01] [01,01] [0x44,0x4A,0x6B,0x6B] [0x00,0x00,0x00,0x00]
UNIT

TurnEvents:
OpeningTurnEvent(OpeningScene) //Do not include this event if the chapter has a prep screen
END_MAIN

TalkEvents:
END_MAIN

LocationEvents:
House(0x00,House1st,0,9)
END_MAIN

MiscEvents:
DefeatAll(EndingScene)
CauseGameOverIfLordDies
END_MAIN

OpeningScene:
LOU1 LyonUnit
ENUN
LOU1 Bandits
ENUN
OOBB
TEX1 0x59
ALIGN 4
REMA
ENDA

EndingScene:
MoveToChapter(0x01)
ENDA

TrapDataEM:
TrapDataHM:
ENDTRAP

House1st:
ALIGN 4
FADI 10
BACG 0x01
FADU 10
TEX1 0x5A
ENUN
REMA
ENDA

MESSAGE Events end at offset CURRENTOFFSET
//The map for this chapter is at offset: ???

And below is the text data

Well, it may have been an oversight but I guess that is the point of asking.

your text event has no location to load the first face, as well as you also didn’t say who says what Line.

[OpenMidLeft][LoadFace][0xFF][0xFF][OpenRight][LoadFace][0xDE][0x01] [OpenMidLeft] Hello,[.] I am on the left.[.][A] [OpenRight] And I am on the right.[.][A][X]

A few things you can change, but I think they wouldn’t cause the problem.

Events are already aligned to 4 unless you lave a shop list or something. Remove the ALIGN 4s in the house event and opening event.
The ENUN is unnecessary in the house event. Only use that to wait for units and stuff to finish moving around.
Try using the Text(Background,Text) macro instead of manually setting the background, fading, etc.

The only thing I can think of with the event that would cause problems is double check your coordinates.
Also that text problem Dancer pointed out.

Well, I try both of your suggestions and discover that there is indeed a problem in my text data (and thankfully it did as apparently the portrait in 0xDE is actually a generic enemy portrait for the stat screen and it would probably break something) so for testing purposes I just copy-pasted @dancer_A’s text data. This does not solve the problem. Visiting still just end turns, though the text data seems to be working as I temporarily used it as the opening and it works. As for the coordinates, it seems that there is nothing wrong. Shown below is the map I use.

Tileset: 2E343A

In a glance you could see that the coordinate of the house is (0,0). I did change the script to reflect the change, though the only change I’ve done is using Text(0x01,0x5A) macro, removing the unnecessary ‘ENUN’ and ‘ALIGN 4’, and change the coordinate of the house event to (0,0).

P.S. Actually, I actually encountered another problem while testing things, though it is not connected to the problem at hand. So there may be another question for me in the near future hehe unless I solved it before I decide to ask about it.

Try adding another command to the event like moving a unit or something else. Something that we know will work. Then we can see if it’s a problem with the text showing or the event triggering.

Well, moving event seems to work fine

That means the text is the problem. Try loading some text you know works now. If it does, double check that the portraits you’re using exist as normal portraits. Try replacing [0xFF][0xFF] with something else too for now.

Ok that is weird, I try to create a 2nd House Event and it works, however only one of them work. So I tried creating another House event and only 2 of them work and I do not know how.

[details=Event]

#define DISABLE_TUTORIALS
#include EAstdlib.event

EventPointerTable(0x06,Pointers)

ORG 0x1005E2C
Pointers:
POIN TurnEvents
POIN TalkEvents
POIN LocationEvents
POIN MiscEvents
POIN TrapDataEM TrapDataHM
POIN BadENM BadEHM BadHNM BadHHM
POIN Good Good Good Good //Same order as the above line, but we probably don’t need to differentiate between them
POIN OpeningScene EndingScene

BadENM:

Bandits:
UNIT 0x3E 0x39 0x00 Level(3,Enemy,False) [07,04] [07,04] [0x1F,0x6B,0x00,0x00] [0x00,0x00,0x00,0x00]
UNIT 0x3E 0x39 0x00 Level(5,Enemy,False) [05,04] [05,04] [0x1F,0x28,0x6B,0x00] [0x00,0x00,0x00,0x00]
UNIT

BadEHM:

Bandits:
UNIT 0x3E 0x39 0x00 Level(3,Enemy,False) [07,04] [07,04] [0x1F,0x6B,0x00,0x00] [0x00,0x00,0x00,0x00]
UNIT 0x3E 0x39 0x00 Level(5,Enemy,False) [05,04] [05,04] [0x1F,0x28,0x6B,0x00] [0x00,0x00,0x00,0x00]
UNIT

BadHNM:

Bandits:
UNIT 0x3E 0x39 0x00 Level(3,Enemy,False) [07,04] [07,04] [0x1F,0x6B,0x00,0x00] [0x00,0x00,0x00,0x00]
UNIT 0x3E 0x39 0x00 Level(5,Enemy,False) [05,04] [05,04] [0x1F,0x28,0x6B,0x00] [0x00,0x00,0x00,0x00]
UNIT

BadHHM:

Bandits:
UNIT 0x3E 0x39 0x00 Level(3,Enemy,False) [07,04] [07,04] [0x1F,0x6B,0x00,0x00] [0x00,0x00,0x00,0x00]
UNIT 0x3E 0x39 0x00 Level(5,Enemy,False) [05,04] [05,04] [0x1F,0x28,0x6B,0x00] [0x00,0x00,0x00,0x00]
UNIT

Good:

LyonUnit:
UNIT 0x08 0x65 0x00 Level(1,Ally,False) [01,01] [01,01] [0x44,0x4A,0x6B,0x6B] [0x00,0x00,0x00,0x00]
UNIT 0x09 0x65 0x00 Level(1,Ally,False) [01,02] [01,02] [0x44,0x4A,0x6B,0x6B] [0x00,0x00,0x00,0x00]
UNIT

TurnEvents:
OpeningTurnEvent(OpeningScene) //Do not include this event if the chapter has a prep screen
TURN 0x07 JustMoving [02,00] 0x00 0x00
END_MAIN

TalkEvents:
END_MAIN

LocationEvents:
Armory(Armory1,01,00)
House(0x00,House4th,00,00)
House(0x00,House3rd,00,01)
House(0x00,House2nd,00,09)
END_MAIN

MiscEvents:
DefeatAll(EndingScene)
CauseGameOverIfLordDies
END_MAIN

OpeningScene:
LOU1 LyonUnit
ENUN
LOU1 Bandits
ENUN
OOBB
Tex1 0x800
REMA
ENDA

EndingScene:
MoveToChapter(0x01)
ENDA

TrapDataEM:
TrapDataHM:
ENDTRAP

Armory1:
SHLI 0x1F 0x28

House2nd:
ALIGN 4
Text(0x01,0x800)
REMA
ENDA

House3rd:
ALIGN 4
Text(0x01,0x800)
REMA
ENDA

House4th:
ALIGN 4
Text(0x01,0x800)
REMA
ENDA

JustMoving:
ALIGN 4
MOVE 0x08 [00,08]
ENUN
ENDA

MESSAGE Events end at offset CURRENTOFFSET
//The map for this chapter is at offset: ???

----------[/details]

I make sure that there is a house on the coordinates listed. I think the first House macro in the location event is not working and it does not matter which label I used it is always the first House macro that is not working. For now at least the house I want to use is working so I guess problem solved still I want to know your opinion on what had happened if you had any idea.

Edit: Now all the house is working, ok then, I still have no idea how it worked though. I also use Dancer’s A text data and it also work too.

Swap these around, else there"s a chance House2nd will point to, say, E80002, but it gets aligned by 4 after that, which means the actual events start at E80004.

1 Like

make sense…well, problem solve…and also that seems a newbie mistake for me.