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 08-05-07, 04:15 PM   #1
Digital_Trucker
Silent Hunter
 
Join Date: Jul 2007
Location: The Peach State
Posts: 4,171
Downloads: 141
Uploads: 10
Default [WIP] Radio Station Manager

V1.0 released. See http://www.subsim.com/radioroom/show...020#post623020



Beta version 0.9 (last Beta) now available. It has all of the editing functions enabled and you can now save your changes. It also now has data checking functions such as verifying that media files for events exist and checking event date/time order. About all that's left to do is the nag screens for saving changes before exiting the program and the documentation. Thanks to Misfit138's testing all the bugs should be worked out now.

It's available at http://files.filefront.com/RSM090Bet.../fileinfo.html


Based on Misfit138's Workaround for radio repeating the broadcasts when loading a save and the discussions in his thread http://www.subsim.com/radioroom/showthread.php?t=119443 , I have begun development of a "RadioStationManager" application.

This application would allow you to create and add radio stations in an automated fashion and solve the problems with the scripted radio broadcasts being repeated when you reload a saved game in the middle of a patrol.

This is the basic layout I have in mind for the app (with a description following the screeny). Any suggestions or comments would be greatly appreciated.


  1. In this area, all of the information for the radio stations defined in your radio.ini file would be displayed for editing.
  2. In this area, all of the scripted events (if any) contained in the events.ini file would be displayed and available for edit.
  3. This button would allow for the importation of new radio stations. Basically, you would create (or download) a radio station folder with the music and scripted events (if any), place it in the blah,blah,blah\Data\Sounds\Radio folder then press this button. You would be presented with a dialog to allow the selection of the folder containing the new radio station. Then you would fill in the required information (start and end dates and so on) and the station would be entered into your radio.ini file automatically.
  4. This button would allow you to delete a radio station from the radio.ini file.
  5. This button would save changes made to the currently selected station.
  6. This button would perform the necessary operations to prepare all radio stations for the reloading of a game. It would first present you with a dialog allowing you to specify which saved game you were going to load. Then, if the game that you select was not saved while on patrol, all events in the events.ini files for all radio stations would be uncommented (many thanks to JScones for the idea on how to handle the replay problem) so that your radio will start on the correct date. If the saved game you select is one that was saved while on patrol, then the SaveData.crp file will be examined to find the last command issued while on that patrol and that date/time will be used to determine which events are commented out to prevent their replay. In order to insure that the correct date/time is used, you would only need to issue an order (of any kind) immediately before saving your game.
  7. This button would allow you to choose a media file for the event that you are entering/editing. You would be presented with a dialog to select a media file from the events folder in your radio station. No more having to type (or even copy/paste) the name of the media file when creating/editing an event.
  8. This button would allow you to add an event at the end of the events list for the current radio station you are working on.
  9. This button would allow you to delete the currently selected event in area 2.
  10. This button would allow you to insert an event in front of the currently selected event in area 2.
Before I start actually coding this app, I'd like to get a little feedback on any operations y'all might like to see added to it, or any changes in the layout that you think would be an improvement.

Last edited by Digital_Trucker; 08-16-07 at 02:05 PM.
Digital_Trucker is offline   Reply With Quote
Old 08-05-07, 04:58 PM   #2
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,226
Downloads: 901
Uploads: 73


Default

Keep the mods comin baby. Awesome stuff
THE_MASK is offline   Reply With Quote
Old 08-05-07, 05:29 PM   #3
Von Manteuffel
Commander
 
Join Date: Feb 2007
Location: UK
Posts: 473
Downloads: 411
Uploads: 0
Default

Lookin' Good!!!

How difficult would it be to include ( I think as part of "8" and/or"10" ) a setting which would allow the user to specify the period between dates ( e.g. from "previous + 1 day", to "previous + x days") This would greatly speed-up the creation of events.ini files.

Keep up the good work.
Von Manteuffel is offline   Reply With Quote
Old 08-05-07, 07:11 PM   #4
Digital_Trucker
Silent Hunter
 
Join Date: Jul 2007
Location: The Peach State
Posts: 4,171
Downloads: 141
Uploads: 10
Default

Thanks, sober.

VM, what I had in mind was what JScones suggested in the other thread, that is commenting out (putting a semicolon in front of) all the entries prior to the date/time of the saved game that is about to be loaded. That way, the entire events.ini file doesn't have to be recreated each time, just modified a little. That also leaves room for manual editing of the file without messing anything up.

