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

Reply
 
Thread Tools Display Modes
Old 09-23-15, 01:56 PM   #16
GT182
Ocean Warrior
 
GT182's Avatar
 
Join Date: May 2005
Location: New Castle of Delaware
Posts: 3,231
Downloads: 658
Uploads: 0
Default

Excellent mod! Even if does have a high learning curve it's well worth it.
__________________
Gary

No Borders, No Language, No Culture =s No Country

I'm a Deplorable, and proud of it.
GT182 is offline   Reply With Quote
Old 09-24-15, 07:24 AM   #17
LGN1
Ace of the Deep
 
Join Date: Mar 2006
Posts: 1,138
Downloads: 147
Uploads: 12
Default

Hi Tycho,

is it possible to have a default message in the textbox (via menu.txt) which can be replaced by your own message? This might offer a way to save the text.

Regards, LGN1
LGN1 is offline   Reply With Quote
Old 09-24-15, 08:59 AM   #18
LGN1
Ace of the Deep
 
Join Date: Mar 2006
Posts: 1,138
Downloads: 147
Uploads: 12
Default

Hi,

I think I have a solution to save the text:

- Use Autohotkey to log your key strokes during game-play
- Evaluate and process this log file with a script
- Use, e.g., SH3Commander to add the text back into SH3 via *_menu.txt for a chosen save-game (if necessary change the text box parameters, too).

For convenience this could be put into a single script.

This should all be straight-forward, however, it would require quite some coding...

Regards, LGN1
LGN1 is offline   Reply With Quote
Old 09-24-15, 09:15 AM   #19
sublynx
Sea Lord
 
Join Date: Mar 2011
Location: In the conning tower of my VIIC scanning the sea through the periscope
Posts: 1,698
Downloads: 173
Uploads: 7
Default

With a proper Autohotkey script one could type something like this:

#BE1742 1414 A 3000 GRT merchant spotted 174°##

# meaning Start text
## meaning End text

??

So I could write and save a war diary many pages long with the help of an Autohotkey script and the KzS Notebook?

Would it be possible to also have the script to save the text as a Word file?
__________________
[SIGPIC][/SIGPIC]
NYGM+H.sie v16+Stiebler 4C+MaGui WS
sublynx is offline   Reply With Quote
Old 09-24-15, 03:02 PM   #20
Tycho
Sonar Guy
 
Join Date: Oct 2009
Location: Sofia, Bg
Posts: 384
Downloads: 264
Uploads: 1


Default

Quote:
Originally Posted by LGN1 View Post
is it possible to have a default message in the textbox (via menu.txt) which can be replaced by your own message? This might offer a way to save the text.
Yes! Add in menu_1024_768.ini for the edit box "Text=any number" which leads to en_menu.txt. There write what you want, and the text will be in that edit box when start the game. In the game you can edit this text, but in en_menu.txt will stay original text.


Quote:
Originally Posted by LGN1 View Post
It would be a nice addition to the radio message screen in combination with the enigma. One could then write down the decrypted letters in-game.
Yes, I was thinking of adding one edit box for radio message screen. And if manipulated the font files, it is possible to type letter on keyboard and to appear different letter in the box. I'm going to do it, but when have time.


As for the script, it is too occupation for me. I continue to write log book on paper after patrol, I just want opportunity for quick notes in game.
__________________
If you ride like lightning, you're gonna crash like thunder.
Tycho is offline   Reply With Quote
Old 09-25-15, 12:31 AM   #21
areo16
Sonar Guy
 
Join Date: Oct 2013
Posts: 377
Downloads: 64
Uploads: 0
Default

Quote:
Originally Posted by Tycho View Post
Yes! Add in menu_1024_768.ini for the edit box "Text=any number" which leads to en_menu.txt. There write what you want, and the text will be in that edit box when start the game. In the game you can edit this text, but in en_menu.txt will stay original text.

But game must be completely restarted to see changes of en_menu.txt file. This isn't that ideal.

