Author Topic: [FF7PC] Mod manager - 7thHeaven (v1.54)  (Read 183804 times)

Iros

  • 7th Heaven Crew
  • Crazy poster
  • *
  • Posts: 229
  • Karma: 65
  • Files for the file god! Mods for the mod throne!
    • View Profile
[FF7PC] Mod manager - 7thHeaven (v1.54)
« on: 2013-07-11 18:12:17 »
LATEST VERSIONS
Iros - v1.52: https://mega.nz/#!aQdXiZYA!aJnVbQH5kWSi5sC6QMdgPmjKmhfUdsP-87R70j90ub4
ficedula - v1.54: http://www.ficedula.co.uk/7thHeaven/7H_1.54.zip

Hi all.

Long time lurker here. The idea about being able to (de)activate mods more easily appeals to me, right now I have nothing installed other than Aali's driver + FF7Music, the idea of basically reinstalling/patching every time I want to try a mod out seems awkward.

So I've written a wrapper program that will intercept reads to the LGP files by FF7, and selectively replace the data the game reads. An example might make it easy to understand...

I set up a folder containing files I want the game to use. The file structure looks like this:
Code: [Select]
C:\games\ff7\wrapped
                    |- mod1
                           |- menu_us.lgp (a folder named this - not an LGP file)
                                         |- cloud.tex
                                         |- earith.tex
                           |- char.lgp (again, a folder)
                                      |- aaba.p

When the game tries to read cloud.tex from menu_us.lgp my wrapper intercepts this, and redirects it to read from the file in my 'mod1\menu_us.lgp' folder instead. Same with the other files. The LGP files themselves remain UNALTERED - all I do to make the game use my new versions is drop them into the mod1 folder and run the game from my wrapper.

You can give the wrapper multiple file paths to check - your file structure might look like:

Code: [Select]
C:\games\ff7\wrapped
                    |- mod1
                           |- menu_us.lgp
                                         |- cloud.tex
                                         |- earith.tex
                           |- char.lgp
                                      |- aaba.p
                    |- mod2
                           |- menu_us.lgp
                                         |- cloud.tex
                                         |- earith.tex
                                         |- buster.tex

The wrapper will check the mod paths in the order they're specified in its configuration file. So in the above case, it'll use cloud.tex and earith.tex from mod1 (ignoring the versions in mod2, mod1 takes priority), but it'll use buster.tex from mod2 (since mod1 doesn't have that file) - and off course, any files not present in the mods, come from the original LGPs instead.

Especially if a number of different mods all change DIFFERENT files, this means they should co-exist quite happily - and even if two mods change the same files and don't work properly, changing which mods you run the game with is just a case of launching the wrapper again with a different set of paths :)

I understand Aali's driver can do something similar, but I think the ability to specify multiple source paths (and choose which takes priority) is a worthwhile addition?

Download link: https://mega.co.nz/#!xVohQJRY!aIyPJ0L65zXM2Da6_PXQrQvOfiIpRrek5eG_X_QPdTY

Anticipating some questions:

Q) How to use it?
A) Run the 7thWrapper.exe file. Tell it the locations of (1) your FF7 exe, (2) the 7thWrapperLib.dll, (3) the mod paths to search for files. You can edit the config file to avoid specifying these every time. You can also run it with a /LAUNCH command line option to make it run FF7 straight away then exit (could be useful for making a shortcut; or a front-end tools for easy mod selection?).

Q) Does it slow the game down?
A) Yes but maybe not much. It takes ~1 second longer to launch the game for me, and it then runs without any noticeable slowdown. HOWEVER - I haven't tried it with a mod that changes hundreds of files at once. If it does then I should be able to optimize the code, it's definitely not as fast as it could be yet. If anybody can suggest some good mods to test it with that change lots of files, perhaps I can try them and see how well it works (or you can try it and report back?).

