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

Maps

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

Xifanie

September 29, 2007, 10:23:24 am Last Edit: September 29, 2007, 11:33:33 am by Xifanie
Hey thanks to iceknight I found some info.

Right now I'm working on it but so far I found what looks like to be:

- Height of panels
- If a panel is walkable or not
- Traps?
  • 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

Xifanie

September 29, 2007, 11:33:09 am #1 Last Edit: December 31, 1969, 07:00:00 pm by Xifanie
Damn, looks like my units are flying in the air.
The movement cursor follows the new height but the blueish tiles to indicate you can move on them is at the original height.

Without changing the map graphics, I suppose all I could do is changing the water's dept so that it doesn't look like units are underground or flying.
  • 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

karsten

September 29, 2007, 12:12:31 pm #2 Last Edit: December 31, 1969, 07:00:00 pm by karsten
a great accomplishment, really.

Argg0

September 29, 2007, 12:22:54 pm #3 Last Edit: December 31, 1969, 07:00:00 pm by Argg0
How do you think maps are? Pre-set images or what?

I think there may have one thing that goes like...

0001 - Grass 1
0002 - Grass 2
.
.
.
00A3 - Rock 4
00A4 - Rock 5
.
.
.

Though, it might be hard to find...

Xifanie

September 29, 2007, 12:33:20 pm #4 Last Edit: December 31, 1969, 07:00:00 pm by Xifanie
My guess is more that each panel graphic is made of 32*32 nibbles or 512 bytes; With a 16 colors palette.

If it was stored like you suppose, we would have one big file (or many) containing all the terrains graphics, which is not the case.

Each map had 1 to 41 files anyway.
  • 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

Xifanie

September 29, 2007, 12:35:10 pm #5 Last Edit: December 31, 1969, 07:00:00 pm by Xifanie
However it might be as you said, it's just that it would load the tiles withing the map files.

The only tiles I can recall that look exactly the same are the Darkness and tutorial tiles though.
  • 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

karsten

September 29, 2007, 01:34:00 pm #6 Last Edit: December 31, 1969, 07:00:00 pm by karsten
bed desert might be a valuable map to check. it's almost 90% of the same terrain

Xifanie

September 29, 2007, 02:29:25 pm #7 Last Edit: December 31, 1969, 07:00:00 pm by Xifanie
However Bed Desert had 18 files... >_>

So it's a pretty complex map in terms of structure. :/
  • 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

karsten

September 29, 2007, 03:30:31 pm #8 Last Edit: December 31, 1969, 07:00:00 pm by karsten
mmmh maybe you might check the battle with olan... all the tiles should be snowy and the must should be smaller and square-like

Xifanie

September 29, 2007, 03:42:17 pm #9 Last Edit: December 31, 1969, 07:00:00 pm by Xifanie
I'll give it a try. 10 files, 60% blizzard, 35% carve model, and rest for 3 other tiles.
  • 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

Xifanie

September 29, 2007, 03:44:52 pm #10 Last Edit: December 31, 1969, 07:00:00 pm by Xifanie
Man, makes me think I'll have to make a new Image of my FFT,

Ovelia -> Draclau
Simon + Agrias -> Rafalak
in the first scene of the game

rofl battle at orbonne with 11 lvl99 Arc Knights Delitas

Maps being completely fucked up by my testing and more...
  • 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

Argg0

September 29, 2007, 05:20:59 pm #11 Last Edit: December 31, 1969, 07:00:00 pm by Argg0
Want an easy map to check?

Use the Tutorial ones.

karsten

September 29, 2007, 06:25:23 pm #12 Last Edit: December 31, 1969, 07:00:00 pm by karsten
Quote from: "Zodiac"Man, makes me think I'll have to make a new Image of my FFT,

Ovelia -> Draclau
Simon + Agrias -> Rafalak
in the first scene of the game

rofl battle at orbonne with 11 lvl99 Arc Knights Delitas

Maps being completely fucked up by my testing and more...

take screens! :D

gomtuu

February 05, 2008, 09:49:52 pm #13 Last Edit: December 31, 1969, 07:00:00 pm by gomtuu
A while ago, I worked on deciphering the map data. I used an emulator and edited the save states to reverse-engineer the data. I don't remember how or where I found the data, but based on my old notes, here's what I found. Each square of the map has 8 bytes, and each byte's meaning was as follows:

byte 0, bits 0-1: unknown
byte 0, bits 2-7: terrain type
byte 1, unknown
byte 2, height, whole part
  (00-1E display a number)
  (1F-FF work, but display no number)
byte 3, bits 0-2: water depth
byte 3, bits 3-7: height, fractional part
byte 4, unknown
byte 5, unknown
byte 6, bit 7: can't move cursor to this spot
byte 6,  bit 6: cursor turns red on this spot
byte 7, unknown

Here's a list of the terrain types from my notes:

00 Natural Surface
01 Sand area
02 Stalactite
03 Grassland
04 Thicket
05 Snow
06 Rocky cliff
07 Gravel
08 Wasteland
09 Swamp
0A Marsh
0B Poisoned marsh
0C Lava rocks
0D Ice
0E Waterway
0F River
10 Lake
11 Sea
12 Lava
13 Road
14 Wooden floor
15 Stone floor
16 Roof
17 Stone wall
18 Sky
19 Darkness
1A Salt
1B Book
1C Obstacle
1D Rug
1E Tree
1F Box
20 Brick
21 Chimney
22 Mud wall
23 Bridge
24 Water plant
25 Stairs
26 Furniture
27 Ivy
28 Deck
29 Machine
2A Iron plate
2B Moss
2C Tombstone
2D Waterfall
2E Coffin
2F ""
30 ""
3F Cross section
C0 Natural Surface
C1 Sand area
D1 Sea
FF Cross section

