Qhimm.com Forums

Miscellaneous Forums => Scripting and Reverse Engineering => Topic started by: The SaiNt on 2001-07-02 19:30:00

Title: Bingo!
Post by: The SaiNt on 2001-07-02 19:30:00
Ok, I looked at some of the field files today and it appears that "Section 2" keeps the data for the walkable / non-walkable coordinates.

Section 2 seems to be constantly 42 bytes in size.
It also always begins with the same 4 bytes:-

26 00 00 00

and ends with the last byte as 01(All values in hex).

I haven't looked at everything in this section in detail yet but anyone care to continue this for me? I don't exactly have the time to compare every file one by one to find the pattern.

I'm not sure if the above-mentioned stuff applies to all files, but it applied to all the files I've opened so far.


BTW, fice do you know where the data for which MIDI file to load is in the field file?

And you didn't add the sections on where to find the text kept in the field files?

Title: Bingo!
Post by: ficedula on 2001-07-02 19:43:00
Um, how can you store all that data in 42 bytes??? 38 once you take away the length indicator?


Text and midi indicator data is stored at the end of the first section. I didn't include it since I don't fully understand it. Really, I don't know much more than 'go to end of section, look for data that could be text-like...'.

Title: Bingo!
Post by: The SaiNt on 2001-07-02 20:35:00
Basically, I was pretty surprised too to find that it was this section that affected the walkable / non walkable sections.

If you don't believe me, go ahead and replace this section from one field file to another, you'll get what I mean.

Could it be that it only stores the co-ordinates of a 19 point shape?

Honestly I could be wrong since I have not tested this throughly yet. From what I tested, it completely changed the walkable sections, or maybe it shifted the walkable layer. If this proves to be the walkable / non-walkable section, then there's one more thing you should know. You can't seem to place 3D objects where the area is non-walkable. Shopkeepers (3D objects) and such get "moved" out of their original positions and they are repositioned to walkable areas.

I'll continue working on it if no one comes up with anything new by the time I'm free again. Maybe tommorow. Time to sleep   :)

fice : BTW, I'm wasting a hell lot of time cause FFLZS100 doesn't accept wildcards  :)

[This message has been edited by The SaiNt (edited July 03, 2001).]

Title: Bingo!
Post by: CT-CyberTech on 2001-07-03 10:18:00
Now Honestly I have no say in this seeing as I don't have a PC copy of the game you are talking about(I don't think so at least heh), but maybe the data is encoded/compressed, that would explain its small size. And as for the moving objects, the games 3D engine probably is as you said programmed not to allow objects to be placed in those areas, _OR_ maybe the coordinates after being decoded out of the 38 bytes(if thats needed) have it so:
   00 00
    |  ^---> Walkable coordinate
   Object Coordinate
and thats how it may go thoughout the whole file after being _possibly_ decoded.
Title: Bingo!
Post by: CT-CyberTech on 2001-07-03 10:20:00
Dang it, it took out my tabs, I meant that maybe it goes as 1 hex value for the object, then the following for the walkable area, or visa-versa, in 2 Byte intervals for the whole thing.
Title: Bingo!
Post by: The SaiNt on 2001-07-03 19:46:00
It really looks like section 2 was only for shifting the positioning of the walkable map.

I am able to "change" the walkable map by moving it around. The exits also seem to move together with the "walkable" terrain. The 3D objects also seem to move together with the terrain.

Thus, I think it would be right to conclude that this is not in fact the "walkable / non-walkable" map. In fact, this would be a relative positional map since the 3D objects and "walkable" map seem to placed upon it. The field background however seems to be not affected by it, so it looks like the field background is placed first then this "mask" is applied. Everything else is then placed in accordance to this "mask"'s relative co-ordinates.

I also have suspicions to what the function of section 6 is. When a simple exchange in bytes was done, the whole background & all objects disappeared, so all I get is a black screen. The bg MIDI still loads. It seems that the objects are still around since you can still interact with them. I can't confirm if the character is still able to walk since even when I use "help" the arrow doesn't appear. Even the arrows that show the exit's don't appear. I have also been unable to exit from the field file. I'm not sure about this too, since I can't even see where I am in the first place (I could easily be running in circles). It does look likely though that section 6 somehow controls the exits and the layering. I have a feeling it's just the last black layer covering everything. Anyone have any comments?

