• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
April 24, 2024, 09:26:44 pm

News:

Don't be hasty to start your own mod; all our FFT modding projects are greatly understaffed! Find out how you can help in the Recruitment section or our Discord!


Branched Events - Storyline Progression

Started by Genghis Hank, April 21, 2020, 09:58:13 am

Genghis Hank

I've come across an issue with storyline progression, which I haven't encountered previously.

I'm using the Beowulf branched event as a base. You receive a choice on whether to fight or not - Option A leaves storyline progression as it is, and Option B increases storyline progression by 1.

I'll post the events below, for reference.

Offset(x003A2000)
//Remove the previous line if you wish not to override the offset in CONFIG.INI.
Text(x0000052F)
//Remove the previous line if you wish text to compile directly after instructions.

UnitAnim(x00,x00,x02,x00,x00)
LoadEVTCHR(x01,x86,x00)
WaitForInstruction(x34,x00)
SaveEVTCHR(x01)
Wait(00002)
UnitAnim(x80,x00,x66,x02,x01)
UnitAnim(x81,x00,x63,x02,x01)
UnitAnim(x82,x00,x65,x02,x01)
UnitAnim(x83,x00,x64,x02,x00)
Wait(00001)
{7F}(r80000105)
{7F}(r81000103)
{7F}(r82000104)
{7F}(r83000102)
ColorUnit(x80,x00,x04,-003,-003,-003,000)
Wait(00002)
ColorUnit(x81,x00,x04,-003,-003,-003,000)
ColorUnit(x82,x00,x04,-003,-003,-003,000)
ColorUnit(x83,x00,x04,-003,-003,-003,000)
Wait(00001)
AddUnit(x80,x00,x01)
AddUnit(x81,x00,x01)
AddUnit(x82,x00,x01)
AddUnit(x83,x00,x01)
AddUnit(x1F,x00,x01)
Wait(00001)
SpriteMove(x80,x00,+00014,-00017,-00004,x02,x08,+00001)
SpriteMove(x81,x00,+00019,-00007,-00009,x02,x08,+00001)
SpriteMove(x82,x00,-00002,+00000,+00000,x02,x08,+00001)
SpriteMove(x83,x00,+00004,-00003,+00000,x02,x08,+00001)
WarpUnit(x03,x00,003,005,x00,x02)
SpriteMove(x03,x00,+00056,+00000,-00156,x00,x01,+00001)
WaitSpriteMove(x03,x00)
Camera(+00280,-00941,+00616,+00302,+00512,+00000,+04096,+00001)
WaitForInstruction(x04,x00)
UnitAnim(x83,x00,x64,x02,x00)
{63}(rA9)
{4D}(r3C)
Camera(+00280,+00083,+00616,+00302,+00512,+00000,+04096,+00096)
WaitForInstruction(x04,x00)
{63}(rAA)
Wait(00030)
ColorUnit(x03,x00,x01,+000,+000,+000,000)
Wait(00002)
Draw(x03,x00)
ColorUnit(x03,x00,x08,+000,+000,+000,004)
SpriteMove(x03,x00,+00056,+00000,-00112,x00,x01,+00044)
WaitSpriteMove(x03,x00)
UnitAnim(x03,x00,x02,x00,x00)
Wait(00060)
UnitAnim(x03,x00,x61,x02,x01)
Wait(00008)
UnitAnim(x03,x00,x62,x02,x01)
Wait(00021)
UnitAnim(x03,x00,x61,x02,x01)
Wait(00008)
UnitAnim(x03,x00,x02,x00,x00)
Wait(00008)
UnitAnim(x03,x00,x5F,x02,x01)
Wait(00008)
UnitAnim(x03,x00,x60,x02,x01)
Wait(00016)
UnitAnim(x03,x00,x5F,x02,x01)
Wait(00010)
UnitAnim(x03,x00,x02,x00,x00)
Wait(00008)
RotateUnit(x03,x00,x04,x00,x00,000)
WaitRotateUnit(x03,x00)
Wait(00040)
UnitAnim(x03,x00,x03,x00,x00)
SpriteMove(x03,x00,+00012,+00000,-00104,x00,x01,+00045)
WaitSpriteMove(x03,x00)
RotateUnit(x03,x00,x08,x00,x00,000)
SpriteMove(x03,x00,+00000,+00000,-00084,x00,x01,+00023)
WaitSpriteMove(x03,x00)
SpriteMove(x03,x00,+00000,+00000,+00000,x00,x01,+00084)
Wait(00053)
UnitAnim(x80,x00,x67,x02,x01)
Wait(00010)
WaitForInstruction(x0B,x00)
UnitAnim(x03,x00,x02,x00,x00)
RotateUnit(x03,x00,x04,x00,x00,000)
UnitAnim(x03,x00,x02,x00,x00)
PortraitCol(x06)
Wait(00030)
DisplayMessage(x10,x91,x0001,x80,x00,x05,-00012,+00000,+00006,x10)
WaitForInstruction(x01,x00)
DisplayMessage(x10,x92,x0002,x03,x00,x00,+00014,+00000,+00000,x12)
WaitForInstruction(x01,x00)
ChangeDialog(x01,x0003,x05,x00)
WaitForInstruction(x01,x00)
ChangeDialog(x02,xFFFF,x00,x00)
Wait(00008)
ChangeDialog(x01,xFFFF,x00,x00)
WaitForInstruction(x01,x00)
Wait(00060)
DisplayMessage(x10,x11,x0004,x1F,x00,x00,+00000,+00000,+00000,x12)
WaitForInstruction(x01,x00)
RotateUnit(x03,x00,x0C,x02,x01,000)
Wait(00010)
{63}(rAA)
Camera(+00392,+00115,+00728,+00302,+00512,+00000,+04096,+00032)
WaitForInstruction(x04,x00)
Wait(00010)
DisplayMessage(x10,x12,x0005,x84,x00,x00,+00000,+00000,+00000,x03)
WaitForInstruction(x01,x00)
DisplayMessage(x10,x11,x0006,x1F,x00,x00,+00000,+00000,+00000,x12)
WaitForInstruction(x01,x00)
DisplayMessage(x10,x12,x0007,x84,x00,x00,+00000,+00000,+00000,x03)
WaitForInstruction(x01,x00)
BlockStart()
Wait(00020)
RotateUnit(x03,x00,x04,x01,x00,000)
WaitRotateUnit(x03,x00)
BlockEnd()
DisplayMessage(x10,x91,x0008,x80,x00,x05,+00000,+00000,+00018,x03)
WaitForInstruction(x01,x00)
ChangeDialog(x01,xFFFF,x00,x00)
Wait(00010)
Camera(+00280,+00019,+00616,+00302,+00512,+00000,+04096,+00032)
WaitForInstruction(x04,x00)
Wait(00010)
DisplayMessage(x10,x92,x0009,x03,x00,x00,+00014,+00000,+00000,x13)
WaitForInstruction(x01,x00)
DisplayMessage(x10,x91,x000A,x80,x00,x05,+00000,-00006,+00001,x13)
WaitForInstruction(x01,x00)
ChangeDialog(x02,xFFFF,x00,x00)
Wait(00008)
ChangeDialog(x01,xFFFF,x00,x00)
WaitForInstruction(x01,x00)
Wait(00030)
RotateUnit(x1F,x00,x03,x00,x01,100)
DisplayMessage(x10,x12,x000B,x1F,x00,x00,+00000,+00000,+00000,x02)
WaitForInstruction(x01,x00)
RotateUnit(x03,x00,x0C,x02,x01,000)
Wait(00008)
ChangeDialog(x02,xFFFF,x00,x00)
WaitForInstruction(x01,x00)
Wait(00010)
Camera(+00392,+00115,+00728,+00302,+00512,+00000,+04096,+00032)
WaitForInstruction(x04,x00)
Wait(00010)
DisplayMessage(x10,x11,x000C,x03,x00,x00,+00000,+00000,+00000,x13)
WaitForInstruction(x01,x00)
DisplayMessage(x10,x12,x000D,x1F,x00,x00,+00000,+00000,+00000,x02)
WaitForInstruction(x01,x00)
ChangeDialog(x01,xFFFF,x00,x00)
Wait(00008)
ChangeDialog(x02,xFFFF,x00,x00)
WaitForInstruction(x01,x00)
Wait(00008)
Camera(+00280,+00019,+00616,+00302,+00512,+00000,+04096,+00032)
WaitForInstruction(x04,x00)
Wait(00030)
UnitAnim(x80,x00,x68,x02,x01)
Wait(00010)
UnitAnim(x80,x00,x69,x02,x01)
Wait(00010)
Wait(00016)
BlockStart()
Wait(00016)
RotateUnit(x03,x00,x04,x01,x01,000)
WaitRotateUnit(x03,x00)
BlockEnd()
DisplayMessage(x10,x91,x000E,x80,x00,x05,-00014,+00000,+00012,x13)
WaitForInstruction(x01,x00)
WaitForInstruction(x08,x00)
DisplayMessage(x10,x92,x000F,x03,x00,x00,+00036,+00000,-00020,x13)
WaitForInstruction(x01,x00)
UnitAnim(x80,x00,x68,x02,x01)
Wait(00008)
UnitAnim(x80,x00,x67,x02,x01)
Wait(00008)
ChangeDialog(x01,x0010,x05,x00)
WaitForInstruction(x01,x00)
ChangeDialog(x02,xFFFF,x00,x00)
Wait(00008)
ChangeDialog(x01,xFFFF,x00,x00)
WaitForInstruction(x01,x00)
Wait(00060)
RotateUnit(x03,x00,x00,x00,x00,000)
WaitRotateUnit(x03,x00)
UnitAnim(x03,x00,x03,x00,x00)
SpriteMove(x03,x00,+00000,+00000,-00084,x00,x01,+00084)
Wait(00024)
UnitAnim(x80,x00,x66,x02,x01)
Wait(00008)
Camera(+00280,+00211,+00616,+00302,+00512,+00000,+04096,+00032)
WaitForInstruction(x04,x00)
BlockStart()
WaitSpriteMove(x03,x00)
UnitAnim(x03,x00,x02,x00,x00)
RotateUnit(x03,x00,x0C,x00,x01,000)
WaitRotateUnit(x03,x00)
BlockEnd()
RotateUnit(x1F,x00,x01,x00,x01,100)
DisplayMessage(x10,x92,x0011,x1F,x00,x00,+00056,+00000,-00032,x10)
WaitForInstruction(x01,x00)
RotateUnit(x84,x00,x01,x00,x01,100)
Wait(00040)
RotateUnit(x03,x00,x09,x00,x01,100)
DisplayMessage(x10,x91,x0012,x03,x00,x00,-00077,+00024,+00015,x12)
WaitForInstruction(x01,x00)
ChangeDialog(x02,x0013,x00,x00)
WaitForInstruction(x01,x00)
ChangeDialog(x01,x0014,x00,x00)
WaitForInstruction(x01,x00)
ChangeDialog(x02,xFFFF,x00,x00)
Wait(00008)
ChangeDialog(x01,xFFFF,x00,x00)
WaitForInstruction(x01,x00)
Wait(00004)
ZERO(x00A8)
{B1}(x00A8,x0018)
EventEnd()

