Author Topic: Passing out at Great Glacier  (Read 9708 times)

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Passing out at Great Glacier
« on: 2012-08-28 03:49:00 »
Just because I like to document everything.  Never know who might find this useful.

The time until you pass out is based on number of steps the character takes.  I am actually making this value a 3 byte value rather than 2 because I am odd like that and like to know how many steps I have taken in a game.  The glacier zeroes the 2 byte value (which I will be stopping/nopping in my tweak) and when it reaches 220h (544 steps, around 2.5 minutes), you pass out.

For anyone who cares, the actual pass out value of 544 steps .

The value is set and checked in flevel script.  Like
move_s > group 0 > s0-main

variable [14][6]

The main comparison in code is at 00611CCC.  If it equals 220h, it adds 1 to al, and this is the pass-out flag. 

Code: [Select]
cmp esi,edx
setge al

Code: [Select]
esi: current number of steps
edx: 220
if esi=edx then add 1 to al.


If you want to have no passing out, then just nop the instruction "setge al"
This will mean the flag is never set.

in ff7.exe, set
002110CE = 90
002110CF = 90
002110D0 = 90


 If you want to set the actual number of steps to pass out
(65535 maximum. To give you an idea, running speed is around 3.6 steps a  second, so 65535 is
around 5 hours) then you will have to change script with Makou Reactor.


« Last Edit: 2012-08-28 16:27:58 by DLPB »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Passing out at Great Glacier
« Reply #1 on: 2012-08-28 18:03:21 »
Updated.

Also, the cave in the snowfield part of the game also makes the steps counter return to 0.  Obviously the idea being that you are sheltered from the cold in there.  So that's a way of prolonging the time that you pass out.

Tenko Kuugen

  • Public Enemy
  • *
  • Posts: 1416
    • View Profile
    • Twitter
Re: Passing out at Great Glacier
« Reply #2 on: 2012-08-28 23:40:09 »
I forgot, but was passing out a necessary act to continue the story? Or could you just find the Hut the normal way by going there and advance the plot that way?
If the latter, do you think it's possible to switch the function from pass out -> wake up in the Hut to pass out -> GAME OVER?
Of course, that'd mean increasing the steps before you pass out. do you happen to know in which field the steps script is contained? ( or is it in every glacier script? If yes, do you know in which group? )

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Passing out at Great Glacier
« Reply #3 on: 2012-08-28 23:42:39 »
Search for the var above in Makou Reactor (makou can search for vars etc).  The value to change will need to be changed on all maps.  You can still make the hut the normal way....

As for game over, you'd have to ensure that the hut returned it to 0, or when you ventured back out afterward you'd be closer to game over.

Tenko Kuugen

  • Public Enemy
  • *
  • Posts: 1416
    • View Profile
    • Twitter
Re: Passing out at Great Glacier
« Reply #4 on: 2012-08-28 23:54:22 »
okay, I'm still new at changing scripts, but I found the actual variable
if [14][6]>=544 else jump
followed by
Execute the script #8 in extern group cloud (No8) (priority 5/6) - Waiting for end of execution to continue
the script # is different on seemingly every map
is that of any importance? or can I safely switch them all to gave over ( module )?

hyou12 ( inside cave with a tent ) also has
If Var[14][6] > 544 (else jump to byte 13)
resulting in
Var[14][6] = 0 (16-bit)

after that comes
If Var[14][6] >= 544 (else jump to byte 24)
Execute the script #3 in extern group cloud (No2) (priority 5/6) - Waiting for end of execution to continue

so...  am I seeing things? How can 14-6 be > 544 if >= 544 results in game over?
shouldn't that be 14-6 > 1 at the first part?

the same thing as above happens in move_s ( id 670 )

so.. what am I misunderstanding?

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Passing out at Great Glacier
« Reply #5 on: 2012-08-29 00:00:11 »
If the part you are talking about is the one I think it is, the programmer just got lazy and left the code there that's been copied/pasted.  It doesn't get to that point.

Tenko Kuugen

  • Public Enemy
  • *
  • Posts: 1416
    • View Profile
    • Twitter
Re: Passing out at Great Glacier
« Reply #6 on: 2012-08-29 00:23:07 »
Can't I theoretically use that piece of code? If I set it so that it goes
check var 14-6 of >=1
if yes, set var 14-6 == 0

In reset spots
If Var[14][6] > 1 (else jump to byte 13)
Var[14][6] = 0 (16-bit)
If Var[14][6] >= 4096 (else jump to byte 24)
   Game Over
Return

everywhere else, I'll just remove
If Var[14][6] > 1 (else jump to byte 13)
Var[14][6] = 0 (16-bit)

right?

everywhere else

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Passing out at Great Glacier
« Reply #7 on: 2012-08-29 00:26:19 »
Every map has to have the check since every map has to check if the value has gone over.  So any map you want gameover on, will have to check if it >=

Reset points are pretty good already really... the cave, when you start at glacier... check the hut 0's also.


Tenko Kuugen

  • Public Enemy
  • *
  • Posts: 1416
    • View Profile
    • Twitter
