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 07-29-07, 12:41 AM   #1
Misfit138
Lieutenant
 
Join Date: Apr 2005
Location: Finland
Posts: 267
Downloads: 80
Uploads: 0
Default [TEC/REL] Workaround for radio repeating the broadcasts when loading a save

Ok, I'm pretty sure that most of you have already figured this out but those who haven't, this is for you. Besides, I figure this out only yesterday and been testing it to see if this really works and it seems to

This workaround is basicly very simple but kind of hard to explain so bare with me

An example
You were on a patrol and saved on December 13th 1941 16:31 and then exited the game. Normally when you load a save, you'll have to listen the radio broadcasts all over again from the beginning of the patrol. Well, not anymore!

First, before you start your game, open the radio folder (Silent Hunter IV/Data/Sound/Radio) and from there select the radio station you are using. For example the radio Washington folder. Then go into the Events folder and open the events.ini file with your notepad. You'll see the following code

Code:
;1941 news
;=========

[EVENT]
StartDate=07.12.1941
StartTime=19.00.00
MediaFile=News_Intro_Line_02.ogg

[EVENT]
StartDate=07.12.1941
StartTime=19.00.03
MediaFile=News_1941_01.ogg

[EVENT]
StartDate=07.12.1941
StartTime=20.00.00
MediaFile=News_Intro_Line_02.ogg

[EVENT]
StartDate=07.12.1941
StartTime=20.00.03
MediaFile=News_1941_02.ogg

[EVENT]
StartDate=08.12.1941
StartTime=19.00.00
MediaFile=News_Intro_Line_01.ogg

[EVENT]
StartDate=08.12.1941
StartTime=19.00.03
MediaFile=News_1941_03.ogg

[EVENT]
StartDate=08.12.1941
StartTime=20.00.00
MediaFile=News_Intro_Line_03.ogg

[EVENT]
StartDate=08.12.1941
StartTime=20.00.03
MediaFile=News_1941_04.ogg

[EVENT]
StartDate=09.12.1941
StartTime=20.00.00
MediaFile=News_Intro_Line_02.ogg

[EVENT]
StartDate=09.12.1941
StartTime=20.00.03
MediaFile=PearlHarbor.mp3

[EVENT]
StartDate=11.12.1941
StartTime=20.00.00
MediaFile=News_Intro_Line_02.ogg

[EVENT]
StartDate=11.12.1941
StartTime=20.00.03
MediaFile=News_1941_05.ogg

[EVENT]
StartDate=31.12.1941
StartTime=20.00.00
MediaFile=News_Intro_Line_01.ogg

[EVENT]
StartDate=31.12.1941
StartTime=20.00.03
MediaFile=News_1941_06.ogg

Etc. Etc.
Before you do any changes into this file you should make a backup so save it with a name events2.ini. Now open the events.ini and just remove all the markings from top to bottom to the date you saved. With my example this date would be the December 13th 1941 16:31. Now the code in your events.ini file should look like this

Code:
1941 news
;=========

[EVENT]
StartDate=31.12.1941
StartTime=20.00.00
MediaFile=News_Intro_Line_01.ogg

[EVENT]
StartDate=31.12.1941
StartTime=20.00.03
MediaFile=News_1941_06.ogg

Etc. Etc.
You'll have to do this to every events.ini file if you have more than just that radio Washington. If there is an easier way, please let me know

Last edited by Misfit138; 07-29-07 at 01:03 AM.
Misfit138 is offline   Reply With Quote
Old 07-29-07, 02:36 AM   #2
Von Manteuffel
Commander
 
Join Date: Feb 2007
Location: UK
Posts: 473
Downloads: 411
Uploads: 0
Default

Well done, Misfit.

I'm afraid, though, that for me, it's too fiddley - especially as I have a number of careers running simultaneously.

What's neded is something which will change the radio.ini "automatically".

It's as "simple" as a "find/replace" routine, where the station start-dates in the radio.ini are replaced with a date you type in.

JSGME might be able to do it and, when it appears, SH4 Skipper, I hope, will include it.

Till then, as an alternative, I'll continue to use the randomised tracks option, with individual tracks edited to sound like a continuous radio broadcast.

Why not try it and let me know what you think?

http://sh.xset.co.uk
Von Manteuffel is offline   Reply With Quote
Old 07-29-07, 02:56 AM   #3
Misfit138
Lieutenant
 
Join Date: Apr 2005
Location: Finland
Posts: 267
Downloads: 80
Uploads: 0
Default

