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

  • Thread starter Thread starter Iros
  • Start date Start date
Status
Not open for further replies.
But doesn't 7H have to launch the game in order for the mods to function? I don't see how you can have it and Hext_Launch handle the ff7.exe at the same time.

Dan is really busy getting Reunion R02 to release I think, so I hope I'm not a bother asking him to look into it. It would be really nice if it were possible to translate them to memory patches.
 
Ehm, is it possible to implement an 7zip packer and unpacker? I don't want to download a huge project like Facepalmer or yarLson project uncompressed from the catalog. It is also better to have non active mod inside a 7zip archive.

@EQ2Alyza
Use the 'Also launch' function of 7th Heaven to open Hext_Launch. Both tools work perfectly together.
 
Hmm, well it doesn't matter whether they work together anyways. All Hext_Launch files work using the hext folder in 7H. The ones I linked above are for Hexteditor.exe, which Iros states does not work like Hext_Launch. We just need the above link to be translated to Hext_Launch capabilities and the need to launch it won't be necessary. I have no idea if that's even possible :-\

I reaaaaally don't like the idea of releasing multiple .exe to the public because I can see how much Q&A it's going to cause due to user error.

I'm pretty sure there's a feature to compress the mod folders into a .7z and have it read all subfolders inside it after downloaded. I think I tried compressing an .iro file into a .7z way back when the tool was first released, but it didn't read from the .iro properly. This was months and moths ago though, and I haven't look into it since.
 
Last edited:
tl;dr

All you need to do to my menu overhaul files to make them work with hext launch is remove the global values.  Any lines that start

-400C00
-401400
-401600

Should be deleted.

Any that start:

21C = 60
21F = E0

Need deleting also and the following adding in their place instead:

{change permissions up to 00915FFF}
00913340:11455

I suggest you don't do that, because changes as large as this really are best off being made to the actual file.

=====================
HextEdit is for changing files, the same way launch is for changing memory.  To  make launch hext files work with Hextedit (and thus change the exe), you need to add global values, that convert between the two.

For example, if the memory address is 76F920


You would use

-400C00

76F920


Anything after -400C00 would have that value deducted from its address, turning it into a file offset and not a memory offset. Unfortunately, it isn't as simple as ONE global address.  FF7 has different offsets depending on address.  So you will need add them as follows:

If your memory address lies within:

00401000 to 007B5FFF: Global Value is -400C00
007B6000 to 007B9FFF: Global Value is -401400
007BA000 to 00F50FFF: Global Value is -401600
00F51000 and above:  Global Value is -9B5600


See the readme on Hext in DLPB Tools 2.0

The following is an example of making Dziugo's GYPT go from memory to file.
Every address falls between 401000 and 7B5FFF
so you only need to add -400C00.

Code: [Select]
Code:
-400C0000417BD9 = 85 C0 74 3C 90 90 8B 08 50006767D9 = 68 A2 00 00 00 FF 15 14 63 7B 00 83 E0 FE 74 4B006767E9 = 8B 45 10 83 F8 53 74 26 83 F8 44 74 30 83 F8 51006767F9 = 75 39 8B 45 FC 8B 8800676800 = 5C 0A 00 00 85 C9 74 04 50 FF D1 58 33 C9 41 8900676810 = 88 54 0A 00 00 EB 1D 33 C0 40 A3 10 10 9A 00 A300676820 = 14 10 9A 00 EB 0E 33 C0 66 A3 D4 0D CC 00 90 9000676830 = 90 90 90 90

Please note that HextEdit uses line 1 for the target file.

Also note that going from file addresses to memory is the same thing except the Global Value becomes an addition, not subtraction.

In other words:

00000400 to 003B4BFF: Global Value is +400C00
003B4C00 to 003B89FF: Global Value is +401400
003B8A00 to 0059B9FF: Global Value is +401600
0059BA00 and above:  Global Value is +9B5600
 
Last edited:
Well, just deleting the offsets seems like it should work. The permissions lines may not be necessary since 7H already handles setting memory permissions automatically, and the patches are quite small so they take really no time to apply.

