Hellgate Revival :: Forums

Hellgate: London (Single Player) => Modification => Topic started by: Kite on Dec 01, 2009; 05:50 PM

Title: Modfile Inspector, files.xml editor, ModPackage Creator 1.2c
Post by: Kite on Dec 01, 2009; 05:50 PM
I've been playing around with the Reanimator Tool for the past few hours (nice work! :mrgreen:) and I quickly got tired of always having to copy the modified files to their respective folders... As I had nothing else to do (who cares about studying xD) I thought I'd try programming a little tool that allowes me to directly create a mod package from those cooked files... However as the new HGL launcher doesn't seem to like my own zipped mod packages, I didn't care about implementing this functionality...
When placed in the "Flagship StudiosHellgate London" folder (together with the Reanimator.jar) the program searches for all *.txt.cooked files located in this folder level, creates a new mod package folder + directory tree structure and places the files in their respective folders.

I tried to keep the tool as simple as possible and made it command-line based so it can be used for scripting or whatever other purposes. When running the program you can decide wether you want to add information like the name of your mod (also used as mod folder name), the version, or the author's name (the corresponding "modinfo.ini" file will be created automatically), or if you just want to create the package using standard values (empty name, version, author fields in the "modinfo.ini").

All in all I just want to hear what you guys think of this and where you see some potential for improvements...

