Log in

View Full Version : modMerge.js


Fader_Berg
03-26-10, 05:46 PM
modMerge.js appends your mods menu_1024_768.ini items to the users customized one without a fuzz, (well not for sure - it's still in alpha stadium - but almost).
Read the source for more details... and see http://www.subsim.com/radioroom/showthread.php?t=166246 for an example.

Features:
- Appends items to respective group by giving it the next free item number.
- Generates a new ItemID if necessary.
- If a new object got the same name as a existing one, the user gets a question whether to replace or append the object.

Instructions:
To install ModMerge, simply put the modMerge.js script in your SH3 directory.

To merge a mod, drag and drop the mods *-objects.ini file on to the modMerge script. It will merge, (or replace) the new objects in a new menu_1024_768.ini file. It will not overwrite your existing one. That part will be left for JSGME.
The new menu file will be created in .\data\Menu from where the *-objects.ini file is located. If the path exists that is, otherwise it will be created in the same directory as the *-objects.ini file. So...

A good way to install a mod that supports modMerge is...

1. Unzip the mod into your MODS folder.
2. Drag and drop the *-objects.ini file on to the modMerge script.
3. Enable the mod in JSGME.


Download here (http://www.skyffet.net/modMerge.zip).

C h a n g e L o g
================================================== ==============================
0.3.1
- Changed the ini parsing method.

Before the items in ini-files had to be separated with one empty
line. This is no longer necessary.

0.3.0
- Changed the way modMerge treats the SH3 path.

Before modMerge used the installation register value to find out
where SH3 was installed. This was a problem with multiple installs.
From now on, modMerge expect to be located in the SH3 directory and
simply uses the menu.ini-file for that particular installation.

Hitman
03-27-10, 03:48 AM
Wow a new modding tool, GREAT :woot:

Fader_Berg
03-27-10, 08:48 AM
Bugfix... download updated.

Rubini
03-27-10, 04:34 PM
How it works? It adds any new entries (one or more) for a giving group on the menu_1024 and automatically renumber them?:hmmm:

If so this is avery good tool!

Fader_Berg
03-27-10, 05:59 PM
How it works? It adds any new entries (one or more) for a giving group on the menu_1024 and automatically renumber them?:hmmm:

If so this is avery good tool!
Like you said. It appends (or replace) one or more entries in the menu_1024_768.ini file, and gives them correct item- or index- (whatever the I stands for) numbering for any given group.
It doesn't work with any mod though. The mod creator has to create a newMenuObjects.ini-file for this script to work.

Yes, I've missed it.

Fader_Berg
03-27-10, 07:39 PM
New ItemIDs are now created if necessary. Download updated. Last micro change update... I promise. It just felt fundamental for the sake of it.

(I don't want to update this thread every time I make a change. So the latest version will be available for download at the link below no matter the change.)

Rubini
03-27-10, 09:51 PM
Humm...it donīt find my in use directory for Sh3. I guess that you know that a lot of ppl donīt use the game official installation directory. We have a lot of copies of a stock 1.4b SH3 to be used with different big mods, etc.

I guess that you get my point. Just make the tool ask for the "in use" Sh3 directory installation or make it get the menu_1024 file from the same directory that modMerge.js is. I guess that this last is the better because this way we can test/use any menu_1024 that we want before merge anything.

So, in truth i could not use it until now. No official Sh3 installation, but 5 "copies" with different big mods/stock here in my external HD!:03:

Fader_Berg
03-28-10, 03:05 AM
Humm...it donīt find my in use directory for Sh3. I guess that you know that a lot of ppl donīt use the game official installation directory. We have a lot of copies of a stock 1.4b SH3 to be used with different big mods, etc.

I guess that you get my point. Just make the tool ask for the "in use" Sh3 directory installation or make it get the menu_1024 file from the same directory that modMerge.js is. I guess that this last is the better because this way we can test/use any menu_1024 that we want before merge anything.

So, in truth i could not use it until now. No official Sh3 installation, but 5 "copies" with different big mods/stock here in my external HD!:03:
I didn't know that... I'll fix it.

Fader_Berg
03-28-10, 05:45 AM
Ok, things have changed and the download is updated. Please, read the instructions edited in this threads first post.

Hitman
03-28-10, 07:27 AM
This is most excellent :yeah:

can you allow the user to point the menu.ini file he wants to modify?

By default it searches the SH3 path, but I have multiple installs (NYGM3, GWX3, etc) and also prefer to modify a file dragged to my desktop then enable via JSGME :up:

Fader_Berg
03-28-10, 09:29 AM
Hitman, download the latest version which where uploaded today. The SH3 installation path is no longer used. With this the latest version, you put a copy of the script in each of your SH3 setups. And use them depending on which menu ini you like to merge with. Read the instructions, which is edited in this threads first post.
I want to clarify that modMerge doesn't modify your menu ini file. Running modMerge is completly safe. It writes a new one at a different location. You'll have to either replace it with the original by your self, or by using JSGME.

Hitman
03-28-10, 10:16 AM
Fantastic!!:salute:

Rubini
03-28-10, 12:26 PM
Thanks mate! I will try it with these new features (path) and will post feedback soon!:up:

Fader_Berg
04-11-10, 06:22 AM
modMerge created a incorrect menu.ini if there where items in it not separated with a empty line. I've changed the ini-parsing method, so that this will not be a problem any more. The download is updated.

(This problem made modMerge incompatible with Hitmans GUIs menu.ini.)

Fader_Berg
04-29-10, 03:36 PM
modMerge is discontinued.