Best solution would be to write to memory address. Look into CheatEngine and find the pointer to the text edit box and then put in the saved log string there. Do you guys have experience with reading and writing to memory locations of a running executable?
areo16 is offline   Reply With Quote
Old 09-25-15, 03:28 AM   #22
Tycho
Sonar Guy
 
Join Date: Oct 2009
Location: Sofia, Bg
Posts: 384
Downloads: 264
Uploads: 1


Default

Quote:
Originally Posted by areo16 View Post
Do you guys have experience with reading and writing to memory locations of a running executable?
No! And don't want to. I achieved what I wanted - possibility for quick and short notes in game. I make screenshot with these notes and then, after patrol I write logbook on paper, with help from these notes.
The rest, I'll leave it in the hands of who has experience with what you are talking about.
__________________
If you ride like lightning, you're gonna crash like thunder.
Tycho is offline   Reply With Quote
Old 09-25-15, 04:46 PM   #23
areo16
Sonar Guy
 
Join Date: Oct 2013
Posts: 377
Downloads: 64
Uploads: 0
Default

Quote:
Originally Posted by Tycho View Post
No! And don't want to. I achieved what I wanted - possibility for quick and short notes in game. I make screenshot with these notes and then, after patrol I write logbook on paper, with help from these notes.
The rest, I'll leave it in the hands of who has experience with what you are talking about.
Understood.

However, your idea opens up the door to many other possibilities. If we can get a method to save the notes. Screenshots aren't ideal for everyone. We can expand this to other things like captain diaries and such. I know a bit about it but am occupied with my two jobs and I'm a fulltime student.

I'd be willing to guide anyone who wants to take on this memory method. I know how you can learn it fast and help put it together.
areo16 is offline   Reply With Quote
Old 09-26-15, 02:36 PM   #24
LGN1
Ace of the Deep
 
Join Date: Mar 2006
Posts: 1,138
Downloads: 147
Uploads: 12
Default

Hi Tycho & Areo16,

I agree my solution would not be the ideal solution, however, it would work (at least for my style of playing because I always play only one career during a gaming session/loading).

Anyway, I don't have time and I'm too lazy to write the script. The same applies to implementing anything involving writing to memory...

@Tycho: Concerning your remark about the font: Do you mean to make a new font for the notepad at the radio screen so that if you press the letter of the encrypted message you see the decrypted letter on the notepad? That's a very nice idea and would speed up the process of decryption quite a bit (but avoiding your nice enigma machine ) !

Regards, LGN1
LGN1 is offline   Reply With Quote
Old 09-26-15, 03:17 PM   #25
areo16
Sonar Guy
 
Join Date: Oct 2013
Posts: 377
Downloads: 64
Uploads: 0
Default

Quote:
Originally Posted by LGN1 View Post
Hi Tycho & Areo16,

I agree my solution would not be the ideal solution, however, it would work (at least for my style of playing because I always play only one career during a gaming session/loading).

Anyway, I don't have time and I'm too lazy to write the script. The same applies to implementing anything involving writing to memory...
I hear ya. I guess I'll just have to put it on my ever expanding to-do list.

How about the other problem of one line text edits? Now you have to click on the next line to type on the next line.

Is there anywhere in the game that has a multi-line text edit area? Not just a one line text edit line. If exists, we could use that menu item id.
areo16 is offline   Reply With Quote
Old 09-26-15, 03:54 PM   #26
Tycho
Sonar Guy
 
Join Date: Oct 2009
Location: Sofia, Bg
Posts: 384
Downloads: 264
Uploads: 1


Default

Quote:
Originally Posted by LGN1 View Post
@Tycho: Concerning your remark about the font: Do you mean to make a new font for the notepad at the radio screen so that if you press the letter of the encrypted message you see the decrypted letter on the notepad? That's a very nice idea and would speed up the process of decryption quite a bit (but avoiding your nice enigma machine ) !
Yes, exactly! Will do it the next week.

Quote:
Originally Posted by areo16 View Post
How about the other problem of one line text edits? Now you have to click on the next line to type on the next line.