Title: Bingo!
Post by: ficedula on 2001-07-03 22:09:00
SaiNt: Was that a request for me to make FFLZS accept wildcards?   :) No problem, I'll add that in straight away; it's a fairly easy change.

Speculation on the nature of section 2: since it's constant size, and has the effects you described, I'd conclude that it was the initial position of the '3d camera'. If so, changing it would move all the 3d parts of the level - items, people, exits - while leaving the 2d background unchanged since that's drawn straight onto the screen regardless. It's one possible explanation anyway.

It's probably coincidence, but the data in that section takes up 38 bytes. Each CAM file (which we pretty much agreed were movie camera files) has a 40-byte field per camera position. Might have nothing to do with it, but it's encouraging...

EDIT: Uploaded a new LZS tool.

[This message has been edited by ficedula (edited July 03, 2001).]

Title: Bingo!
Post by: The SaiNt on 2001-07-04 14:37:00
It seems you're right about the 3D camera thing.

Fice, would you mind finishing off what I started about section 2? I don't exactly have the time to edit one byte and recompress the whole flevel file several times to test the results. Now that we roughly know what it's about it should be easier for you to test?

I was thinking that I would move on to section 6 to test more stuff.

fice :-
 

Quote
Quote from your field file document
Section 4

After the length indicator comes another integer, also indicating length. Useless, but it's there.

I think it's a mistake of some sort, since if you count the size of the section from right after the first length indicator, you will arrive 4 bytes short of the next section. If you start right after the second length indicator, then everything will be right. It's pretty dumb but like you, I haven't found any variations to this yet.

Quote
Quote from your field file document
code:

00              Blank                   2 bytes
0009            NumSections             4 bytes
????            Section 1 location      4 bytes
????            Section 2 location      4 bytes
etc.            etc.                    etc.
[/quote]

Why is it that you always make
0000 four bytes and not 00000000 4 bytes?
Common mistake?

:)

[This message has been edited by The SaiNt (edited July 04, 2001).]

Title: Bingo!
Post by: The SaiNt on 2001-07-04 18:07:00
Ok, today I took a look at Section 7

It seems that section 7 is of a constant size too, just like section 2.

The only difference is that section 7 is
48 bytes in size (not including the first four bytes / length indicator).

It also seems that not many files keep information in this section. Looking a little further, I've made a list of field files that I've looked through.

Odd files with info in section 7
ANFRST_1
ANFRST_2
ANFRST_3
ANFRST_4
ANFRST_5
BLIN63_1
BLIN65_1
BLIN671B
BLIN673B
BLIN67_1
BLIN67_3
BLIN1
BLIN2
BLIN3_1
BLIN59
BLIN69_1
BLIN68_2
BLIN68_1
CANON_1


Files with no info in Section 7
ANCNT1
ANCNT2
ANCNT3
ANCNT4
ASTAGE_A
ASTAGE_B
BIGWHEEL
BLINST_1
BLINST_2
BLINST_3
BLIN66_2
BLIN66_3
BLIN66_4
BLIN66_5
BLIN66_6
BLINELE
BLIN61
BLUE_1
BLUE_2
BLIN62_1
BLIN62_2
BLIN62_3
BLIN65_2
BLIN66_1
BLIN67_2
BLIN64
BLIN2_I
BLIN63_T
BLIN60_1
BLIN60_2
BLIN70_4
BLIN70_3
BLIN70_2
BLIN70_1
BONEVIL1
BONEVIL2
BUGIN2
BUGIN3
BUGIN1A
BUGIN1B
BUGIN1C
CARGOIN
CANON_2

Anyone see anything in common for the files that have info in Section 7?

Title: Bingo!
Post by: ficedula on 2001-07-04 19:30:00
 
Quote
Why is it that you always make
0000 four bytes and not 00000000 4 bytes?
Common mistake?

Yes  :wink: I often miscount things like that when I'm not spending much time checking what I wrote.

Title: Bingo!
Post by: The SaiNt on 2001-07-05 13:10:00
Here's an update.

Most of the field files have a Section 2 of size 42 bytes. However, I have found out that certain files have different sizes.