If I'm not mistaken, when the game starts, it reads the events.ini file for each station until it reaches an entry that is at or past the date/time that it is looking for and it doesn't read the next entry in the file until the game time is past the time in the events.ini record. If this is the case, then there wouldn't be any advantage to leaving out any entries at the end of the file. I could be wrong about that. I'll make it a point to time how long it takes my dilapidated Socket A system to set up the events files. If mine can do it in a reasonable amount of time, then anyone's should be able to
Digital_Trucker is offline   Reply With Quote
Old 08-05-07, 07:33 PM   #5
ReallyDedPoet
Canadian Wolf
 
ReallyDedPoet's Avatar
 
Join Date: Jul 2006
Location: Canada. The one and only, East Coast
Posts: 10,885
Downloads: 946
Uploads: 5


Default

Look forward to this one


RDP
__________________

Back in the Day



ReallyDedPoet is offline   Reply With Quote
Old 08-05-07, 07:43 PM   #6
Misfit138
Lieutenant
 
Join Date: Apr 2005
Location: Finland
Posts: 267
Downloads: 80
Uploads: 0
Default

This tool I've been working on looks so pitiful compared to yours :rotfl:



But are you gonna continue from this on? Just asking so that I know should I drop this project of mine. Been making slow but steady progress ever since I got that one problem solved
Misfit138 is offline   Reply With Quote
Old 08-05-07, 08:20 PM   #7
Digital_Trucker
Silent Hunter
 
Join Date: Jul 2007
Location: The Peach State
Posts: 4,171
Downloads: 141
Uploads: 10
Default

I didn't mean to make it a one or the other proposition, Misfit. There's no reason for you to stop working on yours. Just like most mods, some people like one over the other and vice versa. I imagine that my app is going to appeal more to the folks that like to create radio stations than just the folks who use them. Mine is kind of overkill for just the one problem.

Keep on truckin', dude. You'll probably be done with yours before I get this one done anyway, 'cause you've got a head start. I'm just in the planning stages.
Digital_Trucker is offline   Reply With Quote
Old 08-05-07, 08:36 PM   #8
Misfit138
Lieutenant
 
Join Date: Apr 2005
Location: Finland
Posts: 267
Downloads: 80
Uploads: 0
Default

Quote:
Originally Posted by Digital_Trucker
Keep on truckin', dude. You'll probably be done with yours before I get this one done anyway, 'cause you've got a head start. I'm just in the planning stages.
Isn't much of a head start if you're still learning to code... :p

Anyways, I'll probable continue on this. At least for learning purposes. Don't know am I going to release it. Probable not but just have to wait and see
Misfit138 is offline   Reply With Quote
Old 08-05-07, 08:59 PM   #9
Fearless
Ace of the Deep
 
Join Date: Feb 2007
Location: Adelaide, Australia
Posts: 1,047
Downloads: 340
Uploads: 1
Default

Well worth the wait
__________________
Fearless

System Specs: AMD Ryzen 7 5800X 8 Core 16 Thread CPU, 3.8GHz Base Clock, 4.7GHz Boost, 105W TDP, 32MB L3 cache | MSI GeForce RTX3060Ti 8Gb Graphics | Corsair Vengeance RGB Pro 32Gb (2x16Gb) 3200 MHz CL16 DDR4 Ram | Samsung 970 Evo Plus NVMe SSD 1TB | Seagate Barracuda 2.5in 2TB HDD | AOC QHD 165 Hz FreeSync HDR curved 31.5in Monitor | ASUS ROG Strix LC 240 ARGB AIO Liquid CPU Cooler White Edition | ASUS ROG Strix Gold 750W Modular Power Supply | Corsair iCUE 5000X RGB Tempered Glass Mid Tower Case White.
Fearless is offline   Reply With Quote
Old 08-05-07, 09:22 PM   #10
JScones
Navy Seal
 
Join Date: Apr 2005
Posts: 5,501
Downloads: 19
Uploads: 0
Default

Looks good.

This won't be a .NET app will it? 'Cause if there ends up being choices, the non-.NET version will always win it for me.

Anyway, a suggestion on layout. Atm it's not overly clear to me what the save button refers to - just the stations? Or the events as well?

I'd apply some grouping to distinguish the different functionality, and to keep the buttons together and more structured. Here's a quick mockup using your model...



Having the "Prepare" button separated means that under normal operation, players can ignore the two groupings altogether and go straight for the Prepare button (which is unrelated to your editing functions anyway). Some tooltips would help with the buttons, but keep in mind this is just a quick mockup to demonstrate an alternate layout.

I have assumed that clicking on a station will automagically populate the events view. I have also assumed that you want to apply changes to each aspect separately.

Now, ordinarily, if you have a "Save" or "Apply" button, you should also have a "Discard" or "Cancel" button, otherwise how will users get back to what they started with without closing and reloading your app?