//INSTRUCTION SECTION END -  TEXT START
//Message x01
{font:08}Bar Master{br}
{font:00}Welcome.{br}
Something to drink?{end}

//Message x02
{font:08}{Ramza}{br}
{font:00}Give me something stiff...{end}

//Message x03
{font:08}Bar Master{br}
{font:00}Coming right up.{end}

//Message x04
{font:08}Grizzled Old Man{br}
{font:00}So, you heard about me,{br}
girl?{end}

//Message x05
{font:08}Young Woman{br}
{font:00}Well, um...{end}

//Message x06
{font:08}Grizzled Old Man{br}
{font:00}Heh, don't be shy. {br}
I'll look after ya. {br}
Listen, I'm a Nanten veteran. {br}
Back in the Lion War, I used to {br}
take down Hokuten pansies for sport! {end}

//Message x07
{font:08}Young Woman{br}
{font:00}Wow! You did that?{end}

//Message x08
{font:08}Bar Master{br}
{font:00}He's in here every night.{br}
{br}
It's always the same thing. Hitting {br}
on a different girl... bragging about {br}
how many Hokuten he killed. {end}

//Message x09
{font:08}{Ramza}{br}
{font:00}What a clown. {end}

//Message x0A
{font:08}Bar Master{br}
{font:00}Still... best to leave him {br}
to it. {br}
He gets a bit aggressive after a {br}
few drinks. {end}

