Final Fantasy Hacktics

Modding => Event Editing => Topic started by: advfox on October 31, 2014, 06:33:14 pm

Title: My event is ending early.
Post by: advfox on October 31, 2014, 06:33:14 pm
When my event loads, the camera reveals the scene, and Ramza starts walking like he's supposed to. Shortly after he stops, the event cuts to black, and the game loads the World Map. I can't find any obvious issues in the instructions:


Offset(x0003E000)
//Remove the previous line if you wish not to override the offset in CONFIG.INI.

Erase(x01,x00)
Erase(x38,x00)
Camera(+00760,-00124,-00776,+00174,+00512,+00000,+04096,+00001)
WaitForInstruction(x04,x00)
{3E}(r020000008080000200)
WaitForInstruction(x0C,x00)
{63}(rA9)
Camera(+00376,-00188,+00952,+00366,+00512,+00000,+04096,+00128)
{3E}(r028080000000006000)
{4D}(r40)
WaitForInstruction(x04,x00)
Wait(00030)
{63}(rAA)
SpriteMove(x01,x00,+00000,+00000,-00014,x00,x01,+00000)
ColorUnit(x01,x00,x01,-006,-004,-002,000)
Wait(00002)
Draw(x01,x00)
ColorUnit(x01,x00,x08,+000,+000,+000,004)
SpriteMove(x01,x00,+00000,+00000,+00000,x00,x01,+00018)
WaitSpriteMove(x01,x00)
WalkTo(x01,x00,005,004,x00,x00,+008,x01)
WaitWalk(x01,x00)
UnitAnim(x01,x00,x0002,x00)
Wait(00050)
SpriteMove(x38,x00,+00000,+00000,-00014,x00,x01,+00000)
ColorUnit(x38,x00,x01,-006,-004,-002,000)
Wait(00002)
Draw(x38,x00)
ColorUnit(x38,x00,x08,+000,+000,+000,004)
SpriteMove(x38,x00,+00000,+00000,+00000,x00,x01,+00018)
WaitSpriteMove(x38,x00)
WalkTo(x38,x00,005,007,x00,x00,+008,x01)
WaitWalk(x38,x00)
UnitAnim(x38,x00,x0002,x00)
Wait(00020)
DisplayMessage(x10,x11,x0001,x38,x00,x00,+00000,+00000,+00000,x00)
WaitForInstruction(x01,x00)
Wait(00030)
DisplayMessage(x10,x12,x0002,x01,x00,x00,+00000,+00000,+00000,x00)
WaitForInstruction(x01,x00)
Wait(00010)
DisplayMessage(x10,x91,x0003,x38,x00,x00,+00000,+00000,+00000,x00)
WaitForInstruction(x01,x00)
DisplayMessage(x10,x92,x0004,x01,x00,x00,+00000,+00000,+00000,x00)
WaitForInstruction(x01,x00)
ChangeDialog(x02,x0005,x00,x00)
WaitForInstruction(x01,x00)
ChangeDialog(x01,x0006,x00,x00)
WaitForInstruction(x01,x00)
ChangeDialog(x02,xFFFF,x00,x00)
Wait(00008)
ChangeDialog(x01,xFFFF,x00,x00)
WaitForInstruction(x01,x00)
Wait(00060)
DisplayMessage(x10,x11,x0007,x38,x00,x00,+00000,+00000,+00000,x00)
WaitForInstruction(x01,x00)
Wait(00030)
RotateUnit(x01,x01,x00,x00,x00,000)
WaitRotateUnit(x01,x00)
Wait(00020)
DisplayMessage(x10,x12,x0008,x01,x00,x00,+00000,+00000,+00000,x00)
WaitForInstruction(x01,x00)
Wait(00060)
RotateUnit(x01,x01,x07,x00,x00,000)
WaitRotateUnit(x01,x00)
Wait(00008)
DisplayMessage(x10,x12,x0009,x01,x00,x00,+00000,+00000,+00000,x00)
WaitForInstruction(x01,x00)
Wait(00010)
DisplayMessage(x10,x11,x000A,x38,x00,x00,+00000,+00000,+00000,x00)
WaitForInstruction(x01,x00)
Wait(00030)
DisplayMessage(x10,x12,x000B,x01,x00,x00,+00000,+00000,+00000,x00)
WaitForInstruction(x01,x00)
Wait(00010)
DarkScreen(x00,x01,012,064,x00,004)
WaitForInstruction(x36,x00)
DisplayConditions(x07,060)
WaitForInstruction(x38,x00)
RemoveDarkScreen()
WaitForInstruction(x36,x00)
Wait(00090)
Camera(+00392,-01693,+00616,+00302,+00736,+00000,+04096,+00180)
Wait(00090)
ZERO(x0094)
EventEnd()

