Author Topic: What condition sets this dialogue?  (Read 14931 times)

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
What condition sets this dialogue?
« on: 2014-08-26 21:35:50 »
Original game text (junone7)

Scarlet
“Why are you still standing there!?
   Catch her and take her away!”

junone7 > sca > script13 > 11

This will be shown if [5][16] var is 6.

That variable is set to 6 in one place (undersea water pipe): spipe_2 > Bubble2 > s0 main > 20

What this has to do with the above interaction with Scarlet is beyond me.  Unless this var is set to 6 here for totally unrelated reasons?


nfitc1

  • *
  • Posts: 3008
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: What condition sets this dialogue?
« Reply #1 on: 2014-08-26 21:51:37 »
...That variable is set to 6 in one place (undersea water pipe): spipe_2 > Bubble2 > s0 main > 20

What this has to do with the above interaction with Scarlet is beyond me.  Unless this var is set to 6 here for totally unrelated reasons?

Doesn't matter where else this is set. Bank 5/6 is temporary and is reset each time the field changes. If [5][16] isn't set on that field then reading it will always return a 0.

That said, Scarlett's Script 11 starts with "Var[5][16] = Var[5][16] + 1 (8-bit)". So if that gets run 6 times then your text gets displayed. I would assume a certain condition during the slap-fest.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: What condition sets this dialogue?
« Reply #2 on: 2014-08-26 22:03:16 »
I forgot about temp banks...

You're absolutely right.

I'm thinking the dialogue occurs if you do a perfect slap count... i.e, scarlet does not land a single shot against you.

But I've just tried my hardest and she always gets at least one against me.  I'll keep trying.

edit.  Seems all you do is hold circle... but even then she lands a shot.  I don't see any way of getting this dialogue to occur.  It may be a script error (either you were meant to be able to do a perfect game against her, or the dialogue was meant to be shown due to some other factor).
« Last Edit: 2014-08-26 22:06:01 by DLPB »

nfitc1

  • *
  • Posts: 3008
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: What condition sets this dialogue?
« Reply #3 on: 2014-08-26 22:05:40 »
What happens if you don't slap at all?

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: What condition sets this dialogue?
« Reply #4 on: 2014-08-26 22:07:31 »
Same dialogue.  Although by doing that you've found an error in the retranslation project :P  So not a total loss.

nfitc1

  • *
  • Posts: 3008
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: What condition sets this dialogue?
« Reply #5 on: 2014-08-26 22:08:36 »
Same dialogue.  Although by doing that you've found an error in the retranslation project :P  So not a total loss.

Glad I could help  ;D

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: What condition sets this dialogue?
« Reply #6 on: 2014-08-26 22:12:59 »
From what I can see, to beat her you need to slap her 5 times... that's where the var ends up as 5.  But that dialogue requires 6 slaps, which may be impossible due to a script oversight.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: What condition sets this dialogue?
« Reply #7 on: 2014-08-26 22:16:47 »
OK you can do a perfect run against her.  By timing circle presses properly.  But even then 5 ends the bout with the same dialogue.  I don't think that var ever reaches 6...

nfitc1

  • *
  • Posts: 3008
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: What condition sets this dialogue?
« Reply #8 on: 2014-08-26 22:44:34 »
From what I can see, to beat her you need to slap her 5 times... that's where the var ends up as 5.  But that dialogue requires 6 slaps, which may be impossible due to a script oversight.

Kind of how the 1700 points on Tetra Master results in erroneous text. I guess that should be fixed.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: What condition sets this dialogue?
« Reply #9 on: 2014-09-01 19:15:40 »
Condition 2.  World map.  Canon has just disappeared from Junon.  This dialogue is supposed to be shown when Cloud notices that the canon is no longer there.  However, I can't make this dialogue appear.  Similar dialogue always seems to appear in Junon itself when the party notice the canon is gone, and then a var is set which must be used to make the canon disappear from the world map model.

In any case, I cannot get it to appear.

Dialogue is originally:

{CLOUD}
“…I got the feeling
    I'm forgetting something…”

It may be that this dialogue ended up being unused, because they had the exposition happen on the field instead.
« Last Edit: 2014-09-01 19:20:28 by DLPB »

