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)
-   -   [REL] Even More Crew Commands through Dialog (https://www.subsim.com/radioroom/showthread.php?t=210521)

archer9 01-12-14 04:38 PM

Quote:

Originally Posted by sober (Post 2163179)
I am using this mod as well .
Speech fixes and additions (english version)
I get 2 speeches when asking watch officer for the weather .

Two speeches that are one and the same? Or two different ones?

archer9 01-12-14 04:47 PM

Does it also happen if you ask Navigator for weather?

I remember having this bug a while ago (also using speech fixes and additions). My solution was to replace one of the weather report sound files with a silent 1 second sound file (MC_CR_NAV_68 I believe).

Anyway, my mod does not interfere with those sounds. The only sound I added was a "Jawohl Herr Kaleun" for hydrophone operator.

Sjizzle 01-12-14 05:11 PM

nice mod good job :)

Mikemike47 01-12-14 09:47 PM

Quote:

Originally Posted by archer9 (Post 2163204)
Does it also happen if you ask Navigator for weather?

I remember having this bug a while ago (also using speech fixes and additions). My solution was to replace one of the weather report sound files with a silent 1 second sound file (MC_CR_NAV_68 I believe).

Anyway, my mod does not interfere with those sounds. The only sound I added was a "Jawohl Herr Kaleun" for hydrophone operator.

The navigator references sound files for speech fixes and additions mod. Maybe that is why it is heard twice, even though you are not moding the commands.cfg.
In its' "commands.cfg"
[Cmd261]
Name=Report_weather
Contexts=1
MnID=0x3F250006
Sound_0=ELO_Helm,MC_RR_RADIO_08;#KarlKoch

from message_NA.cfg (not related to weather just an example)
[Msg1]
MsgId=1
Priority=3
Timeout=20
Param0=1
; Depth under keel is
MsgOgg0_0=MC_CR_NAV_06

Cool!! Nice work:up:.

Now I won't have to add stuff like this to my [wip] voices reloaded project! Plenty of other general dialogue to add.

archer9 01-13-14 05:28 AM

Hmm, sounds great. What kind of dialogs are you planning to add?

