Author Topic: Problems swapping Hojo's sample monsters + possible scene.bin discovery  (Read 8147 times)

Kudistos Megistos

  • Banned
  • *
  • Posts: 3929
    • View Profile
I've been trying to change the enemies that fight with Hojo in the first battle on the Sister Ray in Midgar from the Poodler and Bad Rap Samples into an Unknown 2 and Unknown 3. The enemy IDs, data from 0x0350-0x04bf, all attack related data have been swapped and the AI has been fixed, including pointers and Hojo's AI telling him to "kill" his monsters during the battle set-up. But they still won't appear; they are targetable, invisible, do not act and die after being the target of any attack (including things like "sense").

I suspect this may be something to do with their formation; when I change their formation to put them in the position in which they appear in the Gelnika, they appear in battle at the start but disappear when Hojo uses capsule on them (exactly the opposite of what one expects). When their position is the same as that of the Poodler and Bad Rap samples, the battle starts as usual with them invisible and untargetable, but they revert to the state mentioned above when capsule is used. I've remembered to put their IDs in the formation data every time :P

So after all that, what I'd like to know is what is known about formation data in the scene.bin (assuming this is the problem); there isn't any data on the wiki and a forum search reveals little of use. Or might the problem be something else entirely that may or may not require a facepalm for my ignorance?

Now for the (possible) discovery. I've noticed that the wiki says that the function of all the bytes from 0x00a to 0x0019 are unknown. They aren't. The first two bytes of this "unknown" data do something similar to this field opcode. By changing 0x00a-0x00b from 5c03 to ffff I changed what happens when the player wins; now, when Hojo's first form is killed, there is a normal victory scene with Exp gained before the player is taken back to the cannon as if all the forms had been beaten. My apologies if this is old news, but if it's not, the function of those two bytes has now been discovered.

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Could you post Hojo's main script? It's normally got an "activate" command that may not be firing properly in this situation.

Kudistos Megistos

  • Banned
  • *
  • Posts: 3929
    • View Profile
This is his main script:

Code: [Select]
02 00 00 00 00 40 80 60 01 40 02 60 20 02 40 41
80 61 8B 03 86 42 50 70 74 00 12 70 20 02 00 00
00 00 40 80 60 01 40 90 60 20 61 8B 03 92 12 70
20 10 20 40 80 60 01 90 12 70 20 10 23 40 80 60
01 90 12 70 20 10 22 40 80 60 01 90 12 70 20 10
22 40 80 60 01 90 12 70 20 13 60 41 80 02 70 20
03 80 41 80 90 12 70 20 12 40 41 80 02 70 20 02
50 41 80 90 73

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Right off the bat I can see that I need to know what is stored at address 0x0000 (Looks like the Death Status, actually). That's going to be in the init script. Can you post that too plz? There may be some "issues" with that too.

The Main looks fine except for this part:

Code: [Select]
12 70 20 PSHA 2070
10 20 40 PSHA 4020
80 AND
60 01 PSH 01
90 STOR

I can't really tell what this is supposed to do. Actually, I know it's setting the target's flag 00 at 0x04, but I don't know what that flag does. Maybe invalidates their Exp/Gil/AP? Oh well. Further research is unnecessary.
You've also got a block checking his MP against the Capsule attack. Capsule normally costs no MP, have you changed this?
« Last Edit: 2009-02-05 14:09:09 by NFITC1 »

Kudistos Megistos

  • Banned
  • *
  • Posts: 3929
    • View Profile
Hojo's setup script is quite long:

Code: [Select]
12 60 20 10 2C 40 80 60 01 90 93 28 4F 4A 4F 00
B2 27 57 41 48 0C 00 48 41 57 0C 00 48 41 57 01
01 B3 FF 60 24 60 00 92 12 70 20 02 60 20 90 60
20 61 1F 01 92 12 00 00 02 60 20 01 60 40 80 83
02 50 20 01 60 40 80 40 90 12 00 00 02 00 00 02
60 20 37 35 90 12 20 00 02 00 00 02 20 41 80 61
11 01 40 90 12 40 00 02 00 00 02 20 41 80 61 10
01 40 90 12 00 00 10 00 40 80 60 01 90 73

I have changed 0x070-0x071 and 0x07f-0x080 of this bit of script from 6b 01 and 6a 01 to 11 01 and 10 01 because they specified the enemy IDs for the Poodler and Bad Rap samples before; they now specify the IDs for the Uknowns in the order they appear in the first few bytes of the file. These are the only changes in Hojo's AI between the two fights. The attack data for capsule in this file is identical to the data in my unmodded file.

I'll do a little more sleuthing with this tonight.