How to start:
First of all I expect the Reanimator.jar to be located in the "Flagship StudiosHellgate London" folder (where the NewLauncher.exe is located), so that all the modified files created by Reanimator are also being placed in this folder. The "ModPackageCreator.exe" and its "files.xml" file should also be placed in this folder.
To use the program, either create a shortcut and add the startup parameters there (e.g. "-n "My New Mod" -v "1.2.0" -a "Kite") or open up a command prompt. For quick&dirty tests you can also use the parameter "-x" which will tell the program to just use standard values for all fields.
The final mod package will also be located in the "Flagship StudiosHellgate London" folder.

Important: As the program was written in C# it requires the .Net Framework 2.0 to run!

I might also add a GUI in the near future or add some more customization options (currently there is no option to specify where the final mod package should be created etc.)

(http://http://img695.imageshack.us/img695/5948/mpc.png)

(http://http://img686.imageshack.us/img686/5451/mpcgui.png)

HINT:
I tried to find all possible bugs or errors (and I'm pretty confident I slayed most of them :)), but some might still be left. Use with caution and don't blame me if anything bad happens :P If anyone is interested, I can also provide the source-code (undocumented and don't comment on my programming style... or lack thereof xD)

HINT2:
As I have no connection to the development process of the SP modification or Revival, there is no use in asking maeyan or any other developer for help concerning this tool. If you have any problems or questions, feel free to contact me via PM :)



In return I have a small question regarding the "modinfo.ini" file:
Would it be possible to add additional entries to the file like
"Short description" - for a short summarization of what this mod does and
"Description" - for a more complete list of changes?
I think this might help keeping track of all the different mods when having a huge amount of packages...



EDIT:
Added a simple GUI that requires the ModPackageCreator.exe (you need to download both files).

EDIT2:
Just came accross a buggy function in the GUI... v1.1 is the newest version.

EDIT3: v1.2
Added requested features to the ModPackageCreator:

Added features to the GUI:

EDIT4: v1.3
Added zipping functionality (and enabled it in the GUI) to automatically zip the created mod package. Uses "SharpZipLib" http://www.sharpziplib.com/ (http://www.sharpziplib.com/) under the GPL license http://www.icsharpcode.net/OpenSource/S ... ib/GPL.asp (http://www.icsharpcode.net/OpenSource/SharpZipLib/GPL.asp)
WARNING:
As I am deleting the "normal" unzipped mod folder after zipping it, make sure you use a folder name that isn't already existing, e.g. if you name your mod "ABC" and you already have a folder called "ABC", the mod files will be placed inside this folder, but at the end of the progress, the whole folder will be deleted (files can still be found in the zipped folder)! Keep this in mind and you'll have absolutely no problems :)

EDIT5: v1.4
Added requested features to the ModPackageCreator:

GUI changes:

EDIT6: v1.5 (Creator)
The basic functionality and features of v1.5 are the same as in v1.4. No new features were added, no errors were corrected. The only difference (for programmers) is, that I cleaned up the code, extracted the main functionality and placed it in a seperate DLL (ModPackageCreatorLib.dll) so the most important methods can be used without the need of using the console or parameters. All methods inside the DLL are fully commented so if you are using MS Visual Studio you'll see those neat little help lines and explanations.


EDIT7: v1.5 (GUI)
Added a config file for the GUI which allows you to determine the standard values for all the GUI fields. This way you can save your most commonly used settings (e.g. Mod name, author, target folder, if the folder should be zipped, etc.) and are not forced to enter them each time you start the GUI. Edit the *.config file by hand to make changes.
(http://http://img692.imageshack.us/img692/6453/unbenanntkt.png)


EDIT8: v1.6 (Creator + GUI)
Added a new option to specify the type of the mod (base/original) and modified the command-line arguments to match the new parameter.
Changed some command-line arguments:
Changed -t to -i (installation type)
Changed -m to -o (onlyUseModifiedFiles)
Added -m (mod type)
[attachment=0:wklvmmpq]ModPackageCreator v1.6 - ModPackageCreator - GUI v1.6.zip[/attachment:wklvmmpq]

Additionally, you can download a new, reworked standalone version of the GUI featuring the creation of multiple mod packages from the next page (http://http://www.hellgateaus.net/forum/download/file.php?id=1606).(recommended)[/b]


Known bugs/possible problems:
Even though the "files.xml" is designed so that other files and their locations inside the mod package can be added, the Creator and the GUI are currently only looking for *.txt.cooked files, when no arguments are specified via the "-c" switch. I haven't tested this yet, but the program MIGHT process those files correctly when passing these files as arguments via "-c".
Sometimes small changes to *.txt.cooked files aren't recognised correctly when using the option "onlyUseModifiedFiles" resulting in the file not being used as it is "identical" to the original file.

Resolved bugs:
Title: Re: Mod Package Creator
Post by: ElectricMessiah on Dec 01, 2009; 10:39 PM
I'm probably going to regret this question....

Where is the Reanimator download?  I've not seen a link for it yet.  (runs and hides).
Title: Re: Mod Package Creator
Post by: Kite on Dec 01, 2009; 11:14 PM
The Reanimator is a tool only available for Founding members -> viewtopic.php?f=2&t=42 (http://www.hellgateaus.info/forum/viewtopic.php?f=2&t=42)
Title: Re: Mod Package Creator
Post by: maeyan on Dec 02, 2009; 12:06 AM
This is really cool Kite. Well done!  :D I love community contributions

The new Reanimator suite is written in C# and defines a new modding method, that is actually an XML schema designed to script the modifications. This allows us to combine multiple modifications. There are lots of other tasty tools too, such as IDX explorer and DAT repacking (handy for replacing movies, sounds and strings). If your interested in contributing, send me a PM and i'll hook you up with the SVN credentials.
Title: Re: Mod Package Creator
Post by: Malachor on Dec 02, 2009; 08:49 AM
Hi Kite, great program, but could you add the option to modify "type=", so we can use opt-in, opt-out or required, rather than just required?
Could you also add the option to specify the files that go into it? I ended up with 3 txt.cooked files, 2 I expected, 1 I didn't(since I hadn't modified it).
And I was wondering why you've kept the older version of the gui? It might make it a bit confusing, since the main program is with the older version of the gui.
Title: Re: Mod Package Creator
Post by: Kite on Dec 02, 2009; 10:27 AM
Quote from: "maeyan"
This is really cool Kite. Well done! :D I love community contributions
Thanks :)

Quote from: "maeyan"
The new Reanimator suite is written in C# and defines a new modding method, that is actually an XML schema designed to script the modifications. This allows us to combine multiple modifications. There are lots of other tasty tools too, such as IDX explorer and DAT repacking (handy for replacing movies, sounds and strings). If your interested in contributing, send me a PM and i'll hook you up with the SVN credentials.
The scripting part sounds very good, especially the combinations of different modifications... I already wanted to ask if something like this might be possible :)
Regarding contributions, you'll probably hear from me one of these days :)


Quote from: "Malachor"
Hi Kite, great program, but could you add the option to modify "type=", so we can use opt-in, opt-out or required, rather than just required?

Sure can do. As I couldn't find any mod that uses something other than "required" I thought I'd be on the safe side if I just kept it at that. But its no big deal changing that.


Quote from: "Malachor"
Could you also add the option to specify the files that go into it? I ended up with 3 txt.cooked files, 2 I expected, 1 I didn't(since I hadn't modified it).

Hmmm... up till now I just take all the files Reanimator creates, so each file is taken.
Are you talking about
1. adding additional parameters to be passed to the program that specify the files
2. a separate... say... XML file where you can specify those files, or
3. the programm actively discovering which files were really modified?


Quote from: "Malachor"
And I was wondering why you've kept the older version of the gui? It might make it a bit confusing, since the main program is with the older version of the gui.

I'm not that used to this version of the board software and I tried all buttons I could find to delete the old version, but had no luck... Maybe one of you can help me there xD

EDIT:
OK... guess I'm blind xD Removed the old version...
Title: Re: Mod Package Creator
Post by: Malachor on Dec 02, 2009; 11:33 AM
Quote from: "Kite"
Hmmm... up till now I just take all the files Reanimator creates, so each file is taken.
Are you talking about
1. adding additional parameters to be passed to the program that specify the files
2. a separate... say... XML file where you can specify those files, or
3. the programm actively discovering which files were really modified?
I'd say either #1 or #3 (maybe this would be the best) would be good.
Title: Re: Mod Package Creator
Post by: Kite on Dec 02, 2009; 02:40 PM
Quote from: "Malachor"
I'd say either #1 or #3 (maybe this would be the best) would be good.

Okay, the new version is up and I also updated the GUI to support the new features. For now I went with option #1 as I'm not quite sure how to solve option #3. As far as I understand it, Reanimator only modifies files and doesn't add any new entries, so comparing file sizes might not work (only parameters that are already existing are changed).

IMHO this issue should be handled in Reanimator itself so that it doesn't provide/create cooked files which weren't even modified...


I'm not quite sure if I should remove the ".txt.cooked" extension from the cooked files when passing them to the Creator, as the parameter list can get pretty long (-c "affixes.txt.cooked;gameglobals.txt.cooked;items.txt.cooked;monsters.txt.cooked;offer.txt.cooked;treasure.txt.cooked;"). On the other hand handling it this way is pretty easy and straightforward, as this is the format I get when searching for all files in a folder...
Title: Re: Mod Package Creator
Post by: Malachor on Dec 03, 2009; 01:43 AM
Quote from: "Kite"
IMHO this issue should be handled in Reanimator itself so that it doesn't provide/create cooked files which weren't even modified....
Reanimator didn't modify the 3rd file. I only had 2 files, that were modified, in the hellgate base folder; where reanimator.jar, and Mod Creator Package.exe are.

Ok, one more thing the latest version created the data folder, but not the excel folder within it. Though it created the data_commonexcel folder.
So my file structure looks like this:
basedataitems.txt.cooked
basedatatreasure.txt.cooked
basedata_commonexcel

when it should be:
basedataexcelitems.txt.cooked
basedataexceltreasure.txt.cooked
basedata_commonexcel
Title: Re: Mod Package Creator
Post by: Kite on Dec 03, 2009; 09:37 AM
Hm... this could be a mapping problem... Try modifying the files.xml and change the part

Code: [Select]
<folder name="Data">to
Code: [Select]
<folder name="Dataexcel">
The files.xml is used by the Creator to determine in which folders the different *.txt.cooked files have to be placed when creating a mod package. Basically it is just a representation of the HGL folder structure. This little change should do the trick... I can't check this as I'm currently at my university, but as soon as I'm home I'll have a look at this. I thought I had checked wether all the paths are correct, but looks like I missed this part :)

I think I will rename the files.xml to mapping.xml in my next version... This might make things a little bit less confusing :P
Title: Re: Mod Package Creator
Post by: Malachor on Dec 03, 2009; 11:11 AM
That fixed it.
Title: Re: Mod Package Creator
Post by: Kite on Dec 03, 2009; 10:06 PM
Whew... checking for modified files is implemented, zipping is also working... and I think I finally implemented all features you were asking for Malachor :) My code won't win any price for runtime efficiency, but its doing the job xD