Re: Passing out at Great Glacier
« Reply #8 on: 2012-08-29 00:35:51 »
what do the reset points look like, code wise?
because I searched through all 14-6 variables in the lgp and not only was there none in the hut or in front of it but also i couldn't really see any actual code that reset the value beside the ones I quoted above, namely:

If Var[14][6] > 544 (else jump to byte 13)
Var[14][6] = 0 (16-bit)

when I check destinations and field exists for the glacier fields in makou reactor, it doesn't show any valid destinations

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Passing out at Great Glacier
« Reply #9 on: 2012-08-29 05:30:13 »
If Var[14][6] > 544 (else jump to byte 13)
Var[14][6] = 0 (16-bit)


< That is a reset.  It only happens when character passes out I think.  That's what it looks like there.

If steps > 544
steps = 0

Var[14][6] = 0 (16-bit) < that is how you reset it :)  It is just setting steps back to 0.
« Last Edit: 2012-08-29 05:38:00 by DLPB »

BrutalAl

  • *
  • Posts: 17
    • View Profile
Re: Passing out at Great Glacier
« Reply #10 on: 2012-08-31 17:16:41 »
The Cave in the middle of the snowfield doesn't reset the counter any more than any other Glacier field adjacent to the snowfield map.

When you pass out you are brought to the hut, the pass out variable is not reset at this time. Instead, it is reset if you return to a glacier field (not the rotating snowfield map) with a value >544.

Side note
This is where the pass out glitch comes into play, the function detecting if the variable is >544 reads the variable as signed, meaning that a value >7FFF will be interpreted as negative, and thus not above 544, and the pass out variable will not reset, and nor will you pass out.
So if you run around at the base of Gaea's cliff for almost 2½ hours and then return to the glacier you'll be impassoutable!

Tenko Kuugen

  • Public Enemy
  • *
  • Posts: 1416
    • View Profile
    • Twitter
Re: Passing out at Great Glacier
« Reply #11 on: 2012-08-31 17:47:58 »
well that doesn't work in my version at least

BrutalAl

  • *
  • Posts: 17
    • View Profile
Re: Passing out at Great Glacier
« Reply #12 on: 2012-08-31 18:00:15 »
I could have mentioned that my previous post concerns the PSX versions (more specifically NTSC) of the game.
Can't say I know if it works on the PC, but the vast majority of glitches (of this nature) are the same on both platforms.

Tenko Kuugen

  • Public Enemy
  • *
  • Posts: 1416
    • View Profile
    • Twitter
Re: Passing out at Great Glacier
« Reply #13 on: 2012-08-31 18:09:14 »
I changed the code that checks for the steps
I'm surprised it even counts the steps at gaia's cliff
it should be relatively easy to add the necessary code there to prevent this glitch from ever happening.
Just add a check of
>=X == game over
at gaia's cliff and voila
Adding steps=0 as an assignment to sleeping in the hut also does well to stop the glitch from occuring.

ajthedj747

  • *
  • Posts: 305
  • Looking Forward to 2017
    • View Profile
Re: Passing out at Great Glacier
« Reply #14 on: 2012-09-05 07:57:54 »
Updated.

Also, the cave in the snowfield part of the game also makes the steps counter return to 0.  Obviously the idea being that you are sheltered from the cold in there.  So that's a way of prolonging the time that you pass out.
Really? I wish I knew that when I was trying to obtain the materia for the summon, Alexander (one of my favorites). Wow, I feel like a fool.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Passing out at Great Glacier
« Reply #15 on: 2012-09-05 07:59:20 »
According to the poster above, this doesn't happen.  I will check script again.

ajthedj747

  • *
  • Posts: 305
  • Looking Forward to 2017
    • View Profile
Re: Passing out at Great Glacier
« Reply #16 on: 2012-09-05 08:01:08 »
I forgot, but was passing out a necessary act to continue the story? Or could you just find the Hut the normal way by going there and advance the plot that way?
If the latter, do you think it's possible to switch the function from pass out -> wake up in the Hut to pass out -> GAME OVER?
Of course, that'd mean increasing the steps before you pass out. do you happen to know in which field the steps script is contained? ( or is it in every glacier script? If yes, do you know in which group? )
I could be incorrect, but I think the first time I played this area on my PSN version of Final Fantasy VII for the PSP, I arrived to the cabin / hut without passing out and was able to progress in the game. I could be incorrect, though, because my recall memory has been shot lately.

sithlord48

  • *
  • Posts: 1632
  • Dark Lord of the Savegame
    • View Profile
    • Blackchocobo
Re: Passing out at Great Glacier
« Reply #17 on: 2012-09-05 14:31:46 »
The "Steps" var is counted on everywhere but is only used in that area of the game. you could use it elsewhere for other things.

Tenko Kuugen

  • Public Enemy
  • *
  • Posts: 1416
    • View Profile
    • Twitter
Re: Passing out at Great Glacier
« Reply #18 on: 2012-09-05 19:54:58 »
The "Steps" var is counted on everywhere but is only used in that area of the game. you could use it elsewhere for other things.

Oh thats interesting. Is the variable constant? I mean, is it always [14][6]? ( probably is, just making sure )