[PC] Mod manager - 7thHeaven (v1.54)

  • Thread starter Thread starter Iros
  • Start date Start date
Status
Not open for further replies.
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  :?
 
Code: [Select]
Code:
Wrap createdWrap 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 conditionalsWM_ACTIVATEAPP INITIALIZE DD/D3D START In IsDCProcessingDone = true SetTimer for WM_DISPLAYCHANGE and ApplyCSCCoefficients Started SetTimer for WM_DISPLAYCHANGE StartedATTACHED to desktop Intel Driver is ActiveATTACHED to desktop ATTACHED to desktop ATTACHED to desktop ATTACHED to desktop ATTACHED to desktop ATTACHED to desktop  Inside ApplyCSCCoefficients  Inside ProcessDisplayChangeProcessDisplayChange KillTimer(0, 28619).RetVal = 1, LastError = 14007.ERROR: Couldn't read regsitry TMMOffForTVStdChangeWA in ProcessDisplayChange File: persistence.cppInside IsModifyRotCapsForDCIsModifyRotCapsForDC returned SUCCESSimukherj: Enter ProcessDRRSModeSetOnDispChangeimukherj:imukherj: Get Power API Passimukherj: GetBackLightSettingsimukherj: GetBackLightSettings call passHooked CreateFileA for D:\Games\FINAL FANTASY VII\data\menu\menu_us.lgp under 2044LGPWrapper: no overrides for menu_us.lgp, early outHooked CreateFileA for D:\Games\FINAL FANTASY VII\data\battle\battle.lgp under 2052FindFirstFile 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 entriesCreated: VFile containing 1927 rangesOverrides found, activating VFileHooked CreateFileA for D:\Games\FINAL FANTASY VII\data\battle\magic.lgp under 1260LGPWrapper: no overrides for magic.lgp, early outHooked CreateFileA for D:\Games\FINAL FANTASY VII\data\field\char.lgp under 1284FindFirstFile 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.
 
Excellent, thank you. Could you also send me the list of the files in the Wrapped\UM\char.lgp\ folder?
 
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 edited:
I'm excited about the new mods to come from the ability to do these things, nice work.
 
It seems that today is a day of updates;

v0.06:  SEE OP for latest download links

Main change is that I have added the option to 'pack' a mod into a single file. This will be better for mods that change lots of files - the reason FF7 used LGP files to begin with is that opening thousands of individual files can be slow, it is better to combine them all into one big (LGP!) file. So the same is true for mods, it will run fine with 100 or 200 different files on disk, but if you are changing 10000 files, maybe it is a good idea to pack the mod into a single file so it loads quicker.

Of course you can still run mods from normal folders, this is good for testing, or just to set up something easily :)  But if you find that a mod which changes lots of files is a bit slow, perhaps this will help.
 
Last edited:
Oh boy, this just got serious. Lots of interest in what you are working on here Iros. Looks like this might be the next big thing for ff7.
 
Last edited:
I'm apparently not smart enough to figure this out myself  :P

Can you tell me how the folder/file structure should be inside the Wrapper folder. I have a battle.lpg, char.lpg, high-us.lpg, and world_us.lpg with custom models already packed, but I'm able to unpack them if needed.
 
For the moment I use folders which are named as the LGP files and store everything in them, and it works (I'm so happy)!
I guess the structure must be : Wrapped/YourModFolder/YourLGP(or LGPFolders).
I will now try the condition thing with game moment and field name to replace Cloud's battle model with the Young Cloud battle model I have made.

Oh boy, this just got serious. Lots of interest in what you are working on here Iros. Looks like this might be the next big thing for ff7.
This is the next big thing! :-D
 
I'm apparently not smart enough to figure this out myself  :P

Can you tell me how the folder/file structure should be inside the Wrapper folder. I have a battle.lpg, char.lpg, high-us.lpg, and world_us.lpg with custom models already packed, but I'm able to unpack them if needed.
I think Kaldarasha is correct, but to make it clear:

Code: [Select]
Code:
Wrapped    <-- This is the folder you point the launcher at |-----YourModFolder   <-- Name it anything you want, this is what it will be called in the launcher         |--------battle.lgp   <-- NOT an LGP file - a folder called this                    |------ rxaa                    |------ rxac                    |------ rxad                    etc....
Yes, you will need to unpack the LGP files and create subfolders inside your mod folder called battle.lgp, char.lgp, etc. containing ONLY your modified files.

If you want to pack them up for distribution / speed, use the 'pack' option in the launcher once you have got it working, but always start by creating the folders like above to make sure it works correctly :)

