• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
April 30, 2024, 05:31:40 am

News:

Don't be hasty to start your own mod; all our FFT modding projects are greatly understaffed! Find out how you can help in the Recruitment section or our Discord!


Maps

Started by Xifanie, September 29, 2007, 10:23:24 am

gomtuu

March 21, 2008, 01:05:41 pm #100 Last Edit: December 31, 1969, 07:00:00 pm by gomtuu
Updated the spec again, above. I discovered the function of a few more bytes, and I had some things wrong before, like the ENTD info.

Xifanie

March 21, 2008, 03:56:28 pm #101 Last Edit: December 31, 1969, 07:00:00 pm by Xifanie
Ohh, so that's why... Yeah all the events are stored in TEST.EVT and it will be much easier now to know which Event Script is loaded for each Event.

You can see yourself in FFTPatcher. The event with cadets hold all cadets that join you with their equipment and all. There MAY be something else about them that grants them higher brave/faith, I'd have to check.

Units that join as a guest or as a permanent unit is not influenced by the event.
You can make a unit join permanently, ask to join, or make a human come as a guest using FFTPatcher.

As for the weather, it snows at Zeakden but Ice isn't stronger. It snows in the battles to go save Reis and Ice IS stronger. So those two aren't linked. It may be possible that which map's texture is loaded had a direct influence on Elemental damage.

Vincent, about that one, events will always loop indefenitely if the games read an unset instruction. Just 0x00 after an instruction and your event is screwed.
  • 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

gomtuu

March 21, 2008, 05:12:35 pm #102 Last Edit: December 31, 1969, 07:00:00 pm by gomtuu
Quote from: "Zodiac"Ohh, so that's why... Yeah all the events are stored in TEST.EVT and it will be much easier now to know which Event Script is loaded for each Event.

Cool. Is there anything that displays or edits these right now? I don't see it in FFTPatcher (0.205)... The closest thing I see is the ENTD info.

Quote from: "Zodiac"You can see yourself in FFTPatcher. The event with cadets hold all cadets that join you with their equipment and all. There MAY be something else about them that grants them higher brave/faith, I'd have to check.

Ha, that's neat! I never realized that the cadets in the military academy scene become your initial party... Funny! :)

I'd imagine there's an event instruction to raise Brave, since your Brave gets raised based on how you answer questions in the events (Event Script 5, I think, for example).

Quote from: "Zodiac"You can make a unit join permanently, ask to join, or make a human come as a guest using FFTPatcher.

I see "Join After Event," but I looked at ENTD entries 0x0188 (Military Academy) and 0x0110 (the cinematic at Orbonne where Rad, Alicia, and Lavian ask to join) in FFTPatcher, but I don't see what makes a character join silently vs asking to join. Where's that?

Quote from: "Zodiac"As for the weather, it snows at Zeakden but Ice isn't stronger. It snows in the battles to go save Reis and Ice IS stronger. So those two aren't linked. It may be possible that which map's texture is loaded had a direct influence on Elemental damage.

My point was just that the weather chosen from the GNS isn't the only thing that affects weather-related stuff, but yeah, it's still possible. Although, the weather byte during the Zeakden battle is 2, but during the Colliery levels, it's 2, then 3, then 4... Hmm...

Xifanie

March 21, 2008, 06:45:28 pm #103 Last Edit: December 31, 1969, 07:00:00 pm by Xifanie
Given what we call the "sprite" which also assigns the main job of the unit:

0x00-0x7F (special units)
None: -
Join: Ask to join permanently
Save: -
Both: Join as Guest

0x80-0xFF (generics and monsters)
None: -
Join: Ask to join permanently
Save: -
Both: Join Silently

That's the simple reason
  • 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

gomtuu

March 22, 2008, 06:19:15 pm #104 Last Edit: December 31, 1969, 07:00:00 pm by gomtuu
Ah, I see... That's kind of a weird way to do it. Oh, well.

Hey, guess what I found? The data that controls the character placement screen. :) It's in ATTACK.OUT at offset 0xbbd4. There are 768 12-byte entries, though not all of them are used.

4218 2300 0401 0003 0401 0100
AAAA AAAA BBCC xxDE FFGG HHHH

A = 5x5 bitmap
    (ffffff01 is solid)
    (a9d62a01 is an S)
B = X coordinate of center of 5x5 square relative to map's (0,0) square
    (signed)
C = Z coordinate of center of 5x5 square relative to map's (0,0) square
    (signed)
x = Padding
    (Always 0x00)
D = Orientation
    (0x00 = W)
    (0x01 = S)
    (0x02 = E)
    (0x03 = N)