The second thing is the confirmation of the function of section 2. It has been confirmed that Section 2 contains the Camera positioning information. It controls the angle and the distance of the camera. I'm guessing that this section stores camera positional information on a per object basis since there are certain field files with larger Section 2's

*EDIT*
Information mapped on Section 7

The first 4 bytes of Section 4 is the Length Indicator.

After that,

The first byte disables / enables random battles.
00 = Disable
01 = Enable

The 2nd byte sets the encounter rate
01 = High
FF = Low

The 3rd & 4th byte determine the enemy & background for the 1st possible enemy.
If you give a non available value, a debug battle will load.
It doesn't seem like the background is attached to the enemy.
But this two bytes do not work independantly.
Maybe it requires adding of the values of both background & enemy.

The 5th & 6th byte determine the enemy & background for the 2nd possible enemy.

After that, I assume that the list will follow the same accordance for enemy 3, enemy4, etc

There are a few odd values near the end of this section.
I'm guessing they set the probability of the enemy being chosen.

[This message has been edited by The SaiNt (edited July 05, 2001).]

Title: Bingo!
Post by: Skillster/RedSarg99 on 2001-07-06 02:18:00
well all i have to say is....
WOWOWOWOWOWOWOWOOWOWOWOW   :D   :D  :D  :D
u know ive been waitin for this discovery for ages   :)
now all i have to do is fix my shitty aTi drivers 2nite, and 2moro is my day off so im gonna crack on with testin this theory.
i pray that its correct   :P

=======
refresh my memory, where do i find sections 4&7 inthe decompressed feild file

[This message has been edited by The Skillster (edited July 05, 2001).]

Title: Bingo!
Post by: ficedula on 2001-07-06 03:02:00
...that's what my field file format doc is for...
Title: Bingo!
Post by: Skillster/RedSarg99 on 2001-07-06 03:49:00
no luck in there too
the closest thing was
0009 num..
???? section1
???? section2
.. ...
not much help actually
The Saint: where in the ff7 memory might these feild files be loaded into?
Title: Bingo!
Post by: The SaiNt on 2001-07-06 06:39:00
Skillster : No idea. If I knew, I could easily point out the problems in Cosmo's background viewing code, provided FF7 has already decompressed it in memory.

Fice: Hmm, Skillster doesn't understand. Maybe your doc was not clear enough? Anyway, fice, could you add this to Cosmo then Skillster won't have to understand it to use it  :)

Title: Bingo!
Post by: ficedula on 2001-07-06 14:10:00
Tell you what: you fully decode the enemy section, and I'll do that  :wink:
Title: Bingo!
Post by: halkun on 2001-07-06 20:10:00
Hey guys, I have just found the *clooest* PSX emu plugin that allows me to view the video memory, so I can see what get banked into where and when something loads. It also can  wireframe all objects and I have made some rather intrestisting dicoveries.

1) Ok, opening scene, even before the movie starts, all the field textures are loaded, What's really cool is the eyes for the field models are loaded into thier own little section and blink automaticly while the movie is playing. (It's a random mutitasking fucnction) I slaf found out that there are *4* field layers, From front to back it's blue, pink, purple, and white. Also when a battle loads, the scene texture data overwrites the field textures and the level is loaded, but whale the camera pans about the level, the models are *not* loaded yet. They are cached. The textures are banked in and the models appear, but *THEY ARE NOT THE CORRECT COLOR* They white and trasperent. The textures are loaded and then immiadely the white transparent models appear and darken to thier correct colors. The enemys do pretty much the same thing. Oh and when a spell goes off, during the "warm up" sequence before the spell is fired, the spell texture is loaded into video memory and cached there until another spell is used. Then that overwrites whatever was there. At battle end the field texture data  overwrites the mess left befind by the battle and the game continues.

Title: Bingo!
Post by: ficedula on 2001-07-06 21:49:00
Interesting ... but remember stuff isn't always done the same on the PC. For a start, I'm only aware of 2 layers of background in the field files ... maybe each layer is split into 2 parts, or maybe not; anything learnt from the PSX version *may* apply to the PC version, but not automatically.
Title: Bingo!
Post by: Skillster/RedSarg99 on 2001-07-06 22:51:00
any progress on decodin the enemy info?
fice:
all i wanted to know is how to identify the start of the section 7 in the field file OR the hex location in a hex editor (ie: ultra edit) so i can try and tune/edit the enemy values.
thanks
Title: Bingo!
Post by: ficedula on 2001-07-06 23:34:00
Field files: Skip the first 6 bytes.