However the patches EQ2Alyza provided crash when I try doing that - but they also crash FF7 if I apply them using Hext, so I am guessing they are for a different version of the FF7 exe than the one I have, or a different version of the Aali driver, or something? That means I can't really test very well.

Hmm, well it doesn't matter whether they work together anyways. All Hext_Launch files work using the hext folder in 7H. The ones I linked above are for Hexteditor.exe, which Iros states does not work like Hext_Launch. We just need the above link to be translated to Hext_Launch capabilities and the need to launch it won't be necessary. I have no idea if that's even possible :-\

I reaaaaally don't like the idea of releasing multiple .exe to the public because I can see how much Q&A it's going to cause due to user error.

I'm pretty sure there's a feature to compress the mod folders into a .7z and have it read all subfolders inside it after downloaded. I think I tried compressing an .iro file into a .7z way back when the tool was first released, but it didn't read from the .iro properly. This was months and moths ago though, and I haven't look into it since.
Yes, you can make the download a zip or 7z and 7H will decompress it after downloading, to make the download smaller. It should work to compress a IRO file into a 7z, although I cannot be sure there are certainly no bugs :)

There is not a way now for the actual IRO file to be compressed - since I was worried that decompressing data while the game was running could be slow. However I haven't tried this so possibly it could be added once it has been tested.
 
How is it possible to set a mod folder against two multiple 'Active when'?
 
Last edited:
How is it possible to set a mod folder against two multiple 'Active when'?
Hmm, not currently possible :/

Although depending on what condition you wanted (Active when X AND Y, or Active when X OR Y?) there is a workaround ... if you want OR, you could just list the mod folder twice. There is no way to do AND, though...

I guess you would like this in a future version?
 
I guess you would like this in a future version?
Yes, I think it is handy for more complicated mods to keep the script length as minimal as possible. There is also something else I would like to have, to set more ID's at once with one option. I don't plan to use it (anymore) in the near future, but it could be become handy as well.
 
Well, just deleting the offsets seems like it should work. The permissions lines may not be necessary since 7H already handles setting memory permissions automatically, and the patches are quite small so they take really no time to apply.

However the patches EQ2Alyza provided crash when I try doing that - but they also crash FF7 if I apply them using Hext, so I am guessing they are for a different version of the FF7 exe than the one I have, or a different version of the Aali driver, or something? That means I can't really test very well.
Any that start:

21C = 60
21F = E0

Need deleting also and the following adding in their place instead:

{change permissions up to 00915FFF}
00913340:11455

Also note that going from file addresses to memory is the same thing except the Global Value becomes an addition, not subtraction.

In other words:

00000400 to 003B4BFF: Global Value is +400C00
003B4C00 to 003B89FF: Global Value is +401400
003B8A00 to 0059B9FF: Global Value is +401600
0059BA00 and above:  Global Value is +9B5600
I had the same crashes when just deleting the offsets, so I added the edits Dan mentioned and the game launched fine again. It's showing the patches being applied in the debug and with no syntax error messages, but ingame does not show it. The spacing is off in the same manner as if the patch isn't applied at all.

Here are the edited versions that will allow the game to launch: LINK

What do you think Iros, can we get these working?
 
Ditto :)

The crash on uninstall fix seems to have changed. Now the right-side window will tell me the mod can't be uninstalled because it's being accessed by something else. It removes from the Library, but as soon as the Library refreshes, it's back. Closing and reopening 7H will allow it to be uninstalled without the message. The crash is gone now, but the program still has to be closed and reopened in a different manner to be able to uninstall a mod. It's no biggie though, I don't think the average user is going to be installing and uninstalling mods nearly as much as I have for testing.
 
Hm, OK. I think I have a fix for the uninstall problems anyway so next version should solve this.

Also you said movie mods aren't injecting properly, are you sure? I tried replacing a movie file in a mod and it looks OK to me...
 
Apparently I wasn't sure lol I checked the file size and the last .iro pack went from 6+ GB to 1.7 GB, so the packing failed. I packed a new one that's equal size and it works.
 
v1.28: https://mega.co.nz/#!yQN2WaIR!oUC5TZNUvnsNeGHjhChS2r6uUbzyIj58DfnERphiOeI