//Message x0B
{font:08}Nanten Veteran{br}
{font:00}You wouldn't be talking {br}
about me there... would you? {end}

//Message x0C
{font:08}{Ramza}{br}
{font:00}..I think you should turn {br}
back around old man. {end}

//Message x0D
{font:08}Nanten Veteran{br}
{font:00}Ha! You have any idea who {br}
you're talking to? {br}
Don't fool yourself kid, I'd kick {br}
your ass any day of the week, twice {br}
on Sundays. {end}

//Message x0E
{font:08}Bar Master{br}
{font:00}Look, he's not worth it. {br}
{br}
He may be a braggart, but he can {br}
actually fight. I don't want any {br}
bloodshed. {end}

//Message x0F
{font:08}{Ramza}{br}
{font:00}Maybe you're right. {br}
I've got better things to do. {end}

//Message x10
{font:08}Bar Master{br}
{font:00}Thank you.{end}

//Message x11
{font:08}Nanten Veteran{br}
{font:00}Haha! What's the rush? {br}
You're that scared of me, boy? {end}

//Message x12
{font:08}{Ramza}{br}
{font:00}I swear... don't push {br}
me. {end}

//Message x13
{font:08}Nanten Veteran{br}
{font:00}What are you gonna do, {br}
kid? {br}
You got any balls, why don't {br}
we settle this like men? {end}

