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 > SH4 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 04-11-15, 04:28 PM   #1
Phrozin
Bosun
 
Join Date: Mar 2007
Posts: 68
Downloads: 85
Uploads: 0
Default SH4 wrapper/profile selector

Ok, so my father was having an issue with corrupt save game files, and also keeping his ships separate. So I wrote a small program to keep backups of save games and allow him to keep his ships in separate SH4 folders for convenience. Anyway, I figure someone might want to use it, so here ya go.

Installing:
The default directory that the installer chooses will be an "Open Directory" that your user account has full read/write/execute permissions to. If you choose to install elsewhere I can't promise that the UAC wont make you run in full administrator access mode.

Once it's finished installing, it will give you the option of launching immediately or to simply exit the installer. If you have not renamed your sh4 folder yet, then I would suggest unchecking the "Launch Silent Hunter 4 Wrapper" and just finish the installer. I've programmed my application to look for the save files in your documents folder. (IE: for windows XP and down "C:\Documents and Settings\[user name]\My Documents" or for windows Vista and up "C:\Users\[user name]\Documents") More specifically it looks for folders starting with "SH4-". So lets say your current ships name in game is USS Bonefish, you would rename your "sh4" folder to "SH4-USS Bonefish". (Mind your capitalization, my program will ignore lower case "sh4" folders).

once it's launched for the first time, the program will ask you to locate your "Silent Hunter 4" installation folder. This is where the file "sh4.exe" is.

It will then ask you to name this installation. You can name it anything you like, but I would suggest something descriptive like TMO if your installation is modded with the trigger maru mod. My program allows for multiple installations for those of you running different "mod soups". You will be able to set these different installations up once the base installation is setup. Once the installation path and name have been set, you are presented with the programs main interface.

On first launch you will notice all the windows are empty and there are 3 installations named "install 1" though "install3", the program hasn't populated everything yet and this is normal.

*Note: if you already had a save game and renamed it before launching, the windows will be populated with information, but it will still have those 3 installations.

Simply click on the setup button to open the settings interface and choose the options you wish to activate if any.

For those of you that run multiple installations for different "mod soups" if you checkmark the "Multiple Installations" checkbox, you are then presented with 2 additional boxes to set those up. The setup is just like the initial setup, so it shouldn't need explaining. Once an install is setup the button on the right will change from "Setup" to "Reset". This is so you can rename them if you need too, or if you move the installation folder. If you then uncheck "Multiple Installations" my application will "forget" those additional installs and you will have to re-set them up. It does not delete or uninstall your installed game or folders, it simply forgets they are there.

Once you've set your options and clicked "Set" you'll be back at the main screen. I suggest you exit the application to allow it to set the registry settings and paths, then reopen it. Now you just select the ship you wish to pilot today and the installation you are playing that ship on and click play. As you can see, the ships info and captains info have populated.


If in the unfortunate event that a game save gets corrupted for one reason or another, click on "Setup", checkmark "Restore Profile". The "New Profile" button will change to "Restore", clicking it will now open the archived savefiles interface. Simply select the one you want and click the "Restore Selected Archive" button.

for those wanting a new ship, click on the "Setup" button, then click the "New Profile" button. This will create a new save named "USS Fresh" select it and click play. Once you are assigned your ship in game, exit the game you will be asked to name the save directory. My Father chooses to name the saves after his ships IE: USS Trigger, but you can name them whatever you like.

I think that's everything. If you have questions or find a bug let me know and I'll do my best to answer or correct it. If you just want the source code instead of the installer let me know. if enough people want it I'll put it up here for download as I didn't want to inflate the installer with the source code and materials.

Also, the images on the backgrounds and in the installer, I've had on my hard drive for years and can't recall who made them. If you feel these are your images, let me know and I'll give you credit for them or remove them based on your desires.

UPDATES

Version 1.3.0.3

Version 1.3.0.3
-Uses UTC time now instead of local
-Archives saves to the "[app path]\archives" folder now
-Checks for a "sh4" folder in your documents on startup, if found asks to rename it or delete it.
-Archives "sh4" folder if found before deleting it.
-No longer needs admin rights (if installed to default location)
-Archive times reworked for more precision

Download Links
SHA1: ff2bae912bd4bb0848df81e68b4ec576974436ea
MD5: ec65d962e5308e4c8faef80018a605f6
Updated - 04/13/2015 TinyUpload 2.0 MB
Updated - 04/13/2015 MediaFire 2.0MB
Updated - 04/13/2015 Dead Legion Toolz 2.0MB
__________________
~"Cry 'Havoc!' and let slip the dogs of war." - Act 3, Scene 1 Julis Ceaser William Shakespeare
[SIGPIC][/SIGPIC]