nfitc1

  • *
  • Posts: 3008
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: What condition sets this dialogue?
« Reply #10 on: 2014-09-01 23:10:31 »
Have you tried with both subs? IIRC, the "I think we're missing something" happens when you go to the underwater reactor. I know the "you failed the sub game" scenario is different, but the field thing happens earlier than that, doesn't it?

Are you sure it has anything to do with the cannon? Maybe he's talking about the key to the ancients or he left an area before he was supposed to do something...

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: What condition sets this dialogue?
« Reply #11 on: 2014-09-02 00:15:25 »
Pretty sure it's the canon, but can't be sure.  You can't get to the sub without the canon disappearing first and field dialogue being displayed.

It wouldn't be the first time there was unused wm dialogue though...

Tifa has a dialogue for when the buggy breaks down, for example.
« Last Edit: 2014-09-02 00:16:56 by DLPB »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: What condition sets this dialogue?
« Reply #12 on: 2014-09-02 15:32:05 »
To be honest, the world map idea makes far more sense.  That's how that dialogue should have been displayed.  In the revision they've made, you go into Junon seeing the canon still there, and then suddenly when you arrive at the area, it's gone.  It doesn't work well for continuity.

Somewhere along the line it looks to me like they vetoed the world map exposition in favour of the field.  And I think that was a bad idea.  Further to that, I remember the first time I saw the junon cannon exposition- I thought "What's missing... I don't get it".  If it had been on the world map, the missing canon would have stuck out like a sore thumb.

Unless the dialogue can still be seen somehow.  I dunno. Maybe one day we'll have a world map script editor?
« Last Edit: 2014-09-02 15:34:46 by DLPB »

Kaldarasha

  • *
  • Posts: 2449
  • Prince of Model Editing
    • View Profile
Re: What condition sets this dialogue?
« Reply #13 on: 2014-09-02 15:56:36 »
Can't you set the variable to remove the canon on an earlier scene, I would say fship_3 is a good point after Cloud has joined the party again and tells the truth.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: What condition sets this dialogue?
« Reply #14 on: 2014-09-02 16:02:53 »
The variable to remove the canon only removes the model from the world map.  It doesn't invoke any dialogue when you arrive outside junon.

Kaldarasha

  • *
  • Posts: 2449
  • Prince of Model Editing
    • View Profile
Re: What condition sets this dialogue?
« Reply #15 on: 2014-09-02 16:31:43 »
Yeah, but it's still better as when it magically vanishes after you enter the Junon event.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: What condition sets this dialogue?
« Reply #16 on: 2014-09-02 16:53:26 »
Yeah, but it's still better as when it magically vanishes after you enter the Junon event.

Yeah, that's an easy way to fix it so that the field dialogue actually feels right. It would be nice to see if we could restore the wm dialogue though :)

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: What condition sets this dialogue?
« Reply #17 on: 2014-09-03 11:07:28 »
@nfitc1 me and sithlord had a discussion last night about the save banks, because bank 10 was not remembering the vars on entry/exit to a field.

According to the wiki, this makes sense. It looks like a lot more banks besides 5 and 6 are for temp vars only.  The wiki shows which are saved.   I think it is 1,2,3,4,7, 11,12,13, 14, 15.

Yup it is:

http://wiki.qhimm.com/view/FF7/Savemap

A bit bizarre that bank 7 does not follow on from 4 in memory.
« Last Edit: 2014-09-03 11:44:52 by DLPB »

nfitc1

  • *
  • Posts: 3008
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: What condition sets this dialogue?
« Reply #18 on: 2014-09-03 13:49:47 »
@nfitc1 me and sithlord had a discussion last night about the save banks, because bank 10 was not remembering the vars on entry/exit to a field.

Here's how I have it set in my list:

Code: [Select]
Handlers:
Bank_0_Const       0x60F88E
Bank_12            0x60F8B9
Bank_34            0x60F8F5
Bank_56            0x60F9F3
Bank_7F            0x60F9B5
Bank_BC            0x60F936
Bank_DE            0x60F977
Bank_89A_Null      0x60FA2B