//Message x14
{font:08}{Ramza}{font:00}{br}
{FB} 1.Be the bigger man and walk away.{br}
 2.Kick his ass.{FC}{close}{end}

//Message x15
Let's go.{end}

//Message x16

Offset(x003A4000)
//Remove the previous line if you wish not to override the offset in CONFIG.INI.
Text(x000000D6)
//Remove the previous line if you wish text to compile directly after instructions.

DisplayMessage(x10,x11,x0001,x03,x00,x00,-00060,+00024,+00000,x13)
WaitForInstruction(x01,x00)
Wait(00015)
AddUnitPrep()
{82}()
AddUnitStart()
UnitAnim(x03,x00,x03,x00,x00)
RotateUnit(x03,x00,x0B,x00,x06,000)
SpriteMove(x03,x00,+00056,+00000,-00112,x00,x01,+00063)
WaitSpriteMove(x03,x00)
RotateUnit(x03,x00,x00,x00,x06,000)
SpriteMove(x03,x00,+00056,+00000,-00152,x00,x01,+00040)
Wait(00008)
ColorUnit(x03,x00,x01,+000,+000,+000,004)
Wait(00033)
Erase(x03,x00)
Wait(00060)
RotateUnit(x1F,x00,x00,x00,x01,100)
RotateUnit(x84,x00,x00,x00,x01,100)
DisplayMessage(x10,x12,x0002,x1F,x00,x00,+00040,+00000,-00023,x12)
WaitForInstruction(x01,x00)
Wait(00060)
Camera(+00280,-00813,+00616,+00302,+00512,+00000,+04096,+00096)
Wait(00036)
{3E}(r02000000FFFFFF3C00)
{60}(r003C)
Wait(00060)
ZERO(x00A7)
ADD(x00A7,x0001)
ZERO(x02E5)
ADD(x02E5,x0000)
AddUnitEnd()
EventEnd()

//INSTRUCTION SECTION END -  TEXT START
//Message x01
{font:08}{Ramza}{br}
{font:00}I've not got time for this {br}
shit. {end}


