Author Topic: (PSX FF7) Information on world map models?  (Read 10800 times)

Lazy Bastard

  • *
  • Posts: 290
  • I may be lazy, but I can...zzzZZZzzzZZZzzz...
    • View Profile
    • GameHacking.org
(PSX FF7) Information on world map models?
« on: 2012-08-29 21:25:08 »
I've scoured the forums and the wiki, but I see only hints and whispers concerning world map models, and most of even these are related to the PC version rather than the PSX one. Does anyone have any information that might point me in the right direction in isolating world map model data?

As an end result, I'd like to modify models, replace one with another, migrate individual parts between models, and create new parts entirely. Any information would be much appreciated.

Jenova's Witness

  • Right Wing Safety Squads
  • *
  • Posts: 471
  • I ♥ SCIENCE
    • View Profile
.
« Reply #1 on: 2012-08-29 22:45:12 »
.
« Last Edit: 2015-11-16 09:56:31 by Jenova's Witness »

Lazy Bastard

  • *
  • Posts: 290
  • I may be lazy, but I can...zzzZZZzzzZZZzzz...
    • View Profile
    • GameHacking.org
Re: (PSX FF7) Information on world map models?
« Reply #2 on: 2012-08-30 00:57:19 »
This is getting awesome.  I may bring my dream of a Chocobo Sage prequel to life!

I could fairly easily create a Chocobo Sage globally-playable field model, but the battle model would be the tricky part. Migrating model data from his field model to an existing playable character battle model might be feasible, with a little creativity. As for world map models, only time will tell...

Once I'm able to do that, I could create you a full set, if you like.

Lazy Bastard

  • *
  • Posts: 290
  • I may be lazy, but I can...zzzZZZzzzZZZzzz...
    • View Profile
    • GameHacking.org