I will now try the condition thing with game moment and field name to replace Cloud's battle model with the Young Cloud battle model I have made.
I hope it works, tell me if there is a problem making it work. The variable names you can use are in the '7thLauncher.var' file, so far just 'PPV' and 'FieldID' but I will add others as we find useful ones.
 
Can't bring it to work. :|
This is my mod.xml

Code: [Select]
Code:
<?xml version="1.0"?><ModInfo>  <Author>Kaldarascha</Author>  <Version>0.01</Version>  <Description>Just a test mod swapping a few files to check that the launcher works...</Description>  <Link>http://forums.qhimm.com/</Link><Conditional Folder="YoungCloud">    <RuntimeVar Var="PPV:2" Values="300..383" />  </Conditional></ModInfo>
The mod path:
Wrapped\UM\YoungCloud\battle.lgp\

Content of the UM folder:
battle.lgp, char.lgp, flevel.lgp,world_us.lgp, YoungCloud

The model I want implement:
YoungCloud.rar
 
Try just using Var="PPV" instead of Var="PPV:2".

If you use a variable name like PPV, you don't have to say what size it is. (Size is actually optional for most variables anyway - it is most important for reading strings from memory, but there are not many strings you would want to read for a condition.)
 
Hmmm, OK  :(  What doesn't work? Does it crash with an error, or just your files are not used? In both cases, if you could post the debug output while you run the game, that would help...

(You definitely have the 7thWrapper.var file in the same folder as the 7thWrapper.exe file?)
 
This what I get when I try to use only the condinal replacement for Cloud.

Code: [Select]
Code:
LGPWrapper: no overrides for menu_us.lgp, early outHooked CreateFileA for D:\Games\FINAL FANTASY VII\data\battle\battle.lgp under 2036FindFirstFile for D:\Games\FINAL FANTASY VII\Wrapped\UM2\YoungCloud\battle.lgp\*FindFirstFile for D:\Games\FINAL FANTASY VII\Wrapped\UM2\YoungCloud\battle.lgp\*FindFirstFile for D:\Games\FINAL FANTASY VII\Wrapped\UM2\YoungCloud\battle.lgp\*Calculated new LGP headers for battle.lgp with 12332 file entriesERROR: System.Collections.Generic.KeyNotFoundException: Der angegebene Schlüssel war nicht im Wörterbuch angegeben.   bei System.Collections.Generic.Dictionary`2.get_Item(TKey key)   bei _7thWrapperLib.LGPWrapper..ctor(IntPtr handle, String name, RuntimeProfile profile) in C:\Iros\7thWrapperLib\VFile.cs:Zeile 375.   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 272.
 
Thank you, it was very helpful (also the link to download the mod, there were two problems and I needed to try that mod myself too).

New version 0.065: SEE OP for latest download links

Download the new version, your mod.xml should look like:

Code: [Select]
Code:
<?xml version="1.0"?><ModInfo>  <Author>Kaldarascha</Author>  <Version>0.01</Version>  <Description>Just a test mod swapping a few files to check that the launcher works...</Description>  <Link>http://forums.qhimm.com/</Link><Conditional Folder="YoungCloud">    <RuntimeVar Var="PPV" Values="300..383" />  </Conditional></ModInfo>
Then it should work.

There were two bugs:

1) It didn't like conditional folders if they contained files that weren't in the original LGP. I didn't think this would happen with battle.lgp but it does with the mod you are using.

2) The conditional folders 'recalculate' which file to use when the game reads from the file header in the LGP (that says how long the file is). But it seems like some files, the game ignores the file header and doesn't read it! So it would load a mixture of some original files and some new ones, this doesn't work well. I have fixed this too :)

Hopefully it works now!
 
Last edited:
Totally forget about the added part to the bone. :oops:
But it works now, not as I expect it, but it does. I need two mod folders: one with my models and one with the conditional model.
It seems so, that a XXX.lgp has a higher priority as a conditional XXX.lgp in a supfolder. Well I can work with it, but I guess it's not as you intend it.
 
That is a good point; I didn't think about that.

I suppose one work around would be to use a conditional folder with a condition that is always true :) That will slow things down a bit, though. So for the next version, I will add the ability for mod.xml to control what order the folders are used (even folders which are not conditional).

Edit: Now I have thought, I think conditional folders should always be higher priority than normal folders in the mod. If the normal folder is higher priority, it will never use the conditional folder, this isn't useful. So perhaps I should just make conditional folders always checked first and this is good enough.
 
Last edited:
Status
Not open for further replies.
Back
Top