SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SHIII Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 03-26-10, 05:46 PM   #1
Fader_Berg
中国水兵
 
Join Date: Jun 2009
Location: Uppland, Sweden
Posts: 278
Downloads: 48
Uploads: 0
Default modMerge.js

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.

Code:
                  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.
__________________
patSH3r-developer, (https://fb.tuxxor.net)
Type II junkie

Last edited by Fader_Berg; 04-12-10 at 04:01 AM.
Fader_Berg is offline   Reply With Quote
Old 03-27-10, 03:48 AM   #2
Hitman
Pacific Aces Dev Team
 
Hitman's Avatar
 
Join Date: Sep 2002
Location: Spain
Posts: 6,109
Downloads: 109
Uploads: 2


Default

Wow a new modding tool, GREAT
__________________
One day I will return to sea ...
Hitman is offline   Reply With Quote
Old 03-27-10, 08:48 AM   #3
Fader_Berg
中国水兵
 
Join Date: Jun 2009
Location: Uppland, Sweden
Posts: 278
Downloads: 48
Uploads: 0
Default

Bugfix... download updated.
__________________
patSH3r-developer, (https://fb.tuxxor.net)
Type II junkie
Fader_Berg is offline   Reply With Quote
Old 03-27-10, 04:34 PM   #4
Rubini
Ocean Warrior
 
Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
Default

How it works? It adds any new entries (one or more) for a giving group on the menu_1024 and automatically renumber them?

If so this is avery good tool!
__________________
One gamer's must-have mod is another gamer's waste of time.
-Sailor Steve
Rubini is offline   Reply With Quote
Old 03-27-10, 05:59 PM   #5
Fader_Berg
中国水兵
 
Join Date: Jun 2009
Location: Uppland, Sweden
Posts: 278
Downloads: 48
Uploads: 0
Default

Quote:
Originally Posted by Rubini View Post
How it works? It adds any new entries (one or more) for a giving group on the menu_1024 and automatically renumber them?

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.
__________________
patSH3r-developer, (https://fb.tuxxor.net)
Type II junkie

Last edited by Fader_Berg; 03-27-10 at 06:11 PM.
Fader_Berg is offline   Reply With Quote
Old 03-27-10, 07:39 PM   #6
Fader_Berg
中国水兵
 
Join Date: Jun 2009
Location: Uppland, Sweden
Posts: 278
Downloads: 48
Uploads: 0
Default

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.)
__________________
patSH3r-developer, (https://fb.tuxxor.net)
Type II junkie
Fader_Berg is offline   Reply With Quote
Old 03-27-10, 09:51 PM   #7
Rubini
Ocean Warrior
 
Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
Default

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!
__________________
One gamer's must-have mod is another gamer's waste of time.
-Sailor Steve
Rubini is offline   Reply With Quote
Old 03-28-10, 03:05 AM   #8
Fader_Berg
中国水兵
 
Join Date: Jun 2009
Location: Uppland, Sweden
Posts: 278
Downloads: 48
Uploads: 0
Default

Quote:
Originally Posted by Rubini View Post
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!
I didn't know that... I'll fix it.
__________________
patSH3r-developer, (https://fb.tuxxor.net)
Type II junkie
Fader_Berg is offline   Reply With Quote
Old 03-28-10, 05:45 AM   #9
Fader_Berg
中国水兵
 
Join Date: Jun 2009
Location: Uppland, Sweden
Posts: 278
Downloads: 48
Uploads: 0
Default

Ok, things have changed and the download is updated. Please, read the instructions edited in this threads first post.
__________________
patSH3r-developer, (https://fb.tuxxor.net)
Type II junkie
Fader_Berg is offline   Reply With Quote
Old 03-28-10, 07:27 AM   #10
Hitman
Pacific Aces Dev Team
 
Hitman's Avatar
 
Join Date: Sep 2002
Location: Spain
Posts: 6,109
Downloads: 109
Uploads: 2


Default

This is most excellent

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
__________________
One day I will return to sea ...
Hitman is offline   Reply With Quote
Old 03-28-10, 09:29 AM   #11
Fader_Berg
中国水兵
 
Join Date: Jun 2009
Location: Uppland, Sweden
Posts: 278
Downloads: 48
Uploads: 0
Default

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.
__________________
patSH3r-developer, (https://fb.tuxxor.net)
Type II junkie
Fader_Berg is offline   Reply With Quote
Old 03-28-10, 10:16 AM   #12
Hitman
Pacific Aces Dev Team
 
Hitman's Avatar
 
Join Date: Sep 2002
Location: Spain
Posts: 6,109
Downloads: 109
Uploads: 2


Default

Fantastic!!
__________________
One day I will return to sea ...
Hitman is offline   Reply With Quote
Old 03-28-10, 12:26 PM   #13
Rubini
Ocean Warrior
 
Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
Default

Thanks mate! I will try it with these new features (path) and will post feedback soon!
__________________
One gamer's must-have mod is another gamer's waste of time.
-Sailor Steve
Rubini is offline   Reply With Quote
Old 04-11-10, 06:22 AM   #14
Fader_Berg
中国水兵
 
Join Date: Jun 2009
Location: Uppland, Sweden
Posts: 278
Downloads: 48
Uploads: 0
Default

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.)
__________________
patSH3r-developer, (https://fb.tuxxor.net)
Type II junkie
Fader_Berg is offline   Reply With Quote
Old 04-29-10, 03:36 PM   #15
Fader_Berg
中国水兵
 
Join Date: Jun 2009
Location: Uppland, Sweden
Posts: 278
Downloads: 48
Uploads: 0
Default

modMerge is discontinued.
__________________
patSH3r-developer, (https://fb.tuxxor.net)
Type II junkie
Fader_Berg is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 02:28 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.