Q) What does/doesn't it work with?
A) It SHOULD work with any file that comes from within an LGP. I've tried loading savegames, running around in the field, going into a battle, accessing menus, and that worked, so it SEEMS stable. Just not tested very much yet. It doesn't currently work to change non-LGP files; e.g. sound effects, kernel bins, or PNG files for Aali's driver. It could be made to work with these too: I just haven't done that yet, this is only a first release! It does work OK with Aali's driver, off course - you don't have to go back to running the game using the old renderer. FF7Music also works fine (that doesn't change game files anyway I think?).

I haven't yet figured out how to deal with mods that want to patch FF7.exe, that seems like it would be interesting to deal with.


Q) How to figure out if it's working?
A) It outputs debug information through OutputDebugString, so any tool (e.g. DbgView - or FF7Music?) that views that will let you see the logs of what is happening.

Q) It doesn't work!
A) Reply here and maybe we can figure it out? :) Only tested on my PC so far, so I expect there will be problems with it that I don't know about. Maybe lots of problems. It's only a first release!

(Mods: Posted this here because it seemed relevant to the thread, but split off or move it if you think this is in the wrong forum?)

Comments / suggestions for how to improve it welcome.
« Last Edit: 2016-12-21 13:48:04 by EQ2Alyza »

Vgr

  • Global moderator
  • No life
  • *
  • Posts: 2209
  • Karma: 33
  • If it quacks like a duck, it must be a duck
    • View Profile
Re: 7thWrapper
« Reply #1 on: 2013-07-11 19:28:36 »
Aali's driver does the exact same thing, but if you improve it enough it might surpass it. To be continued.

Iros

  • 7th Heaven Crew
  • Crazy poster
  • *
  • Posts: 229
  • Karma: 65
  • Files for the file god! Mods for the mod throne!
    • View Profile
Re: 7thWrapper
« Reply #2 on: 2013-07-11 20:37:06 »
Yes, I'm hoping that if I add the right features in, it will be useful to make a mod manager that does allow activating / deactivating mods without having to reinstall from scratch.

I'm testing code now that remaps non-LGP files now (e.g. kernel2.bin) which hopefully should make it useful for more mods.

I would like to use this for a different task. It would be cool if I could change some battle models depending on the game moment. I have done a young Cloud field model for the Niebelheim flashback, but there is no way I could use a different battle model.

I hadn't thought of that; but, I think it should be possible. Not sure how often it would be used, though? I suppose if it WAS possible people might think of a good use for it!

Vgr

  • Global moderator
  • No life
  • *
  • Posts: 2209
  • Karma: 33
  • If it quacks like a duck, it must be a duck
    • View Profile
