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:

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.

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?

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?)

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!

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).

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.

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).

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).

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?)

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.

Yep, my char.lgp is bad guy. 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.

Yep, my char.lgp is bad guy. 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.

1) cloud.tex and earith.tex always replace the files in menu_us.lgp2) 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.

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

thats not difficult at allall 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.

thats not difficult at allall 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.

-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

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.

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.

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

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...