The appearance of the map is unrelated to this and stored elsewhere in the map files as vector data. Not all of the files in the map directory contain vector data, but the ones that do have blocks that go something like this, if memory serves:

3-point polygons' XYZ coordinates
4-point polygons' XYZ coordinates
untextured (black "skirt") 3-point polygons' XYZ coordinates
untextured (black "skirt") 4-point polygons' XYZ coordinates
3-point polygons' texture UV coordinates + palette index
4-point polygons' texture UV coordinates + palette index
3-point polygons' normal vectors
4-point polygons' normal vectors

I have a map viewer that wrote in Python. It's unfinished, but I'll post it here later.

Cheetah

February 05, 2008, 10:18:35 pm #14 Last Edit: December 31, 1969, 07:00:00 pm by Cheetah
That is some pretty good information, if nothing else you presented it in a very organized fashion. Do you know where the data for the weather on the map is stored? Just wondering if there is anyway to customize it, or potentially change it while in a battle.

Zodiac, is it possible that there could be an FAQ section posted on the main page where people could submit information like this so that it would be easier to find and sort?
Current Projects:

gomtuu

February 06, 2008, 11:46:09 pm #15 Last Edit: December 31, 1969, 07:00:00 pm by gomtuu
Cheetah,

I'm fairly certain that the GNS files in the MAP directory would be the place to start if you want to load maps in different weather conditions. I don't understand the GNS files very well, but I do know that they contain pointers to LBA addresses of the other files in the MAP directory. A single GNS file usually has many entries in it, so it points at several files. It was my feeling that these entries were probably grouped by weather condition, but I never determined that for sure.

The non-GNS files in the MAP directory can be one of two things, as I understand it:

1. Texture files, which are always 131072 bytes
2. "Everything else" files

In viewing the texture files, I've found that a map like Mandalia Plains, for instance, will have several sets of textures: One with very harsh shadows "baked" onto the texture, one with not-quite-as-harsh shadows, one with no shadows, etc. It stands to reason that the first is used if the weather is sunny, the second if it's rainy, and the third if it's night.

Some of the things that I've found in the "everything else" files include the map's background gradient colors, positions and colors for three (I think?) light sources, vertex data, texture palette data, animated vertex data (for the windmill, etc.), and I think the height/terrain-type data as well.

Since weather affects the background gradient and the lighting (it does, right?), that suggest that the GNS files contain instructions for how to load a map with a given weather condition. It would also mean that you probably can't easily have the weather change mid-event, since all that info (especially the texture data) is probably just determined once when the map is first loaded. Can anyone think of a counterexample within the game? A map that starts sunny and turns rainy, or something?

This message is getting long, so I'll post my map viewer in a separate message below with instructions.

-Don

gomtuu

February 06, 2008, 11:52:34 pm #16 Last Edit: February 08, 2008, 10:13:53 pm by gomtuu
Attached is a map viewer I wrote in Python. I never finished it, but it might be useful as a place to start. To run it, you'll need:

    * Windows only: glut32.dll (included) in your WINDOWS\system32 directory
    * Video card with OpenGL support and 16MB onboard RAM :roll:
    * Python 2.5.1 or greater
    * setuptools 0.6c6 or greater, which you can use to install:
      * PIL 1.1.6 or greater
      * pyopengl 3.0.0a6 or greater
      * numpy 1.0.3.1 or greater

To run it from a regular command prompt, type:

python map2gl.py <path_to_map_directory> <map_number>
So, for example:

python map2gl.py D:\MAP\ 25
This is assuming D: is the FFT CD. It should also work in Linux, where it would look something like:

python map2gl.py /mnt/cdrom/MAP/ 25
Maps on the CD are numbered 0-125. (Look at the .GNS files.) There are a few maps that cause the program to crash when they load, so if the first one you try doesn't work, try a few more. While it's running, you can drag the mouse around to rotate the camera, or press these keys:

ijkl (to rotate the camera)
JL (to rotate the camera to the previous or next 45-degree angle and stop its rotation)
o (to toggle between orthographic (isometric) and perspective projection)
x (to toggle display of axes: R=x G=y B=z)
0 (to stop the camera's rotation and zero its position)
-= (to dolly the camera out or in)
_+ (to decrease or increase the camera's focal length in perspective projection mode)
[] (to go to the previous or next map)
Esc (to quit)

Feel free to use it any way you like, and let me know if you have any questions.

gomtuu

February 07, 2008, 12:31:46 am #17 Last Edit: December 31, 1969, 07:00:00 pm by gomtuu
P.S. - Here are some screenshots of my map viewer, in case you think I'm just full of it. :) Notice that it can do perspective projection as well as isometric, so there's no way these were taken in an emulator.

-Don

karsten

February 07, 2008, 02:12:21 am #18 Last Edit: December 31, 1969, 07:00:00 pm by karsten
you kick ass! this way zodiac's guesses can be verified offgame too?

you, zodiac and melonhead are on the way of doing the impossible!

karsten

Cheetah

February 07, 2008, 03:15:40 am #19 Last Edit: December 31, 1969, 07:00:00 pm by Cheetah
...WOW!! When on earth did you make this program, that is some really impressive stuff. I sadly will likely never get your program working on my computer, I'm a mac guy, but this is a very big contribution. Are you planning any more additions to the program? Thanks for the info about the weather, it didn't occure to me that there even good be animations happening on the maps till you reminded me of the windmill. Seems like that was rather underused in the game.
Current Projects: