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 04-29-08, 05:37 PM   #1
treblesum81
Frogman
 
Join Date: Apr 2008
Posts: 308
Downloads: 71
Uploads: 0
Default A question about JSGME

This is pretty simple, but is there a way to make the enabler append game files? I.E. if I want to create a mod that only alters specific parts of a cfg file, but leaves the rest alone (i.e. changing the stock loadout of torpedos on a sub so I don't have to go in and re-do it every time I start a mission)? Or is it only possible to replace whole files in this way?

I ask because with all of the mod updates that are going on right now, every time I upgrade to the newest version, some of these files are overwritten and I've got to go back and make the changes manually all over again. It would be nice to simply disable upgrade other mods and then reenable.

Thanks,
Greg
treblesum81 is offline   Reply With Quote
Old 04-29-08, 09:38 PM   #2
treblesum81
Frogman
 
Join Date: Apr 2008
Posts: 308
Downloads: 71
Uploads: 0
Default

anyone?
treblesum81 is offline   Reply With Quote
Old 04-29-08, 09:42 PM   #3
ReallyDedPoet
Canadian Wolf
 
ReallyDedPoet's Avatar
 
Join Date: Jul 2006
Location: Canada. The one and only, East Coast
Posts: 10,886
Downloads: 946
Uploads: 5


Default

Hi Greg,

Give it a few, I am sure someone will have something for you.


RDP
__________________

Back in the Day



ReallyDedPoet is offline   Reply With Quote
Old 04-29-08, 10:56 PM   #4
Wreford-Brown
Sea Lord
 
Join Date: Nov 2007
Location: In sight of Stonehenge
Posts: 1,750
Downloads: 51
Uploads: 26
Default

treblesum - I'd be very interested if this was possible as well. Hopefully someone with more knowledge will come along soon.

Is your mod specific to changing the loadout, or was that just an example?
__________________

All my mods are available at MediaFire:
SH3 Mods
Other modders SH3 mods
SH4 Mods
...you can't please all of the people all of the time...
Wreford-Brown is offline   Reply With Quote
Old 04-30-08, 12:03 AM   #5
treblesum81
Frogman
 
Join Date: Apr 2008
Posts: 308
Downloads: 71
Uploads: 0
Default

It was really just an example, though it is a change that i've made because I feel that, at least in 1939-1940, its better to have 4 TII fish than the default 2. Its not something all that difficult to alter in game before a mission, but having to do it over and over again is just bothersome.

That being said, i really think it would be a much more useful tool if it had this ability, because mods would much more easily be compatable with one another, especially across multiple revisions... Imagine you've got a mod that only changes 2-3 lines in the basic.cfg, but to use that on top of any other mod, you'd have to update you're whole mod every time someone else updates theirs. If you could just write your files to overwrite those few lines when enabled, you'd almost never have to update your mod. It would also do a lot to reduce the effects of enabling certain mods in the wrong order.

It really wouldn't be that hard to do. Simply allow for a descriptor tag (kind of like the "-remove" which is already there) that would allow you to specify a start and a stop point and a replacement text. Then the program would just search through the file, find the start and stop points (i.e. [equip0] - [equip1]), and replace everything between them with the replacement text. As long as its used within reason, it would allow for great flexibility for modders who want to make their wares more available and compatable.

Greg
treblesum81 is offline   Reply With Quote
Old 04-30-08, 01:24 AM   #6
HW3
Navy Seal
 
Join Date: Apr 2005
Location: Gresham Oregon
Posts: 6,574
Downloads: 458
Uploads: 0


Default

The actual modding of the program to do this would be JScones area since it is his program. He stops by here every so often so he should notice this thread.
__________________


"Some ships are designed to sink...others require our assistance." Nathan Zelk
HW3 is offline   Reply With Quote
Old 04-30-08, 02:28 AM   #7
The Bad Wolf
Sparky
 
Join Date: Sep 2006
Location: East Midlands. UK
Posts: 156
Downloads: 0
Uploads: 0
Default

The JSGME replaces the "WHOLE" files that you have specified in your jsgme structure.

Here's what I do

In jsgme all the mods are in their seperate folders.
Make an extra folder of your own and name it i.e. "Common Files" or "conflicting Files" or whatever name you want.
In here you put all the files and their "folder paths" which appear in more than one mod.

In the mod folders remove these files and append them manually in the "Common Files" folder.

Now as you modify or add new mods, any confictions, can be done in the one folder "Common Files".

When altering files, most will let you add a comment if you put ; in front. So as an example the menu_1024_768 at the top line I write.
;OLC's GUI & LRT & ........
If you can't do this i.e. Periscope.tga, then add a readme with it.

By making comments, it is easier to correct the problems later on.
The Bad Wolf is offline   Reply With Quote
Old 04-30-08, 03:19 AM   #8
treblesum81
Frogman
 
Join Date: Apr 2008
Posts: 308
Downloads: 71
Uploads: 0
Default

I agree that that is an acceptable way to accomplish the same task, but its not optimal. What I'm proposing would essentially remove the need for such a complicated system in the first place. If you only change the parts of a file (a cfg file at least... all bets are off on a .tga) that need to be changed for your individual mod, independant of any other changes by any other mods, you'll never have to worry about your mod overwriting a part of the file that you may not use, but may be important to another mod you have.
treblesum81 is offline   Reply With Quote
Old 04-30-08, 04:12 AM   #9
The Bad Wolf
Sparky
 
Join Date: Sep 2006
Location: East Midlands. UK
Posts: 156
Downloads: 0
Uploads: 0
Default

The menu_1024_768.ini is perhaps the file that gives the most trouble with conflictions.

For your system to work all modders would have to stick with the basic layout, making some mods impossible to do. If you look at OLC's GUI there is a huge difference from the original menu. It would be virtually impossible to have a program to do just the changes.
The Bad Wolf is offline   Reply With Quote
Old 04-30-08, 04:27 AM   #10
The Bad Wolf
Sparky
 
Join Date: Sep 2006
Location: East Midlands. UK
Posts: 156
Downloads: 0
Uploads: 0
Default

To change just simple setup configs, like weapons loadout well thats different. As Mikhayl said you could use SH3Commander, which is a more sophisticated type of JSGME or change the file with JSGME. To change just the part of the file by a program, would be prone to errors if something alters and makes things more difficult.
The Bad Wolf is offline   Reply With Quote
Old 04-30-08, 04:49 AM   #11
The Bad Wolf
Sparky
 
Join Date: Sep 2006
Location: East Midlands. UK
Posts: 156
Downloads: 0
Uploads: 0
Default

What if 2 different mods change the same data in the file, not an uncommon occurance. By doing it manually, you can decide how to do it and make it work.
The Bad Wolf is offline   Reply With Quote
Old 04-30-08, 05:39 AM   #12
JScones
Navy Seal
 
Join Date: Apr 2005
Posts: 5,501
Downloads: 19
Uploads: 0
Default

Wow, I feel guilty breaking the "connect four", but anyway...

Quote:
Originally Posted by treblesum81
This is pretty simple, but is there a way to make the enabler append game files? I.E. if I want to create a mod that only alters specific parts of a cfg file, but leaves the rest alone (i.e. changing the stock loadout of torpedos on a sub so I don't have to go in and re-do it every time I start a mission)? Or is it only possible to replace whole files in this way?

I ask because with all of the mod updates that are going on right now, every time I upgrade to the newest version, some of these files are overwritten and I've got to go back and make the changes manually all over again. It would be nice to simply disable upgrade other mods and then reenable.
JSGME does full files only. A subsequent version *may* include the ability to update elements within a file, but this will only occur if I can create a robust mechanism to handle conflicts (multiple mods updating the same settings in the same file, updating different settings in the same file, etc all can lead to CTD).

In any event, you need to use SH3Cmdr. It is tailored specifically for SH3. Through using it you can make static or randomised changes to *almost any* SH3 value, even catering for changes based on date.

Read the User Guide, "\Cfg\Static settings.cfg" and "Cfg\Randomised events.cfg" for more guidance. There's also examples of how the features have been used in the forum archives.
JScones is offline   Reply With Quote
Old 04-30-08, 11:24 AM   #13
The Bad Wolf
Sparky
 
Join Date: Sep 2006
Location: East Midlands. UK
Posts: 156
Downloads: 0
Uploads: 0
Default

Hi JScones
(Sorry to pinch thread, but 1 question, thanks treblesum81)

If I used the random folder for an event, how could I make it a permanant fixture thereafter automatically.

An example

I have 8x zoom binoculars and am given a present of 10x zoom sometime, perhaps, in my career. (camera.dat change)

or

All subs of same class would perform differently due to quality factors i.e. Depth variation due to weld quality, giving a + or - of a random percentage. This could be used to many characteristics thus giving an unknown sub performance.

Cheers.
The Bad Wolf 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 04:19 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.