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 10-31-12, 02:10 PM   #1
Paco
Captain
 
Join Date: May 2005
Location: Kassel, Germany
Posts: 542
Downloads: 345
Uploads: 0
Default singular/plural; TDW Scripts

Hi gap,

I added the singular and plural-forms to the scipt. Than I added a variable to setup a new delimiter for the shn-files and patched the TDW-scipt additive.

For better digest, I used the "_" as delimiter and not "#".

Have a look for the italian version:

Quote:
Giving changes as an exact value:
512328_7225438_-1_9999,0_7_-1_Viriamo 1 grado di barra a dritta, Comandante.
521982_7199124_-1_9999,0_7_-1_Rimaniamo in rotta, Comandante.
530193_7172250_-1_9999,0_7_-1_Viriamo 3 gradi di barra a dritta, Comandante.
539876_7146954_-1_9999,0_7_-1_Viriamo 4 gradi di barra a sinistra, Comandante.

Giving changes as dec-value:
1343910_8146509_-1_9999,0_7_-1_Viriamo 1 decine di gradi a dritta, Comandante.
1318821_8132517_-1_9999,0_7_-1_Viriamo 1 decine di gradi a sinistra, Comandante.

Using the BIGREG/gap-style ;-)
1294086_8119799_-1_9999,0_7_-1_Viriamo 10 di gradi a dritta, Comandante.
1270297_8105174_-1_9999,0_7_-1_Viriamo 10 di gradi a sinistra, Comandante.
Quote:
All the same, I would get anyway in touch with him for three reasons:

- politeness

- asking him if by any chance the changes proposed by you may be generating bugs, or breaking other's scripts

- asking him to include your inprovements in the next version of New UIs, provided that they have no side effects
I will do so.

Cheers,
Paco.
Paco is offline   Reply With Quote
Old 10-31-12, 04:12 PM   #2
Paco
Captain
 
Join Date: May 2005
Location: Kassel, Germany
Posts: 542
Downloads: 345
Uploads: 0
Default Comments at a given Waypoint (MWP)

Ok, now I try toexplain the outputs while passing a Masterwaypoint:

A Masterwaypoint is mostly a turning-point, we have to set a new heading, for example to circle around an island. Additional we are able to change the speed and/or the depth of the sub.


1. Speed-Changes:

If using the dialog-style, the captain commands to change speed or to stop the sub:

- stopping:
Quote:
TEXT['ALL_STOP'] + TEXT['XO']
-changing speed:
Quote:
TEXT['NEW_SPEED'] + speed + TEXT['KN'] +TEXT['XO']
Than, the crew confirms this command - this part is the same as the no dialog-style:

- stopping:
Quote:
TEXT['STOPPING'] + TEXT['HERR_KALEUN']
-changing speed:
Quote:
TEXT['NEW_SPEED_IS'] + speed + TEXT['KN'] +TEXT['HERR_KALEUN']
Examples:
Quote:
New Speed 7 knots, XO. Going to 7 knots, Herr Kaleun.
Neue Fahrt 7 Knoten, LI. Gehen auf 7 Knoten, Herr Kaleun.

All stop, XO. Stopping, Herr Kaleun.
Maschinen stop, LI. Maschinen stop, Herr Kaleun.
2. Headings:

If using the dialog-style, the captain commands the new heading of the sub:

Quote:
TEXT['NEW_HEADING'] + TEXT['NAVIGATOR'])
Than, the crew confirms this command - this part is the same as the no dialog-style. It is divided to write the heading in degree or as a compass:

a) degree - change heading:

Quote:
TEXT['NEW_HEADING_IS'] + heading + TEXT['DEGREE'] + TEXT['HERR_KALEUN']
b) degree - heading is not changing:

Quote:
TEXT['HEADING_IS_FINE'] + heading + TEXT['DEGREE'] + TEXT['HERR_KALEUN']
c) compass-style - change heading:

Quote:
TEXT['NEW_HEADING_IS'] + SSO + TEXT['HERR_KALEUN']
d) compass-style - heading is not changing:

Quote:
TEXT['HEADING_IS_FINE'] + SSO + TEXT['HERR_KALEUN']
Examples:

Quote:
a)
We need to change the heading, Navigator. New heading is 75 degree, Herr Kaleun.
Zeit den Kurs zu wechseln, ObStrMn. Gehen auf Kurs 0 Grad, Herr Kaleun.

b)
We need to change the heading, Navigator. Heading is fine 90 degree, Herr Kaleun.
Zeit den Kurs zu wechseln, ObStrMn. Bleiben auf Kurs 0 Grad, Herr Kaleun.

c)
We need to change the heading, Navigator. New heading is WNW, Herr Kaleun.
Zeit den Kurs zu wechseln, ObStrMn. Gehen auf Kurs WSW, Herr Kaleun.

d)
We need to change the heading, Navigator. Heading is fine N, Herr Kaleun.
Zeit den Kurs zu wechseln, ObStrMn. Bleiben auf Kurs N, Herr Kaleun.
3. Changing Sub-depth:

The process of changing the subdepth is a little bit more complex.

A sub is on surface while travelling above the waves or decks-awash. It is Submerged if it is on snorkel depth or below. So I have designed different prepare-commands:

Dialog-style surfacing:
Quote:
TEXT['PREPARE'] + TEXT['FOR'] + TEXT['TO_SURFACE'] + TEXT['XO']
TEXT['READY'] + TEXT['FOR'] + TEXT['TO_SURFACE'] + TEXT['HERR_KALEUN']
Dialog-style from surface -> diving:
Quote:
TEXT['PREPARE'] + TEXT['FOR'] + TEXT['TO_DIVE'] + TEXT['XO']
TEXT['READY'] + TEXT['FOR'] + TEXT['TO_DIVE'] + TEXT['HERR_KALEUN']
Dialog-style from surface -> diving to the testdepth of the sub:
Quote:
TEXT['PREPARE'] + TEXT['FOR'] +TEXT['TO_TESTDIVE'] + TEXT['XO']
TEXT['READY'] + TEXT['FOR'] +TEXT['TO_TESTDIVE'] + TEXT['HERR_KALEUN']
Dialog-style all other depth-changes:
Quote:
TEXT['PREPARE'] + TEXT['FOR'] +TEXT['TO_CHANGE_DEPTH'] + TEXT['XO']
TEXT['READY'] + TEXT['FOR'] +TEXT['TO_CHANGE_DEPTH'] + TEXT['HERR_KALEUN']
Than follows the command with the exact depth:

Quote:
TEXT['GO_TO_FIXED_DEPTH'] + TEXT['SURFACE'] + TEXT['XO']
TEXT['GO_TO_FIXED_DEPTH'] + TEXT['SNORKEL_DEPTH'] + TEXT['XO']
TEXT['GO_TO_FIXED_DEPTH'] + TEXT['PERISCOPE_DEPTH'] + TEXT['XO']
TEXT['GO_TO_FIXED_DEPTH'] + TEXT['DECKSAWASH_DEPTH'] + TEXT['XO']
or
TEXT['GO_TO_DEPTH'] + TEXT['DEPTH'] + subdepth + TEXT['METRES'] + TEXT['XO']
The last part is used from dialog or non-dialog-style:
Quote:
TEXT['SURFACEING']
TEXT['GOING_TO'] + TEXT['SNORKEL_DEPTH'] + TEXT['HERR_KALEUN']
TEXT['GOING_TO'] + TEXT['PERISCOPE_DEPTH'] + TEXT['HERR_KALEUN']
TEXT['GOING_TO'] + TEXT['DECKSAWASH_DEPTH'] + TEXT['HERR_KALEUN']
or
TEXT['GOING_TO'] + TEXT['DEPTH'] + subdepth + TEXT['METRES'] + TEXT['HERR_KALEUN']
Examples:

Quote:
Prepare for Surfacing, XO. Ready for Surfacing, Herr Kaleun. Surfaceing, XO. Surfacing, Herr Kaleun.
Klar für Überwasserfahrt, LI. Boot klar für Überwasserfahrt, Herr Kaleun. Auftauchen, LI. Tauchen auf, Herr Kaleun.

