Author Topic: FF7 PC possible program?  (Read 6496 times)

kela51

  • *
  • Posts: 167
    • View Profile
    • http://www.youtube.com/user/killakela51
FF7 PC possible program?
« on: 2017-04-01 12:41:03 »
Hi guys! I would like to know if it's possible for you to create a program to get names files for all magics models and textures when i'm playing in real time? I don't know if you understand what i mean.. because in magic files, lots of .p files can be replaced but i don't really know what these files corresponds. Thx in advance guys!

nfitc1

  • *
  • Posts: 3010
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: FF7 PC possible program?
« Reply #1 on: 2017-04-01 22:03:47 »
I'd love something like this too. Aali's driver could theoretically do this, but since we don't have the source we might be able to wrap it somehow. I've been toying with this idea for years and can't make a good solution.

kela51

  • *
  • Posts: 167
    • View Profile
    • http://www.youtube.com/user/killakela51
Re: FF7 PC possible program?
« Reply #2 on: 2017-04-02 07:30:27 »
Ok so not possible for now

sithlord48

  • *
  • Posts: 1640
  • Dark Lord of the Savegame
    • View Profile
    • Blackchocobo
Re: FF7 PC possible program?
« Reply #3 on: 2017-04-02 13:16:37 »
You can look the models up in the file reconstruction project . As for the textures i seam to remember there being an option in aalis driver for this. It was only ever known to Team Avalanche members the option is save_textures = on but BECAREFUL it will write them to your mod_path so be sure to set that to a new folder.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: FF7 PC possible program?
« Reply #4 on: 2017-04-02 14:41:57 »
I'll have a look at this also.  But I know sod all about models and what not. I can at least look....

nfitc1

  • *
  • Posts: 3010
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: FF7 PC possible program?
« Reply #5 on: 2017-04-02 16:45:40 »
@sithlord48:
The biggest problem is the file names are duplicated a lot. There are probably 6 files like 01.tex or similar. Every time I go into the code with the purpose of figuring these files out I am always astounded that it works at all. Most of the code references poly files or rsd files that somehow get the correct texture/model. It makes more sense on the PSX because all the files to one action are archived together. Some "genius" at Eidos decided to make one master archive (magic.lgp) and save no directory structure in it. While that does make it harder to mod directly, it also makes it a pain to separate these files manually.

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Re: FF7 PC possible program?
« Reply #6 on: 2017-04-02 23:45:06 »
I thought there was a directory tree in magic.lgp hmm..

Kaldarasha

  • *
  • Posts: 2449
  • Prince of Model Editing
    • View Profile
Re: FF7 PC possible program?
« Reply #7 on: 2017-04-03 06:00:00 »
Sort of. For example summons models are in the main folder while there effects are in the supfolders. Though,summons are easy to spot (mostly), but there are other effects in the main folder which you can't tell how they are connected and if they even use the supfolders.

nfitc1

  • *
  • Posts: 3010
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: FF7 PC possible program?
« Reply #8 on: 2017-04-03 14:27:29 »
I thought there was a directory tree in magic.lgp hmm..
Hey, halkun. It's been a while.

There is a listing of folders, but within the internal structure of the magic.lgp there is no link between the files and folders. I've analyzed the archive several times in the past and there just isn't any indication of what belongs with what. The only thing that binds them together is in the exe. The game just knows which file to look for (I think based on the file's position, not offset, in the archive). The folders might be completely ignored too. This is VERY poor programming (as most video games are), but at the time those conventions had not been well established.

Aali

  • *
  • Posts: 1196
    • View Profile
Re: FF7 PC possible program?
« Reply #9 on: 2017-04-03 15:55:36 »
Actually the game keeps track of which "directory" it is in and uses this to find the files, name + directory goes into the LGP parser but the directory is only used if there is a conflict. However, with FF7PC being a fairly shoddy port this system is not used in any sort of consistent way. The battle module has its own encoder/decoder for converting PSX filenames into the cryptic 4-letter sequences from the PC version but I guess they couldn't be bothered with that for the magic effects so they were left as-is. At the same time, some modules use the mangled PC names straight up, completely doing away with the PSX names. In short, it is definitely possible to sort out the magic effects into separate directories but it will probably need a bunch of manual work to sort out the odd file where the directory happens to be incorrect.

Either way, the crucial piece of metadata that ties these files together is hardcoded in the .exe, magic effects (which are hardcoded) explicitly load their own models and textures as they execute.