Any other new requests and/or suggestions are welcome, so if you can think of anything, let me know :)
Title: Re: Mod Package Creator (for Reanimator)
Post by: freekyjason on Dec 12, 2009; 04:03 AM
grats kite, nice little program that should help the modders :P
Title: Re: Mod Package Creator v1.5 (for Reanimator)
Post by: Malachor on Jan 01, 2010; 04:49 AM
Just one more suggestion, though it's not regarding the mod creator: When you edit your original post, may I suggest that you post in the thread that you've updated it. I've just looked at this since I'm having trouble seeing anything* when I install one of my mods, to test the installation, and I've been using 1.4, and I've just noticed that you've got version 1.5 out. Your last update was on the 20th of decemeber, but since the last post was the 12th, I didn't realise you were still updating this.



*it's as though the modinfo isn't being recognised. I've noticed this even when I right click on the mod folder and send to a zip file, or even using winrar directly, so I don't think it's a problem with your program.

Edit: Ok, just tried gui version 1.5 out, and it can't find any cooked files, even though I've changed the target folder to the hellgate londondataexcel folder. And I can't select what files to use. I can click on the "Cooked files to use" button but nothing happens, even the "..." button beside it doesn't do anything.
Title: Re: Mod Package Creator v1.5 (for Reanimator)
Post by: Kite on Jan 01, 2010; 02:13 PM
I know where you're coming from... the next time I update the tool I'll definitely add the update date to the thread title and make a post... Up till now I didn't post in here but edited my first post as I didn't want to make too many double posts.