Sorry, but I just can't help but provide suggestions on programming when asked to do so, LOL! I won't be offended if you discard everything I've said.
JScones is offline   Reply With Quote
Old 08-05-07, 09:46 PM   #11
Digital_Trucker
Silent Hunter
 
Join Date: Jul 2007
Location: The Peach State
Posts: 4,171
Downloads: 141
Uploads: 10
Default

JScones, thanks for all the great input. I'll definitely take your advice to heart when I'm working on this. You make excellent points regarding the grouping of buttons and the separation of functions. All of your assumptions were correct except that I really hadn't thought through the save function yet and probably would have saved everything instead of separating the two saves. I definitely wouldn't have thought of the "take me back to square one" button.

Unfortunately, for me (at the moment, anyway), the only thing I have that I'm comfortable working with is Visual Basic, so this would be a nasty .NET app. I spent 16 years (from '76 to '92) programming IBM mainframes and midranges in Fortran, COBOL and Assembler, but VB is the one "semi-current" language that I'm even close to being proficient in. I probably could learn just about any language I felt like using, but I'm also old enough that I don't want to waste too much time finding a new way to "skin the cat" so to speak.

Thanks again for the great input. I'll have a revised layout ready soon and will get going on the project just as soon as my monthly supply of Geritol gets here:rotfl: .
Digital_Trucker is offline   Reply With Quote
Old 08-05-07, 10:20 PM   #12
JScones
Navy Seal
 
Join Date: Apr 2005
Posts: 5,501
Downloads: 19
Uploads: 0
Default

Quote:
Originally Posted by Digital_Trucker
Unfortunately, for me (at the moment, anyway), the only thing I have that I'm comfortable working with is Visual Basic, so this would be a nasty .NET app.
Shame. You don't have VB6 I guess? I just hate it how such small and simple apps require 280mb of runtime files.

Hehe, I remember someone bragging to me recently that an app he wrote (unrelated to SH3 or SH4) was much smaller than a similar app I wrote - his was about 40kb, mine about 400kb. His argument crashed and burned though when I pointed out the 280mb of runtime files needed to power his 40kb creation (as one needs the whole "framework" installed; they can't just pick and choose the individual runtimes) compared to the 0kb of files (outside of the OS itself of course) needed to power mine. :rotfl: At least this is now less of an issue for Vista users as they have the framework (read: MS PR for runtime files) installed by default. Only updating it becomes a hassle for them.

Don't get me wrong, I use the .NET framework too...when I have no choice.

Anyway, enough on my hate of .NET...

Quote:
Originally Posted by Digital_Trucker
I spent 16 years (from '76 to '92) programming IBM mainframes and midranges in Fortran, COBOL and Assembler, but VB is the one "semi-current" language that I'm even close to being proficient in.
Ah, COBOL. Will still be in use when the "year 9999 bug" hits. :rotfl:

Last edited by JScones; 08-06-07 at 12:43 AM.
JScones is offline   Reply With Quote
Old 08-06-07, 10:39 AM   #13
fred8615
Saint of the seas
 
fred8615's Avatar
 
Join Date: Mar 2004
Location: Sorrento, Louisiana
Posts: 1,320
Downloads: 265
Uploads: 127
Default

As a radio station creator, I like the idea, and really like what you've got so far.
fred8615 is offline   Reply With Quote
Old 08-06-07, 12:51 PM   #14
Digital_Trucker
Silent Hunter
 
Join Date: Jul 2007
Location: The Peach State
Posts: 4,171
Downloads: 141
Uploads: 10
Default Second shot at layout

OK, here's my redone layout with JScones suggestions implemented (as I understand them anyway )



Note: I didn't add the "Edit Event" button since the data grid will be editable.

I'm going to go ahead and start coding on it, but any further suggestions would still be welcomed.

Totally off topic:

Quote:
Originally Posted by JScones
Ah, COBOL. Will still be in use when the "year 9999 bug" hits. :rotfl:
I've got to start paying more attention to the state of the software world . While travelling around the country in my second career, I totally lost track of what programming languages were in use with Windoze. I just "ass-u-me-d" that COBOL was dead. Now I see that there are several "free" COBOL compilers (or should I say translators since what I saw ports the code over to C). You may just be right about it still being around when the "9999" bug hits.
Digital_Trucker is offline   Reply With Quote
Old 08-06-07, 01:00 PM   #15
CaptainCox
Sea Lord
 
Join Date: Feb 2007
Location: A Swede in Frankfurt am Main
Posts: 1,897
Downloads: 4
Uploads: 0
Default

Looks like a kick ass app there Digital_Trucker.
This game is getting better by the day. We are seeing some darn good work kicking in at the mo when it comes to applications for this game.
__________________
CaptainCox 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:39 AM.


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.