Is there anywhere in the game that has a multi-line text edit area? Not just a one line text edit line. If exists, we could use that menu item id.
It is possible to edit on every line. But the cursor is not visible after first line, and this makes the editings more tricky. And the impossibility to go for new line, when you want, makes the multi-line edit box even more tricky for use.
__________________
If you ride like lightning, you're gonna crash like thunder.
Tycho is offline   Reply With Quote
Old 09-26-15, 04:18 PM   #27
areo16
Sonar Guy
 
Join Date: Oct 2013
Posts: 377
Downloads: 64
Uploads: 0
Default

Quote:
Originally Posted by Tycho View Post
It is possible to edit on every line. But the cursor is not visible after first line, and this makes the editings more tricky. And the impossibility to go for new line, when you want, makes the multi-line edit box even more tricky for use.
What is the menu id number for multi-line edit box?
Not seeing cursor makes it difficult but not impossible. Finding cursor location can be done by deleting or adding one character. If you click on the second line on the right side of the text and it has text on the second line, wont the cursor go to the end of the text? Even though it is invisible.

Last edited by areo16; 09-26-15 at 04:24 PM.
areo16 is offline   Reply With Quote
Old 09-26-15, 05:06 PM   #28
ExFishermanBob
Difficulties Numbing
 
Join Date: Aug 2013
Location: AN19
Posts: 470
Downloads: 43
Uploads: 0


Default

Quote:
Originally Posted by areo16 View Post
I hear ya. I guess I'll just have to put it on my ever expanding to-do list.

How about the other problem of one line text edits? Now you have to click on the next line to type on the next line.

Is there anywhere in the game that has a multi-line text edit area? Not just a one line text edit line. If exists, we could use that menu item id.
Are you thinking - "enter some known text" then scan the memory (of the running program) to find out where it lies? If the notepad was started with some fixed (known) text (like "KzS Notepad") it might be easy enough even at run-time. I suspect the problem might be detecting the end of the text (unless you had a fixed-size allocation for any notepad text with an end-marker as well).
ExFishermanBob is offline   Reply With Quote
Old 09-26-15, 05:12 PM   #29
Tycho
Sonar Guy
 
Join Date: Oct 2009
Location: Sofia, Bg
Posts: 384
Downloads: 264
Uploads: 1


Default

Quote:
Originally Posted by areo16 View Post
What is the menu id number for multi-line edit box?
The same, there has only the one edit box in the game and it is Type=1035.
Make it bigger and give it more TextMaxLen=xxxx, and you will have multi-line edit box.

Quote:
Originally Posted by areo16 View Post
Not seeing cursor makes it difficult but not impossible. Finding cursor location can be done by deleting or adding one character.
Yes, I know! I experimented a lot with these things. And because of that, I reached to the decision to divide it into separated lines with numerous edit boxes.

Quote:
Originally Posted by areo16 View Post
If you click on the second line on the right side of the text and it has text on the second line, wont the cursor go to the end of the text? Even though it is invisible.
Not possible:
One click with the mouse over - opens edit box.
Second click with the mouse - closes edit box.
But, works with Home, End and Arrow keys.
__________________
If you ride like lightning, you're gonna crash like thunder.
Tycho is offline   Reply With Quote
Old 09-27-15, 02:46 AM   #30
areo16
Sonar Guy
 
Join Date: Oct 2013
Posts: 377
Downloads: 64
Uploads: 0
Default

Quote:
Originally Posted by ExFishermanBob View Post
Are you thinking - "enter some known text" then scan the memory (of the running program) to find out where it lies? If the notepad was started with some fixed (known) text (like "KzS Notepad") it might be easy enough even at run-time. I suspect the problem might be detecting the end of the text (unless you had a fixed-size allocation for any notepad text with an end-marker as well).
Well if its a multiline text edit box then wont there be a pointer somewhere to an allocated space big enough to hold enough characters to fill that whole multiline text edit box?
areo16 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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 04:13 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.