Author Topic: Savemap set for concert at FH in FF8  (Read 4007 times)

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Savemap set for concert at FH in FF8
« on: 2018-08-25 13:53:59 »
fhwise12 looks like the map I remember the instruments being set on.. but how does the game know when it's Eyes on Me or Irish Jig?

What and where are the vars being set?  I need a clear place in the Savemap where a value will = x if irishjig and y if eyesome.

I am using Deling, but it's no good in asm. Very hard to follow.

Shard

  • *
  • Posts: 330
    • View Profile
Re: Savemap set for concert at FH in FF8
« Reply #1 on: 2018-08-26 00:41:16 »
The offsets are listed on the wiki, which is unfortunately down right now. There are actually 3 musical outcomes. One for each piece, and one when you didn't get 4 instruments for the same song. The choices you make are stored in a long. Here's that section of code in script form:

Code: [Select]
if (Byte[346] == 1)
{
Long[360] = Long[360] | 4080
}
if (Byte[346] == 2)
{
Long[360] = Long[360] | 4096
}
if (Byte[346] == 3)
{
Long[360] = Long[360] | 3670016
}
if (Byte[346] == 4)
{
Long[360] = Long[360] | 516096
}
if (Byte[346] == 5)
{
Long[360] = Long[360] | 8
}
if (Byte[346] == 6)
{
Long[360] = Long[360] | 4
}
if (Byte[346] == 7)
{
Long[360] = Long[360] | 4194304
}
if (Byte[346] == 8)
{
Long[360] = Long[360] | 2
}
if (Byte[347] == 1)
{
Long[360] = Long[360] | 4080
}
if (Byte[347] == 2)
{
Long[360] = Long[360] | 4096
}
if (Byte[347] == 3)
{
Long[360] = Long[360] | 3670016
}
if (Byte[347] == 4)
{
Long[360] = Long[360] | 516096
}
if (Byte[347] == 5)
{
Long[360] = Long[360] | 8
}
if (Byte[347] == 6)
{
Long[360] = Long[360] | 4
}
if (Byte[347] == 7)
{
Long[360] = Long[360] | 4194304
}
if (Byte[347] == 8)
{
Long[360] = Long[360] | 2
}
if (Byte[348] == 1)
{
Long[360] = Long[360] | 4080
}
if (Byte[348] == 2)
{
Long[360] = Long[360] | 4096
}
if (Byte[348] == 3)
{
Long[360] = Long[360] | 3670016
}
if (Byte[348] == 4)
{
Long[360] = Long[360] | 516096
}
if (Byte[348] == 5)
{
Long[360] = Long[360] | 8
}
if (Byte[348] == 6)
{
Long[360] = Long[360] | 4
}
if (Byte[348] == 7)
{
Long[360] = Long[360] | 4194304
}
if (Byte[348] == 8)
{
Long[360] = Long[360] | 2
}
if (Byte[349] == 1)
{
Long[360] = Long[360] | 4080
}
if (Byte[349] == 2)
{
Long[360] = Long[360] | 4096
}
if (Byte[349] == 3)
{
Long[360] = Long[360] | 3670016
}
if (Byte[349] == 4)
{
Long[360] = Long[360] | 516096
}
if (Byte[349] == 5)
{
Long[360] = Long[360] | 8
}
if (Byte[349] == 6)
{
Long[360] = Long[360] | 4
}
if (Byte[349] == 7)
{
Long[360] = Long[360] | 4194304
}
if (Byte[349] == 8)
{
Long[360] = Long[360] | 2
}

Variables 346 through 349 contain which instrument each of the 4 characters is assigned, and variable 360 contains a long that represents whether or not the instruments match, bit by bit. Luckily, how that variable is used is right below it. This controls which set of dialogue gets played (based on how good your music choices were)

Code: [Select]
if (Long[360] & 4096 != 0)
{
Byte[341]=3
}
if (Long[360] == 8384513)
{
Byte[341]=1
}
if (Long[360] == 4095)
{
Byte[341]=2
}

I don't remember which value for 341 means you did a good job. I would assume 3 is eyes on me, 2 is irish jig, and 1 is "you really suck at picking instruments."
« Last Edit: 2018-08-27 00:55:48 by Shard »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Savemap set for concert at FH in FF8
« Reply #2 on: 2018-08-26 12:54:25 »
Thanks a lot!  I am adding in a check at Shumi Village to play the correct music you see...  in Roses and Wine.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Savemap set for concert at FH in FF8
« Reply #3 on: 2018-08-26 17:41:34 »
I think var 341 is used elsewhere too so might not be safe to use it.

var_341_ubyte = 0
var_360_ulong |= 1
if (var_360_ulong & 4096) begin
   var_341_ubyte = 3
end
if (var_360_ulong == 8384513) begin
   var_341_ubyte = 1
end
if (var_360_ulong == 4095) begin
   var_341_ubyte = 2
end

Why is the bolded instruction there? It seems to be bitwise OR with var and 1?

Also, I have tried finding out how the PSX game deals with things.

Does it play Irish Jig as well as Eyes on Me when quest complete?  Because the code in PC seems to indicate it only plays EyesOnMe ?

lbl(33)
polycolorall(128, 128, 128)
setplace(199)
if (var_623_ubyte >= 32) begin
   musicload(43)
   choicemusic(4095, 0)
   musicvol(0, 100)
else
   musicload(38)
   musicvol(0, 50)
   musicchange()
end
ret(8)

This looks to me like the "Shumi Quest" value.. and when it's 32+ it will play 4095 (which I think is EyesOnMe instruments only).  ChoiceMusic is for the concert instruments.
« Last Edit: 2018-08-26 19:28:30 by DLPB »