Author Topic: How Final Fantasy field stuff is done.  (Read 8469 times)

halkun

  • Global moderator
  • No life
  • *
  • Posts: 2111
  • Karma: 20
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
How Final Fantasy field stuff is done.
« on: 2001-02-11 21:26:00 »
I have this book called "The Complete Works of Final Fantasy" It was written by Hironobu Sakaguchi and gives some real good insight into how Final Fantasy works. That and also some snippis of code and some stories from my old contact from square, I can put togeather how FF7 was made.

After the story is written, the whole game is put out onto a storyboard. Then each and every scene is sketched out and the dialoge is attached to it. Let's take a look at the bery beginning of the game, as this has every single part of the engine in it. Here's a review.

You start the game, and you are treated to a little moviewith music, you see areith, pan back, long shot from the left, she turns, and starts walking. Pan out to the street, up and out, pan, pan, pan, pan, then the logo comes in on time with the music, pan in, pan in, train, pan in, train, pan in and you see the guards the train pulls in, stops, the good guys come out fihgt, cloud comes out last, barret turns, "'come on newcommer, come with me" he runs off. You follow. two guards come out, fight, then to the next screen, some dialog, you name youself, jessie open the door. Another movie pan, and you go forth.

I know this is long-winded but let me tell you what's going on behind the scenes.