Then there's a 4-byte integer listing the offset for each section.

Ie. bytes 6-9, section 0 offset
bytes 10-13, section 1 offset
etc.

Title: Bingo!
Post by: Skillster/RedSarg99 on 2001-07-07 01:29:00
u mean like a table of contents? or an index?
Title: Bingo!
Post by: ficedula on 2001-07-07 02:20:00
Yep.
Title: Bingo!
Post by: Skillster/RedSarg99 on 2001-07-07 02:54:00
dammit
im lookin at field file gonjun2
decompressed (gast)
and well the section 7 has an offset of 8100
and im struggling to find the right one :O
i mean, i dont think im searching the files properly, can any1 help?
Title: Bingo!
Post by: Clone5 on 2001-07-07 05:05:00
I'm having the same problem as Skillster.  No matter how I look at the numbers or put the together or take them apart, I never get addresses that make any sense what so ever.
Why don't you show us an example. Here is anfrst_1.DEC to 0x2F:

 

Quote
00 00 09 00 00 00 2A 00 00 00 07 5F 00 00 31 5F
00 00 F8 63 00 00 08 80 00 00 58 A1 00 00 22 E1
00 00 56 E1 00 00 3E E4 00 00 D9 5E 00 00 02 05

Seeing what they are will definitely help next time.


EDIT: Thought HTML was on

[This message has been edited by Clone5 (edited July 07, 2001).]

Title: Bingo!
Post by: Skillster/RedSarg99 on 2001-07-07 10:58:00
hold on thats the offset table.
i can tell u that u ignore the 1st 3 bytes:
000009
then the next 2 r offset for section 1, next 2 are for section 2 etc
buuuuut
in my case im lookin for a 8100 as an offset for section 7...
Title: Bingo!
Post by: Clone5 on 2001-07-07 11:24:00
I've just realized that I've misread Fice's field-format document.  For some reason I thought that the... No wonder I wasn't finding anything.  Oops. My mistake.
Title: Bingo!
Post by: The SaiNt on 2001-07-07 12:04:00
Let me put this in a clearer form.

Let me take the example of my favourite file     :)

MD1_1

Remember to decompress the file first.

Next you have to understand my shortform system.

S   Start of file
NS   Number of sections
S1   Section 1 offset
S2   Section 2 offset
S3   Section 3 offset
S4   Section 4 offset
S5   Section 5 offset
S6   Section 6 offset
S7   Section 7 offset
S8   Section 8 offset
S9   Section 9 offset

Now, look at the starting section of the file I've given below.

code:

S---+ NS--------+ S1--------+ S2--------+ S3--------+ S4--------+ S5--------+ S6--------+ S7--------+ S8--------+ S9--------+ Section 1 Starts here
00 00 09 00 00 00 2A 00 00 00 A1 2E 00 00 F1 2E 00 00 17 32 00 00 27 50 00 00 E7 5B 00 00 07 94 00 00 3B 94 00 00 23 97 00 00 73 2E 00 00 02 05 .. .. .. etc
[/quote]

Ok, so it looks clear now right?

But that's not all!

You have to remember that the PC reads stuff the opposite way around.
Now look at the section I labelled S1.
The value is 2A 00 00 00.
Since the PC reads stuff the opposite way around, the value should actually be read as 00 00 00 2A.
The second thing to remember that this is a hex number so when you use the "GOTO" command in your hex editor,
So, remember to select hex and not decimal.
If you goto offset 2A, you will arrive at the section I've labelled "Section 1 starts here"
Not use the same method to get to section 7, ok?

Fice has explained this before but I'm sure most of you didn't pay attention of were not around then.


Ok, back to my documentation of Section 7.

The first 4 bytes of Section 4 is the Length Indicator. So far the size of Section seems to be a constant size of 48 bytes.
In fact, I don't even have to look at the other files to tell you that there shouldn't be a different size of it since there is no indicator at all to tell where the offset for "low probabilty "(see below) is.

After that,

The first byte disables / enables random battles.
00 = Disable
01 = Enable

The 2nd byte sets the encounter rate
01 = High
FF = Low

