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

Rundas

  • Freak
  • *
  • Posts: 728
  • Karma: 15
  • What do you even do?
    • View Profile
Re: 7thWrapper
« Reply #25 on: 2013-07-17 15:47:06 »
I'm excited about the new mods to come from the ability to do these things, nice work.

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 #26 on: 2013-07-17 18:58:11 »
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 Edit: 2013-08-03 13:17:32 by Iros »

Template

  • Freak
  • *
  • Posts: 861
  • Karma: 17
  • Life is a series of cats.
    • View Profile
Re: 7thWrapper
« Reply #27 on: 2013-07-17 19:26:41 »
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 Edit: 2013-07-17 19:28:27 by Template »

EQ2Alyza

  • 7th Heaven Crew
  • Global moderator
  • No life
  • *
  • Posts: 2577
  • Karma: 173
  • Dilly-Dally Shilly-Shally
    • View Profile
    • EQ2Alyza - YouTube Channel
Re: 7thWrapper
« Reply #28 on: 2013-07-17 21:29:36 »
This should be coupled with Saftle's idea for a FF7 Workshop. His tool can be used to organize and download compatible mods, and Iros' Mod Manager easily installs/uninstalls them.

EQ2Alyza

  • 7th Heaven Crew
  • Global moderator
  • No life
  • *
  • Posts: 2577
  • Karma: 173
  • Dilly-Dally Shilly-Shally
    • View Profile
    • EQ2Alyza - YouTube Channel
Re: 7thWrapper
« Reply #29 on: 2013-07-18 06:41:05 »
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.

Kaldarasha

  • No life
  • *
  • Posts: 1991
  • Karma: 118
  • Prince of Model Editing
    • View Profile
Re: 7thWrapper
« Reply #30 on: 2013-07-18 07:23:20 »
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

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 #31 on: 2013-07-18 08:28:51 »
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]
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.

Kaldarasha

  • No life
  • *
  • Posts: 1991
  • Karma: 118
  • Prince of Model Editing
    • View Profile
Re: 7thWrapper
« Reply #32 on: 2013-07-18 09:41:38 »
Can't bring it to work. :|
This is my mod.xml

Code: [Select]
<?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



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 #33 on: 2013-07-18 09:52:49 »
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.)

Kaldarasha

  • No life
  • *
  • Posts: 1991
  • Karma: 118
  • Prince of Model Editing
    • View Profile
Re: 7thWrapper
« Reply #34 on: 2013-07-18 10:04:01 »
Dosen't work. I had used this before.

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 #35 on: 2013-07-18 10:09:54 »
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?)

Kaldarasha

  • No life
  • *
  • Posts: 1991
  • Karma: 118
  • Prince of Model Editing
    • View Profile
Re: 7thWrapper
« Reply #36 on: 2013-07-18 10:13:51 »
This what I get when I try to use only the condinal replacement for Cloud.

Code: [Select]
LGPWrapper: no overrides for menu_us.lgp, early out

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

FindFirstFile 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 entries

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

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 #37 on: 2013-07-18 10:45:24 »
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]
<?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 Edit: 2013-08-03 13:17:56 by Iros »

Kaldarasha

  • No life
  • *
  • Posts: 1991
  • Karma: 118
  • Prince of Model Editing
    • View Profile
Re: 7thWrapper
« Reply #38 on: 2013-07-18 11:16:19 »
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.

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 #39 on: 2013-07-18 11:22:35 »
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 Edit: 2013-07-18 11:28:27 by Iros »

Kaldarasha

  • No life
  • *
  • Posts: 1991
  • Karma: 118
  • Prince of Model Editing
    • View Profile
Re: 7thWrapper
« Reply #40 on: 2013-07-18 11:34:28 »
 ;D
