SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH5 Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=249)
-   -   [WIP] In-game naval Enigma M4 machine (https://www.subsim.com/radioroom/showthread.php?t=205112)

gap 08-20-16 10:49 AM

Of course encrypting all the messages would be unrealistic: only campaign messages addressed to the player, intelligence reports and other historical messages sent by/ adressed to U-boats, should be encoded. Most of them are already in the short style described by SkyaBaron. If an automatic encoder is possible, we could choose a tag or a string for marking the messages that actually need to be encoded ;-)

gap 08-20-16 11:17 AM

Besides making the process totally automatic (in my idea, only the tagging of messages that need to be encoded should be manual), the advantage of an automatic encoder scripted directly into the game would be that recursive campaign messages woul be encoded with the correct format for the current year/month. Again I realize that building such an encoder into the game might not be that easy. Just thinking out aloud :salute:

SkyBaron 08-20-16 11:45 AM

Quote:

Originally Posted by vdr1981 (Post 2428176)
Optional addon for grid reposition combat order would also be cool , IF you can come up with solution for mentioned in game current year problem...:hmm2:

I'll release an updated version where you can select the year as well.

To be honest I haven't finished a campaign mission or career in a long time. I seem to have the modder's illness where I always want to make a mod instead of just playing the game. :haha: That's not a bad thing because I'm enjoying making them. That's why I'm not very familiar with the messages during campaign.

So for example in a file like this:
Code:

[Text]
MissionTitle=Patrol the specified area AM2258
MissionBriefing=Patrol the specified area AM2258
Patrol the designated area=Patrol area assigned. Reach the area AM2258 and start operations. Attack any enemy contact
Reposition and patrol the designated area=Reposition and continue patrol operations AE8868
Patrol the specified area=Reposition and continue operations AM2296
Fail4A=Combat  task accomplished. In the presence of torpedoes, conduct free  anti-shipping operations, otherwise return to base. BdU
Info80R1=Patrol AM2258 zone radius 120 km. Time of patrol 24 hours. BdU
Info80R2=Reposition. Patrol AE8868 zone radius 120 km. Time of patrol 24 hours. BdU
Info80R3=Reposition. Patrol AM2296 zone radius 120 km. Time of patrol 24 hours. BdU

Which parts come as message? I'm guessing some are for description and others show up during game-play, right? Do they show up once the player reaches an area and finishes the time of patrol? What do the endings ...4A ...80R1 ...80R2 mean?

My thought was to create a program to read all the "info...=" in the .tsr files, change numbers and punctuation, and encrypt all at once since these are pretty short. Maybe we can make a package with all these encrypted messages, to give the player options. That's probably what you're doing already.

Another thing, some of the .tsr files like infiltrate, intercept, etc. don't seem to have the same structure. Do they still "send" in game messages?


Quote:

Originally Posted by gap (Post 2428190)
Besides making the process totally automatic (in my idea, only the tagging of messages that need to be encoded should be manual), the advantage of an automatic encoder scripted directly into the game would be that recursive campaign messages woul be encoded with the correct format for the current year/month. Again I realize that building such an encoder into the game might not be that easy. Just thinking out aloud :salute:

That's actually a good idea for the combat messages, because it would avoid you being in 1943 and having to decode a message encoded in 1939, making it more realistic.

Save

vdr1981 08-20-16 12:39 PM

Quote:

Originally Posted by SkyBaron (Post 2428206)
I'll release an updated version where you can select the year as well.

This is very good :up:



Quote:

So for example in a file like this:
Which parts come as message? I'm guessing some are for description and others show up during game-play, right? Do they show up once the player reaches an area and finishes the time of patrol? What do the endings ...4A ...80R1 ...80R2 mean?
Code:

[Text]
MissionTitle=Patrol the specified area AM2258
MissionBriefing=Patrol the specified area AM2258
Patrol the designated area=Patrol area assigned. Reach the area AM2258 and start operations. Attack any enemy contact

Reposition and patrol the designated area=Reposition and continue patrol operations AE8868
Patrol the specified area=Reposition and continue operations AM2296

Fail4A=Combat  task accomplished. In the presence of torpedoes, conduct free  anti-shipping operations, otherwise return to base. BdU
Info80R1=Patrol AM2258 zone radius 120 km. Time of patrol 24 hours. BdU
Info80R2=Reposition. Patrol AE8868 zone radius 120 km. Time of patrol 24 hours. BdU
Info80R3=Reposition. Patrol AM2296 zone radius 120 km. Time of patrol 24 hours. BdU

Green - Initial orders content and headlines for order taken in base. Should not be encrypted.
Blue - Hedlines for oders received in patrol should be titled like "New orders", should not be encripted.
Yellow - Combat instructions received in patrol, should be encrypted.

Only content after "=" mark should be edited and NOT before it...:yep:

Quote:

My thought was to create a program to read all the "info...=" in the .tsr files, change numbers and punctuation, and encrypt all at once since these are pretty short. Maybe we can make a package with all these encrypted messages, to give the player options.
And this would be even better! :yep:

Quote:

Another thing, some of the .tsr files like infiltrate, intercept, etc. don't seem to have the same structure. Do they still "send" in game messages?
Missions like harbors photo reconnaissance and spy infiltration should not be touched because we should assume that orders like that would be taken in home base. Only grid patrol and intercept convoy/TF missions are of interest.

vdr1981 08-20-16 12:45 PM

Just a small example of in game codded message...(Just dont ask me about the content, I have forgot and still havent learn to use "Enigma" :D)

https://s6.postimg.org/3u12gzxf5/SH5...0_18_47_05.jpg

