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

Reply
 
Thread Tools Display Modes
Old 09-07-12, 08:32 AM   #1306
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Cool

by any chance, could you make % probability that subs are dispatched, and B.d.U. messages time delay user configurable?
Everything will be user configurable (even the % chance Bdu sends a message when it can't dispatch subs) when I finally update the patcher for variables
TheDarkWraith is offline   Reply With Quote
Old 09-07-12, 09:11 AM   #1307
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
Everything will be user configurable (even the % chance Bdu sends a message when it can't dispatch subs) when I finally update the patcher for variables


is this going to be applied to previous patches too?
gap is offline   Reply With Quote
Old 09-07-12, 09:12 AM   #1308
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post


is this going to be applied to previous patches too?
Yes. Anything that uses variables defined in the patch file will be able to be user configured. I just have to write the code for the patcher app to do this and finalize the implementation.
TheDarkWraith is offline   Reply With Quote
Old 09-07-12, 04:11 PM   #1309
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
Yes. Anything that uses variables defined in the patch file will be able to be user configured. I just have to write the code for the patcher app to do this and finalize the implementation.
Excellent!

Did you find time for looking for an easy way to make your patch to read external datas on U-boat positions? I am slowly working on a database based on historical kriegsmarine records.
gap is offline   Reply With Quote
Old 09-07-12, 05:01 PM   #1310
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Excellent!

Did you find time for looking for an easy way to make your patch to read external datas on U-boat positions? I am slowly working on a database based on historical kriegsmarine records.
I'm slowly working there. Baby steps, have to take baby steps when working in assembly
TheDarkWraith is offline   Reply With Quote
Old 09-07-12, 05:25 PM   #1311
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
I'm slowly working there. Baby steps, have to take baby steps when working in assembly
baby steps for preparing your usual lion's jumps!

what would be a good format for an external data file divided in rows and columns to be read in assembly? txt, xml or what else?
gap is offline   Reply With Quote
Old 09-07-12, 06:37 PM   #1312
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
baby steps for preparing your usual lion's jumps!

what would be a good format for an external data file divided in rows and columns to be read in assembly? txt, xml or what else?
txt is easiest (with csv [comma seperated values]). What data are you proposing?
TheDarkWraith is offline   Reply With Quote
Old 09-07-12, 08:02 PM   #1313
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Just finished with the Bdu failed to dispatch subs code. There will be 5 entries for these. If Bdu fails to dispatch subs to you then the same timer for when they do send subs to you is started. This means it could take up to an hour to receive a failed response back from Bdu:



The new menu entries for menu.txt so far are:

menu.txt entries:
MaxStrings=11100

; Contact report wolfpack patch
11000=Dispatching available submarines to your patrol area|Remain undetected and in a favorable position|Send status reports| |Bdu
11001=All available submarines have been dispatched to your patrol area
11002=Submarines in your area have received instructions to join your attack|Stay in front of contact/convoy, remain undetected, and send regular status reports| | |B.d.u
11003=Remain undetected and continue following contact/convoy|Available submarines are heading to your patrol area
11004=Attain favorable position and shadow contact/convoy until reinforcements arrive

; possible messages from Bdu when can not dispatch subs
11010=No boats are within your patrol area|Act as lone boat| |Bdu
11011=No support within range|Be more aggressive| |Bdu
11012=Contact report received|Act on own data| |BdU
11013=Be more aggressive!| |Bdu
11014=Attack contact| |Bdu

; Reports from dispatched subs
11020=Contact keeper continue to send bearing signals|Group act on own data|Take every opportunity to attack
11021=Convoy in sight|Signal bearing sent|Moving to attack port side
11022=I believe to have made contact with the convoy|Sending bearing signals|Act according to own data|Attacking at full speed
11023=Requesting bearing signal from contact keeper
11024=Beacon signals lie in the line of approach according to dead reckoning.|Attacking far side of convoy


EDIT:

also added code that will check any unit sending a radio message to see whether it's capable of sending it (currently checks it's depth to what game determines is max depth for sending/receiving radio messages)

Last edited by TheDarkWraith; 09-07-12 at 08:28 PM.
TheDarkWraith is offline   Reply With Quote
Old 09-07-12, 08:41 PM   #1314
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
txt is easiest (with csv [comma seperated values]). What data are you proposing?
currently I am working in xlsx format for my ease , but I can convert scheduled data in txt format by simply copying/pasting them in notepad.

My idea is having a txt file for each month, similar to historical messages featured in your UI. Each file would be divided into sections, one for each U-boat type available in game (VIIA, VIIB, ecc.). Within each section, the first column would be the unit's number (U-27, U-28, ecc.); the following columns would be couples of lat/long coordinates in ascending order, from the 1st day of the month to the last one.

Each second row (the first one being the one conatining unit's number and daily coordinates) could optionally contain the assessed number of torpedoes that that unit had available for each day of the month. Yes I know, estimating those figures from patrol reports is a crazy work, and I am also 99% sure that you are going to tell me that spawned subs cannot be given custom torpedo loadouts, but you could use that row for determining if that unit is currently available to be dispatched, based on the torpedoes she got left. Is it worth?

Anyway, the file structure would be more or less like this:

Code:
[VIIA]
				
U-27	56.51N 14.48W	55.03N 13.45W	55.03N 13.45W	55.03N 13.45W ...
11	11	11	11 ...
U-28	52.21N 13.45W	52.21N 13.45W	52.03N 14.15W	51.27N 10.45W ...
11	11	11	11 ...
U-29	55.03N 16.45W	53.15N 16.45W	53.15N 16.45W	51.27N 15.15W ...
11	11	11	11 ...
...

[VIIB]

...
As you can see coordinates are currently expressed in deg.min, and lat long values are spaced by a single space. Nevertheless, digging into historical missions files I have noticed that SH5 uses another format. If we manage to understand how the game gets those numebrs, by using simple excel functions I should be able to automatize the convertion from conventional to SH5 units.
gap is offline   Reply With Quote
Old 09-07-12, 08:46 PM   #1315
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
currently I am working in xlsx format for my ease , but I can convert scheduled data in txt format by simply copying/pasting them in notepad.

My idea is having a txt file for each month, similar to historical messages featured in your UI. Each file would be divided into sections, one for each U-boat type available in game (VIIA, VIIB, ecc.). Within each section, the first column would be the unit's number (U-27, U-28, ecc.); the following columns would be couples of lat/long coordinates in ascending order, from the 1st day of the month to the last one.

Each second row (the first one being the one conatining unit's number and daily coordinates) could optionally contain the assessed number of torpedoes that that unit had available for each day of the month. Yes I know, estimating those figures from patrol reports is a crazy work, and I am also 99% sure that you are going to tell me that spawned subs cannot be given custom torpedo loadouts, but you could use that row for determining if that unit is currently available to be dispatched, based on the torpedoes she got left. Is it worth?

Anyway, the file structure would be more or less like this:

Code:
[VIIA]
 
U-27    56.51N 14.48W    55.03N 13.45W    55.03N 13.45W    55.03N 13.45W ...
11    11    11    11 ...
U-28    52.21N 13.45W    52.21N 13.45W    52.03N 14.15W    51.27N 10.45W ...
11    11    11    11 ...
U-29    55.03N 16.45W    53.15N 16.45W    53.15N 16.45W    51.27N 15.15W ...
11    11    11    11 ...
...
 
[VIIB]
 
...
As you can see coordinates are currently expressed in deg.min, and lat long values are spaced by a single space. Nevertheless, digging into historical missions files I have noticed that SH5 uses another format. If we manage to understand how the game gets those numebrs, by using simple excel functions I should be able to automatize the convertion from conventional to SH5 units.
Looks good. What I'm probably going to do is write a dll for this (an act file actually so the game automatically loads it). It's easier to write this kind of code in a high level language like C#. Then I just call the functions in my new act file passing the needed parameters and it'll return the data I need for the patch to use
TheDarkWraith is offline   Reply With Quote
Old 09-07-12, 08:49 PM   #1316
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
EDIT:

also added code that will check any unit sending a radio message to see whether it's capable of sending it (currently checks it's depth to what game determines is max depth for sending/receiving radio messages)


Your attention for details is admirable, TDW. With this last icing on the cake you let me simply speachless...
gap is offline   Reply With Quote
Old 09-07-12, 08:56 PM   #1317
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

v1.0.73.0 released. See post #1

All required menu.txt entries are found at post #1

This version adds radio messages when Bdu can't dispatch subs to you from a contact report

Still haven't updated the patcher app so you all can edit the variables

Now I have to figure out how the game handles all the units in game (what function spawns them, what function updates them, and what function despawns them) so that I can implement radio messages when a dispatched sub starts following waypoint 2 (and also for upcoming carrier patch )

TheDarkWraith is offline   Reply With Quote
Old 09-07-12, 09:00 PM   #1318
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
currently I am working in xlsx format for my ease , but I can convert scheduled data in txt format by simply copying/pasting them in notepad.
Actually separating all values in a single row with tabs would be best. That's how I did the radio messages (single tab between items). This way I can reuse most of the code from the radio messages
TheDarkWraith is offline   Reply With Quote
Old 09-07-12, 09:00 PM   #1319
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
Looks good. What I'm probably going to do is write a dll for this (an act file actually so the game automatically loads it). It's easier to write this kind of code in a high level language like C#. Then I just call the functions in my new act file passing the needed parameters and it'll return the data I need for the patch to use
So, can we start looking for volunteers? This time noone will be excused for not having modding skills: we get just to copy/paste n times

gap is offline   Reply With Quote
Old 09-07-12, 09:04 PM   #1320
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
Actually separating all values in a single row with tabs would be best. That's how I did the radio messages (single tab between items). This way I can reuse most of the code from the radio messages
Even easier for me: excel generates automatically tabs separators between colums, when its data are pasted in a document as simple txt.
gap 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:10 AM.


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