Re: (PSX FF7) Information on world map models?
« Reply #3 on: 2012-08-30 03:54:21 »
Thanks to Cyberman pointing out that I should probably check out WORLD/*.BSZ files given that the other major file types have been looked into, I've identified that they're LZS-compressed, and that at 0x8 there's an offset to something (which may be a relative offset, as in 0x8 + offset, based on a look at data structure). I'm too tired to look into it in any detail tonight, but I'll post updates as I have them.

Of course, if anyone else has any information, please do chime in.

xLostWingx

  • *
  • Posts: 801
  • No Comment
    • View Profile
    • FFVII Lost Wing Mod/Hacks
Re: (PSX FF7) Information on world map models?
« Reply #4 on: 2012-08-30 04:07:19 »
I honestly don't know if it will help at all, but on the slight chance that it may help a small bit, GarlandTheGreat's "The Most Epic VII Glitch Ever" videos on youtube involve swapping out world map models...

http://www.youtube.com/watch?v=m7WXok7vKCw&feature=watch_response_rev

Maybe there's a chance that speaking with him could provide some tidbit of useful information?  If so, awesome.  If not, sorry.

Lazy Bastard

  • *
  • Posts: 290
  • I may be lazy, but I can...zzzZZZzzzZZZzzz...
    • View Profile
    • GameHacking.org
Re: (PSX FF7) Information on world map models?
« Reply #5 on: 2012-08-30 04:17:06 »
Yep, Rainsphere hacked the world map model mod GameShark code back in 2000 or so. I do have a list of values, which should help in my general search.

Nonetheless, thanks for tossing ideas out there.

Jenova's Witness

  • Right Wing Safety Squads
  • *
  • Posts: 471
  • I ♥ SCIENCE
    • View Profile
.
« Reply #6 on: 2012-08-30 20:10:18 »
.
« Last Edit: 2015-11-16 09:56:06 by Jenova's Witness »

Lazy Bastard

  • *
  • Posts: 290
  • I may be lazy, but I can...zzzZZZzzzZZZzzz...
    • View Profile
    • GameHacking.org
Re: (PSX FF7) Information on world map models?
« Reply #7 on: 2012-08-30 20:13:27 »
I assumed you'd use existing fields and other models, and simply tell a tale of the Chocobo Sage and his travels, keeping him mostly solitary in a quest to accomplish a few key goals, gather a few treasured items, etc.

Lazy Bastard

  • *
  • Posts: 290
  • I may be lazy, but I can...zzzZZZzzzZZZzzz...
    • View Profile
    • GameHacking.org
Re: (PSX FF7) Information on world map models?
« Reply #8 on: 2012-08-30 20:47:25 »
Also, according to the wiki:

Quote

    WM0 is the above water map.
    WM2 is the underwater (submarine) map.
    WM3 is the snowstorm map.


Does anyone know what map WM1 is?

Jenova's Witness

  • Right Wing Safety Squads
  • *
  • Posts: 471
  • I ♥ SCIENCE
    • View Profile
.
« Reply #9 on: 2012-08-30 22:53:26 »
.
« Last Edit: 2015-11-16 09:55:51 by Jenova's Witness »

Lazy Bastard

  • *
  • Posts: 290
  • I may be lazy, but I can...zzzZZZzzzZZZzzz...
    • View Profile
    • GameHacking.org
Re: (PSX FF7) Information on world map models?
« Reply #10 on: 2012-08-31 15:49:15 »
Sounds like a good idea. Maybe you should reconsider, when you have a bit more time.


Quote
I don't know, but remember that there are two overworld maps.  The second one appears after the WEAPONS are released.  One of the WEAPONS crashes into the forest south of Midgar, and annihilates it.

Ah, good point...it's probably the second world map.

Lazy Bastard

  • *
  • Posts: 290
  • I may be lazy, but I can...zzzZZZzzzZZZzzz...
    • View Profile
    • GameHacking.org
Re: (PSX FF7) Information on world map models?
« Reply #11 on: 2012-08-31 15:51:50 »
Having admittedly not had much time to look into it yet, my notes are currently:


Using WM0.BSZ (normal, non-underwater world map):


The first eight bytes of each (LZS) decompressed BSZ is always the same [at offset 0x00000000]:


Code: [Select]
02 00 00 00 08 00 00 00




Next, there's a 4-byte offset to something (I believe this offset is relative, as in 0x8 +

offset) [at offset 0x00000008]:


Code: [Select]
5C 47 00 00




Next, there's a 4-byte 80-type offset (to something in memory) [at offset 0x00000010]:


Code: [Select]
18 A6 14 80




Next, there's a 4-byte offset (I believe this offset is relative as well), the value of which is always 0x4 less than the value of the offset at 0x00000008. In this case [at offset 0x00000014]:


Code: [Select]
54 47 00 00





Next, there are 4 bytes of Unknown, which is 0x0F16FF01 in every case except the WM1 map, in which case it's 0x1119FF01 [at offset 0x00000018]:


Code: [Select]
01 FF 16 0F





...followed by another 4 bytes of Unknown, which is 0x0000000A in every case except the WM1 map, in which case it's 0x0000000B [at offset 0x0000001C]:

Code: [Select]
0A 00 00 00




Then 16 bytes of Unknown, which is always the same [at offset 0x00000020]:


Code: [Select]
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02





Then 4 bytes of Unknown, which is 0x02380058 in every case except the WM1 map, in which case it's 0x02840064 [at offset 0x00000030]:


Code: [Select]
58 00 84 02






Then a 4-byte 80-type offset, which is 0x8014A63C in every case except the snowstorm map, in which case it's 0x8016D1A4 [at offset 0x00000034]:


Code: [Select]
3C A6 14 80





Then there are 4 bytes of unknown, always 0x00000000 [at offset 0x00000038]:


Code: [Select]
00 00 00 00






Note: After this, WM3 (snowstorm map) diverges significantly from the pattern of the rest of the world map model files, although later it seems to return to the norm. For now, I'll leave out mention of WM3/snowstorm after this point.







There are then 8 bytes of Unknown; this value is always the same [at offset 0x0000003C]:


Code: [Select]
00 00 FF 00 00 00 00 01






In save state, the 'file' starts at 153625 (?) and ends at 1583DC. Perhaps it starts earlier, but has some header info, etc...



Hmm, according to tales-cless.org's 'The PSX Doc', "RAM begins in an (uncompressed) ePSXe savestate at offset 1BA."



Interesting: Even if I enable a cheat code, and save a state, if I look up the value at the location it should be at (even taking into account the 0x1BA shift), it isn't.




Rainsphere’s code:

 

___________________________________


Main Character Graphic Modifier
   

8010A5A4 ????
   

"This code will change the main character on the world map into the selected items. All of these codes, unless otherwise specified, work on the 3rd Disc...testing into the others discs will be done."

0204 = White Chocobo
0200 = Cloud
0201 = Tifa
0202 = Cid
030A = Diamond Weapon (1st Disc only)
020D = Highwind
0307 = Propeller
030F = Phoenix


________________________________________



This turns out to be at the following address in the savestate (tested and verified):

Code: [Select]
1135C9



...the difference between the code and the savestate address being 0x9025.




15902D - Cloud super shiny pelvis thing. Strangely, only the first two addresses seem to be found here (even when I change all values and continue to match them in the same place)...although it could be that subsequent addresses are resisting value change or something.

Still, nothing in this area seems to exist in WM0.BSZ. Using the same difference that was successful in the graphic mod above didn't yield anything either.
« Last Edit: 2012-08-31 19:23:38 by Lazy Bastard »

Lazy Bastard

  • *
  • Posts: 290
  • I may be lazy, but I can...zzzZZZzzzZZZzzz...
    • View Profile
    • GameHacking.org
Re: (PSX FF7) Information on world map models?
« Reply #12 on: 2012-08-31 22:58:57 »
Looks like BSZ files are indeed world map model files.

Swapping WM1.BSZ in place of WM0.BSZ (properly renamed and at the correct LBA, of course) changed me to Tifa.

Swapping WM2.BSZ in place of WM0.BSZ resulted in my character being changed from Cloud to Cid. Strange, considering that's supposed to be the underwater model file.

WM3.BSZ is 101.14 KB, as opposed to the others, which are all 12.x KB. I'd have to remove all the others, plus WM0.MAP (which would crash the game, I assume) in order to swap it in place of WM0.BSZ. My assumption is that this contains all other models besides Cloud, Tifa, and Cid. I'd love to find where these files are referenced by LBA, so I could find a way to store WM0.BSZ (which would actually be a renamed WM3.BSZ) somewhere else, and point to it there...although if my guess is correct, it might crash...if it didn't go with the 1st model available, that is.

Also, WM1.MAP is only 2 bytes in size...so it must be a dummy of sorts. Same with WM1.BOT.


Edit: I also tried replacing WM0.MAP and WM0.BOT with the WM2 set (again, supposedly the underwater map) and this changed nothing. Are we sure these are underwater files?
« Last Edit: 2012-08-31 23:12:07 by Lazy Bastard »

Aali

  • *
  • Posts: 1196
    • View Profile
Re: (PSX FF7) Information on world map models?
« Reply #13 on: 2012-09-01 09:22:12 »
In the PC version WM0, WM2 and WM3 are indeed overworld, underwater and snowfield respectively while WM1 simply does not exist. Would be very strange if they changed it from the PSX version.
« Last Edit: 2012-09-02 00:03:14 by Aali »

syntax error

  • *
  • Posts: 147
    • View Profile
Re: (PSX FF7) Information on world map models?
« Reply #14 on: 2012-09-01 20:42:20 »
WM1 could be from the development and they didnt delete it because code referenced it,so they shortened it to one CD sector.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: (PSX FF7) Information on world map models?
« Reply #15 on: 2012-09-01 20:53:07 »
WM1 was outer space.  8)  ;D

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Re: (PSX FF7) Information on world map models?
« Reply #16 on: 2012-09-01 23:52:32 »
I'm going to guess that WM1 was probably a copy of the post comet overworld map before they realized they could just swap out cells at particular plot points.

Aali

  • *
  • Posts: 1196
    • View Profile
Re: (PSX FF7) Information on world map models?
« Reply #17 on: 2012-09-02 00:09:30 »
I'm going to guess that WM1 was probably a copy of the post comet overworld map before they realized they could just swap out cells at particular plot points.

Makes sense, doubly so considering that this "feature" is only used post-comet; that could very well be explained by the fact that that code just didn't exist while they were working on disc1.

All speculation of course, and in the end, it doesn't really matter :)

Lazy Bastard

  • *
  • Posts: 290
  • I may be lazy, but I can...zzzZZZzzzZZZzzz...
    • View Profile
    • GameHacking.org
Re: (PSX FF7) Information on world map models?
« Reply #18 on: 2012-09-03 03:00:53 »
Strange; nothing seems to happen to the world map when I cast Comet...or, did you guys mean Meteor? ;)

Does anyone know what FIELD.TBL and WORLD.BIN are? I assume FIELD.TBL is some sort of table, although I don't see anything intelligible therein. WORLD.BIN seems to be compressed/encoded/encrypted, but it's neither GZIP nor LZS, unless I've missed something.

While on the world map, WM0.BSZ is loaded in entirety into memory, starting at 0x8014A600 (and ending at 0x8014F3B7). Some values are changed, so I assume the entire file is loaded, then modified as necessary by storyline flags, current world map conditions, etc. None of the other three WM*.BSZ files are loaded, and even if I go underwater in the submarine, only WM0.BSZ is present (and in the same place, no less). It's possible that only fragments of WM3.BSZ are being loaded as necessary (if my theory of WM3.BSZ containing all models except Cloud, Cid, and Tifa is correct), but I haven't been able to identify any unique data to strengthen this theory.

There is only one value in the entire 'file' of WM0.BSZ in memory that changes when I jump into the airship, onto a chocobo, onto the buggy, etc, and this is the 4-byte value at 0x1C (from beginning of file). This value also changes when I move rather than stand still, and if I change terrain (from grass to desert, etc). It does not change if I turn toward another direction, move to another part of the same terrain, or do anything else I've tried thus far. This leads me to believe that it's related to animations, though I'm just guessing here.

I haven't gotten around to looking for WM2.MAP and WM2.BOT while underwater, and then seeing if they exist above water, but I'll do so later.

I haven't dedicated much time to this yet, so I don't have much progress to share. If anyone else would like to tear into these files, please do. I was lucky when working with field and battle models that considerable work had already been done, but faced with a complete mystery format, the task is much more daunting. My only plan at this point is to begin modifying pieces of data and observing for effects, which is a pretty crude form of investigation.
« Last Edit: 2012-09-03 03:07:59 by Lazy Bastard »

Kranmer

  • *
  • Posts: 766
    • View Profile
Re: (PSX FF7) Information on world map models?
« Reply #19 on: 2012-09-03 08:07:36 »
Does anyone know what FIELD.TBL and WORLD.BIN are? I assume FIELD.TBL is some sort of table, although I don't see anything intelligible therein. WORLD.BIN seems to be compressed/encoded/encrypted, but it's neither GZIP nor LZS, unless I've missed something.
You missed something, WORLD.BIN is Gzip compressed, same as field.bin you just remove the first 0x8 bytes from the file then decompress (you can use 7zip to decompress or use gzip.exe but if you use gzip.exe make sure to rename world.bin to world.gz, for some reason it doesn't like the .bin extension then use the command "gzip.exe -d world.gz"). Hope this helps.

Lazy Bastard

  • *
  • Posts: 290
  • I may be lazy, but I can...zzzZZZzzzZZZzzz...
    • View Profile
    • GameHacking.org
Re: (PSX FF7) Information on world map models?
« Reply #20 on: 2012-09-03 19:37:01 »
Ack, I did forget to change the file extension for gzip.exe. Thanks.

Also, I've identified model data in WM0.BSZ. Looks like I was correct; WM0.BSZ is Cloud's world map model, WM1.BSZ is Tifa's, WM2.BSZ is Cid's, and (I assume) WM3.BSZ is everything else's (similar to a BSX file in fields).

I'll post more details later; I'm currently mapping it out.

Lazy Bastard

  • *
  • Posts: 290
  • I may be lazy, but I can...zzzZZZzzzZZZzzz...
    • View Profile
    • GameHacking.org
Re: (PSX FF7) Information on world map models?
« Reply #21 on: 2012-09-03 23:52:16 »
OK, I've mapped the entire file out (with the exception of a few bytes of 'Unknown' data). I'll make a thread for the breakdown, as usual.