Prepare for Depthchanging, XO. Ready for Depthchanging, Herr Kaleun. Decks awash, XO. Going to Decks awash, Herr Kaleun.
Klar für Tiefenänderung, LI. Boot klar für Tiefenänderung, Herr Kaleun. Vorfluttiefe, LI. Gehen auf Vorfluttiefe, Herr Kaleun.

Prepare for Diving, XO. Ready for Diving, Herr Kaleun. Snorkeldepth, XO. Going to Snorkeldepth, Herr Kaleun.
Klar für Unterwasserfahrt, LI. Boot klar für Unterwasserfahrt, Herr Kaleun. Schnorcheltiefe, LI. Gehen auf Schnorcheltiefe, Herr Kaleun.

Prepare for Depthchanging, XO. Ready for Depthchanging, Herr Kaleun. Persicopedepth, XO. Going to Persicopedepth, Herr Kaleun.
Klar für Tiefenänderung, LI. Boot klar für Tiefenänderung, Herr Kaleun. Sehrohrtiefe, LI. Gehen auf Sehrohrtiefe, Herr Kaleun.

Prepare for Depthchanging, XO. Ready for Depthchanging, Herr Kaleun. Go to 130 metres, XO. Going to 130 metres, Herr Kaleun.
Klar für Tiefenänderung, LI. Boot klar für Tiefenänderung, Herr Kaleun. Neue Tiefe 130 Meter, LI. Gehen auf 130 Meter, Herr Kaleun.

4. Routing informations:


You get an information about the distance to the next MWP, the time ingame and realtime (calculated with the given TC)

Quote:
TEXT['REACHING_NEXT_WP'] + distance + TEXT['SM'] + TEXT['THAT_TAKES'] + Gametime + TEXT['HOURS'] + TEXT['LEFT_BRACKET'] + Realtime + TEXT['MINUTES'] + TEXT['RIGHT_BRACKET'] + TEXT['HERR_KALEUN']
Example:

Quote:
Reaching next Waypoint in 1100 nm. That takes 20 hours (4 minutes), Herr Kaleun.
Nächster Kurswechsel in 1100 sm. Marschzeit dahin 20 Stunden (4 Minuten), Herr Kaleun.

5. Arrival:


At the last MWP, the comment is:

TEXT['WE_ARE_THERE'] + TEXT['HERR_KALEUN']

Good luck
Paco

Last edited by Paco; 11-01-12 at 05:09 PM. Reason: Added last changes to code
Paco is offline   Reply With Quote
Old 10-31-12, 07:31 PM   #3
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Paco View Post
Hi gap,

I added the singular and plural-forms to the scipt.
Thank you Paco!
I've updated the italian translation at post #53 and added a new text entry: 'DEGREES' for the plural form

Quote:
Originally Posted by Paco View Post
Than I added a variable to setup a new delimiter for the shn-files and patched the TDW-scipt additive.

For better digest, I used the "_" as delimiter and not "#".


Quote:
Originally Posted by Paco View Post
Have a look for the italian version:

Quote:
Using the BIGREG/gap-style ;-)
1294086_8119799_-1_9999,0_7_-1_Viriamo 10 di gradi a dritta, Comandante.
1270297_8105174_-1_9999,0_7_-1_Viriamo 10 di gradi a sinistra, Comandante.
That's not correct

the correct forms should be:

Quote:
Viriamo 10 gradi di barra a dritta, Comandante.
Viriamo 10 gradi di barra a sinistra, Comandante.
or even:

Quote:
Viriamo 10 gradi a dritta, Comandante.
Viriamo 10 gradi a sinistra, Comandante.

Quote:
Originally Posted by Paco View Post
Ok, now I try toexplain the outputs while passing a Masterwaypoint:

A Masterwaypoint is mostly a turning-point, we have to set a new heading, for example to circle around an island. Additional we are able to change the speed and/or the depth of the sub.


1. Speed-Changes:

...

2. Headings:

...
translation done without problems
(see post #53)


Quote:
Originally Posted by Paco View Post
3. Changing Sub-depth:

The process of changing the subdepth is a little bit more complex.

A sub is on surface while travelling above the waves or decks-awash. It is Submerged if it is on snorkel depth or below. So I have designed different prepare-commands:

....
Okay, translation done, but with some remarks:
  • the entry ['FOR'] should be translated with the italian preposition "a" combined with the definite article, wich may vary depending on the noun that follows it. In our case we would have "al" or "all'" (with the apostrophe). My workaround was leaving the 'FOR' entry blanc, and including the preposition in the ['TO_SURFACE'], ['TO_DIVE'], ['TO_TESTDIVE'] and ['TO_CHANGE_DEPTH'] entries. Are they used in any other combination that the one you have illustrated?

  • In italian we make a broad use of the apostrophe. Nevertheless I see that your code uses straight apostrophes as string markers. I've used the curly apostrophe instead (hoping that it is not going to be confused with the straight one), but this forum doesn't recognize it: it gets replaced with a ***8217; code. In your code, you should replace that text with the correct character. If you are going to do it, please remember that there is no space between words separeted by postrophes (for example: "all'immersione" not "all' immersione".

  • Are the strings ['TO_SNORKEL_DEPTH'], ['TO_PERISCOPE_DEPTH'] and ['TO_DECKSAWASH_DEPTH'] used likewise the remaining ['TO_*'] entries. I didn't translate them yet, because I couldn't find any mention to them among your examples.

  • As far as depth commands are concerned, could you put the ['GO_TO'] string to before these phrases:

    TEXT['SNORKEL_DEPTH'] + TEXT['XO']
    TEXT['PERISCOPE_DEPTH'] + TEXT['XO']
    TEXT['DECKSAWASH_DEPTH'] + TEXT['XO']

    it would make more obvious that they are orders, and it would also make them symmetrical with their respective answers (order carried out), thus easing their translation.

  • In this dialog:

    TEXT['GO_TO'] + subdepth + TEXT['METRES'] + TEXT['XO']
    TEXT['GOING_TO'] + subdepth + TEXT['METRES'] + TEXT['HERR_KALEUN']

    can you insert a ['DEPTH'] string between ['GO_TO'] / ['GOING_TO'] and the subdepth value: it is not indispensable, but in italian in would make it more straightforward from the beginning that we are talking about meters of depth. For other languages that don't require it, the entry could be left blank

Quote:
Originally Posted by Paco View Post

4. Routing informations:


...

5. Arrival:


...
No problem here
gap is offline   Reply With Quote
Old 11-01-12, 06:07 AM   #4
Paco
Captain
 
Join Date: May 2005
Location: Kassel, Germany
Posts: 542
Downloads: 345
Uploads: 0
Issue with TDW's delimiter - No issue with TDW's delimiter

My first attemp to change the delimiter from ',' to anything other has crashed.

I have to go to deep into TDW's work to change and to be compatible with others work. But I found another way to allow the using of a comma in the navigation-files.

Changing the input-routines in TDW's Mod -> heavy work
Make a little change to his Journal-routine -> easy work

For our comments, we write them as we want with the comma. By creating the shn-file, the script replaces all positions of a comma with "_#$#_".

Now, I added a line to the "Page Default Hud.py" from TDW to get back the comma by replacing the _#$#_ in the output-function.

The advantages are
- we get less problems with the complex process how the automations are working
- less code to change (one line only)
- Less side effects, we aren't crashing the UI-Mod, because we are only in an output-routine (I think, nobody uses a term like _#$#_ in his comments )
- The change allows Trevally, AvM, and others to use a so hided comma in ther shn files. They only need is the code update in the "Page Default Hud.py".


Paco
Paco is offline   Reply With Quote
Old 11-01-12, 12:35 PM   #5
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Paco View Post
My first attemp to change the delimiter from ',' to anything other has crashed.

I have to go to deep into TDW's work to change and to be compatible with others work. But I found another way to allow the using of a comma in the navigation-files.

Changing the input-routines in TDW's Mod -> heavy work
Make a little change to his Journal-routine -> easy work

For our comments, we write them as we want with the comma. By creating the shn-file, the script replaces all positions of a comma with "_#$#_".

Now, I added a line to the "Page Default Hud.py" from TDW to get back the comma by replacing the _#$#_ in the output-function.

The advantages are
- we get less problems with the complex process how the automations are working
- less code to change (one line only)
- Less side effects, we aren't crashing the UI-Mod, because we are only in an output-routine (I think, nobody uses a term like _#$#_ in his comments )
- The change allows Trevally, AvM, and others to use a so hided comma in ther shn files. They only need is the code update in the "Page Default Hud.py".


Paco
Brilliant!
gap is offline   Reply With Quote
Old 11-01-12, 04:49 PM   #6
Paco
Captain
 
Join Date: May 2005
Location: Kassel, Germany
Posts: 542
Downloads: 345
Uploads: 0
Default

Hi gap,

I got Your remarks into the script:

Quote:
the entry ['FOR'] should be translated with the italian preposition "a" ....
Your workaround is good. I do it for some german translations, too.

Quote:
code uses straight apostrophes as string markers.
Changed it into double quote and added Your straight apostrophes into the strings.

Quote:
Are the strings ['TO_SNORKEL_DEPTH'], ['TO_PERISCOPE_DEPTH'] and ['TO_DECKSAWASH_DEPTH'] used likewise the remaining ['TO_*'] entries. I didn't translate them yet, because I couldn't find any mention to them among your examples
Yes

Quote:
As far as depth commands are concerned, could you put the ['GO_TO'] string to before these phrases:
Done. I divided it into 'GO_TO_DEPTH' for a depthchanging in metres and 'GO_TO_FIXED_DEPTH' for a change to a preset, like Snorkel, or Periscopedepth. For the german translation I leave the second one empty, because we don't need that 'GO_TO_FIXED_DEPTH'.

Quote:
can you insert a ['DEPTH'] string between ['GO_TO'] / ['GOING_TO']
Yes I can. -> Done. Added the new string into the TEXT-dictionary.

Greets,
Paco.
Paco is offline   Reply With Quote
Old 11-01-12, 05:27 PM   #7
LemonA
Lieutenant
 
Join Date: Jan 2012
Posts: 252
Downloads: 66
Uploads: 0
Default

I am asking, for whom is the mod intended? ONly for the lazy guy who is not able to draw 5 course lines back to Wilhelmshaafn?

Must the script be monitored in any way to avoid u-boat loss? If "no" how does the script deal with enemy attacks?
__________________
Robert Schmidt, LTJG
U-43
LemonA is offline   Reply With Quote
Old 11-01-12, 06:03 PM   #8
Paco
Captain
 
Join Date: May 2005
Location: Kassel, Germany
Posts: 542
Downloads: 345
Uploads: 0
Default

Quote:
Originally Posted by LemonA View Post
I am asking, for whom is the mod intended? ONly for the lazy guy who is not able to draw 5 course lines back to Wilhelmshaafn?
For me, I'm a lazy guy. I like the idea, to have a "taxi-service" in the game like the "harbour pilot scripts" from Trevally.

Perhaps, some other players, who are using the Real-Navigation-Mod could have a need for such a Mod...

Quote:
Originally Posted by LemonA View Post
Must the script be monitored in any way to avoid u-boat loss? If "no" how does the script deal with enemy attacks?
You do not need the script. It is only to generate automation-files, which have to be imported via JSGME into the game.

Ingame the behaviour is the same as You plot a course and Your crew sights an enemy ship. TC drops and You have to decide what to do.

Paco
Paco is offline   Reply With Quote
Old 11-01-12, 07:24 PM   #9
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

For me in makes sense inasmuch I don't like having a laser guided sub, but at the same time I don't see it realistic that after enabling real navigation we are no longer able to plot a course, letting navigator and xo to follow it. Using this mod makes them again able to do what they are meant to

Talking about it, it would be cool if Paco's script could feature some limitations:

injured navigator and XO: script disabled
stormy weather: more randomness

Another cool feature would be making the Navigator to mark on map his extimated position at start/end of the script and when main waypoints are reached. Something similar to automatic dead reckoning/celestial fixes script
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 03:29 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.