Re: 7thWrapper
« Reply #3 on: 2013-07-11 20:45:25 »
I would love a versatile one, that you can tell "RT** (that's Cloud's battle model) inside the battle LGP should use the one I specify" and then you can change a setting and then another model is used. Instead of Game Var, user input (that's merely my opinion).

Iros

  • 7th Heaven Crew
  • Crazy poster
  • *
  • Posts: 229
  • Karma: 65
  • Files for the file god! Mods for the mod throne!
    • View Profile
Re: 7thWrapper
« Reply #4 on: 2013-07-11 21:21:06 »
I would love a versatile one, that you can tell "RT** (that's Cloud's battle model) inside the battle LGP should use the one I specify" and then you can change a setting and then another model is used. Instead of Game Var, user input (that's merely my opinion).

That should be possible, just by using the multiple mod paths, right?

If you have two (or more) mods that both have all of Cloud's files, then by just adding/removing that folder from the list of active mods (or, changing the priority so the one you want to use comes first in the list), then you can control which mod takes priority and gets used.

Or did you mean something other than that?

Vgr

  • Global moderator
  • No life
  • *
  • Posts: 2209
  • Karma: 33
  • If it quacks like a duck, it must be a duck
    • View Profile
Re: 7thWrapper
« Reply #5 on: 2013-07-11 21:23:25 »
Nope, that's exactly what I meant.

Kaldarasha

  • No life
  • *
  • Posts: 2155
  • Karma: 130
  • Prince of Model Editing
    • View Profile
Re: 7thWrapper
« Reply #6 on: 2013-07-11 22:15:19 »
I would love a versatile one, that you can tell "RT** (that's Cloud's battle model) inside the battle LGP should use the one I specify" and then you can change a setting and then another model is used. Instead of Game Var, user input (that's merely my opinion).

Well, I need a possibility to control different versions of a model through a game variable. I would like to represent Clouds different states of his mental behavior visually.
Or giving Cait Sith number II a different look. There plenty of possibility if we are able to do this (snow clothes for the party in the snow area as example).

EQ2Alyza

  • 7th Heaven Crew
  • Global moderator
  • No life
  • *
  • Posts: 2673
  • Karma: 186
  • Dilly-Dally Shilly-Shally
    • View Profile
    • EQ2Alyza - YouTube Channel
Re: 7thWrapper
« Reply #7 on: 2013-07-12 00:17:44 »
I would love a versatile one, that you can tell "RT** (that's Cloud's battle model) inside the battle LGP should use the one I specify" and then you can change a setting and then another model is used. Instead of Game Var, user input (that's merely my opinion).

That sounds really exciting. I would advertise the heck out of this feature on YT if it were to come to fruition.

Well, I need a possibility to control different versions of a model through a game variable. I would like to represent Clouds different states of his mental behavior visually.
Or giving Cait Sith number II a different look. There plenty of possibility if we are able to do this (snow clothes for the party in the snow area as example).

Imagine beach clothing for the Costa Del Sol area  ;)

OR!!! Traditional Japanese clothing for the Wutai area  ;D
« Last Edit: 2013-07-12 00:19:16 by EQ2Alyza »

Iros

  • 7th Heaven Crew
  • Crazy poster
  • *
  • Posts: 229
  • Karma: 65
  • Files for the file god! Mods for the mod throne!
    • View Profile
Re: 7thWrapper
« Reply #8 on: 2013-07-12 13:14:21 »
OK, I have made some changes.

SEE OP for latest download links

Now it will replace non-LGP files (e.g. kernel2.bin - or any of the PNG files for use in Aali's driver). Also I have improved the GUI a bit so it's easier to turn mods on or off, or change the order. See:



It will list all the folders within the 'base mod location' you choose, and let you turn those mods on or off by (un)ticking the item, or change the priority for which mod takes effect by moving them up or down the list. Also you can save a particular configuration to use rather than have to go through ticking and reordering them each time (could take a long time with 50+ mods installed...)

For this to work, you need to have a mod folder set up in Aali's driver, point the launcher at it, but instead of placing mods in that folder, place it in the 'wrapped' folder you select in my launcher instead. That way it can control which files get used. Also I recommend turning off the compress textures (cache) option in Aali's driver, otherwise it will use the cached files instead of mods you have just chosen!

(Also you can put a file - mod.xml - in the folder for a mod to give more details about the mod, including a link to the website/forum page for that mod, see in the screenshot. This is optional, but maybe if people want to use this launcher, authors putting a mod description file in their download will make it easier for people to use?)

That sounds really exciting. I would advertise the heck out of this feature on YT if it were to come to fruition.

Imagine beach clothing for the Costa Del Sol area  ;)

OR!!! Traditional Japanese clothing for the Wutai area  ;D

Hm, I will try and do this then, should be good if it works :)
« Last Edit: 2013-08-03 13:16:03 by Iros »

Kaldarasha

  • No life
  • *
  • Posts: 2155
  • Karma: 130
  • Prince of Model Editing
    • View Profile
Re: 7thWrapper
« Reply #9 on: 2013-07-13 13:19:18 »
I can't insert char.lgp. :'(
Every other modification seems to work (new battle models, world models, etc.). But if I create a char.lgp folder, the game crashes - even if its empty.

Edit:
Oh, I guess it's time to move this tool to the tool section. ;)
'Fat Chocobo' would be a nice name. :-D
« Last Edit: 2013-07-13 13:26:07 by Kaldarasha »

Iros

  • 7th Heaven Crew
  • Crazy poster
  • *
  • Posts: 229
  • Karma: 65
  • Files for the file god! Mods for the mod throne!
    • View Profile
Re: 7thWrapper
« Reply #10 on: 2013-07-13 13:41:48 »
I can't insert char.lgp. :'(
Every other modification seems to work (new battle models, world models, etc.). But if I create a char.lgp folder, the game crashes - even if its empty.

Hm, I tried altering char.lgp with a new aaba.p (Cloud's head) and that's worked for me. Not sure why it wouldn't work; is your char.lgp already altered with some mods? (I don't think that should cause a problem, but perhaps?)

I will try and put some better error handling into the next version so it is easier to work out why things don't work.

Edit:
Oh, I guess it's time to move this tool to the tool section. ;)
'Fat Chocobo' would be a nice name. :-D

Makes sense to put it in the tool section, but I'm not sure about the name!

Kaldarasha

  • No life
  • *
  • Posts: 2155
  • Karma: 130
  • Prince of Model Editing
    • View Profile
Re: 7thWrapper
« Reply #11 on: 2013-07-16 08:25:26 »
Yep, my char.lgp is bad guy. :evil:
However testing with a default char.lgp has given me another problem. It appears that your wrapper only replace files which are existent in the Lgp.
So many of the characters I have reworked has some parts missing. I do not have these issue with the direct mode of Aali's driver.
Do you think you could made it work like the direct mode? However I'm looking forward to these tool, it would give us much more opportunities.

Iros

  • 7th Heaven Crew
  • Crazy poster
  • *
  • Posts: 229
  • Karma: 65
  • Files for the file god! Mods for the mod throne!
    • View Profile
Re: 7thWrapper
« Reply #12 on: 2013-07-16 14:44:37 »
Yep, my char.lgp is bad guy. :evil:
However testing with a default char.lgp has given me another problem. It appears that your wrapper only replace files which are existent in the Lgp.
So many of the characters I have reworked has some parts missing. I do not have these issue with the direct mode of Aali's driver.
Do you think you could made it work like the direct mode? However I'm looking forward to these tool, it would give us much more opportunities.

You are right, it didn't cope properly with new files (that were not in the original LGP). I was working on that already :)

SEE OP for latest download links

It SHOULD work if there are files with new names available. It looks OK to me but please let me know if you have problems or not! There is also more debug information so if it crashes we should be able to find out what the problem is.

Also, I have added the option for a mod to have files that are only active depending on game variables (like time, PPV, or current location) :) To do this you need to specify options in the mod.xml so the wrapper knows what conditions to use.

For example you have a file structure like this:

Code: [Select]
C:\games\ff7\wrapped
                    |- mod1
                           |- mod.xml
                           |- menu_us.lgp
                                         |- cloud.tex
                                         |- earith.tex
                           |- sewer
                                         |- char.lgp
                                                 |- aaba.p
                           |- junon
                                         |- char.lgp
                                                 |- aaba.p


And then your mod.xml looks like this:

Code: [Select]
<?xml version="1.0"?>
<ModInfo>
  <Author>Iros</Author>
  <Version>0.01</Version>
  <Description>Just a test mod with conditional folders...</Description>
  <Link>http://forums.qhimm.com/</Link>
  <Conditional Folder="sewer">
    <RuntimeVar Var="Short:0xCC15D0:2" Values="0xD5,0x160" />
  </Conditional>
  <Conditional Folder="junon">
    <RuntimeVar Var="Short:0xDC08DC:2" Values="300..400" />
  </Conditional>
</ModInfo>

What this means, if you activate this mod:

1) cloud.tex and earith.tex always replace the files in menu_us.lgp
2) The wrapper will read a 2-byte value from a location in memory (0xCC15D0 - this is the 'current field ID' variable). If it becomes 0xD5 or 0x160 then the files in the 'sewer' folder will become active, and so aaba.p inside char.lgp will also be replaced.
3) The wrapper will also check memory location 0xDC08DC (this is the PPV variable). If it is in the range 300-400, then the 'junon' folder will become active and it will replace aaba.p inside char.lgp