//Message x02
{font:08}Nanten Veteran{br}
{font:00}HA! What a (Edited for content)! {end}

//Message x03


Offset(x003A6000)
//Remove the previous line if you wish not to override the offset in CONFIG.INI.
Text(x00000083)
//Remove the previous line if you wish text to compile directly after instructions.

Wait(00036)
DisplayMessage(x10,x91,x0001,x03,x00,x00,-00060,+00024,+00000,x13)
WaitForInstruction(x01,x00)
DisplayMessage(x10,x92,x0002,x1F,x00,x00,+00052,+00000,-00036,x12)
WaitForInstruction(x01,x00)
ChangeDialog(x01,xFFFF,x00,x00)
Wait(00008)
ChangeDialog(x02,xFFFF,x00,x00)
WaitForInstruction(x01,x00)
AddUnitPrep()
{82}()
AddUnitStart()
Wait(00048)
Camera(+00280,-00813,+00616,+00302,+00512,+00000,+04096,+00096)
Wait(00036)
{3E}(r02000000FFFFFF3C00)
{60}(r003C)
Wait(00060)
ZERO(x00A7)
ADD(x00A7,x0001)
ZERO(x026F)
ADD(x026F,x0000)
ZERO(x03D6)
ADD(x03D6,x0001)
ZERO(x006E)
ADD(x006E,x0021)
AddUnitEnd()
CallFunction(x01)
EventEnd()

//INSTRUCTION SECTION END -  TEXT START
//Message x01
{font:08}{Ramza}{br}
{font:00}Step outside. {end}

//Message x02
{font:08}Nanten Veteran{br}
{font:00}Heh, don't worry. You'll get {br}
yours. {br}
But not here, too many guards. Come {br}
to the old Colliery tonight. They'll {br}
be nobody to save your ass.{end}

//Message x03

Storyline progression remains at 20, no matter which option is chosen. I've tried editing the storyline progression of the event I want to trigger if the fight is chosen to 20, to see if I can get it to begin - so I know that isn't the issue.

I've also tried using other variables besides storyline progression if the fight is chosen - such as 0x00A9, and then using that to trigger the battle event, but that variable won't change either. Interestingly though, the colour of Goland City is correctly changed if you pick the fight option.

Hopefully I've explained this well. If anyone can offer any advice then I would be very grateful.

Thanks




 

Nyzer

April 21, 2020, 10:28:27 pm #1 Last Edit: April 22, 2020, 10:58:46 am by Nyzer
So what happens? The same second event plays no matter which option you choose? Or does the game actually play your "let's rumble motherfucker" event and then fail?

You can always just condense all of this into one event with JumpForwardIfNot and moving the result of variable x0018 to x0001, and see if that works better.
  • Modding version: Other/Unknown

Genghis Hank

Thank you for the reply.

Apologies, I don't think I was clear enough with what was intended to happen. Storyline progression is 0020 prior to the event. If the fight option is selected during the event, then I wanted the storyline progression to advance to 0021, otherwise remain at 0020. I've never had issues with storyline progression before, so I wondered if it was related to it being a branched event.

Thank you for your recommendation on using JumpForwardIfNot. I'll see if this works out better for what I'm trying to do.


Nyzer

April 23, 2020, 07:33:29 am #3 Last Edit: April 23, 2020, 08:26:47 am by Nyzer
I understand you're trying to get the variable to progress, but you do realize you need to specifically find out where it's failing first.

If your branching choice is failing to play different choice result events, then that's the problem.
If it's successfully playing the event that sets the variable, but not successfully setting the variable, then there's some other problem: either the variable is not being set to 21 despite successfully processing the command to do so, or it is being set to 21, but 21 fails to activate the later battle event.
This, then, can be checked by always setting the variable to 21 before the player even gets a choice, and seeing what happens next.

There are multiple possible points of failure here, and there's not a whole lot anyone can do to fix it without narrowing it down, which is why I asked about the first, most obvious point: whether the game fails to process the entire choice correctly and always plays the "no time for your bullshit" event.
  • Modding version: Other/Unknown