« Last Edit: 2009-02-05 16:53:49 by Leighos Kudistos Megistos »

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
The scripts looks fine (If I'm reading them correctly), but I have a theory as to why this isn't working. You're referencing monsters in a different scene from Hojo's script. I don't know if this has any effect or not.
That info on the unknown parts of the scene files is interesting. Battle Setup and Formation is still largely unknown, I think. Is 0x035C the Monster ID or battle formation ID of Helletic(/Heretic) Hojo?

Kudistos Megistos

  • Banned
  • *
  • Posts: 3929
    • View Profile
I changed it to a0 03, and look what happened!



So it seems that one can make the game skip to any formation ID when the battle is won by sticking said ID there, without the normal victory scene and without the battle location changing in the same way that the game skips ahead to different formation IDs during the Hojo battles. This looks quite awesome.  :mrgreen:

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
So, theoretically, if you set it to itself will it be in a continuous battle? Sounds fun, but isn't Bizzaro facing the wrong way? :D I just updated the wiki with this discovery.

Kudistos Megistos

  • Banned
  • *
  • Posts: 3929
    • View Profile
I changed it to 9c 03. This gets more awesome!  8-)



I've also found that by putting in the foundation ID of the battle being fought (here 58 03), one can fight the same battle an infinite number of times. This might come in handy if anyone wants to have an endless stream of enemies for some reason.

Quote from: NFITC1
The scripts looks fine (If I'm reading them correctly), but I have a theory as to why this isn't working. You're referencing monsters in a different scene from Hojo's script. I don't know if this has any effect or not.

I'm not quite sure what you mean here; could you elaborate? All of their data is in this file, unless you mean that they have to be exclusive to this scene.

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
I changed it to 9c 03. This gets more awesome!  8-)

[img]

I've also found that by putting in the foundation ID of the battle being fought (here 58 03), one can fight the same battle an infinite number of times. This might come in handy if anyone wants to have an endless stream of enemies for some reason.

That is beyond awesome! Now an enemy can be made that needs to be fought 200+ times before a win. Like a horde of soldiers or stampede of Elfadunks. I've been considering changing the Characters' AI Scripts to actually affect the love points instead of dumping them in a unused portion of memory. Then those memory blocks (80 - 83) could actually be used for something useful such as keeping track of how many of the monsters have been defeated. :D
Or possibly better yet, a single battle could be made that has you fighting EACH WEAPON IN TURN! I think I'm going to try to set that up and make a YouTube video of it. :D

Quote from: NFITC1
The scripts looks fine (If I'm reading them correctly), but I have a theory as to why this isn't working. You're referencing monsters in a different scene from Hojo's script. I don't know if this has any effect or not.

I'm not quite sure what you mean here; could you elaborate? All of their data is in this file, unless you mean that they have to be exclusive to this scene.

I think I misunderstood your first post. If you replaced the Samples' data with the Unknowns' data in the scene then there's no problem.

Unfortunately, this still doesn't solve your problem. It's possible that there's something in the Samples' animations that allow them to "appear" when activated.

Furzball

  • *
  • Posts: 612
  • Furzball happens...
    • View Profile
Think it would be possible to set up the inf. battle script thing in other battle locations. World be absolutely ridiculous to send my zack into battle and he goes "ah this shit again!?" and it is an inf amount of grunts/MPs. Or bring out the code for the golden saucer battle arena, put in the code where if you die in the battle you return to a certain scene.

Kudistos Megistos

  • Banned
  • *
  • Posts: 3929
    • View Profile
Quote from: NFITC1
That is beyond awesome! Now an enemy can be made that needs to be fought 200+ times before a win. Like a horde of soldiers or stampede of Elfadunks. I've been considering changing the Characters' AI Scripts to actually affect the love points instead of dumping them in a unused portion of memory. Then those memory blocks (80 - 83) could actually be used for something useful such as keeping track of how many of the monsters have been defeated.  :lol:
Or possibly better yet, a single battle could be made that has you fighting EACH WEAPON IN TURN! I think I'm going to try to set that up and make a YouTube video of it.  :lol:

Quote from: furzball
Think it would be possible to set up the inf. battle script thing in other battle locations. World be absolutely ridiculous to send my zack into battle and he goes "ah this sh*t again!?" and it is an inf amount of grunts/MPs. Or bring out the code for the golden saucer battle arena, put in the code where if you die in the battle you return to a certain scene.

This is exactly what I had in mind; I think it might be interesting at some point to have an endless stream of enemies, rather like the MPs that Zack fights in Crisis Core. Maybe they could be beatable, maybe not.

EDIT.

Hmmm, it should be possible to make a mod to fight every single boss in the game, one after the other; *that* would be a challenge! I'm going to have a go at that.
« Last Edit: 2009-02-06 15:54:27 by Leighos Kudistos Megistos »

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Hmmm, it should be possible to make a mod to fight every single boss in the game, one after the other; *that* would be a challenge! I'm going to have a go at that.

You'd have to be careful with that. You couldn't just change the bosses' scenes or we'd end up fighting all of them every time we were supposed to fight one. :-o

Kudistos Megistos

  • Banned
  • *
  • Posts: 3929
    • View Profile
It would just be for a one off challenge  :-P, a mod that one installs every time one wants to use it and then uninstalls when finished. All one would need to do is keep one copy of the modded scene.bin and one copy of the old one and swap them as needed.