Log in

View Full Version : A question about JSGME


treblesum81
04-29-08, 05:37 PM
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
04-29-08, 09:38 PM
anyone?

ReallyDedPoet
04-29-08, 09:42 PM
Hi Greg,

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


RDP

Wreford-Brown
04-29-08, 10:56 PM
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?

treblesum81
04-30-08, 12:03 AM
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

HW3
04-30-08, 01:24 AM
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.

The Bad Wolf
04-30-08, 02:28 AM
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.

treblesum81
04-30-08, 03:19 AM
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.

The Bad Wolf
04-30-08, 04:12 AM
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
04-30-08, 04:27 AM
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
04-30-08, 04:49 AM
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.

JScones
04-30-08, 05:39 AM
Wow, I feel guilty breaking the "connect four", but anyway...

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.

The Bad Wolf
04-30-08, 11:24 AM
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.