//INSTRUCTION SECTION END -  TEXT START
//Message x01
{font:08}Boy{br}
{font:00}Excuse me...I have a{br}
question to ask you.{end}

//Message x02
{font:08}{Ramza}{br}
{font:00}I'm sorry, but have we{br}
met?{end}

//Message x03
{font:08}Boy{br}
{font:00}Oh, right. My name is{br}
Marche.{end}

//Message x04
{font:08}{Ramza}{br}
{font:00}And I am {Ramza}.{end}

//Message x05
{font:08}Marche{br}
{font:00}{Ramza}, could I{br}
travel with you for a while?{end}

//Message x06
{font:08}{Ramza}{br}
{font:00}We have not yet{br}
even come to know each{br}
other.{br}
{br}
Why do you ask?{end}

//Message x07
{font:08}Marche{br}
{font:00}Believe it or not,{br}
I really have no one else{br}
to turn to.{br}
{br}
I'm - not from around here.{end}

//Message x08
{font:08}{Ramza}{br}
{font:00}Well, I'd rather not{br}
leave you here alone...{end}

//Message x09
{font:08}{Ramza}{br}
{font:00}Very well.{br}
But know that you may{br}
have to fight.{end}

//Message x0A
{font:08}Marche{br}
{font:00}Don't worry,{br}
I think I handle it.{end}

//Message x0B
{font:08}{Ramza}{br}
{font:00}We shall depart{br}
then.{end}

//Message x0C
Title: Re: My event is ending early.
Post by: 3lric on November 01, 2014, 12:22:17 am
When posting an event, please post the whole thing. My guess is that it's the offset, or specifically that you didn't remove the Text Offset before compiling. You didn't post that part though :P

There are several reasons this can happen, so let's start with that.

(Also, when I say to post the whole event I literally mean, hit Control+A then copy and paste the entire thing, dialogue and all. Events aren't one of those things that you can just paste a chunk of and try to debug it, since this issues can be caused elsewhere, such as in the dialogue themselves, offsets, etc)
Title: Re: My event is ending early.
Post by: advfox on November 01, 2014, 09:42:02 am
Alright, I updated the post to include everything.
Title: Re: My event is ending early.
Post by: Xifanie on November 01, 2014, 09:55:12 am
Event looks fine to me... usually the best way to discover what's wrong with your event is by deleting stuff until it works. Gradually pinpoint the problem then you'll have your answer.

You'll want to avoid unknown instructions because some CAN break your event. We don't know what they do after all, so we don't know when they're supposed to work and when not. I also see you're using an old version of the configuration and I highly suggest that you update, because some of those are now documented; http://ffhacktics.com/smf/index.php?topic=10218.0 (http://ffhacktics.com/smf/index.php?topic=10218.0).

PS: I see Marche is in your event... I sure hope you're not using that terrible sprite.
Title: Re: My event is ending early.
Post by: 3lric on November 01, 2014, 10:54:47 am
Did you make this event from scratch? I'm curious as to where all the 3E commands are coming from, as that is generally used at the end of any event rather than the beginning. (That's the color screen effect)

Any reason you haven't updated to the new config.ini? Might make it easier on both you and the people helping.

Try commenting out the 3E commands as well as the WaitForInstruction 0C commands and see if this helps.
Also, get rid of the second {63} command. You only need one in this instance.
Title: Re: My event is ending early.
Post by: advfox on November 01, 2014, 11:24:45 am
I made the event from scratch, but I referred to existing events for some of the commands since I assumed they were vital for an event to work properly.

I updated the config.ini and took out the commands you suggested. Now, when I try to compile the event, an error message pops up that reads 'r' is not a valid integer value.




Title: Re: My event is ending early.
Post by: Xifanie on November 01, 2014, 11:52:12 am
There is no backwards compatibility. You have to compile all your events with the old configuration, then decompile them with the new one.
Title: Re: My event is ending early.
Post by: Jumza on November 01, 2014, 12:05:10 pm
This was all part of Xif's above post

-Elric
Title: Re: My event is ending early.
Post by: advfox on November 01, 2014, 01:00:43 pm
I compiled my events with the old config.ini, decompiled them with the new one, and then compiled the event in question.

I still encountered the same problem, so I started stripping the event of everything, piece by piece. When I took out all of the dialog instructions, the event actually did what it was supposed to do past that point. So I guess I'll just try to redo all of the dialog and their instructions, and maybe I can get this event working right.