Last edited by Phrozin; 04-14-15 at 06:27 AM. Reason: Updates
Phrozin is offline   Reply With Quote
Old 04-11-15, 04:38 PM   #2
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,321
Downloads: 130
Uploads: 0


Default

Looks pretty slick!


I've grabbed a copy and Thanks!!
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 04-11-15, 08:45 PM   #3
ReallyDedPoet
Canadian Wolf
 
ReallyDedPoet's Avatar
 
Join Date: Jul 2006
Location: The one and only East Coast
Posts: 10,775
Downloads: 946
Uploads: 5


Default

Nice work!
__________________

Back in the Day



ReallyDedPoet is offline   Reply With Quote
Old 04-11-15, 10:52 PM   #4
fitzcarraldo
Argentinian Skipper
 
fitzcarraldo's Avatar
 
Join Date: Jul 2009
Location: Somewhere between Buenos Aires and the Bungo Suido
Posts: 5,133
Downloads: 3219
Uploads: 0


Default

Looks interesting. I'll try it.

Many thanks!

Fitzcarraldo
__________________



My subject is War, and the pity of War. The Poetry is in the pity - Wilfred Owen.
fitzcarraldo is online   Reply With Quote
Old 04-12-15, 12:52 AM   #5
james_nix
What's happenin' Cap'n'?
 
james_nix's Avatar
 
Join Date: Feb 2015
Posts: 325
Downloads: 719
Uploads: 6


Default

Looks great! But I get a message saying that it can't find my activeuserplayerunits.cfg

I can't even use the USS Fresh because it says the same thing. If I try to start USS Fresh it says
Quote:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.IOException: Cannot create a file when that file already exists.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalMove(String sourceDirName, String destDirName, Boolean checkHost)
at sh4.wrapper.MainForm.Button1Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
__________________
USS COPPERFINS-05
james_nix is offline   Reply With Quote
Old 04-12-15, 08:59 AM   #6
Phrozin
Bosun
 
Join Date: Mar 2007
Posts: 68
Downloads: 85
Uploads: 0
Default

Quote:
Originally Posted by james_nix View Post
Looks great! But I get a message saying that it can't find my activeuserplayerunits.cfg

I can't even use the USS Fresh because it says the same thing. If I try to start USS Fresh it says
Sounds like you have an "sh4" folder in your documents folder. Check there for one and if found rename it to"SH4-USS <whateverYoulike>" or just "sh4-old". As for the ActiveUserPlayerUnits.cfg, USS Fresh will not have one because you haven't made commission on a boat in game yet.

let me know if this fixes it.
__________________
~"Cry 'Havoc!' and let slip the dogs of war." - Act 3, Scene 1 Julis Ceaser William Shakespeare
[SIGPIC][/SIGPIC]

Last edited by Phrozin; 04-12-15 at 09:01 AM. Reason: forgot a quote mark.
Phrozin is offline   Reply With Quote
Old 04-13-15, 01:36 PM   #7
Phrozin
Bosun
 
Join Date: Mar 2007
Posts: 68
Downloads: 85
Uploads: 0
Default Bloody UAC

Sorry everyone, My father uses Windows XP, and I completely forgot about Windows Vista - Windows 8.1 User Account Control. I'll have a new version written and posted in a few hours that will work with the UAC on newer versions of Windows.

Thank you idlehands for the headsup!
__________________
~"Cry 'Havoc!' and let slip the dogs of war." - Act 3, Scene 1 Julis Ceaser William Shakespeare
[SIGPIC][/SIGPIC]
Phrozin is offline   Reply With Quote
Old 04-13-15, 10:20 PM   #8
Phrozin
Bosun
 
Join Date: Mar 2007
Posts: 68
Downloads: 85
Uploads: 0
Default

Quote:
Originally Posted by Jeff-Groves View Post
Looks pretty slick!


I've grabbed a copy and Thanks!!
Thank you. Make sure you grab the latest version, and you are more then welcome

Quote:
Originally Posted by ReallyDedPoet View Post
Nice work!
Thank you, I appreciate the complement.

Quote:
Originally Posted by fitzcarraldo View Post
Looks interesting. I'll try it.

Many thanks!

Fitzcarraldo
Most welcome, make sure to get the latest version and let me know if somethings screwy or you'd like something else in it.


Quote:
Originally Posted by james_nix View Post
Looks great! But I get a message saying that it can't find my activeuserplayerunits.cfg

I can't even use the USS Fresh because it says the same thing. If I try to start USS Fresh it says
Thank you for the complement, and do try the new version. It should catch any sh4 folders for you and ask what do with them.
__________________
~"Cry 'Havoc!' and let slip the dogs of war." - Act 3, Scene 1 Julis Ceaser William Shakespeare
[SIGPIC][/SIGPIC]
Phrozin 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 05:43 PM.


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