Qhimm.com Forums

Miscellaneous Forums => Scripting and Reverse Engineering => Topic started by: myst6re on 2012-09-11 20:46:09

Title: The music bug on FF7 PC
Post by: myst6re on 2012-09-11 20:46:09
Some time ago, I found bugs in the field data, in the music section. Some of you have mentioned (http://forums.qhimm.com/index.php?topic=9658.msg182120#msg182120) that some fields don't load the right music on the PC version of Final Fantasy VII. That's true!

In fact, some fields have their first AKAO broken, here is the list:

But if we look closer, some other fields are buggy, but differently: their first AKAO is OK, except the "Music ID" which has a strange value, always the same (=42752).
Here is the list:

Even more disturbing, the second list follows the first: sininb1 is just after sinin3, junair2 is just after junair1, ...

One last thing: this bug is still present in the rerelease version!
I am ready to create a patch... maybe :P
Title: Re: The music bug on FF7 PC
Post by: DLPB_ on 2012-09-11 21:10:53
Considering lazy ass square are only using the driver here and fixes that this community has found, it isn't surprising.  Don't worry "they" will fix it for the next patch.
Title: Re: The music bug on FF7 PC
Post by: cirellio on 2012-09-11 21:16:59
*facepalm*
Thank you, myst
Title: Re: The music bug on FF7 PC
Post by: DLPB_ on 2012-09-11 21:53:08
Myst6re, are the volume levels of the music there too?  I assume they are along with other data.
Title: Re: The music bug on FF7 PC
Post by: myst6re on 2012-09-11 22:55:32
Myst6re, are the volume levels of the music there too?  I assume they are along with other data.

I do not know, but I think the PC version only uses the id of the music, so... maybe no.
Title: Re: The music bug on FF7 PC
Post by: DLPB_ on 2012-09-11 22:56:45
Well the data for ramps and stuff must be in there?  I mean what tells the game to fade out and set volume (certain volumes go lower like cosmo canyon when you descend the rope.  I can check that in script now and see)

edit:

See Cosin5 > SOUND

The various vars there are for lower stages of the descent.  "U2" is the volume.  It is probably set initially in the other akao blocks that are not in script.
Title: Re: The music bug on FF7 PC
Post by: myst6re on 2012-09-11 23:03:30
Hey! cosin5 is an instersting field to understand the AKAO opcode.

Look at 534: cosin5 -> 15: SOUND -> S0: Main:
Quote
Label 1
If Var[6][4] == -3 (else go to label 2)
   AKAO (u1=192, u2=79, u3=0, u4=0, u5=0, u6=0)
Label 2
If Var[6][4] == -248 (else go to label 3)
   AKAO (u1=192, u2=63, u3=0, u4=0, u5=0, u6=0)
Label 3
If Var[6][4] == -419 (else go to label 4)
   AKAO (u1=192, u2=47, u3=0, u4=0, u5=0, u6=0)
Label 4
If Var[6][4] == -564 (else go to label 5)
   AKAO (u1=192, u2=31, u3=0, u4=0, u5=0, u6=0)
Label 5
If Var[6][4] == -682 (else go to label 6)
   AKAO (u1=192, u2=15, u3=0, u4=0, u5=0, u6=0)
Label 6
If Var[6][4] == -897 (else go to label 7)
   AKAO (u1=192, u2=10, u3=0, u4=0, u5=0, u6=0)
Label 7
If Var[6][4] == -1521 (else go to label 8 )
   AKAO (u1=192, u2=5, u3=0, u4=0, u5=0, u6=0)
Label 8
If Var[6][4] == -2162 (else go to label 9)
   AKAO (u1=192, u2=2, u3=0, u4=0, u5=0, u6=0)
Label 9
Go to label 1
Return

I bet that "u2" is the volume.

Note: Var[6][4] is the Z coordinate of Cloud here.
Title: Re: The music bug on FF7 PC
Post by: DLPB_ on 2012-09-11 23:09:57
I beat you to it.  :evil:  Other maps ramp the volume (like fade out)... whichever do that will surely show you which values are to do with that also.
Title: Re: The music bug on FF7 PC
Post by: LeonhartGR on 2012-09-11 23:12:59
Is this why when I load my first save even before the first battle (save anywhere patch) music starts after I've finished the first battle? Same thing happens sometimes when I load older saves maybe it just happens in a certain stage but I haven't specified in which exactly...
Title: Re: The music bug on FF7 PC
Post by: DLPB_ on 2012-09-11 23:43:09
No that's because that music is set from ff7.exe and not script and it is set based on a frame number of the opening movie (can't remember which frame, I altered it with Anxious Heart so the music syncs to barrett's arm like it should).  You load your game up after the movie so it never gets set.
Title: Re: The music bug on FF7 PC
Post by: myst6re on 2012-09-12 15:10:55
This is not entirely related to the main subject of the topic, but I posted the informations given by Aali last night about AKAOs.

AKAO opcode (http://wiki.qhimm.com/FF7/Field/Script/Opcodes/F2_AKAO)
AKAO2 opcode (http://wiki.qhimm.com/FF7/Field/Script/Opcodes/DA_AKAO2)