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)

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:


archer9 01-14-14 02:06 PM

Version 0.3 is out, please report if you find any problems. No idea if it's savegame compatible. I'm using crew_commands.txt from MifhtyFineCrew mod in this update, but if I'm correct it shouldn't cause any problems for those who don't use that mod.

Sorry, Mike, I wasn't able to move special abilities into a separate sub-menu. I don't know what's the problem, but it just doesn't work. I'm guessing there's some special rules with special abilities in the script. I'll give it a second try when I can. If I can't do it, we'll need a special compatibility version of EMCCD for your mod. Probably will have to put more stuff in the same sub-menus. Not a big problem.

I've included almost everything I wanted into dialogues. The only command from commands.cfg that for some mystical reason doesn't want to work for me is deploy_decoys. And another one is the Report fix (lat and long) from Real Navigation. I can't find the command in commands.cfg and thus I can't add it to the dialogs... If I could find a way to add these two commands, we'd be able to play with the officers panel fully disabled!! :)

THE_MASK 01-14-14 02:25 PM

With the New Ui options editor you can hide any combination of officers on the officers panel . I don't know how but you can do it . It is an option .

Mikemike47 01-14-14 03:04 PM

Quote:

Originally Posted by archer9 (Post 2163787)
Sorry, Mike, I wasn't able to move special abilities into a separate sub-menu. I don't know what's the problem, but it just doesn't work. I'm guessing there's some special rules with special abilities in the script. I'll give it a second try when I can. If I can't do it, we'll need a special compatibility version of EMCCD for your mod. Probably will have to put more stuff in the same sub-menus. Not a big problem.

The only command from commands.cfg that for some mystical reason doesn't want to work for me is deploy_decoys. And another one is the Report fix (lat and long) from Real Navigation. :)

How about contacting Rongel about special abilities with Reworked Morale and Abilities Mod?

Hopefully, the miscellaneous dialogue from [wip] voices reloaded will fit nicely with 9 entries allowed in the dialogue menu still.

I was thinking the same thing, sub-menus, subroutines. Just an example of an idea, gunner or watch officer vocalizes a general comment that is available in the **.ogg files to say immediately after the command "fire at will" is said, etc.

Deploy decoys makes a sound for me with mods I use. I will look later to see what I can find for this. I do not use real navigation to help with that.

archer9 01-14-14 05:24 PM

Yes, I'm yet to figure out why there is no speech after commands are activated by dialogue. I can hear speeches when they are clicked through the UI... Maybe for the next update I'll figure it out.

THE_MASK 01-14-14 06:42 PM

With V0.3 I get an instant ctd if I click on any of the standard depth control icons on the left GUI .

archer9 01-14-14 07:17 PM

Thank you, sober. Check the first post for a new link.

Mikemike47 01-14-14 09:44 PM

Quote:

Originally Posted by Mikemike47 (Post 2163549)
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"

Whoops, sorry. I only tested the vocal yesterday. Did not actually test the dialog box then. Will be testing later tonight. Did I miss this detail for you and that is why it did not work in version 0.3?

Should be:
DT_XO_all.aix
Search for "TorpedoMan_slash_", "MC_TRF_LOAD01_58" and change to "ExecutiveOfficer_slash_", "MC_CR_SO_102"
Just in case you change this file in future:
DT_Radio_all.aix
Search for "TorpedoMan_slash_", "MC_TRF_LOAD01_58" and change to "RadioMan_slash_", "MC_RR_RADIO_80"

archer9 01-15-14 03:08 AM

Ups, sorry, totally forgot to edit those lines! :dead:

THE_MASK 01-15-14 04:26 AM

Is what your looking for in the
Silent Hunter 5\MODS\NewUIs_TDC_7_4_2_ByTheDarkWraith\data\Scrip ts\Menu\TheDarkWraithAutomation ?
I mean any hints in that file .

archer9 01-15-14 04:41 AM

Yes, I was just looking through that same file and there is this line at the bottom of it:
,[ "Report_position_celestial", AutomationRealNavReportPositionCelestial ]

There is also this line in Data/Automation/TDW_Automation.txt:
; Report_position_celestial,0,0,0,0,0,0,t

But it is commented out for some reason, like the rest of the lines in that file.

Anyway, TDW apparently uses his own commands through his own scripting. I tried simply adding an entry of 'Report_position_celestial' into commands.cfg but it's obviously not that simple because it didn't work in the game. For now I'm stumped.


All times are GMT -5. The time now is 09:05 AM.

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.