If both conditions are true then the version of aaba.p from the 'sewer' folder is used, because it is listed first in the mod.xml file. If neither is true then the original version from the LGP file is used of course :)

A folder could contain all sorts of new files, for all sorts of LGPs. The wiki lists the field ID values you can use.

This will work well for some things (the example above - I am using it to change part of Cloud's model, so it looks different depending on which field location you go into, or what stage of the game (PPV) you have got to). For other files, it might not work so well - e.g. the menu images like cloud.tex / earith.tex, I think the game keeps those in memory after it has read them so you can't change them easily.

But for the field models, it reads them again every time you change location, so you can easily have a different model for different locations :)

You should be able to read any variable from the savemap in a condition. But I have found that not ALL of the savemap is updated straight away - some parts are only updated when the player goes into the menu :( so for some variables, you will have to use a memory hacking tool to find where FF7 stores that information before copying it into the savemap. (Like the field ID I have used above - the ID field in the savemap, is not updated straight away, so not useful. The variable I use above is updated straight away.)

It works for me but I changed a lot of code so expect there are some bugs, I hope people will try it and tell me if there are problems so we can fix them! Also maybe the memory locations that work on my computer are different for other versions of the game, but we will have to try it and see what works.
« Last Edit: 2013-08-03 13:16:23 by Iros »

Tenko Kuugen

  • Public Enemy
  • No life
  • *
  • Posts: 1427
  • Karma: 0
    • View Profile
    • Twitter
Re: 7thWrapper
« Reply #13 on: 2013-07-16 15:24:54 »
That sounds really exciting. I would advertise the heck out of this feature on YT if it were to come to fruition.

Imagine beach clothing for the Costa Del Sol area  ;)