E = Orientation, with bitmap rotated
    (Same as D, but also rotates the 5x5 bitmap)
F = Number of characters allowed in squad
    (1 - 5 are valid. Making this 6 and adding a 6th character crashes ePSXe.)
G = Map number
    (Just for reference?)
H = Placement ID number

I also realized that the scenario data optionally includes two character placement grid numbers, for when there's a 1st squad and a 2nd squad, so I updated the scenario data spec.

Here's a placement bitmap I made while I was testing it out:

trickstardude7

March 22, 2008, 11:18:41 pm #105 Last Edit: December 31, 1969, 07:00:00 pm by trickstardude7
oo nice you guys are getting far with the maps, good job!

Xifanie

March 23, 2008, 07:29:55 am #106 Last Edit: December 31, 1969, 07:00:00 pm by Xifanie
Vincent will be able to limit Zirekile to 3 Characters so all will be well. :O

Man, this will help a lot in many situations.
Don't you know how to add a second squad?

I do know that some Event doesn't play and it strangely has 4 units for 1st Squad, and 2 units for 2nd squad. The battle never plays and the event just ends there. It's the one right before the last one; battle at Igros. I'm not sure if the squads' size are the reason for this.
  • 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

gomtuu

March 23, 2008, 07:10:33 pm #107 Last Edit: December 31, 1969, 07:00:00 pm by gomtuu
Quote from: "Zodiac"Don't you know how to add a second squad?

Yes, it's in the scenario data.

Quote from: "Zodiac"I do know that some Event doesn't play and it strangely has 4 units for 1st Squad, and 2 units for 2nd squad. The battle never plays and the event just ends there. It's the one right before the last one; battle at Igros. I'm not sure if the squads' size are the reason for this.

Do you mean it's like that in the real game, or is this something you tried? I guess if the real game had a bug like that, we should be able to fix it now! :)

VincentCraven

March 23, 2008, 07:23:49 pm #108 Last Edit: March 23, 2008, 07:29:49 pm by VincentCraven
O ma gawd. I'm fixing Zirekile Falls right now.

O wait, I have to find which on is Zirekile Falls first...
I changed jobs and that has made all the difference.

gomtuu

March 23, 2008, 07:27:52 pm #109 Last Edit: December 31, 1969, 07:00:00 pm by gomtuu
I spent most of today working on TEST.EVT, trying to figure out the structure and the event scripts. Other than this site's data page about scripts, and Zodiac's earlier post with the script for the Orbonne battle, does anybody know anything that could be useful?

What I'm working on is filtering the good text from the duplicate text. A lot of the text is in there many times. I figured out a little about the overall structure of the file, but there are big blocks whose purpose I don't know. Within the blocks that seem to be important, though, I understand the structure pretty well. And I've been working on parsing the scripts using Zodiac's data (mostly) and a little extrapolation of my own. The reason I'm parsing the scripts is so I can use the "DisplayMessage" instructions to know exactly which text strings to read...

At this point, I have a program that looks through all of TEST.EVT and can print out the scripts similar to how Zodiac did it in his post. The thing is, without accurate information about the width of every instruction, things can get misaligned and give you false positives and false negatives. But, even so, the output is fairly decent right now.

Does this sound interesting to anyone, or is TEST.EVT pretty well understood at this point?

-Don

Xifanie

March 23, 2008, 08:24:51 pm #110 Last Edit: December 31, 1969, 07:00:00 pm by Xifanie
Did you get my decompiler or did you code it yourself?
  • 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

gomtuu

March 23, 2008, 09:30:55 pm #111 Last Edit: December 31, 1969, 07:00:00 pm by gomtuu
Quote from: "Zodiac"Did you get my decompiler or did you code it yourself?

Hehehe. I didn't know you had a decompiler, so I coded it myself... Where can I get yours?

Gee, it'd be nice if we had some kind of website where we could organize the facts we've discovered to make them easy for others to find... :P

-Don

melonhead

March 23, 2008, 09:47:32 pm #112 Last Edit: December 31, 1969, 07:00:00 pm by melonhead
Quote from: "gomtuu"
Quote from: "Zodiac"Did you get my decompiler or did you code it yourself?

Hehehe. I didn't know you had a decompiler, so I coded it myself... Where can I get yours?

Gee, it'd be nice if we had some kind of website where we could organize the facts we've discovered to make them easy for others to find... :P

-Don

I've told Zodiac to put his source out on the web like I do for LionEditor and FFTPatcher, but he won't listen :P

