Author Topic: FF8 Events  (Read 4001 times)

Xifanie

  • *
  • Posts: 13
  • French Maid
    • View Profile
    • Final Fantasy Hacktics
FF8 Events
« on: 2015-09-18 16:37:57 »
Hello,

I'm extremely familiar with FFT events, as you can see from all this information I compiled: http://ffhacktics.com/wiki/Event_Instructions

My goal? Removing the "Junction remove" before/during/after Laguna dreams. Which from what I investigated yesterday, is actually characters being kicked out of the active/passive party, and thus have their GF and all their junctions removed. So I'd like to find out that instruction and play with it... I'm thinking that ideally, I'd want "present" characters to still be available for junction-switching, so it allows you to have access to all your GFs/magic without destroying your carefully set junctions.

Does anyone have any information about FF8's events? I want to edit the steam version, but debugging the PSX version would be so much easier, so knowing the event data offset in RAM for PSX would be awesome.
« Last Edit: 2015-09-18 16:42:34 by Xifanie »

JeMaCheHi

  • *
  • Posts: 194
  • You can just call me J!
    • View Profile
    • My YouTube Channel :D
Re: FF8 Events
« Reply #1 on: 2015-09-18 18:12:24 »
You should take a look at ff8 field scripting: http://wiki.qhimm.com/view/FF8/FileFormat_JSM
Also take a look at opcodes: http://wiki.qhimm.com/view/FF8/Field/Script/Opcodes
To edit field scripts you can use myst6re's Deling: http://forums.qhimm.com/index.php?topic=13050.0

With this info you can basically play around with everything. To do what you want, you'd probably want to look at fields where party are switched to Laguna's (Balamb-Timber train, Timber forest...) and look for the event that change current party/junctions/money.

Hope it helped  ;D

Xifanie

  • *
  • Posts: 13
  • French Maid
    • View Profile
    • Final Fantasy Hacktics
Re: FF8 Events
« Reply #2 on: 2015-09-18 18:19:24 »
Ah! That's exactly what I was looking for. Thank you!
I've seen the first page you linked, but basically just skimmed through it and didn't even see that last section with the "opcodes".

I just hope I can manage all this, I have a lot of experience hacking FFT, but this might end up being far more troublesome than I thought. We'll see.

JeMaCheHi

  • *
  • Posts: 194
  • You can just call me J!
    • View Profile
    • My YouTube Channel :D
Re: FF8 Events
« Reply #3 on: 2015-09-18 18:26:29 »
Glad it helped! Feel free to ask for help if you get stuck with scripting  ;)

Shard

  • *
  • Posts: 329
    • View Profile
Re: FF8 Events
« Reply #4 on: 2015-09-19 05:07:54 »
You'll probably want to look for the JUNCTION and DYING opcodes. I don't know exactly what DYING does, but it has something to do with resetting the party's health or something.

Xifanie

  • *
  • Posts: 13
  • French Maid
    • View Profile
    • Final Fantasy Hacktics
Re: FF8 Events
« Reply #5 on: 2015-09-19 06:22:25 »
Thank you Shard, that looks exactly what I'm looking for.

Sadly, this documentation is all very confusing to me. I just can't find anything about the byte structure of these "opcodes".
It says they are 4 bytes, so what, dying would be 45 01 00 00? Or 00 00 45 01?
I read about the JSM file format, but I can't find any JSM files. Granted, I am very new to FF8 modding, I thought the program called Garden would help, but it refuses to work for me (at least refuses with the steam version).

All I know so far is that Quistis has her junctions removed -twice- before the first dream... so yay, 2 instructions as culprits.

EDIT: Still confused about the format, but at least I know that RESET GF is 28 01 00 00 and one of the culprits. Changing Junction to 03 instead of 01 does not seem to do anything (to help me in this situation). Doing all this and I'll have no idea how to make a patch afterwards lol.

EDIT2: I removed the routine that Resets junctions under JUNCTION, but now while Quistis still as her GFs equipped, they are also available to pick by Laguna/Kiros/Ward. Which is okay since I want Quistis to be in the passive party anyway; does anyone have any idea how in the dream world, party members are kicked out while remaining "Active"?

EDIT3: (Kinda forgot about magic exchange 8D)
« Last Edit: 2015-09-19 08:34:57 by Xifanie »

JeMaCheHi

  • *
  • Posts: 194
  • You can just call me J!
    • View Profile
    • My YouTube Channel :D
Re: FF8 Events
« Reply #6 on: 2015-09-19 10:34:51 »
As I told you in my first post, the best tool you can use is Deling, which is far better and newer than Garden. To find JSM files you have to open and load the field.fs which contains all stuff related to fields. There you'll find a script editor to directly edit scripts, and a file explorer that you can use to extract *.jsm files if you wish. If you still want to edit the scripts in hex, then you have to know that everything is stored as little-endian, so 0x145 would be represented as 45 01 00 00.

To figure out how the game keeps active characters while kicks'em out of party, you'd probably want to study in game scripts and see how it works. I also recommend you to search on the wiki all the OPCODES you don't know about, Shard and myst6re did a magnificent work on it. Most of stuff I know about scripting is thanks to them.
« Last Edit: 2015-09-19 10:46:20 by JeMaCheHi »

Xifanie

  • *
  • Posts: 13
  • French Maid
    • View Profile
    • Final Fantasy Hacktics
Re: FF8 Events
« Reply #7 on: 2015-09-19 12:57:15 »
Oh gosh, sorry, I feel like such a moron for apparently not reading the entirety of your post.

And as you can see from the screenshots my last post, I was successful in "reverting" that party dream world thing. I figured it wasn't necessary to revert the main menu's display, as only the junction/magic exchange screen need to show the passive characters. It was fairly simple, it's one of the many features of the dream world flag, and I just had to disable that (disabling the entire flag itself makes the game crash pretty quickly :p). That's why I used strikethrough on that edit: it wasn't relevant anymore.

You say it's just little endian (off course it is, it's a PSX game), but 0x007 PSHN L, with let's say a value of 3, is 03 00 00 07 unlike 0x128 RESETGF like I said which is 28 01 00 00. That's why I said it was confusing, the identifier isn't in the same place at all just because there's an argument, I'm suspecting. For the record, I prefer editing things live, because it is unbelievably faster to test than to open a program, edit, compile, restart the game (or at least reload the field).

Now I just need to somehow find all the pre/during dream world scripts and I should be good to go. Took me two minutes to find the first one hahaha, this is going to take a while.

EDIT: Derp, I just realized I can just memory search the Map ID.
« Last Edit: 2015-09-19 14:08:51 by Xifanie »

JeMaCheHi

  • *
  • Posts: 194
  • You can just call me J!
    • View Profile
    • My YouTube Channel :D
Re: FF8 Events
« Reply #8 on: 2015-09-19 14:21:33 »
Yeah, live editing is undoubtedly faster, but having an ASM-like scripting makes things much clearer and helps me to think faster and focus on my goal.

You say it's just little endian (off course it is, it's a PSX game), but 0x007 PSHN L, with let's say a value of 3, is 03 00 00 07 unlike 0x128 RESETGF like I said which is 28 01 00 00. That's why I said it was confusing, the identifier isn't in the same place at all just because there's an argument, I'm suspecting.

Are you sure you're not missing something? Everything is stored as little endian, from what I've learned in the last years. Also the opcode is always before  the argument...