Log in

View Full Version : Triggering/injecting radio message


ExFishermanBob
01-09-14, 05:36 PM
Is there a mod to inject radio message text at all? Or alternatively triggering the next one? I'm a capable programmer if it requires any assembly.

areo16
01-09-14, 08:43 PM
I know there is some hardcore .exe fixes. You might want to ask those modders. I forget their names. hsie I think is one.

Otherwise, the messages are launched via date in the en_messages.txt file in the data/Campaigns folder.

ExFishermanBob
01-10-14, 02:03 AM
Thanks, I'll look up hsie.

areo16
01-10-14, 03:28 AM
What idea did you have in mind?

ExFishermanBob
01-10-14, 03:57 AM
I want to attempt to tie in a chat client (Jabber or IRC, say) to the radio system on-board the sub, as it were. I've been using IRC but it fails to pop-up over the game.

It strikes me that a general chat-to-sub linker would enable both simple chat and also be useful for BdU messages for the Donitz Flotilla.

I have been pondering having a 'radio operator' program external to SH3 which uses the existing message files but modifies them with the chat-program output. I need to experiment with when SH3 opens / loads / counts the message files). I note that sending a status message in-game triggers a reply from BdU so that might be one method. I note that h.sie's V16B1 patch:

http://www.subsim.com/radioroom/showthread.php?t=174225&highlight=radio+message+mod

shows item 13 as a modification, so I can also have a look at the code in the patch, perhaps: there is a comment at the bottom ('original first post') which gives me some hope regarding triggering messages, etc.

My second idea was to subvert the in-game multi-user chat (I have yet to use this, but can rig a couple of PC's to try it out).

areo16
01-10-14, 05:32 AM
Did you want to chat to be realtime or delayed, so someone can post messages that can be read in-game later?

If they were delayed we could roleplay a sort of Donitz commander player that could receive the messages and give commands to uboats, and the uboats would receive the messages once they relaunch their patrol after connecting to a server. This would require an external program to be made.

Or are you thinking of having in-game multiplayer chat between players?

ExFishermanBob
01-10-14, 05:48 AM
It was originally just the latter (in-game chat) but I realised that the former would be just as useful.

If we concentrate on the 'delayed':
For the BdU stuff, there is a mod "RadioLog_expanded" which allows for daily messages, and I could also see (for BdU) that one could have an 'injector' that places real messages from the BdU controller into the campaigners message file (the 'delayed' business).

I would envisage:
Connect to chat (via 'radio-operator' program). Program updates message files.
Start SH3 and proceed as normal.

For the Donitz people, I think that they all play to a specific start date, so message dates could be set accordingly.
Sending information from the campaigner back to BdU would be more difficult, however, the radio-operator could perhaps read the mission logs, or the campaigner could have to use the radio-operator program to reply.

I am quite capable of writing the radio-operator program, and Jabber could be used for the messaging protocol (or whatever): it's the interaction with SH3 that is more of an issue. If I can get something that works with files, the radio-operator program might also function with SH4 and SH5, of course.
I'll have to experiment with the messages tonight.

areo16
01-10-14, 04:00 PM
It was originally just the latter (in-game chat) but I realised that the former would be just as useful.

If we concentrate on the 'delayed':
For the BdU stuff, there is a mod "RadioLog_expanded" which allows for daily messages, and I could also see (for BdU) that one could have an 'injector' that places real messages from the BdU controller into the campaigners message file (the 'delayed' business).

I would envisage:
Connect to chat (via 'radio-operator' program). Program updates message files.
Start SH3 and proceed as normal.

For the Donitz people, I think that they all play to a specific start date, so message dates could be set accordingly.
Sending information from the campaigner back to BdU would be more difficult, however, the radio-operator could perhaps read the mission logs, or the campaigner could have to use the radio-operator program to reply.

I am quite capable of writing the radio-operator program, and Jabber could be used for the messaging protocol (or whatever): it's the interaction with SH3 that is more of an issue. If I can get something that works with files, the radio-operator program might also function with SH4 and SH5, of course.
I'll have to experiment with the messages tonight.

The program should be quite simple to put together. Just a text edit, some buttons, and then have the input edit the en_messages.txt file. But are you going to connect it to a main server or something, that a "commander" can receive the uboat messages and then send them back? Otherwise, then player would be sending Bdu messages to himself, which would be kind of silly.

JeromeHeretic
01-11-14, 05:31 AM
I have strong feeling, that in network game is possibility to send message to other players. But i newer play SH3 network game, so i don't know how it looks in reality. But it means, that some way how to send message to player is in game already implemented. Maybe some research this way can give positive results.

ExFishermanBob
01-11-14, 05:58 AM
Yes: I've yet to play the network game, so I shall rig a couple of PCs and try it out.
At the moment I've been experimenting with putting messages into the message list while SH3 is running to see if they are picked up. I'll post my results here.

areo16
01-12-14, 06:14 AM
Yes: I've yet to play the network game, so I shall rig a couple of PCs and try it out.
At the moment I've been experimenting with putting messages into the message list while SH3 is running to see if they are picked up. I'll post my results here.

I would think the en_messages file is loaded during the mission loading, so only a back out to the main menu would be necessary for it to be loaded in-game. This is how the campaign layers are loaded, so I would think the messages are the same, but I have not confirmed this.

ExFishermanBob
01-13-14, 10:23 AM
Ah, that's a good idea for testing - currently, injected text while the program is running doesn't get picked up. My other idea was to inject directly into the messages log (not as elegant) but I'm uncertain where that is: it seems to vary by game.