kevinsue 08-20-16 09:07 PM

http://i67.tinypic.com/e8748w.jpg

Got my head around the Enigma encryption/decryption part of this amazing mod, but I just can't seem to get the radio messages working. I'm on the second patrol which is North Western Approaches, heading toward AM6144 and the date is 27/11/1939.

I've tried editing the SilentHunter5\data\RadioMessages\English\1939\11\r adiomessages.txt as per the manual but have not received any of the encrypted messages. Could anyone point me in the right direction as to which files are the main ones that generate the relevant radio messages ingame. I know I must be doing something wrong...I just don't know what yet! :oops:

vdr1981 08-21-16 07:04 AM

Here's how it looks encrypted message from my previous screenshot in one of the campaign_radiomessages.txt files...

Code:

19400324        0001        19400331        2300        1        20        1        0        0        -1        all        BDU      0001/24/3    25||XNSL XDYX NQYT VIUY NVVL CJLE OIXT UBYU BUMT KPRF GKWG RUAG HBXQ TLDJ YSOR FRKP YFTQ NKKV WIWT SVFG EBRB EPYL NLDI XNSL XDYX
I hope this can help a bit Kevin...:hmm2:

vdr1981 08-21-16 10:36 AM

Just a quick question SkyBaron. Do you have any rough ETA of your update for the mod? :hmm2: I'm asking because I'm planing to upload new update for TWoS...

SkyBaron 08-21-16 12:24 PM

Quote:

Originally Posted by vdr1981 (Post 2428216)
Just a small example of in game codded message...(Just dont ask me about the content, I have forgot and still havent learn to use "Enigma" :D)

No need to ask about it. :) All the info you need is right here:

http://i1286.photobucket.com/albums/...psi471v1fp.png

Get the current month's substitution table:

http://i1286.photobucket.com/albums/...psk9fw643f.png

Making the four pairs substitutions:

http://i1286.photobucket.com/albums/...psezrur4e1.png

http://i1286.photobucket.com/albums/...ps5qerteiw.png


....you'll get the TWO indicator groups: (ignoring the first letter)

http://i1286.photobucket.com/albums/...ps8f7g4drb.png


Looking up the allocation number for the first indicator(3 letters) you'll get the Hydra cypher:

http://i1286.photobucket.com/albums/...psu4qkul9p.png

http://i1286.photobucket.com/albums/...ps1reamr38.png


Set up the machine for that cipher and date:

http://i1286.photobucket.com/albums/...psjqckdojs.png

http://i1286.photobucket.com/albums/...psuqzgevr1.png


...set the starting rotor positions(Grundstellung) for that date:

http://i1286.photobucket.com/albums/...psxhvdbr7g.png

type the second indicator to get the message key:

http://i1286.photobucket.com/albums/...pszjs5cnpz.png

set the starting rotor positions AGAIN with that key:

http://i1286.photobucket.com/albums/...psajzqqjzy.png


and proceed to decode the message. Ignore my spelling mistakes, and I don't think I decoded the whole thing but that's how it's done :up:

http://i1286.photobucket.com/albums/...psgiheruit.png


I understand this mod is not to everyone's taste, but it's not that hard once you get the hang of it. That's what you get in a hard core mod as this one! :salute:

I'll post an updated version(with year selection) sometime this week.

vdr1981 08-21-16 01:31 PM

Very nice! :up: I have just tried to decipher the very same message but I got bunch of nothing, leaving me wondering did I screwed up something during the encryption process.
I'm glad that you managed to decipher it correctly. Now I have to track down where I made a mistake during decripting...:)

EDIT:

Hm...I done everything the same like you did, but when I entered indicator (WMYI) my output was completely different. Well , repetitio est mater studiorum...:O:

SkyBaron 08-21-16 01:44 PM

Quote:

Originally Posted by vdr1981 (Post 2428509)
EDIT:

Hm...I done everything the same like you did, but when I entered indicator (WMYI) my output was completely different. Well , repetitio est mater studiorum...:O:


The encryption indicator (second one) should be VMYI
Save

vdr1981 08-21-16 01:46 PM

Quote:

Originally Posted by SkyBaron (Post 2428513)
The encryption indicator (second one) should be VMYI
Save

my mistake, it was vmyi...

SkyBaron 08-21-16 02:08 PM

Quote:

Originally Posted by vdr1981 (Post 2428514)
my mistake, it was vmyi...

Maybe you're making a mistake with the codewheels settings. Take a look at this video I made with an older (development version) of this mod, maybe it will help.

https://www.youtube.com/watch?v=I1A_dyGbfo0

vdr1981 08-21-16 03:29 PM

Quote:

Originally Posted by SkyBaron (Post 2428516)
Maybe you're making a mistake with the codewheels settings. Take a look at this video I made with an older (development version) of this mod, maybe it will help.

https://www.youtube.com/watch?v=I1A_dyGbfo0

I made it, thanks! :up:

Wheel slots were already filled up so that confused me a bit...Now it's OK.
It's amassing how deciphering process, although a bit slow, was actually very easy.

Once again, very, very good job SkyBaron! :up::up::up:

SkyBaron 08-21-16 06:39 PM

Quote:

Originally Posted by vdr1981 (Post 2428540)
I made it, thanks! :up:

Wheel slots were already filled up so that confused me a bit...Now it's OK.
It's amassing how deciphering process, although a bit slow, was actually very easy.

Once again, very, very good job SkyBaron! :up::up::up:

Good! Pg 8 in the manual talks about the default wheels sequence when you open the machine for the first time.
Save


All times are GMT -5. The time now is 02:18 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.