-Fix uninstalls, again, probably
-Add support for ActiveWhen to have multiple conditions

Now instead of ActiveWhen being specified as an attribute you can specify an ActiveWhen child node containing various conditions: And, Or, Not, and Option (which actually checks an option)

for example:

Code: [Select]
Code:
  <ModFolder Folder="NewStuff"> <ActiveWhen>  <And>   <Option>newmodels = 2</Option>   <Option>battlemode = 1</Option>  </And> </ActiveWhen>  </ModFolder>
Activates the folder if option newmodels is set to 2 AND option battlemode is set to 1

Code: [Select]
Code:
  <ModFolder Folder="OtherStuff">  <ActiveWhen>  <Or>    <Option>newmodels = 1</Option>   <Option>battlemode = 0</Option>  </Or> </ActiveWhen>  </ModFolder>
Activates folder OtherStuff if newmodels is 1 OR battlemode is zero.
 
I got this error:
System.Runtime.Serialization.SerializationException: Der Typ "_7thWrapperLib.ActiveWhen" in Assembly "7thWrapperLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" ist nicht als serialisierbar gekennzeichnet.
   bei EasyHook.RemoteHooking.CreateAndInject(String InEXEPath, String InCommandLine, Int32 InProcessCreationFlags, String InLibraryPath_x86, String InLibraryPath_x64, Int32& OutProcessId, Object[] InPassThruArgs) in C:\Code\EasyHook-2.7.4761.0-Source\EasyHook\RemoteHook.cs:Zeile 944.
   bei Iros._7th.Workshop.fLibrary.Launch(Boolean varDump, Boolean debug) in c:\Iros\7thWorkshop\fLibrary.cs:Zeile 738.
   bei Iros._7th.Workshop.fLibrary.bLaunch_Click(Object sender, EventArgs e) in c:\Iros\7thWorkshop\fLibrary.cs:Zeile 637.
   bei System.Windows.Forms.Control.OnClick(EventArgs e)
   bei System.Windows.Forms.Button.OnClick(EventArgs e)
   bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.ButtonBase.WndProc(Message& m)
   bei System.Windows.Forms.Button.WndProc(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
I tried both strategies:

Code: [Select]
Code:
<ModFolder Folder="Cloud\CloudWBoB 00">  <ActiveWhen>  <And>   <Option>Dynamic = 1</Option>   <Option>CloudSword = 0</Option>  </And> </ActiveWhen></ModFolder><ModFolder Folder="Cloud\CloudWBoB 01"> <ActiveWhen>  <And>   <Option>Dynamic = 1</Option>   <Option>CloudSword = 1</Option>   <Or>    <Option>Sword = 0</Option>    <Option>Sword = 1</Option>   </Or>  </And> </ActiveWhen></ModFolder><ModFolder Folder="Cloud\CloudWBoB 02"> <ActiveWhen>    <And>   <Option>Dynamic = 1</Option>   <Option>Sword = 1</Option>   <Or>    <Option>Sword = 2</Option>    <Option>Sword = 3</Option>   </Or>  </And> </ActiveWhen></ModFolder>
Code: [Select]
Code:
<ModFolder Folder="Cloud\CloudWBoB 00">  <ActiveWhen>  <And>   <Option>Dynamic = 1</Option>   <Option>CloudSword = 0</Option>  </And> </ActiveWhen></ModFolder><ModFolder Folder="Cloud\CloudWBoB 01"> <ActiveWhen>  <And>   <Option>Dynamic = 1</Option>   <Option>CloudSword = 1</Option>  </And>  <Not>    <Option>Sword = 2</Option>    <Option>Sword = 3</Option>  </Not> </ActiveWhen></ModFolder><ModFolder Folder="Cloud\CloudWBoB 02> <ActiveWhen>    <And>   <Option>Dynamic = 1</Option>   <Option>CloudSword = 1</Option>  </And>  <Not>    <Option>Sword = 0</Option>    <Option>Sword = 1</Option>  </Not> </ActiveWhen></ModFolder>
But I have no luck with it.

Well I will try something else, which will make the script a bit longer, but should also work as I plan it.

Edit:
This seems to work:
Code: [Select]
Code:
<ModFolder Folder="Cloud\CloudWBoB 00">  <ActiveWhen>  <And>   <Option>Dynamic = 1</Option>   <Option>CloudSword = 0</Option>  </And> </ActiveWhen></ModFolder><ModFolder Folder="Cloud\CloudWBoB 01"> <ActiveWhen>  <And>   <Option>Dynamic = 1</Option>   <Option>CloudSword = 1</Option>   <Option>Sword = 0</Option>  </And> </ActiveWhen></ModFolder><ModFolder Folder="Cloud\CloudWBoB 01"> <ActiveWhen>  <And>   <Option>Dynamic = 1</Option>   <Option>CloudSword = 1</Option>   <Option>Sword = 1</Option>  </And> </ActiveWhen></ModFolder><ModFolder Folder="Cloud\CloudWBoB 02"> <ActiveWhen>    <And>   <Option>Dynamic = 1</Option>   <Option>CloudSword = 1</Option>   <Option>Sword = 2</Option>  </And> </ActiveWhen></ModFolder><ModFolder Folder="Cloud\CloudWBoB 02"> <ActiveWhen>    <And>   <Option>Dynamic = 1</Option>   <Option>CloudSword = 1</Option>   <Option>Sword = 3</Option>  </And> </ActiveWhen></ModFolder>
 
Last edited:
Well I can't set the new ActiveWhen function against a conditional folder.

For some reasons it does not work anymore.
System.Runtime.Serialization.SerializationException: Der Typ "_7thWrapperLib.ActiveWhen" in Assembly "7thWrapperLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" ist nicht als serialisierbar gekennzeichnet.
   bei EasyHook.RemoteHooking.CreateAndInject(String InEXEPath, String InCommandLine, Int32 InProcessCreationFlags, String InLibraryPath_x86, String InLibraryPath_x64, Int32& OutProcessId, Object[] InPassThruArgs) in C:\Code\EasyHook-2.7.4761.0-Source\EasyHook\RemoteHook.cs:Zeile 944.
   bei Iros._7th.Workshop.fLibrary.Launch(Boolean varDump, Boolean debug) in c:\Iros\7thWorkshop\fLibrary.cs:Zeile 738.
   bei Iros._7th.Workshop.fLibrary.bLaunch_Click(Object sender, EventArgs e) in c:\Iros\7thWorkshop\fLibrary.cs:Zeile 637.
   bei System.Windows.Forms.Control.OnClick(EventArgs e)
   bei System.Windows.Forms.Button.OnClick(EventArgs e)
   bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.ButtonBase.WndProc(Message& m)
   bei System.Windows.Forms.Button.WndProc(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
 
Last edited:
Update v1.29: https://mega.co.nz/#!nFE2iRJA!DBTKcFTBAgY-yfq23v8tEqNj7oqsUo5GQpnxLtUJz6g

-Fix Conditional folders using new ActiveWhen tags
-Add auto update feature

7H will now tell you when a new version is out and [I hope] download & install the new version automatically if you choose to install it. You can disable the update check in settings if you don't want it of course. Since v1.29 is the first version with the updater, you still have to download this version and apply it manually of course :)

@Kaldarasha: Although most of your tags looked right to me, this one:

Code: [Select]
Code:
 <ActiveWhen>    <And>   <Option>Dynamic = 1</Option>   <Option>CloudSword = 1</Option>  </And>  <Not>    <Option>Sword = 0</Option>    <Option>Sword = 1</Option>  </Not> </ActiveWhen>
won't work since a <Not> can only contain one other node (otherwise, it would not know how to combine the results of the various child nodes?).

<And> can contain any number of other nodes and it is active only if ALL the contained nodes are active.

<Or> can contain any number off nodes too, it is active if ANY of the container nodes are active.

<Not> can only contain one node, it is active if the one node is NOT active.

<Option> cannot contain any other nodes, it actually checks a config option.

If you have problems, tell me what you are trying to do and we will get it working...
 
I will start to test things now. The mod seems to work again and the auto update is a good idea. I had sometimes three 7th Heaven directories in my FF7 folder.
 
Status
Not open for further replies.
Back
Top