OR!!! Traditional Japanese clothing for the Wutai area  ;D

thats not difficult at all
all you need to do is replace cloud's model with a different model for just that area. for that, you have to have the 'new' model separately in the char.lgp and then add it in the field script instead of cloud's.

Iros

  • 7th Heaven Crew
  • Crazy poster
  • *
  • Posts: 229
  • Karma: 65
  • Files for the file god! Mods for the mod throne!
    • View Profile
Re: 7thWrapper
« Reply #14 on: 2013-07-16 17:03:30 »
thats not difficult at all
all you need to do is replace cloud's model with a different model for just that area. for that, you have to have the 'new' model separately in the char.lgp and then add it in the field script instead of cloud's.

True. It is more flexible to do it in a wrapper, though; you can do it without conflicting with another mod that wants to the change the field file, plus you can change the battle models as well :)

Or by checking variables other than / as well as field ID, you could do something like make all the characters wear the pink memorial ribbon (like Advent Children), but only after Aeris's death. Or change Cloud's appearance after his fall into the lifestream etc.

Kaldarasha

  • No life
  • *
  • Posts: 2155
  • Karma: 130
  • Prince of Model Editing
    • View Profile
Re: 7thWrapper
« Reply #15 on: 2013-07-16 17:22:28 »
Or make a playable fight between Zack and Sephiroth. ;)

Iros

  • 7th Heaven Crew
  • Crazy poster
  • *
  • Posts: 229
  • Karma: 65
  • Files for the file god! Mods for the mod throne!
    • View Profile
Re: 7thWrapper
« Reply #16 on: 2013-07-17 10:32:24 »
OK, I have uploaded another small update:

SEE OP for latest download links

-Fixes a bug when there were multiple conditional folders in a mod
-Add ability for conditional folder to trigger off system variables (date/time), a random number, or a counter that increments when specified files are used
-Add variable aliases (so you can specify a 'friendly' name in the mod file, e.g. PPV / FieldID instead of needing to know memory address)

The random number condition means you can have files that only replace the originals randomly.

Counters let you sort of do the same for a group of files. For a field model, you could just replace the HRC randomly and since your new HRC can point to completely different P/TEX files than the original that works OK. But battle models you can't do this, the battle files all have to have exact names the game is looking for. And you don't want every battle file to be randomly replaced, then you end up with 50% of the model parts being your version and 50% being another version :)

So if you specify a counter, you can make all the files for a battle model (rv??) work off the same counter variable so either they are all used, or none of them are. Then make the counter increment when a particular file (rvaa probably) is accessed. If anybody wants to do this let me know and I will explain how to do it.

