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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 09-04-12, 11:44 PM   #11
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Hmm..what do we see below



Why it's a message from another unit to us! I didn't have the menu entries added for units to select a random message so I gave it a pointer to the Bdu messages, that's why it's message doesn't make any sense. Now you may ask why it's unit name is VIIC60. Good question! The reason is because when I asked the game for next available unit name it returned VIIC#1. I sent the pointer to that string to my function that changes everything starting at the # sign to random numbers, thus getting VIIC60. Now VIIC60 isn't a U-Boat hull number so I will send that pointer to the string to a new function that will write a random uboat hull number into it. Now this new U-boat hull number will be forever assigned to this unit while it's spawned (thus it may send out more messages over time )

I can send any kind of message now: unit to player, Bdu to player, Bdu to unit, unit to Bdu, unit to unit, etc. This opens up WHOLE new opportunities/possibilities - for one I can add random radio messages from unit to unit and oh by chance the radio operator intercepted it

Today was a very productive day. In addition to the above I can now retrieve the current game time anytime I need it (local and what the game calls base time - if you're using my UIs mod this would be akin to local = nautical and base time = GMT). The game returns the current game time (or base time if I'm asking for that) in two parts - the time part (in 24hr format) and the date part (in year,mo,day format - i.e. 19400101). I can also apply formatting to strings so I will change the Bdu messages to say how many subs are being dispatched to you

Oh and I can't forget the big one - I found the pointer to the player's u-boat hull number. Now I should be able to point that to another string so that you will always have the hull number you want. Trying to find the pointer to the captain's name so I can do the same thing for that!

Something that I find really interesting is the KGrid number displayed - GR21. The game is actually calling a function to retrieve this value - this tells me that the game has a working KGrid map in memory and it knows what grid you are in at all times. Now I just have to figure out why it can't display the overlay on the maps...
TheDarkWraith is offline   Reply With Quote
 


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 09:28 PM.


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.