Values in between 01 and FF also work, the values were only given as an example.

The 3rd & 4th byte determine the enemy & background for the 1st possible enemy.
If you give a non available value, a debug battle will load, so you don't have to be afraid of testing values here.

The 5th & 6th byte determine the enemy & background for the 2nd possible enemy.

After that, I the list will follow the same accordance for enemy 3, enemy4, etc till the end of the section.

FF7 randomly chooses an enemy and sort of cycles through the list of enemies listed in no particular order.

Values that appear from offset $E onwards, have a very low probablity of occuring. It seems to be less than half. So far, all values that appear here seem to be for back attacks and attack from both sides.

Enemies facing backwards are defined as different numbers.

That means meeting an MP and meeting an MP with back attack uses different values.

If you specify the enemy twice in the list, you increase the probability of that enemy appearing.

The game reads the list in order.
If you have no value for enemy1, but a value for enemy2, when you encounter enemy1, a debug battle will appear.
This means that if you wish to have 4 enemies, you will have to define it in enemy1, enemy2, enemy3 & enemy4
If you define it as blank, enemy2, enemy3, enemy4, enemy1, the game will assume you have 5 different enemies.
And should it load blank, you will get a debug battle.
So in general, you shouldn't leave spaces in-between.
However, you can leave empty spaces from the last enemy to offset $E since offset $E defines the "low probability" battles.

So, you can have:-

code:

Length----+ BE RB E1--+ E2--+ E3--+ E4--+ E5--+ E6--+ LPE1- LPE2- LPE3- LPE4-
30 00 00 00 01 80 2D 61 2E 59 2F 49 00 00 00 00 00 00 30 11 30 11 00 00 00 00
[/quote]


BE Battle Enable
RB Encounter Rate
E1 Enemy 1,etc
LPE1 Low probability enemy1,etc

Here are examples of some values.

2F 49   MP + Dog with Mako Reactor Background
2E 59   Dog with Mako Reactor Background
2D 61   2MP's with Mako Reactor Background
30 11   Dog facing your back with Mako Reactor Background

Unfortunately, it is impossible for me to list all the of the numbers for the enemies since it will involve me modifying each field file to only load one type of enemy.
Thus, it is even more impossible for me to give you an algorithm of how to calculate the enemy types and the backgrounds unless someone can provide me with a list of the values.
I know for sure that there must be an algorithm to find the make enemies appear in different backgrounds since I managed to make Shinra Soldiers that appear in the Shinra Building to appear on the background where Sephiroth fights the dragon (raining).
In fact, Ive even gotten the debug triangles to appear in the train graveyard. This however does make one thing clear, if you put values that are really small, you are very likely to get the debug triangles. If you get a single triangle, that is counted as an encount error and it means there errors in the numbers you have provided. If you manage to get more than one triangle appear with no background, that is not considered a debug error since you get a background. Maybe that's the only way to find out what values appear for which backgrounds.

So, fice is this enough to get you to put this "feature" into Cosmo?

Currently, I'm forced to compile the whole field everytime I make a single change to any field file and this is a lot of hassle since I have to decompress and recompress the field files everytime I do this.
I could continue to do it this way, but you guys will have to wait a long time to get a full listing of the values.

I'm in a rush now and I'm trying to complete my research paper which I have to hand up by Friday so I'm running low on time. So, I doubt I'll be working on the field files for a while so if any one wants to go ahead and help me finish it go ahead, ok? If you guys would rather wait for me, I'm fine with that too. Actually, the next section I was gonna look for was for the shop info. I was sort of thinking of identifying all the easier stuff first so I will be able to find out which section the scripts are held in.

I'll still answer any questions about this section though.

Sorry bout stretching the table again, but this is the only way I can think of formatting it cause HTML is off.

[This message has been edited by The SaiNt (edited July 07, 2001).]

Title: Bingo!
Post by: ficedula on 2001-07-07 17:48:00
Possibly ... I'll do a bit of work on it myself.

Incidentally, all of you DO know you can modify the levels while FF7 is running and have it recognise the changes? That's what I do, I just realised some people might not have been aware you can do that...

Title: Bingo!
Post by: ficedula on 2001-07-07 20:45:00
An observation: The values aren't absolute. In other words, a particular value might give you Shinra MP/Midgar road in one place but not in another.