Quote from: "Malachor"
Ok, just tried gui version 1.5 out, and it can't find any cooked files, even though I've changed the target folder to the hellgate londondataexcel folder. And I can't select what files to use. I can click on the "Cooked files to use" button but nothing happens, even the "..." button beside it doesn't do anything.

Ok let's see...
I made some assumptions (see my first post) on where to place the "ModPackageCreator.exe", so I'm pretty much using hard-coded relative paths instead of checking the windows registry or asking the user for the paths...

(http://http://img706.imageshack.us/img706/5948/mpc.th.png) (http://http://img706.imageshack.us/i/mpc.png/)

1. The "ModPackageCreator.exe" (+ GUI) has to be placed in the main folder of your HGL installation (e.g. E:Program FilesFlagship StudiosHellgate London) where all the relevant game directories and the launcher.exe are
2. I also expect the "*.txt.cooked' files from the "Reanimator.jar" to be located in this directory
3. Try unchecking the box "Only use modified files" and see if you're now able to create a package. There might be a problem with my hashing algorithm... I'm currently using a MD5-hash to compare the "old" and the "new" *.txt.cooked files... Sometimes when there are only very few changes in the file (e.g. editing a value from 10 to 100 and then saving the file) the algorithm doesn't seem to detect the modification. I'm thinking about replacing this with a CRC32 check sum for higher reliability...
4. The "..." button next to the "Cooked files to use" dropdown list is only used to update the list in case you're running the program before creating the cooked files
5. The "Target folder" button describes the directory the complete mod package should be placed in

In the future I might create a kind of manual explaining the different options and buttons of the GUI... Depending on how much time I can spare I also might do a complete overhaul of the GUI, enabling you to select all the paths and adding some more explanations...


Regarding your problem with the modinfo.ini:
I tried several different target folders and zipped/unzipped the folder several times but could not reproduce your problem... Over here the file is always recognized and displayed fine in the "NewLauncher.exe". The only thing I noticed is that the "NewLauncher.exe" seems to ignore my opt-in/opt-out values and always uses "required"... Am I using the wrong commands/names/values here?

[img=http://img64.imageshack.us/img64/9813/unbenanntjj.png (http://http://img64.imageshack.us/i/unbenanntjj.png/)
Title: Re: Mod Package Creator v1.5 (for Reanimator)
Post by: Malachor on Jan 02, 2010; 12:24 AM
Quote from: "Kite"
2. I also expect the "*.txt.cooked' files from the "Reanimator.jar" to be located in this directory
Because I assumed(for some reason) that target folder actually meant source folder :roll:  this is why it was saying that it can't find the files.
I don't about the type problem, from what I've seen it should work. the options are just:
type=opt-in, type=opt-out, and type=required.
Title: Re: Mod Package Creator v1.5 (for Reanimator - 20.12.09)
Post by: Malachor on Jan 02, 2010; 06:04 AM
All righty then :)
I think I've worked out the main issues.
I've set up my mods like this:
Purchaseable_Cubemodinfo.ini
Purchaseable_Cubebasedataexcelitems.txt.cooked
Purchaseable_Cubeoriginaldataexcelitems.txt.cooked

The problem is, when I right-click - "send to" - compressed(zipped) file it creates a zip file like this:
Purchaseable_Cube.zipPurchaseable_Cubemodinfo.ini
Purchaseable_Cube.zipPurchaseable_Cubebasedataexcelitems.txt.cooked
Purchaseable_Cube.zipPurchaseable_Cubeoriginaldataexcelitems.txt.cooked

When NewLauncher is expecting only:
Purchaseable_Cube.zipmodinfo.ini
Purchaseable_Cube.zipbasedataexcelitems.txt.cooked
Purchaseable_Cube.ziporiginaldataexcelitems.txt.cooked

Also, when you only have one option in your mod, it will be "required", even if your mod is either "opt-in", or "opt-out".
There must be more than one option for either opt-in, or opt-out, to work.
I guess you'd have to uncheck create zipped files, create your other options, then zip them up together.
Making sure that all of the options are in the one folder, and using the one modinfo.ini file.
Perhaps you'd like to add support for additional mod options Kite?
Title: Re: Mod Package Creator v1.5 (for Reanimator - 20.12.09)
Post by: Kite on Jan 02, 2010; 02:12 PM
UPDATE TO v1.6

Quote from: "Malachor"
I guess you'd have to uncheck create zipped files, create your other options, then zip them up together.
Making sure that all of the options are in the one folder, and using the one modinfo.ini file.
Perhaps you'd like to add support for additional mod options Kite?

For now I added the option to specify if the mod is of "base" class or just "optional"... I also tried to modify the current GUI to allow multiple mod options, but it looks like this is not an easy thing to do in my current design. I'll have to redesign the GUI structure (design + data structure) from scratch to add these options and I also might have to modify the ModPackageCreator component itself to allow this. Not really difficult but time consuming.


As I want to keep the program as simple as possible so that the user doesn't have to prepare anything by hand (like moving files to certain directories) I'm having some problems deciding on how to structure the workflow of the new GUI. If you want to add multiple mods to one package you'll probably have to switch between Reanimator and the ModPackageCreator a few times... Reanimator for modifying the first load of files, MPC for creating the first package, then Reanimator again for the second load of files, then MPC for creating the second mod package...
Title: Re: Mod Package Creator v1.6 (for Reanimator - 02/01/2010)
Post by: Kite on Jan 06, 2010; 09:13 PM
New GUI Preview (Updated)

As my old GUI design was not capable of creating and handling multiple mods in one mod package, I've decided to redo the whole MPC design from scratch and add the features Malachor suggested. This is an early preview version of the new user interface (no mod packaging functionality included!) to get some feedback and other suggestions from the actual users.

Requires .Net framework 3.5


(http://http://img12.imageshack.us/img12/9329/newgui.th.png) (http://http://img12.imageshack.us/i/newgui.png/)
(http://http://img64.imageshack.us/img64/5188/newgui1.th.png) (http://http://img64.imageshack.us/i/newgui1.png/)
Imitation of the Hellgate Revival SP mod version 1.2 (optional files) folder structure as example.
Title: Re: Mod Package Creator v1.6 (02/01/2010) + new GUI preview
Post by: ajf64 on Jan 06, 2010; 09:27 PM
its nice but not really much to see may be get a bit more creative with  the buttons
Title: Re: Mod Package Creator v1.6 (02/01/2010) + new GUI preview
Post by: Kite on Jan 07, 2010; 05:41 PM
<mod>
<name>Test</name>
<version>
<majorVersion>0</majorVersion>
<minorVersion>0</minorVersion>
<subVersion>1</subVersion>
</version>
<extension>.mod.zip</extension>
<link>http://www.hellgateaus.info/forum/download/file.php?id=1599</link>
</mod>

Quote from: "ajf64"
its nice but not really much to see may be get a bit more creative with  the buttons

Well... GUI design is the last thing I'll be doing as this program is mainly about functionality and usability, not looks ;)
I already thought about adding a kind of Hellgate-ish theme, but manipulation of the design is not supported by most of the control elements. For now I'll just stick with the plain but easy-to-see buttons...

@Malachor:
I'm currently in the final stage of implementing the actual mod packaging functionality. As the new program allows the user a lot more freedom in selecting which files to use (compared to the old GUI), I'll probably drop the "check if file was modified" functionality. If I do implement it I will change its functionality to highlighting files (red background) that weren't modified instead of not even showing them in the file selection. This way users can (theoretically) create a backup of their current installation...
Title: Re: Mod Package Creator v1.6 (02/01/2010) + new GUI preview
Post by: ajf64 on Jan 08, 2010; 05:52 AM
ya i really don't see any thing wrong with it its clean and functional
Title: Re: Mod Package Creator v1.6 (02/01/2010) + new GUI preview
Post by: Kite on Jan 08, 2010; 10:03 PM
New MPC GUI v1.0

Here you go, the first functional version of my new GUI design including support for multiple mod packages. If you need help or find any bugs or errors, let me know :)

[attachment=0:34qfjtm8]MPC-GUI.rar[/attachment:34qfjtm8]

Hint:
If you encounter the error message *"files.xml" contains no valid mapping path for the file "abc.xyz"* the file you want to add is not specified in the "files.xml" mapping file. In this case simply open the "files.xml" with any text editor and do the following:

If you want to add a new folder that is not currently specified in the list (e.g. you want to add new advertisements) add a new entry
Code: [Select]
 <folder name="Databackground_advertisements">
  </folder>
where the path in "name" is the folder path starting in the HGL main directory.
To specify which files (e.g. modified advertisements) should be placed at the end of this path, add the following entries between the <folder> and the </folder> tags:
Code: [Select]
 <folder name="Databackground_advertisements">
    <file>ad01.dds</file>
    <file>ad02.dds</file>
  </folder>
Now the program knows where to place these files the next time when you pass them to the mod file list.

Known problems:
Adding multiple files that share the same name to a single mod is not supported, yet. Example: The Zomper mod contains a texture "zombie_male_diffuse.dds" which is available for normal and low resolution (in the folder "low"). As both files have the same name the folder mapping cannot be completed as the program cannot determine where to place the "low" file.
Possible solution (not implemented, yet): As all names must be unique, I'm thinking about solving this special issue by requiring something like a "#low" postfix in the name ("zombie_male_diffuse.dds#low"). Via this postfix I could determine that the file should be placed in a folder "low", while having a unique name.
Title: Re: Mod Package Creator v1.6 + new GUI v1.0 (08/01/2010)
Post by: ajf64 on Jan 09, 2010; 05:13 AM
nice work seems to work perfect for me
Title: Re: Mod Package Creator v1.6 + new GUI v1.1 (Jan 20, 2010)
Post by: Kite on Jan 20, 2010; 12:22 PM
<mod>
<name>Test</name>
<version>
<majorVersion>0</majorVersion>
<minorVersion>2</minorVersion>
<subVersion>0</subVersion>
</version>
<extension>.mod.zip</extension>
<link>http://www.hellgateaus.info/forum/download/file.php?id=1599</link>
</mod>


MPC_GUI v1.1

Fixed some bugs
Title: Re: Mod Package Creator v1.6 + new GUI v1.1 (Jan 20, 2010)
Post by: Kite on Jan 20, 2010; 10:21 PM
MPC_GUI v1.2

Fixed a bug that only appeared when adding ONE mod to the mod package (lol...).

The "files.xml" file I use inside of my program tells the creator, in which directories/subdirectories the ModPackageCreator should place the the different files you added. It is based on XML so its pretty easy to extend the current list of files with new ones (I didn't add all the "file -> folder" mappings as there are just too many... Up till now I only added those I really need). If you get the message that some xml mappings are unknown or could not be found, you need to specify those mappings by hand.

The basic structure of the  files is:
<known_files>...</known_files>:
Starts a list of known mappings. Place new files between these two tags

<folder name="data_commonexcel">...</folder>:
Tells the program that there is a new folder with files to use for the mapping. "name" contains the folder path of the files (the HGL installation directory is the "root" directory" and doesn't have to be specified).

<file>gameglobals.txt.cooked</file>:
You can use this tag to tell the program which files have to be placed inside of the specified folder. Just place this tag between the two "<folder>" tags. Use the complete filename.

This only needs to be done ONCE for each file!


e.g.
If you want to add the file "items.txt.cooked" (already there, but as an example) to the mapping you need to do the following:
Open "files.xml" inside of a normal text editor and add a new "<folder></folder>" tag to the end of the list right before the "</known_files>" tag. If the path to the original "items.txt.cooked" file would look something like this "D:Flagship StudiosHellgate LondonDataexcelitems.txt.cooked", you set the "name=" attribute of the tag to "Dataexcel":
Code: [Select]
<folder name="Dataexcel"></folder>Now the program knows that there is a folder with the name "Dataexcel" inside the HGL directory. To add files to this folder you add a "<file></file>" tag inside of the "<folder></folder>" tag. Inside this "<file>" tag, specify all the files that are inside of this folder.


The final xml structure should then look similar to this:
Code: [Select]
<known_files>
    <folder name="Dataexcel">
        <file>items.txt.cooked</file>
        <file>quests.txt.cooked</file>
        .
        .
        .
    </folder>
    .
    .
    .
</known_files>



PS: As there doesn't seem to be much interest in this tool, I'll probably discontinue this project. This will be the last version.
Title: Re: Mod Package Creator: New MPC_GUI v1.2 (Jan 20, 2010 UPDATED)
Post by: Kite on Feb 06, 2010; 03:35 PM
Modfile Inspector

Another little tool for all the lazy people and modders out there who want to know whats inside a mod package without having to browse through all the folders (If a package contains multiple mods, the program WON'T differentiate between them!).

(http://http://img13.imageshack.us/img13/3507/unbenanntsc.png)

[attachment=0:2e94x1gu]Modfile_Inspector.zip[/attachment:2e94x1gu]
Title: Re: Mod Package Creator + Modfile Inspector
Post by: Kite on Feb 28, 2010; 01:51 PM
files.xml editor

This small tool simplifies the modification of the "files.xml" used by the ModPackageCreator so there's no need to edit it by hand. Use this tool if you want to add additional cooked files or textures to your mod packages that aren't specified inside of the files.xml yet.

[attachment=0:r48zkr02]filesXml_editor.zip[/attachment:r48zkr02]


PS:
Feel free to share your modified files.xml files inside this thread.
Title: Re: Mod Package Creator + Modfile Inspector + files.xml editor
Post by: Coldheart on Mar 02, 2010; 06:38 PM
Question...

Here are some files and the actual directories they reside in:
----------------------------------------------
databackgroundstationposters01.dds
databackgroundstationtrashcan01.dds

databackgroundstationlowposters01.dds
databackgroundstationlowsmcratewood01.dds
databackgroundstationlowsmvending01.dds
databackgroundstationlowtrashcan01.dds
databackgroundstationlowwarningsigns01.dds

databackgroundtubebdumpster.dds

databackgroundtubestationsliverpoolstreetlp_halla_advertslightingmap.dds
databackgroundtubestationsliverpoolstreetlp_hallb_advertslightingmap.dds

----------------------------------------------

I already have the modified files ready to go, but when using the MPC-GUI, the destination paths created do not correspond to the path the file is in. How do I edit that generated path to the one I want the modder to use?


This may not look correct, but I do know the above paths are the ones I need as the files I changed worked with the 0.7 fun patch.
Title: Re: Mod Package Creator + Modfile Inspector + files.xml editor
Post by: Kite on Mar 02, 2010; 08:50 PM
Quote from: "Coldheart"
Question...

Here are some files and the actual directories they reside in:
----------------------------------------------

I already have the modified files ready to go, but when using the MPC-GUI, the destination paths created do not correspond to the path the file is in. How do I edit that generated path to the one I want the modder to use?


This may not look correct, but I do know the above paths are the ones I need as the files I changed worked with the 0.7 fun patch.
Hmm... strange... I had a look at the locations of these files (directly inside the original game files) and a lot of textures are placed in other folders than those you mentioned... (most of the files are in a "low" subfolder).

Well... anyway if you want to modify the folders the "MPC_GUI" places the files in you can either modify the "files.xml" file by hand or use the "files.xml editor". Just place the "filesXml_editor.exe" in the same folder the "files.xml" file is in and start the executable.

(http://http://img237.imageshack.us/img237/161/filesr.png)

If you want to add a new folder:
Type in the path to the new folder in the textbox below and click "Add this folder".

If you want to modify an existing folder path:
Select the folder you want to modify on the left side and correct its name in the textbox above (Modify folder).

If you want to remove a folder:
Select the folder you want to remove on the left side and click "delete selected". This will delete the wrong folder mapping and all the file mappings within the folder.


If you want to add a new file:
Select the folder you want to add the file to on the left side. Type the name of the new file into the textbox on the right side and click "Add this file".

If you want to modify an existing file:
Select the file you want to modify on the right side and modify the filename in the textbox above (Modify file).

If you want to delete a file:
Select the file on the right side and click the "delete selected" button.


If you want to save your modifications:
Click the "Save" button (the floppy disk icon) in the top left corner of the window.

If you want to revert your changes/reload the file:
Click the "Reopen/Reload" button (the folder icon) in the top left corner of the window.
Title: Re: Mod Package Creator + Modfile Inspector + files.xml editor
Post by: Malachor on Mar 02, 2010; 10:33 PM
Quote from: "Kite"
Quote from: "Coldheart"
Question...

Here are some files and the actual directories they reside in:
----------------------------------------------

I already have the modified files ready to go, but when using the MPC-GUI, the destination paths created do not correspond to the path the file is in. How do I edit that generated path to the one I want the modder to use?


This may not look correct, but I do know the above paths are the ones I need as the files I changed worked with the 0.7 fun patch.
Hmm... strange... I had a look at the locations of these files (directly inside the original game files) and a lot of textures are placed in other folders than those you mentioned... (most of the files are in a "low" subfolder).
Don't forget to look in the other dats.
I have each dat in it's own folder structure, and also another folder with all of the dats together, and those files Coldheart mention are in the correct folders.
Title: Re: Mod Package Creator + Modfile Inspector + files.xml editor
Post by: Coldheart on Mar 03, 2010; 05:27 AM
Okay, I was going through some of the old files and posts from when I had done this before.
There are 'low' subfolders and I believe it was Berit who told me about the low folders being used for low resolution displays and objects as seen from a distance.

I did get the files to work.  I had been following the instructions as seen in Kite's notes; but, like an idiot had been doing changes on a copy of the files.xml I had in a different directory and not the actual files.xml file the utility had been using.
Wow, what a difference when one uses the correct, modified files.xml file.  :roll:

btw... I uploaded my coldheart_1_1_1.mod.zip in the thread where I had asked for mod help.  (would have linked it, but the Img and URL buttons above just wrap the selected text between the IMG and URL tags... couldn't browse back to the thread itself...)
Title: Re: Mod Package Creator + Modfile Inspector + files.xml edit
Post by: Kite on Mar 23, 2010; 06:10 PM
MPC_GUI 1.2b

Minor bug fixes + error log
Title: Re: Mod Package Creator + Modfile Inspector + files.xml edit
Post by: Kite on Mar 23, 2010; 08:17 PM
MPC_GUI 1.2c

Fixed a problem when different mods contain the same files/file names
Title: Re: Modfile Inspector, files.xml editor, ModPackage Creator
Post by: Arcana on Jul 07, 2010; 09:29 PM
All the zip are damaged or  not valid can you made a new one?
Title: Re: Modfile Inspector, files.xml editor, ModPackage Creator
Post by: Kite on Jul 08, 2010; 10:30 AM
Ah right, totally forgot about this thread xD
Let's see...

I'll reupload all tools in this post, as the forum always throws some strange "unable to determine the image size" errors when trying to modify my old existing posts...

Reuploaded versions:
[attachment=2:13wqxl6n]filesXml_editor.zip[/attachment:13wqxl6n][attachment=1:13wqxl6n]Modfile_Inspector.zip[/attachment:13wqxl6n][attachment=0:13wqxl6n]MPC-GUI.zip[/attachment:13wqxl6n]