You start at the title screen, with the sword, and select new game. Now the title screen is "outside" the main engine. When you start the game the loads the first "field" file. The field file (who's name escapes me for the moment) is really a script that the engine uses to tell the story, not just the speech but what the characters do.

The first field files tells the engine that it needs to load the opening theme, opening movie, the first poly cam pan for the guards, the npc models, the character models, the solders, the bone movement, background, and the speech script.

The field file starts the music and streames the movie. Now all the dependncies are loaded into memory, and the CD-ROM is busy so don't count on it loading anything. Now on the PSX version, when the camera is panning in and you can see the train below coming into the station, the color depth drops from 24 bit color to 15. The cam file is then started and the guards are placed on the "ground" ontop of the movie in every frame. As the train comes to a stop at the very last frame, it is replaced by a static "field background" made up of two layers of 128x128 square blocks. (or is it 32x32) the lower layer is the "ground" and the ipper layer is theing that the character can be obcured by.

The scene acts out using a script in the field dir of that moves the characters and the barrett says his dialog. WHen you move you hit a trigger in the field file that makes the guards come out. There is a fight.

AFter the battle the computer loads a *deffernt* field file. This one has no script and and exit to *another* field file.

Upon exitin the first screen the old fild file(s) get dumped and new data is loaded. Now bacground, new characters, the door that jessie opens, another cam file for the pan behind cloud, and another movie is readied to be streamed. (because it's with polys it's 15 bit) You talk to the right people, certian triggers are trpped to make them say things, and to change your names. then the script follows through by moving the door, everyone running through, and then the movie sreams with the cam overlay. cloud runs off and aonther field file is loaded in the nex scene.

Every field file has a scene in it (Think about it) each field file points to another and togeather the script makes a story. crack the field file format, and you have a new game.

***** The debug rooms *****

This thing is a huge field loader. This is where you test your fields after they have been compiled, and also test each aspect of the engine. The trigger room (The one with the big airith) the cam room (The one with the people lineed up in a square so you can see the camera axis during the movie) and the battle room with the monsers with exactly 10,000 (1000) health and even starts so you can test weapon/armor math so it all works out. If you want to crack the script, crack the debug field files.  

I think I've rambeld enough I'm going to bed now.

-Halkun


Joey

  • No life
  • *
  • Posts: 1095
  • Karma: 0
    • View Profile
How Final Fantasy field stuff is done.
« Reply #1 on: 2001-02-12 14:51:00 »
Halkun! my mentor!!!!! Hehehehehe

Well, you do know a lot of stuff. I bow to your wisdom......(Qhimm said this last time, didin't he?)

Well, could you please tell me about what's going on with FF9 now that I don't work with Square anymore.

Sorry, Qhimm for the messages. there is something wrong with my internet connection lately.


The Skillster

  • No life
  • *
  • Posts: 2281
  • Karma: 0
  • Loving every Final Fantasy
    • View Profile
    • Lazy at work
How Final Fantasy field stuff is done.
« Reply #2 on: 2001-02-12 15:17:00 »
halkun, your theory is sound, but i can tell you that text from the debug room =s doesnt ONLY resdie in the blackbg files, for instance open md1_1 this is the very 1st scene on the station platform. open it in cosmo, look at the huge amount of MISC TEXT most of these are lines from the debug room, some other scenes hold stuff too. I assume the blackbg files ALSO contain the background pictures for some of the debug rooms too.

Qhimm

  • Founder
  • No life
  • *
  • Posts: 2005
  • Karma: 7
    • View Profile
    • Qhimm.com
How Final Fantasy field stuff is done.
« Reply #3 on: 2001-02-12 18:46:00 »
I haven't had the possibility to work much with FF7psx, but IIRC the field background tiles are 8x8 each (on PC at least).

On the PC version however, the field files are (as you all know) combined into field archives (they're separate files on PSX). But, since the same field background never (well, rarely) occur twice, I'd say that you don't "switch" scenes every time something changes in the game, but rather that the individual elements are controlled by the story flags. For example, when you fight the two guards, the trigger is deactivated using a flag but the field file is still the same. Again, this is based on my experience with FF7pc, so don't take my word for any of this for FF7psx.


halkun

  • Global moderator
  • No life
  • *
  • Posts: 2111
  • Karma: 20
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
How Final Fantasy field stuff is done.
« Reply #4 on: 2001-02-12 20:02:00 »
Sometimes I wish I didn't play with the PSX version so much, it's hard to tell where the PSX stuff ends and the PC stuff begins. Let me therorise something and see if this makes any sense.
Ok, let's pretend we are a storyboarder for FF7. We have this wall with every backgound sketched on an 5x9 card with a little "what's happening in this scene" written on the back of it. We have just finished making the storyboard and and all the cards are in order from the beginning of the game to the end. Each card represents a field background too.

Ok so we take a card, lets say the scene where aeirth and cloud have the conversation infront of the big wall and the chocobo carrage comes in, turns to the right, and tifa is there. We give this card to a field programmer who gets the models from the modelers and the background from the background renderers. He follows the script written on the card and makes the scene. He then puts "exit triggers" on the scene (You see them when you push the select button, the red triangles showing where you can exit) attaches something like, "when cloud goes off the screen to the right, load the first wall market field and execute" I stand corrected, after the scene is ran when you enter it for the first time, is is placed in an "inactive" state so the whole scene doesn't replay itself when you enter it again, but you can still walk through it. Whenever you enter any field file an inital entry script will play. The upshot is that the field files are interpreted I know that as a fact. I postulate that blackbg is actully executed at the beginning of the game (During the back background before the movie starts) . At the very beginning the interpreter reads "If the debug flag is set, link up the debug dependcies and execute the debug room, if not, execute this scene here"

Makes sense, you don't want to swap out field files every time you needed to debug something. Just lump the debug roooms in with the first scene, you know that even if the story changes, that scene will always be first and you don't need to swap *that* put with anything.

I have a better idea! Ok, at the way beginning of the game where you can select "New Game" or "Continue" I bet dollars to douhnuts that the debug verson had the same thing, but had "debug" and "continue" This will load ou blackbg like it would for the normal verson of the engine, but execute the debug room, not the beginning scene from the same field file! Notice that the debug room has no backgrounds attached, I bet field files can handle only one bacground at a time, on the background for the debug room od the opening train station.

Makes sense, FF8 could have up to two backgrounds pre-loaded, thats why there is a background on the floor of the ff8 room, the other background is probably the nurses hospital bed

I have to study japanese now. bah what do you guys think?

-Halkun


Srethron Askvelhtnod

  • Freak
  • *
  • Posts: 965
  • Karma: 0
    • View Profile
    • http://www.srethron.cjb.net/
How Final Fantasy field stuff is done.
« Reply #5 on: 2001-02-12 21:25:00 »
Halkun: Wow! Thanks for *all* the info. What would be interesting is if we could eventually get the game to load *extra* home-grown field files. Like, hypothetically, we wanted to make it possible to return to that prison, that place below the Gold Saucer. (was it Corel Prison?) So we make another batch of field files for what happens if and when you return to it, and find some way to make a field file load it.

Interesting theory about the debug room. Correct me if I'm wrong, but I'm almost certain that the .TEX files for the opening screen with New Game and Continue are kept in a separate .LGP (was it CR_US.LGP?). So if this is true, and there is/was a Debug/Continue screen, how did Square cover it up?

Qhimm:
Re: Switching scenes. I was wondering about that. It wouldn't be a genetically lazy thing to make multiple field files for the same location when you could simply use switches to trigger and disable certain events, would it?


halkun

  • Global moderator
  • No life
  • *
  • Posts: 2111
  • Karma: 20
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
How Final Fantasy field stuff is done.
« Reply #6 on: 2001-02-13 11:57:00 »
Say, I have an idea, why don't you guys switch some bytes around in the field files and see what happens when the engine runs them.  mess with a .cam file and go into the debug room and see what you changed. Every aspect of the game is accessable from the debug room. Change a really easy scene and see if yo can't move the floor or load up different charatrers. I mean, the game's gonna crash alot, but you learn what does what.

Joey

  • No life
  • *
  • Posts: 1095
  • Karma: 0
    • View Profile
How Final Fantasy field stuff is done.
« Reply #7 on: 2001-02-13 12:19:00 »
Wow. You do know how FF7 works. Even I don't really understand how FF9 works.

The SaiNt

  • Administrator
  • No life
  • *
  • Posts: 1302
  • Karma: 3
    • View Profile
How Final Fantasy field stuff is done.
« Reply #8 on: 2001-02-13 14:05:00 »
Joey : What do you mean by "Even I don't really understand how FF9 works."

I suppose you don't really understand how FF9 works at all. Sorry, couldn't help that.

About halkun's suggestion, I wonder who has time to try it out considering FF7 will be crashing a lot? I remember when I was trying to edit the HRC files without ficedula's LGP tools. FF7 kept crashing cause the size of the lgp was altered or something like that.


ficedula

  • No life
  • *
  • Posts: 2179
  • Karma: 40
    • View Profile
    • http://www.ficedula.co.uk
How Final Fantasy field stuff is done.
« Reply #9 on: 2001-02-13 15:12:00 »
Depends what you alter .. I've messed around a bit with the field files. FF7 doesn't seem to check whether the data it's loading is valid as such - just sometimes it can cause a crash if you enter values that make it try to load nonexistant data etc....

example: If you change the table entry for the background block in a field file FF7 will still load the level, just with no background (only the 3d models showing) - at least when I tried it.


Srethron Askvelhtnod

  • Freak
  • *
  • Posts: 965
  • Karma: 0
    • View Profile
    • http://www.srethron.cjb.net/
How Final Fantasy field stuff is done.
« Reply #10 on: 2001-02-15 20:44:00 »
Halkun: If no one has done it by the time I get my new computer this summer, I'll do that.

Srethron Askvelhtnod

  • Freak
  • *
  • Posts: 965
  • Karma: 0
    • View Profile
    • http://www.srethron.cjb.net/
How Final Fantasy field stuff is done.
« Reply #11 on: 2001-04-16 16:35:00 »
Thought I'd share this:
You probably already new this, but LASTMAP is the scene where you fight Sephiroth for the last time. What you might not know is that there is another scene called STARTMAP. I've always somehow missed it when going through the field files until today. Anyway, STARTMAP could be the ticket. I'd urge you guys to take a look at it.
The only text blocks are misc text and it has a black background (although it seems to be very large). The first 2 blocks are of the most interest.
Misc text 1:
        NEXT
        MENU ON
        BATTLE LOCK
        BATTLE UNLOCK
        MOVIE LOCK
        MOVIE UNLOCK
        GLOBAL RESET
        FULL NAME
        NEW START
        EXIT
Misc text 2:
        BACK
        SOUND RESET
        FULL MATERIA
        BATTLE999
        EXIT
Misc text 3:
MMMMMMMMMMMMMMM
Misc text 4:
WWWWWWWWWWWWWWW

The rest of the blocks are all like 3 and 4 (alternate between M's and W's).

What this looks like to me is that this might be Halkun's debug screen. If nothing else, it seems to control some key in-game settings. When you start New Game, the game probably loads STARTMAP which in turn loads the appropriate settings and then loads the first field file/movie. LASTMAP is the last field file, so LASTMAP probably acts in reverse to STARTMAP once everything in LASTMAP has been completed. I'm thinking that if we can figure out everything in STARTMAP, we'll learn some important stuff.


ficedula

  • No life
  • *
  • Posts: 2179
  • Karma: 40
    • View Profile
    • http://www.ficedula.co.uk
How Final Fantasy field stuff is done.
« Reply #12 on: 2001-04-16 16:47:00 »
According to my debug room guide, that's the menu options you get in the central (main) debug room.

Sir Canealot

  • Freak
  • *
  • Posts: 900
  • Karma: 0
    • View Profile
How Final Fantasy field stuff is done.
« Reply #13 on: 2001-04-16 05:35:00 »
Hey where did ya get that book anyways?


ficedula

  • No life
  • *
  • Posts: 2179
  • Karma: 40
    • View Profile
    • http://www.ficedula.co.uk
How Final Fantasy field stuff is done.
« Reply #14 on: 2001-04-16 22:41:00 »
Found it on the net somewhere. Shouldn't be hard to locate ... I could upload it to my web page if you need a copy.

Sir Canealot

  • Freak
  • *
  • Posts: 900
  • Karma: 0
    • View Profile
How Final Fantasy field stuff is done.
« Reply #15 on: 2001-04-16 23:33:00 »
That would be brillinat.
I would owe you another Ficedula

The Skillster

  • No life
  • *
  • Posts: 2281
  • Karma: 0
  • Loving every Final Fantasy
    • View Profile
    • Lazy at work
How Final Fantasy field stuff is done.
« Reply #16 on: 2001-04-17 01:17:00 »
youll find the HTML version on the saints web site  :D

Sir Canealot

  • Freak
  • *
  • Posts: 900
  • Karma: 0
    • View Profile
How Final Fantasy field stuff is done.
« Reply #17 on: 2001-04-17 01:58:00 »
 http://www.zhenjock.com/" TARGET=_blank>http://www.zhenjock.com/  <-Is that his website? I couldent see it there....


ficedula

  • No life
  • *
  • Posts: 2179
  • Karma: 40
    • View Profile
    • http://www.ficedula.co.uk
How Final Fantasy field stuff is done.
« Reply #18 on: 2001-04-17 03:18:00 »
I can't even access his site. Too slow, it times out before I get the whole page.

The SaiNt

  • Administrator
  • No life
  • *
  • Posts: 1302
  • Karma: 3
    • View Profile
How Final Fantasy field stuff is done.
« Reply #19 on: 2001-04-17 14:45:00 »
Actually you can get it at my old site if you can't access the new one  :) I think the address is this:-
 http://www.redrival.com/lzj/debugroom.htm" TARGET=_blank>http://www.redrival.com/lzj/debugroom.htm



Sir Canealot

  • Freak
  • *
  • Posts: 900
  • Karma: 0
    • View Profile
How Final Fantasy field stuff is done.
« Reply #20 on: 2001-04-17 23:06:00 »
I still cant see it on that site. Can you give me a Direct URL there?

The SaiNt

  • Administrator
  • No life
  • *
  • Posts: 1302
  • Karma: 3
    • View Profile
How Final Fantasy field stuff is done.
« Reply #21 on: 2001-04-18 11:15:00 »
Here's a deal
someone provide me with proper webspace
then i'll be more than happy to reupload the files.

Sir Canealot

  • Freak
  • *
  • Posts: 900
  • Karma: 0
    • View Profile
How Final Fantasy field stuff is done.
« Reply #22 on: 2001-04-18 14:08:00 »
Wel I have a website now. Its a bit crap now but I wouldent mind hosting it.

The SaiNt

  • Administrator
  • No life
  • *
  • Posts: 1302
  • Karma: 3
    • View Profile
How Final Fantasy field stuff is done.
« Reply #23 on: 2001-04-18 23:31:00 »
I just found out something I didn't know.
If you click on the link of my old website, you will see the page load but with an advert below it.
The page top frame with the links don't appear since redrival.com has decided to include ad's
To see the links, click on the top frame and drag your mouse downwards.

Srethron Askvelhtnod

  • Freak
  • *
  • Posts: 965
  • Karma: 0
    • View Profile
    • http://www.srethron.cjb.net/
How Final Fantasy field stuff is done.
« Reply #24 on: 2001-05-04 02:41:00 »
Hmm, the RedRival link works just fine for me. Just read the whole guide... It seems like I've read it before. Maybe I have the text version lying around somewhere...