• Welcome to Final Fantasy Hacktics. Please login or sign up.
 

Where (or how) to find space for ASM and event hacking, if needed

Started by Satoh, August 30, 2017, 10:58:36 pm

Satoh

Ok, limited title space, lets rephrase.
First off, event hacking. I have EasyVent Editor Super Perfect 2.0, and I've looked at a few events, and at the command documentation some...
My biggest question here is, how do I know if an event is going to fit in the event file,

and if I need more space, how can I find it?

This is mainly a concern when it comes to dialogue. A long long time ago in a galaxy far far away, at least from where it is now, I tried a simple text replacement hack, and wound up corrupting the game because I used too many string characters and overwrote some other part of the game. At least I assume that's what happened... I can't be sure it wasn't a program error, but I assume I did it.


And similarly, for ASM hacking, how do I know what's free space I can jump into and back out of to add a subroutine in the middle of some existing assembly?
I'm assuming I can pick any place here http://ffhacktics.com/wiki/CD_Index listed as 'free space' but I don't know if I have to address my code cave within the same file, or if I can pick any random place on the disc, and that's a valid place to start adding new things.

EDIT: another note about free space,
I notice in the patcher that there are a number of empty spaces between job/skill set/etc indices... are these actually free space that I could put things, or, as I suspect, are they space reserved for something else/overlapping the other entries in the list already?
  • Modding version: PSX

Xifanie

PSX events are 0x2000 bytes long while the PSP events are 0x2800 bytes long. Unfortunately, the event compiler doesn't stop at those values, and may overwrite following events if you're not careful. You can, whoever, see how large an event is at compilation time. There is an option in the compiler's CONFIG.INI with a popup setting; just set it to 1.

Popup=0

If you need more space with an event, you need to create an event condition to load another slot when the end of your current even slot has been reached.

For example:
ZERO(x007F)
ADD(x007F,x0001)
EventEnd()

At the end of your first event slot

And
0001 007F 0001 | 0019 ????
or in reverse order for the spreadsheet:
01007F0001001900????

Where ???? is the event slot

But that's unlikely you'll even need that considering you'd need to create a lengthy event with a lot of text in the first place to require that.

My FFT Hack Template spreadsheet can show you where free space is. Just be careful to try to not have your hack conflict with others. Both my spreadsheet and FFTOrgASM can detect conflicts, although the latter is a bit buggy at the moment in that regard.
Otherwise, you can have a general idea of what space is available here: http://ffhacktics.com/smf/index.php?topic=11235.0

A PSX CD can hold up to 650mb of data, divided into sectors of 2048 bytes each. The PSX's RAM is limited to 2mb. You can't just expand a file or something to put in more code for your hacks. FFT already uses just about that entire 2mb nearly all the time.

There is no free space between jobs/skillset/ability/whatever tables, I have no idea what you're talking about. Just about everything in FFTPatcher except for the ENTD data is all compacted at the same location in the SCUS; there is no room. In fact, there is even a 4 byte overlap over the items table. The developers just got lucky it didn't create any bug.
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

Satoh

I'm referring to this small section of unlabeled jobs. Some other tabs have them too, and the stats listed here all seem to be the same as those listed at the 00 index, which suggests to me there is no data there. However, that may just as likely be some overlap like you suggested items have. I simply don't know what it is.



As for everything else, thank you. Most helpful.
  • Modding version: PSX

Xifanie

You can use those just fine. They wouldn't be listed if you couldn't.
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

Satoh

I see there's unused(seemingly) space at the end (491-499) in EasyVent. I don't see an instruction to specifically note which events loads next, so I'm assuming events have to be in the correct sequential order for one to lead after another, unless I've missed something.

EDIT: My current goal is to interrupt an event and add a short moment of a character presumed dead, standing up and limping away, before continuing the game. I want it to happen after the screen blackens at the end of one scene, but before returning to the map. As I understand it, the screen only blackens at the end of an event... at least as far as I can tell... and the next event needs to begin with a specific instruction...

although I suppose I could add a pair of 'ColorScreen' commands, and 'BlueRemoveUnit' all of the characters I don't need between them...
I'm not sure, maybe should I make a separate thread about that?

(I apologize if I'm skipping around too much or asking too many simple questions. There's a lot of information to look through and I've seen some evidence that some of it may be obsolete. Like some of the sprite replacing tutorial threads seem to have some old stuff that isn't necessary anymore.)
  • Modding version: PSX

Xifanie

Yes, event slots of the same scenario have to be in sequential order. Not sure why. And only up to 10 slots.

Pretty sure you can just use Reveal(), ColorScreen(), Reveal() without needing to split it into 2 events... the only way you'd need 2 slots is if your event is way too long or if there is a battle in-between. Events don't fade out on their own.

Not sure why you'd use BlueRemoveUnit() over RemoveUnit().

And yeah, this is stuff that belongs more in the Event Editing section.
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

Satoh

Thank you very much for the information once again. I'll mark this resolved and start a thread in the appropriate place if I have more questions along this line of thought.

I said BlueRemoveUnit because I had forgotten there were several other commands like RemoveUnit and Erase that all took units off the screen.
  • Modding version: PSX