Specifically, I was looking at the two train graveyard levels and the sewers before them. I copied the sewer encounter section into the train graveyards. In graveyard one I got Shinra soldiers. In graveyard 2, I got the same encounters as from the sewers!

So I guess each level has a particular 'environment'. This determines which set of encounters and backgrounds it uses. Between levels with the same environment, swapping encounter values gives you exactly the same encounters. Otherwise, it doesn't. No, I don't know where the 'environment' is defined.

Title: Bingo!
Post by: The SaiNt on 2001-07-07 21:20:00
I've gotten conditions like that too but most of the time it's caused by copying and pasting the whole section. Usually, if you clear all the battle values in the section (make all of them 00), and add the values one by one, they should be the same. If each level file had it's own set of enviroments, that would go against the idea of being able to have a forest background, Midgar road, raining background, shinra building, train graveyard in the same field file. I don't remember the exact values, but I managed to get all these different battles working within the same field file.

If what you say about the values not being absolute is true, it would mean that somewhere within the field file, there should indeed be an "enviroment" section. But that doesn't make much sense either, since if there was an enviroment, I would only define only one or two backgrounds per field file. The only reason I can think of for there being different "enviroments", is to divide them into "pool1", "pool2" ,"pool3" etc. This way graveyard 1 will have access to "pool1", and most field files within this area will use "pool1" as well, to help cache and reduce memory usage. When another field requires access to "pool2" of the enemies, it will overwrite "pool1", and most of the field files near it will use the same pool as well. Get the general idea?

You guys probably might have some other opinions, but I think this is where we need some people to help out thinking of the structure of the field file before we can go any further.

Title: Bingo!
Post by: halkun on 2001-07-07 23:48:00
MID1_1 is the first field file right? I'll get to work.
Title: Bingo!
Post by: Skillster/RedSarg99 on 2001-07-08 00:22:00
wow i got it!!!
im finally learning  :P
trust me to have a REAL go at finding the enemy numbers  :)
Title: Bingo!
Post by: Skillster/RedSarg99 on 2001-07-08 00:43:00
hmm
check this out
on a shop level in gongaga
2481 in the enemy 1 section gives u a fight with a BIG GREEN dragon (aka the 1st sephiroth fight in the flashback) plus the background matches with rain AND the camera panning). heh, with my level i got wiped out  :)
Title: Bingo!
Post by: Skillster/RedSarg99 on 2001-07-09 03:10:00
im gonna look into the memory mappin of that section
asuumin ff7 maps the whole or part of the section into memory and then reads from it.
thus we can change enemy fights "on the fly"  :D enabling documention of the enemy+background codes...
damn, magic trainor creator dont work in win2000
Title: Bingo!
Post by: ficedula on 2001-07-09 03:15:00
You can already edit stuff on the fly in a hex editor ... or at least I can. That's why I specifically mentioned it earlier on, in case somebody didn't know how to. Does this mean, somebody doesn't know how to?  :D
Title: Bingo!
Post by: Skillster/RedSarg99 on 2001-07-09 16:14:00
yea i figured it was possible
buuuuut
the section is uploaded in to the memory, but it also CHANGES location if u exit that scene then reenter it (ie to refresh the data- as it gets reloaded from the cache).
sooo
i basically copy/pasted the section 7 values in to a memory search tool and viola.
i can edit the values (as long as im in the same scene) and the corresponding fight occurrs. buuuuut unless u FILL all the enemy sections u WILL get loads of debug fights too.

so, basically thats my findings for today. found out 3 other enemy values. ill guess that the enemy squad+background ARE linked.
you all know this allready but hey, i wasnt too involved b4 so now im catchin up  :wink:

Title: Bingo!
Post by: The SaiNt on 2001-07-09 07:54:00
Hmmm...
Skillster, are the offsets for stuff kept in section 7 constant? If they are, then I can get to work this weekend decoding more of the field file format since this speeds up editing a whole lot compared to editing the files themselves.
Title: Bingo!
Post by: Skillster/RedSarg99 on 2001-07-09 13:11:00
ok wot ive seen is
from the 3-4 feild scenes ive looked at
(md1_1, gonjun2, gunwa2)
the offset section at the start defines the correct section 7 offset.
thus section 7 is loaded into a random part of the feild cache memory in ff7 (just a name for the area it loades feild files into) then it is read from. right. the section 7 values ARE IDENTICAL to those present in the feild file. thus the pc basically decodes and uploads it all in one go. so just search for those first 15 values of section 7 (3000000001ff...) and ull find the memory location. then u can edit it  :)
but sometimes when u RE-ENTER the scene, the data is loaded into another part of the cache memory.
Title: Bingo!
Post by: ficedula on 2001-07-09 15:35:00
I've been doing it using a hex-editor ... go into FF7, enter the location ... leave it and ALT-TAB into my hex editor; edit the file, and update the LGP using FFLZS/FFLGP; ALT-TAB back into FF7 and enter the location again, the changes will be recognised if you've done it correctly.
Title: Bingo!
Post by: The SaiNt on 2001-07-09 17:35:00
Ok, Skillster, if the offset is not constant, I know for sure at least one offset must be constant. The pointer to that address.

Since I might not get the time to do it, I need you to help me do this. Use some kind of memory viewer, (the debug mode of VC++ works fine of even memoryhacker) and browse the values above and below the section 7 defined in memory. See if it matches the order in the field file. If it does, go look for the offset that points to the offset of the beginning of section 7.

However, if the bottom and top sections do not match the field file format you're gonna have to do it the hard way and search for values in memory that equal the offset.
For example, if the beginning offset for section 7 is 00DAF010, you must look for a value in memory that has the a hex value of 00DAF010. If you can identify that offset of the pointer, you won't have to do searches in future.

BTW, fice, it's a whole lot easier modifying memory values than having to use FFLZS everytime. I used a method nearly exactly to yours to test for the existance of section 4 and 7 and boy did it waste a lot of time. Especially, when all I needed was to change one value because I forgot to.

Title: Bingo!
Post by: ficedula on 2001-07-09 18:51:00
Not really. Change one value? ALT-TAB to hex editor, change it and save (Ctrl-S), then recompress it (2 keystrokes, I've set up a shortcut). It's not really that slow!
Title: Bingo!
Post by: Skillster/RedSarg99 on 2001-07-10 03:59:00
ok saint:
confirmation that the WHOLE feild file from the start to the end of section 7 and beyond IS uploaded to memory starting from address:
4FC605C
thats not a fixed pointer thou, but yes the whole feild file is THERE.
what i really want to know is if thats the data the game uses or is that just a temporary storage for the decompressed field files which might get sent elsewhere for use...
========
fice:
i alt tab out to my memory wacther, edit a value then alt tab back in, that REALLY isnt slow  :P
-----

[This message has been edited by The Skillster (edited July 10, 2001).]

Title: Bingo!
Post by: The SaiNt on 2001-07-13 21:12:00
Ok, I've got the address of the pointer
Field File Ptr 00CF0C44

For those of you that don't know how to use the pointer here goes.
The field file ptr is at 00CF0C44.
Now use a game utility like gamehack or anything else and key in the address 00CF0C44.
Now, make sure gamehack reads it as 4 bytes.

Now, the value that appears at this address is the address for the beginning of the field file in memory.

This explanation of mine isn't turning out too well. Tell me if you guys still don't understand. I'll try to think of another way to state this.  :)

Title: Bingo!
Post by: Skillster/RedSarg99 on 2001-07-13 23:33:00
i get u , lets see how to say it.
that numba up there is the "address" of the "page number" for section 6, ok?
u tell a memory editor/game hack thingy to add the "address" to its list or search for the "page number" then using the number in there u just move down that many bytesto find the "location" for section 6 info.

remember how a PC reads data , ok? backwards, one byte at a time.
---------
i was completley wrong  :)
i see now.
the pointer points the the memory address where the field file IS STORED
no wonder.
so it always changed location for u too>?

[This message has been edited by The Skillster (edited July 13, 2001).]

Title: Bingo!
Post by: The SaiNt on 2001-07-14 23:25:00
Ok guys, I've found out what section 8 does too   :)

Section 8 defines the "exits" in the field file. I haven't mapped out it's structure yet though. Await news from as soon as I find more free time.

[This message has been edited by The SaiNt (edited July 14, 2001).]

Title: Bingo!
Post by: Skillster/RedSarg99 on 2001-07-15 02:52:00
ok i await with eagerness