I don't know what other changes to make now, are there any mod authors who are thinking about using this? What changes do you need? Or are there any users who want the launcher to do something extra before it is useful? Please let me know :)
« Last Edit: 2013-08-03 13:16:39 by Iros »

Kaldarasha

  • No life
  • *
  • Posts: 2155
  • Karma: 130
  • Prince of Model Editing
    • View Profile
Re: 7thWrapper
« Reply #17 on: 2013-07-17 11:25:24 »
Dosen't work. I got something like this:
Quote
The typ"_7thWrapperLib.LoaderContext"in the assembly
"7thWrapperLib. Version=1.0.0.0.Culture=neutral. PublicKeyToken=null"
could not be loaded.

However the new random feature is nice and could bring a bit more visible dynamic to the battles.
And thanks for the variable aliases, it will made much things easier to mod for me.
It would be nice if the program would run FF7Music, too, when I click on launch.
Except you could make something better for the music, because FF7Music has a bug with the volume ramping.
The last thing is maybe a PNG or DDS support for the steam (or rerelease) users.



Iros

  • 7th Heaven Crew
  • Crazy poster
  • *
  • Posts: 229
  • Karma: 65
  • Files for the file god! Mods for the mod throne!
    • View Profile
Re: 7thWrapper
« Reply #18 on: 2013-07-17 12:03:18 »
Quote from: Kaldarasha link=topic=14402.msg202481#msg202481 date=1374060-324
Dosen't work. I got something like this:

Oh, I uploaded the wrong version  :-\

This download should work: SEE OP for latest download links

However the new random feature is nice and could bring a bit more visible dynamic to the battles.
And thanks for the variable aliases, it will made much things easier to mod for me.
It would be nice if the program would run FF7Music, too, when I click on launch.
Except you could make something better for the music, because FF7Music has a bug with the volume ramping.
The last thing is maybe a PNG or DDS support for the steam (or rerelease) users.

Not sure I understand about PNG/DDS support?
« Last Edit: 2013-08-03 13:16:58 by Iros »

Kaldarasha

  • No life
  • *
  • Posts: 2155
  • Karma: 130
  • Prince of Model Editing
    • View Profile
Re: 7thWrapper
« Reply #19 on: 2013-07-17 12:22:33 »
This is what I get if I try to load my field models.


Iros

  • 7th Heaven Crew
  • Crazy poster
  • *
  • Posts: 229
  • Karma: 65
  • Files for the file god! Mods for the mod throne!
    • View Profile
Re: 7thWrapper
« Reply #20 on: 2013-07-17 12:32:58 »
OK, can you see if you can get the debug output? You can use DebugView (download from Microsoft), or if you have FF7Music installed, that captures debug output as well. Just run FF7Music before starting the game and it will list all the debug messages in its window. I hope it will let us work out what is happening  :?

Kaldarasha

  • No life
  • *
  • Posts: 2155
  • Karma: 130
  • Prince of Model Editing
    • View Profile
Re: 7thWrapper
« Reply #21 on: 2013-07-17 12:43:20 »
Code: [Select]
Wrap created

Wrap run... Host: 4156  PID: 3652  TID: 3244   Path: D:\Games\FINAL FANTASY VII\Wrapped  Data: D:\Games\FINAL FANTASY VII\data

  Mod: D:\Games\FINAL FANTASY VII\Wrapped\UM has 0 conditionals

WM_ACTIVATEAPP

INITIALIZE DD/D3D START

In IsDCProcessingDone = true

 SetTimer for WM_DISPLAYCHANGE and ApplyCSCCoefficients Started

SetTimer for WM_DISPLAYCHANGE Started
ATTACHED to desktop
Intel Driver is Active
ATTACHED to desktop
ATTACHED to desktop
ATTACHED to desktop
ATTACHED to desktop
ATTACHED to desktop
ATTACHED to desktop

 Inside ApplyCSCCoefficients 

Inside ProcessDisplayChange
ProcessDisplayChange KillTimer(0, 28619).

RetVal = 1, LastError = 14007.

ERROR: Couldn't read regsitry TMMOffForTVStdChangeWA in ProcessDisplayChange File: persistence.cpp