Quote:
Originally Posted by Von Manteuffel
JSGME might be able to do it and, when it appears, SH4 Skipper, I hope, will include it.
I'm 100% sure that this kind of tweak is pretty much impossible to do with JSGME. Way too many varibles but I too was thinking that some kind of easy tweak might be possible with SH4 skipper... :hmm:

I'm really sorry that I'm not able to come up with anything easier. This whole radio feature is on my top 3 favourite improvements over the SH3 so this bug is really bugging me too
Misfit138 is offline   Reply With Quote
Old 07-29-07, 03:59 AM   #4
Misfit138
Lieutenant
 
Join Date: Apr 2005
Location: Finland
Posts: 267
Downloads: 80
Uploads: 0
Default

Been doing some more digging now. I noticed already sometime ago that current date in save files is always the start date so I tried to fix this radio bug by changing the date into what it was in the middle of the patrol but it didn't do anything. But I think this was with 1.2 or 1.1. Now with 1.3 when I try to do the same, I get a CTD after the "please wait" message

I think the whole source of this problem is related to not detecting the current date correctly. While middle of the patrol, that is
Misfit138 is offline   Reply With Quote
Old 07-30-07, 04:44 PM   #5
Misfit138
Lieutenant
 
Join Date: Apr 2005
Location: Finland
Posts: 267
Downloads: 80
Uploads: 0
Default

I apologize for bumping my own thread but some of you might be interested about the current progress

About 10 hours ago I started coding a tool to make the events.ini file adjustments easier and so far, I've been making really nice progress. Working backup function and capability to modify the events.ini file has already been implemented. Currently you can only adjust the radio Washington and this tool can be used only in command prompt but my main interest at the moment is only to make the code to do the absolutely required functions only. User friendly interface is going to be implemented before the final release. Can't even guess when that is going to happen and if it happens. Maybe they release 1.4 patch and fix this problem which would be pretty nice
Misfit138 is offline   Reply With Quote
Old 07-30-07, 06:45 PM   #6
Digital_Trucker
Silent Hunter
 
Join Date: Jul 2007
Location: The Peach State
Posts: 4,171
Downloads: 141
Uploads: 10
Default

Just a suggestion, but why not save the whole events.ini files for the various radio stations in seperate folders (or with names that would point to the folders in the game) and have your program only copy the events for the selected date forward into the game. This way, there is no need to keep a backup since the whole file is stored unchanged.

If you then read through all the folders (or file names) that point to the radio station folders in the game install, you could create the events.ini files for all the radio stations in one shot.
Digital_Trucker is offline   Reply With Quote
Old 07-31-07, 12:09 PM   #7
Misfit138
Lieutenant
 
Join Date: Apr 2005
Location: Finland
Posts: 267
Downloads: 80
Uploads: 0
Default

Quote:
Originally Posted by Digital_Trucker
Just a suggestion, but why not save the whole events.ini files for the various radio stations in seperate folders (or with names that would point to the folders in the game) and have your program only copy the events for the selected date forward into the game. This way, there is no need to keep a backup since the whole file is stored unchanged.
I'm not sure is this possible or even if I'm able to do this. Currently the backup function actually works pretty much the same as in JSGME so I guess it's good enough but suggestions are always welcome

I'll improve functions, code etc. as I make progress and learn to code more complicated stuff. Haven't been doing any C++ in 2-3 years so basicly I'm coding as I learn

Also, I decided to make this tool even if this radio bug will be fixed. I think it would be pretty handy to be able to adjust the events.ini files like for example, you want to listen the music but not the news and tweaks like that
Misfit138 is offline   Reply With Quote
Old 07-31-07, 02:02 PM   #8
Von Manteuffel
Commander
 
Join Date: Feb 2007
Location: UK
Posts: 473
Downloads: 411
Uploads: 0
Default

Way to go, Misfit138! I wish I could help, but I am to coding what the Mongols were to peace, love and international fraternity. Of course, if you can crack the problem, it means I've got to resume work on the Super-Station

Oh well!

All the best

VonM
Von Manteuffel is offline   Reply With Quote
Old 07-31-07, 02:58 PM   #9
Digital_Trucker
Silent Hunter
 
Join Date: Jul 2007
Location: The Peach State
Posts: 4,171
Downloads: 141
Uploads: 10
Default

Misfit138, if there was a decent COBOL or Fortran IV compiler (showing my age here), I could whip something up real quick :rotfl: .

I've done a few things in Visual Basic, so I have an idea of how to do it, and it should be doable in C++ also. All it would invlolve would be reading through the original events.ini file and only writing out the events that occur on or after the date that you saved your career into the events.ini file in the radio station events folder.

You could place the original events.ini files from the radio stations into the blah,blah,blah...\Data\Sound\Radio folder and name them something like RadioStation.events (replace RadioStation with the name of the folder that the station is in). Then you could use your program to read the .events files and write to the .....RadioStation\events\events.ini file.
Digital_Trucker is offline   Reply With Quote
Old 07-31-07, 03:49 PM   #10
Misfit138
Lieutenant
 
Join Date: Apr 2005
Location: Finland
Posts: 267
Downloads: 80
Uploads: 0
Default

Quote:
Originally Posted by Digital_Trucker
Misfit138, if there was a decent COBOL or Fortran IV compiler (showing my age here), I could whip something up real quick :rotfl: .

I've done a few things in Visual Basic, so I have an idea of how to do it, and it should be doable in C++ also. All it would invlolve would be reading through the original events.ini file and only writing out the events that occur on or after the date that you saved your career into the events.ini file in the radio station events folder.

You could place the original events.ini files from the radio stations into the blah,blah,blah...\Data\Sound\Radio folder and name them something like RadioStation.events (replace RadioStation with the name of the folder that the station is in). Then you could use your program to read the .events files and write to the .....RadioStation\events\events.ini file.
Oh yeah, Think I got it now. It is possible to do. Probable even with my skills! I'm not much of a programmer really. That's the reasons why I quit it in the first place but I'm gonna give this a try anyway
Misfit138 is offline   Reply With Quote
Old 07-31-07, 04:03 PM   #11
Payoff
Captain
 
Join Date: Mar 2005
Location: Nash Town, USA
Posts: 525
Downloads: 1
Uploads: 0
Default

Sounds great guys. This would be a welcome addition for us radio junkies.
While your in there, can anything be done to get Alvin & The Chipmunks out of my radio?

Thanks
__________________
"Hit Shokaku class carrier with three out of six torpedos. Recieved 105 depth charges during three hour period. Heard four terrific explosions in the direction of target, two and one half hours after attack. Believe that baby sank!" Lieutenant Commander Herman Kossler USS Cavalla
Payoff is offline   Reply With Quote
Old 07-31-07, 05:29 PM   #12
Misfit138
Lieutenant
 
Join Date: Apr 2005
Location: Finland
Posts: 267
Downloads: 80
Uploads: 0
Default

Quote:
Originally Posted by Payoff
While your in there, can anything be done to get Alvin & The Chipmunks out of my radio?
Sorry, can't help. I've read about this a couple of times but this has never happened to me
Misfit138 is offline   Reply With Quote
Old 08-01-07, 05:42 AM   #13
Von Manteuffel
Commander
 
Join Date: Feb 2007
Location: UK
Posts: 473
Downloads: 411
Uploads: 0
Default

Speeded-up ( or even slowed-down ) playback sometimes happens and, as yet, no-one has found a reason, or a cure. The effect is also intermittent - a station which sounds speeded up on one occasion can play out perfectly normally next time you start SH IV And in a run of stations, any number can play-out fine, but then there'll be the Chipmunks - then more normal stations.

I've tried playing around with all the available in-game sound settings, but haven't found a cure yet. I think it's simply a programming glitch. It's probably nothing to do with format, bitrate, or sample rates, otherwise the chances are that the fault would be more constant - i.e. happening every time to every station with audio at, say, a certain bitrate etc.

The answer I've found is to have a number of stations and if one does go wrong, simply tune to another which is OK. I also split content into "duplicate" stations - e.g. I run with 3 "Big Band" stations, each with around 12 hours of different tracks. If one happens to go "Chipmunk" I go to one of the other two.
Von Manteuffel is offline   Reply With Quote
Old 08-01-07, 12:10 PM   #14
Payoff
Captain
 
Join Date: Mar 2005
Location: Nash Town, USA
Posts: 525
Downloads: 1
Uploads: 0
Default

Thanks. I started pulling files out of my folders when this would happen, but it would just happen to other files. I guess we will have to just live with it for now.
__________________
"Hit Shokaku class carrier with three out of six torpedos. Recieved 105 depth charges during three hour period. Heard four terrific explosions in the direction of target, two and one half hours after attack. Believe that baby sank!" Lieutenant Commander Herman Kossler USS Cavalla
Payoff is offline   Reply With Quote
Old 08-04-07, 08:21 AM   #15
Misfit138
Lieutenant
 
Join Date: Apr 2005
Location: Finland
Posts: 267
Downloads: 80
Uploads: 0
Default

Think I'm going to leave this to somebody who actually knows how to code. Basicly I'm not doing any progress at all. Been fighting with this one thing for 4 days already but I just can't solve it and getting pretty frustrated

Like I mentioned this earlier, I'm not much of a programmer
Misfit138 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 12:23 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.