There is one limitation you should know about (in case you don't already), the dialog menu only supports up to 9 entries (that is including the Exit dialog entry at the bottom). This is why I have placed a lot of things under sub-menus for CE like "Engine control" and "Depth control". If it reaches 10 entries in the root dialog, it breaks down and all the dialog options jump together and only Exit dialog becomes clickable. Right now CE has 8 entries in total, but during campaign a ninth one is spawned (the story dialog about his wife etc.). This means that adding any more dialog entries to CE is impossible.

Unless, I can put the special abilities into another sub-menu as well. I haven't tried this, but I see no reason why it wouldn't work. This would provide space for 2 extra entries in the root dialog.

tonschk 01-13-14 06:25 AM

Do you think the exit (at the bottom) dialog "Nothing more to say" is useful/necessary ?

Quote:

Originally Posted by archer9 (Post 2163354)

There is one limitation you should know about (in case you don't already), the dialog menu only supports up to 9 entries (that is including the Exit dialog entry at the bottom)


archer9 01-13-14 06:28 AM

You have a point. The menu can be closed by hitting Esc anyway, but I'm not sure if it can be disabled. It uses a separate .aix file for generic exits. But I'll look into it.


In other news, I may be onto some clues as to why certain commands don't work trough dialogs. All the commands I have added are also found in Data\Scripts\AI\Crew as crew strategy .aix files (periscope_depth, surface, crash_dive etc.). And all the commands that don't seem to work when clicked through dialogs (report nearest visual contact, follow nearest sound contact etc.) are not in that folder.

tonschk 01-13-14 07:26 AM

Thank you :up:

Mikemike47 01-13-14 11:56 AM

Quote:

Originally Posted by archer9 (Post 2163354)
Hmm, sounds great. What kind of dialogs are you planning to add?

Unless, I can put the special abilities into another sub-menu as well. I haven't tried this, but I see no reason why it wouldn't work. This would provide space for 2 extra entries in the root dialog.

Good idea for sub-menus if possible.

Not at game computer at the moment. Adding or fixing broken dialogue that is not for sub operations is what I am doing. You saved me some work doing this mod. :salute: I was up for the challenge but RL wins, too.

Generally speaking, the PD_YY_CHARACTER_xxx.ogg and SR_YY_CHARACTER_xxx.ogg files are the conversational dialogues that I will direct my attention to. May fix scripts in Data\Scripts\AI or subfolders or data\Campaigns\CampaignProjects\<CampaignName>\Scr ipts\AI\Dialogs.
Example: Hackl and Bosun either talking about the book or cut violin strings dialogue. Chief talking about sick wife, Greta.

Quote:

Originally Posted by archer9 (Post 2163362)
And all the commands that don't seem to work when clicked through dialogs (report nearest visual contact, follow nearest sound contact etc.) are not in that folder.

Check the speech fixes and additions mod to compare what may have been done all ready.

There are *aix files in the Data\Scripts\AI\Dialogs_Default. Using the file DT_Bosun_all.aix as an example, there are lines like "RootDialog_BOSUN_NoCampaign_1066". Does the 1066 number represent the different campaigns such as black pit, operation drumbeat, or total Germany, etc.? Is the 1066 number referenced from another filename that I haven't found yet?

The ubisoft *.doc help texts did not help much for me.

archer9 01-13-14 12:42 PM

No, that number is not referenced anywhere. Only the script file that it's inside uses it. For example NoCampaign_1066 in DT_Bosun_all.aix is used only in that file. Furthermore, it is used only by the "strategy" in which it's placed. Look at this example:

Code:

strategy DialogTitle_RootDialog_BOSUN_NoCampaign_1066(Dialog)
{
    strategies
    {
        DialogTitle_RootDialog_BOSUN_NoCampaign_1066_Init
    }
}

strategy DialogTitle_RootDialog_BOSUN_NoCampaign_1066_Init(Dialog)
{
    precond
    {
        Dialog:GetCurrentCrewState() == 0 and Dialog:IsTutorialMission() == 0
    }
    action
    {
        Dialog:SetDialogTitle( "Text_Dialog_1067" );
        Dialog:PlaySound( "Bosun_slash_", "CGSQ_BOSUN_01", 0 );
        Dialog:ClearRandomLines( "generic_exits" );
        Dialog:AddRandomLine( "generic_exits", "gexit_1" );
        Dialog:AddRandomLine( "generic_exits", "gexit_2" );
    }
}

Here the strategy is called "DialogTitle_RootDialog_BOSUN_NoCampaign_1066(Dial og)". All the lines below it that contain "BOSUN_NoCampaign" must have that same number at the end. Otherwise the script won't work properly. That's about all the significance that number has.


If you scroll down, you will notice lines like this one:


# sh5 dialog tool - start new dialog
#

These are used to create a new dialog, and a list of strategies go below it. But since it is a separate dialog, you can use the same number as in the previous example (1066), it will work perfectly fine, because each new dialog reads only its own strategies. So yeah... that number has no significance outside the file it's inside nor even outside its dialog block.

Also, to my understanding the phrase "NoCampaign" indicates that the dialog line will appear no matter the campaign (even in historical missions).


Quote:

Originally Posted by Mikemike47 (Post 2163449)
The ubisoft *.doc help texts did not help much for me.

Where did you find those help files?

Mikemike47 01-13-14 06:17 PM

Quote:

Originally Posted by archer9 (Post 2163456)
number is not referenced anywhere. Only the script file that it's inside uses it.
Dialog:AddRandomLine( "generic_exits", "gexit_1" );

So yeah... that number has no significance outside the file it's inside nor even outside its dialog block.

Also, to my understanding the phrase "NoCampaign" indicates that the dialog line will appear no matter the campaign (even in historical missions).


Where did you find those help files?

Thanks for the clarity.
Nice to know that the #s have no significant importance outside the scripts. Is "generic_exits" called out in some function in some other file elsewhere? Just one more of those things just used in these scripts?

Quick Start - CrewAI.docx and Crew Strategies Help.docx files in data\Scripts\AI\Crew folder.

If you make another version of this mod, it would be nice to move the prepare weather report back to the orders to navigator under the WO (watch officer). As long as you and others do not mind. It may give me flexibility for general dialogue of WO in the future.

If you are going to look into the **.aix files in data\Scripts\AI\Dialogs_Default someday, some changes need to be made.
DT_XO_all.aix
Search for "MC_TRF_LOAD01_58" and change to "MC_CR_SO_102"
DT_Radio_all.aix
Search for "MC_TRF_LOAD01_58" and change to "MC_RR_RADIO_80"

I can inform you of any other errors when I find them if you wish, let me know. I all ready made the changes to [wip] voices reloaded mod.

Additionally, dialogue for general sub commands are in the MC_YY_CHARACTER_xxx.og. General pleasantries like Jawohl Herr Kaleun and Yes Lieutenant are in the format CG_YY_CHARACTER_xxx.ogg.

General conversational dialogue for [wip] voices reloaded has formats of TM_YY_CHARACTER_xxx.ogg or TTM_YY_CHARACTER_xxx.ogg, too.

archer9 01-13-14 07:19 PM

Quote:

Originally Posted by Mikemike47 (Post 2163549)
Is "generic_exits" called out in some function in some other file elsewhere? Just one more of those things just used in these scripts?

I am not 100% sure about this one, but I think generic_exit entries somehow point to .aix files in data\Scripts\AI\Dialogs_Default_Exits. I'm guessing so because .aix files in \Dialogs_Default have no references to Text_Dialog_101 and 801 ("Nothing more to say." and "Keep up the good work!") from dialogs.tsr, while the ones in \Dialogs_Default_Exits have them.

I'm not sure about moving the weather report back, though. I did this for role-playing reasons - I don't want to ask a guy who sits below for weather. I'll think more about this after I get some sleep.

I will look into those changes for the .aix files.

Mikemike47 01-13-14 08:52 PM

Quote:

Originally Posted by archer9 (Post 2163573)
I'm not sure about moving the weather report back, though. I did this for role-playing reasons - I don't want to ask a guy who sits below for weather.

Fine by me, as real as it gets.

variable intitialized in init.aix, x=2 in data\Scripts\AI\Dialogs_Default. Any ideas why?
Same goes for init.aix in data\Campaigns\CampaignProjects\<CampaignName>\Scr ipts\AI\Dialogs.

archer9 01-14-14 05:47 AM

Nope, no idea what that variable is for. But I have some big announcement - I managed to get Report nearest visual command working through dialog! This means I will probably add in a whole bunch of essential commands that didn't work previously in the next update. :woot:

tonschk 01-14-14 06:27 AM

:woot: :salute::up::D :sunny::rock::yeah:

Quote:

Originally Posted by archer9 (Post 2163671)
I have some big announcement - I managed to get Report nearest visual command working through dialog! This means I will probably add in a whole bunch of essential commands that didn't work previously in the next update. :woot:



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