Yeah, I want ask you if it would possible to swap a model in general.
Some people like Cloud with the sword on his back and some not. It would be pretty cool to have the ability as in bootleg to chose a model with a preview pic, if the mod support it. Maybe an image folder with in the mod for the pics.

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 #41 on: 2013-07-18 11:50:01 »
;D
Yeah, I want ask you if it would possible to swap a model in general.
Some people like Cloud with the sword on his back and some not. It would be pretty cool to have the ability as in bootleg to chose a model with a preview pic, if the mod support it. Maybe an image folder with in the mod for the pics.

A picture in the mod folder / archive would be easy to do I suppose. But do you mean you could also have a single mod, that had different versions of the model in it, and you choose in the launcher which one to use?

I had thought that perhaps you would create two mods for that - but maybe this is not a good way to do it, especially if it is only 1 or 2 parts of the model are different. So OK, I will look at adding this option :)

Template

  • Freak
  • *
  • Posts: 861
  • Karma: 17
  • Life is a series of cats.
    • View Profile
Re: 7thWrapper
« Reply #42 on: 2013-07-18 12:06:30 »
I had thought that perhaps you would create two mods for that - but maybe this is not a good way to do it, especially if it is only 1 or 2 parts of the model are different. So OK, I will look at adding this option :)
Yah, it gets really specific like... a ribbon missing  :cry:

Can I have a pony, too? Seriously, though, this thing is revolutionary.

Kaldarasha

  • No life
  • *
  • Posts: 1991
  • Karma: 118
  • Prince of Model Editing
    • View Profile
Re: 7thWrapper
« Reply #43 on: 2013-07-18 12:26:19 »
The point is I have made many versions of Cloud (original style, Crisis Core style, plus a different styles of his sword)
The folder looks a bit messy and everybody is asking me, what he needs to install.
In the end, yes, it would be good to have choose option, because it would help to keep the mod folder as small as possible.

But every thing is working and I'm happy. Except the Pack mod function is a bit buggy. If I browse save archive to, it open a subfolder when I click on safe.

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 #44 on: 2013-07-18 12:40:45 »
But every thing is working and I'm happy. Except the Pack mod function is a bit buggy. If I browse save archive to, it open a subfolder when I click on safe.

Hmm, open a subfolder? You should just tell it what filename to save the packed mod to?

Kaldarasha

  • No life
  • *
  • Posts: 1991
  • Karma: 118
  • Prince of Model Editing
    • View Profile
Re: 7thWrapper
« Reply #45 on: 2013-07-18 13:25:05 »
I click on browse symbol "..." write the name and then I chose save and then it open a subfolder.
Well, I wrote the name in 'Save archive to:' with the ending .iro. It has created the file in the 7thWrapper folder, I took it and put it in the wrapped folder. After this I activated it in the mod loader, launched the game without any problems, but it didn't change anything.

Here is the file:
2UM.7z


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 #46 on: 2013-07-18 13:45:52 »
Well, a packed mod shouldn't change how anything works. It should just load a bit faster (although probably we can't tell unless the mod is thousands of files!) and is maybe easier to distribute.

EQ2Alyza

  • 7th Heaven Crew
  • Global moderator
  • No life
  • *
  • Posts: 2577
  • Karma: 173
  • Dilly-Dally Shilly-Shally
    • View Profile
    • EQ2Alyza - YouTube Channel
Re: 7thWrapper
« Reply #47 on: 2013-07-18 19:11:56 »
I think Kaldarasha is correct, but to make it clear:

Code: [Select]
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 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.

This is what I tried, but I have yet to get it to work. It has to be an error on my part, but being such a simple setup, I don't know where I've gone wrong. I'll fiddle around with it more tonight.

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 #48 on: 2013-07-18 20:59:09 »
If you still have problems, please post the debug output from when you run the game, it may help me find out what has gone wrong.

EQ2Alyza

  • 7th Heaven Crew
  • Global moderator
  • No life
  • *
  • Posts: 2577
  • Karma: 173
  • Dilly-Dally Shilly-Shally
    • View Profile
    • EQ2Alyza - YouTube Channel
Re: 7thWrapper
« Reply #49 on: 2013-07-19 03:02:15 »
Where is the debug output?