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

DLPB_

  • Banned
  • *
  • Posts: 11008
    • View Profile
Re: What condition sets this dialogue?
« Reply #25 on: 2014-09-03 19:25:43 »
So it's battle that's setting those flags, but wm that can read them ?

NFITC1

  • *
  • Posts: 2934
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: What condition sets this dialogue?
« Reply #26 on: 2014-09-03 19:40:46 »
So it's battle that's setting those flags, but wm that can read them ?

Like I said, I don't know if wm reads it or not.

DLPB_

  • Banned
  • *
  • Posts: 11008
    • View Profile
Re: What condition sets this dialogue?
« Reply #27 on: 2014-09-03 19:42:44 »
I'm guessing it does, since that's the only way it can know whether to display Ruby's graphic or not.

In any case, I see here in Proud Clod that 95 saves to a var with a value like 7B.  I take it this means byte 7B startng from Bank 1?

NFITC1

  • *
  • Posts: 2934
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: What condition sets this dialogue?
« Reply #28 on: 2014-09-03 19:56:14 »
I'm guessing it does, since that's the only way it can know whether to display Ruby's graphic or not.

In any case, I see here in Proud Clod that 95 saves to a var with a value like 7B.  I take it this means byte 7B startng from Bank 1?

Yup.

Aali

  • *
  • Posts: 1196
    • View Profile
Re: What condition sets this dialogue?
« Reply #29 on: 2014-09-04 23:02:50 »
For the record, worldmap can read and write anything in the savemap beyond 0x0BA4. See http://wiki.qhimm.com/view/FF7/WorldMap_Module/Script/Opcodes/118

NFITC1

  • *
  • Posts: 2934
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: What condition sets this dialogue?
« Reply #30 on: 2014-09-05 00:10:13 »
For the record, worldmap can read and write anything in the savemap beyond 0x0BA4. See http://wiki.qhimm.com/view/FF7/WorldMap_Module/Script/Opcodes/118

And to declare my inadequacies, I glossed over the 1XX codes because I thought they were just math functions. I knew there had to be something wrong with my answer because it didn't make sense even to me.

DLPB_

  • Banned
  • *
  • Posts: 11008
    • View Profile
Re: What condition sets this dialogue?
« Reply #31 on: 2014-09-05 00:55:58 »
Also minigames set vars.  For example sub minigame sets a 1 for success and 0 for loss to var [14][94]

I assume snowboard minigame has to be setting your score / time etc.  And of course, G-bike has to be setting the score you have made.  All hardcoded in exe of no doubt.

DLPB_

  • Banned
  • *
  • Posts: 11008
    • View Profile
Re: What condition sets this dialogue?
« Reply #32 on: 2014-09-07 16:49:32 »
Is it just me, or did this issue exist in PSX as well?

At the start in Bombing Mission, if Jessie reaches the door before you after the stairs, she just runs through it.  The door opening is not triggered.

How to fix?  I've had a look at it and can't work out what the issue is.

Sega Chief

  • *
  • Posts: 3650
  • These guys is sick
    • View Profile
Re: What condition sets this dialogue?
« Reply #33 on: 2014-09-07 21:21:35 »
I had a look at that field but it was a bit odd. In the walkmesh viewer there's four green lines (denoting Location groups) but there's only three Location groups that are visible in the editor; the two for the ladder and one for the slide (that's unused but probably functioning). The one that handles the door seems to be missing, but functions in-game. Maybe it's because this area was done during the demo phases so there's bits and pieces the editor doesn't recognise? I scoured the other groups for script that handles the door but couldn't find anything.

What you should try first is maybe enabling the Jessie group's 'Contact' (it's set to disabled in her Init). But if that doesn't work, then best guess as to the actual issue is that the game is tracking Cloud's current triangle ID on the walkmesh and continually updating a variable with it. In the 'dir' group's Main script it tracks the Cloud group's Triangle ID to [6][0]. I'm gonna guess that when this variable falls within a certain value, it triggers certain events to happen (a fragment of the old Biggs scene and the unused slide above are there, the triangle IDs for them being stored in [6][2] and [6][4]; at least, the values here correspond to the triangles where these would be triggered).

The reason the Jessie group might not trigger it is because the game is only tracking the Cloud group's position. If changing Jessie's Contact to enabled doesn't work then you could maybe add these lines to the 'dir' group's Main, underneath the line tracking Cloud's Triangle ID:
-) 'Wait 1 Frame'
-) 'Store Triangle ID of the group 'av_j' in [6][0]
-) 'Wait 1 Frame'

If you're lucky, this'll make the Jessie group open the door when she reaches it, as the game will likely just check [6][0] against whatever it is that triggers the door. I don't know if the frame waits are necessary, but best to be safe. Only thing is, if the door is handled by a location group then the [6][0] check might not be used anymore; the other things, like the slide, don't seem to use it now either.
« Last Edit: 2014-09-07 21:26:25 by Sega Chief »

DLPB_

  • Banned
  • *
  • Posts: 11008
    • View Profile
Re: What condition sets this dialogue?
« Reply #34 on: 2014-09-07 22:48:39 »
Tried that already and no go...

Makou has a separate section for the door stuff.  I think it automatically knows where Cloud is, but I can't be sure.

Does anyone know if this occurred on PSX?

Sega Chief

  • *
  • Posts: 3650
  • These guys is sick
    • View Profile
Re: What condition sets this dialogue?
« Reply #35 on: 2014-09-07 23:08:27 »
Ah well. But yeah, it happens on the PSX PAL version too; just tried it out (console, not emulator just to make sure).

DLPB_

  • Banned
  • *
  • Posts: 11008
    • View Profile
Re: What condition sets this dialogue?
« Reply #36 on: 2014-09-07 23:30:15 »
Well, either script error... or... they just didn't bother programming the game so that NPC / non main char can trigger doors  (and other position events).  Which would be a bit crap.

DLPB_

  • Banned
  • *
  • Posts: 11008
    • View Profile
Re: What condition sets this dialogue?
« Reply #37 on: 2014-09-07 23:49:23 »
There is a way around this , if doors cannot be automatically set by NPC walking near them.  That is to use the "Background" opcode to set the parameter (when NPC has satisfied a certain position).

Of course, this would also mean adding in the sound effect and what not, but I've just done some testing and it works fine.