There is no Bank 0. That's a "read byte at absolute memory address X" command. This is a dummied "return [byte_arg] command". Likely unused.
Five of these banks are saved to the savemap which excludes 5/6. 8/9/A actually have no handler. If they're used in the field scripts they will do nothing. Here's the handler for 8/9/A on the PC:

Code: [Select]
.text:0060FA2B ; ---------------------------------------------------------------------------
.text:0060FA2B
.text:0060FA2B Bank_89A_Null:                          ; CODE XREF: Read_Field_Mem_Byte+126j
.text:0060FA2B                                         ; Read_Field_Mem_Byte+137j
.text:0060FA2B                                         ; DATA XREF: ...
.text:0060FA2B                 xor     al, al          ; default
.text:0060FA2B                                         ; jumptable 0060F887 cases 8-10

Exciting, isn't it? :)

tl;dr: 0 is possibly unused, 5/6 are field-based temporary, 8/9/A are dummied.

EDIT:
Those are the "Read Byte Handlers", the "Read Word Handlers" aren't much different.
« Last Edit: 2014-09-03 14:43:52 by NFITC1 »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: What condition sets this dialogue?
« Reply #19 on: 2014-09-03 15:37:23 »
1. So what you are saying is 8,9 and A are completely unused, and cannot be used at all by anything?

2. Can world map use temp 5/6 ?  It does seem to use bank 1 for a few things if I recall.

3. Also, I noticed battle temp vars are copied at the end of battle to main vars (like escapes, kills) and that it's hardcoded.

4. Can battle AI change addresses / bank vars? And does it?
« Last Edit: 2014-09-03 15:38:54 by DLPB »

nfitc1

  • *
  • Posts: 3008
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: What condition sets this dialogue?
« Reply #20 on: 2014-09-03 18:45:57 »
1. So what you are saying is 8,9 and A are completely unused, and cannot be used at all by anything?
Exactly

2. Can world map use temp 5/6 ?  It does seem to use bank 1 for a few things if I recall.
I'm still not sure. It looks like the only possibilities of reading ANY fieldvars are codes 30C, 325 and 326 though I'm not convinced any of them actually do. I think all wm scripts can do is read the game moment vars and their own memory bank.

3. Also, I noticed battle temp vars are copied at the end of battle to main vars (like escapes, kills) and that it's hardcoded.
Only certain ones are copied. Lots of it is discarded.

4. Can battle AI change addresses / bank vars? And does it?
AI can only affect Bank 1/2 and only one byte at a time through the 95 code.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: What condition sets this dialogue?
« Reply #21 on: 2014-09-03 18:55:40 »
Thanks, last questions :)

1. excellent. Which parts of the original game utilize code 95?

2.  Where is world map's real memory address for its vars?

3. Do you happen to know where bank 5/6 reside in memory

 (I could find these easily but why bother if you know already)


nfitc1

  • *
  • Posts: 3008
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: What condition sets this dialogue?
« Reply #22 on: 2014-09-03 19:11:06 »
1. excellent. Which parts of the original game utilize code 95?
It's the AI Code 95. Several enemies use this for various reasons.

2.  Where is world map's real memory address for its vars?
I dunno. I still don't know what all the codes do. I could be looking over it.

3. Do you happen to know where bank 5/6 reside in memory
0xCC14D0.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: What condition sets this dialogue?
« Reply #23 on: 2014-09-03 19:17:25 »
Which enemies use it?  I need to look at one that does so I can think about making Midgardsormr disappear for good once defeated.  I'll make it set a bit/byte to 1 and then that will be used as a flag to stop it respawning.

nfitc1

  • *
  • Posts: 3008
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: What condition sets this dialogue?
« Reply #24 on: 2014-09-03 19:22:03 »
Which enemies use it?  I need to look at one that does so I can think about making Midgardsormr disappear for good once defeated.  I'll make it set a bit/byte to 1 and then that will be used as a flag to stop it respawning.

Ultima Weapon is a good example.

Now that I think about it, I'm sure there's something the world map can read because the "emerald or Ruby is defeated" flags are in Mem block 1/2.