I tried to mess with TEST.EVT a few months ago but didn't get very far. Looking at my notes, each event in the file is either 0x1800 or 0x800 bytes long, and they alternate between the two. Except in four cases where the blocks are 0x2000 bytes long.

Some of the blocks start with 0xF2F2F2. I think these are dummy events. Others start with a 2 byte integer. This is a pointer to the address in the section where the text starts. The event instructions themselves tell the game which line of dialogue to use in the event.

For example, at offset 0x4000 is the integer 0x8F9. Jumping forward to 0x48F9 shows the dialogue for the "God help us sinful children of Ivalice" event. The text for the event seems to end at 0x4D76. The rest of the data in this block is garbage from another part of the game.

Thinking about it again, it might be that all blocks are of equal length (0x2000 bytes).

gomtuu

March 23, 2008, 10:16:02 pm #113 Last Edit: December 31, 1969, 07:00:00 pm by gomtuu
Hi, melonhead. I like your work on FFTPatcher, by the way. Have you seen the developments in this thread with scenarios and placement grids? It'd be nice if that could make it into FFTPatcher some day. I don't have a lot of interest in writing an editor with a GUI and everything, but you seem to do that pretty well.

Quote from: "melonhead"I've told Zodiac to put his source out on the web like I do for LionEditor and FFTPatcher, but he won't listen :)

Quote from: "melonhead"Thinking about it again, it might be that all blocks are of equal length (0x2000 bytes).

Yeah, I think the game always loads 4 sectors (0x2000 bytes) of TEST.EVT into RAM, but it looked like sometimes (always?) there's a good chunk with the text you want and at least one F2F2F2F2 chunk loaded along with it.

I noticed some of the data in TEST.EVT is probably Japanese. Is this just stuff that didn't happen to get overwritten during localization?

-Don

karsten

March 24, 2008, 04:07:46 am #114 Last Edit: December 31, 1969, 07:00:00 pm by karsten
probably it's the famous sound novels that got canned....


by the way i noticed that we could add back all the character's quotes that were taken away! also with yours super-human skills, one day we might even able to restore the sound novels, or to re-open the hidden debug mode...

it's so sad that i couldn't get my hands on that review/debug copy of FFT :( it was outside even my most exaggerate expenses

Xifanie

March 24, 2008, 07:19:29 am #115 Last Edit: December 31, 1969, 07:00:00 pm by Xifanie
There was no way I'd decompile manually an entire event script :/, plus I talked aabout my decompiler a few times...

Sheez, I got owned... I always checked the events in a savestate which the 4 first bytes are overwritten with 0xF2F2F2F2. I thought that's what normal for an event.

I'm not sure what that Japanese text is for at all.

karsten, that's not really likely as the sound novels doesn't happen on a map or loads any character or anything. And that guy was a fucking jerk. $600 for just a burnt debug FFT disc, go to fucking hell.

We're the only FFT hacking community and that price is way off. Not possible he'd sell it for 600 bucks in his entire life.
  • 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

melonhead

March 24, 2008, 09:16:28 am #116 Last Edit: December 31, 1969, 07:00:00 pm by melonhead
Quote from: "karsten"probably it's the famous sound novels that got canned....
The sound novels are in SNPLMES.BIN.
Quote from: "Zodiac"Sheez, I got owned... I always checked the events in a savestate which the 4 first bytes are overwritten with 0xF2F2F2F2. I thought that's what normal for an event.
So maybe the sections that start with 0xF2F2F2 are the real ones and the rest are dummies.

gomtuu

March 24, 2008, 11:35:08 am #117 Last Edit: December 31, 1969, 07:00:00 pm by gomtuu
Quote from: "melonhead"So maybe the sections that start with 0xF2F2F2 are the real ones and the rest are dummies.

I doubt it. I know what he's talking about; in RAM, the data does have F2F2F2F2 before it, but it's not that way in TEST.EVT.

Xifanie

March 24, 2008, 02:30:34 pm #118 Last Edit: December 31, 1969, 07:00:00 pm by Xifanie
Might I see your program? I just want to compare.

Here's mine: http://auritech.byethost13.com/decompiler.rar

Just put TEST.EVT in the same folder.
  • 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

gomtuu

March 24, 2008, 03:44:51 pm #119 Last Edit: December 31, 1969, 07:00:00 pm by gomtuu
Yeah, I'm curious to take a look at yours, too. Here's mine. It takes the path to TEST.EVT as a command-line parameter and outputs to stdout. It requires Python, but no funny libraries.

Edit: This version is set up to just print the text used by DisplayMessage() calls, but if you want the event instructions too, just uncomment the "print disasm" line.