Inside IsModifyRotCapsForDC
IsModifyRotCapsForDC returned SUCCESS

imukherj: Enter ProcessDRRSModeSetOnDispChange

imukherj:

imukherj: Get Power API Pass

imukherj: GetBackLightSettings

imukherj: GetBackLightSettings call pass
Hooked CreateFileA for D:\Games\FINAL FANTASY VII\data\menu\menu_us.lgp under 2044

LGPWrapper: no overrides for menu_us.lgp, early out

Hooked CreateFileA for D:\Games\FINAL FANTASY VII\data\battle\battle.lgp under 2052

FindFirstFile for D:\Games\FINAL FANTASY VII\Wrapped\UM\battle.lgp\*

FindFirstFile for D:\Games\FINAL FANTASY VII\Wrapped\UM\battle.lgp\*

FindFirstFile for D:\Games\FINAL FANTASY VII\Wrapped\UM\battle.lgp\*

Calculated new LGP headers for battle.lgp with 12381 file entries

Created: VFile containing 1927 ranges

Overrides found, activating VFile

Hooked CreateFileA for D:\Games\FINAL FANTASY VII\data\battle\magic.lgp under 1260

LGPWrapper: no overrides for magic.lgp, early out

Hooked CreateFileA for D:\Games\FINAL FANTASY VII\data\field\char.lgp under 1284

FindFirstFile for D:\Games\FINAL FANTASY VII\Wrapped\UM\char.lgp\*

FindFirstFile for D:\Games\FINAL FANTASY VII\Wrapped\UM\char.lgp\*

FindFirstFile for D:\Games\FINAL FANTASY VII\Wrapped\UM\char.lgp\*

ERROR: System.IndexOutOfRangeException: Der Index war au├čerhalb des Arraybereichs.
   bei _7thWrapperLib.Bytes.WriteUShort(Byte[] data, Int32 offset, UInt16 value) in C:\Iros\7thWrapperLib\Bytes.cs:Zeile 21.
   bei _7thWrapperLib.LGP.CalculateHeaders(List`1 files, Func`2 headerSortKey, Func`2 dataSortKey, List`1& entries) in C:\Iros\7thWrapperLib\LGP.cs:Zeile 94.
   bei _7thWrapperLib.LGPWrapper..ctor(IntPtr handle, String name, RuntimeProfile profile) in C:\Iros\7thWrapperLib\VFile.cs:Zeile 299.
   bei _7thWrapperLib.Wrap.HCreateFileA(String lpFileName, FileAccess dwDesiredAccess, FileShare dwShareMode, IntPtr lpSecurityAttributes, FileMode dwCreationDisposition, FileAttributes dwFlagsAndAttributes, IntPtr hTemplateFile) in C:\Iros\7thWrapperLib\Wrap.cs:Zeile 271.

Iros

  • 7th Heaven Crew
  • Crazy poster
  • *
  • Posts: 229
  • Karma: 65
  • Files for the file god! Mods for the mod throne!
    • View Profile
Re: 7thWrapper
« Reply #22 on: 2013-07-17 12:47:31 »
Excellent, thank you. Could you also send me the list of the files in the Wrapped\UM\char.lgp\ folder?

Kaldarasha

  • No life
  • *
  • Posts: 2155
  • Karma: 130
  • Prince of Model Editing
    • View Profile
Re: 7thWrapper
« Reply #23 on: 2013-07-17 13:00:39 »
AAAA---Without-Sword.rar

Cloud is enough to crash it.  :P

Iros

  • 7th Heaven Crew
  • Crazy poster
  • *
  • Posts: 229
  • Karma: 65
  • Files for the file god! Mods for the mod throne!
    • View Profile
Re: 7thWrapper
« Reply #24 on: 2013-07-17 13:35:52 »
Thanks! I have fixed this now; new download 0.05: SEE OP for latest download links

It was annoying, I knew the LGP hash code only worked with lower case filenames, so I wrote code to make sure it used lower case filenames, but none of the mods I tested with used upper case files, it never got tested and I had made an error...

Should work fine now!
« Last Edit: 2013-08-03 13:17:15 by Iros »