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)
-   -   [REQ] extended dialog with chief eng. (https://www.subsim.com/radioroom/showthread.php?t=165827)

johan_d 03-22-10 02:31 PM

[REQ] extended dialog with chief eng.
 
Hi,

Maybe some modder want to look in the dialog with the chief engineer, herr Erdmann, to have not only the option of his special abilities, but to bring for example some orders to there, as surface the boat, or dive etc..

Like now we have :

1 - special ability
2 - another special
3 - how is your grandmothers cat ?
4 - never mind

Wouldnt this be handier ?

1 - never mind
2 - surface the boat
3 - dive
4 - hold depth
5 - special ability
6 - how is your grandmothers cat ?

If this is possible, then depth under keel could also be added to the navigator.. a whole lot better roleplay I think..

And I euh.. want an editable captains log.. :rock:

Heretic 03-22-10 02:43 PM

Browsing through the Dialog AI scripts, I found the function Dialog:GameCommand(command, var, var), which looks like it activates the commands from Commands.cfg

So I think it would be possible. All it'd take was someone motivated enough to figure out how to do it.

johan_d 03-24-10 12:06 PM

Then sir, I will patientily wait abit.
Looked at the scripting, but without a proper reference its more than a puzzle to me.

Woodybcn 03-24-10 12:32 PM

Yes, yes, yes, please, we need REAL and USEFUL conversations, we're not interested on grandmothers of anyone.

pythos 03-24-10 12:39 PM

You do realize that a very real responsiblility of a ship's master, be it a sailing vessle to the largest oil tanker out ther, is to keep the crew and ship "ship shape"

I for one like the baby steps the devs did as far as crew interaction. It is in serious need of improvement that is for certain.

But giving a care about your crew is a big part of being the captain of the ship.

captainprid 03-24-10 01:01 PM

Quote:

Originally Posted by pythos (Post 1331815)
You do realize that a very real responsiblility of a ship's master, be it a sailing vessle to the largest oil tanker out ther, is to keep the crew and ship "ship shape"

I for one like the baby steps the devs did as far as crew interaction. It is in serious need of improvement that is for certain.

But giving a care about your crew is a big part of being the captain of the ship.


Totally agree. In addition talking about their kids or wife (WO) or their dead brother (radio guy) increases or decreases their morale. Indeed, I would think if the crew were constantly miserable and their captain very remote and unapproachable, they wouldn't last on patrol for a month

johan_d 03-24-10 01:10 PM

yes all right, but maybe some handy commands in actually control das boot with him is also usefull ? not only the cat.. there is business to do also!:salute:

kylania 03-24-10 01:23 PM

I cared for my crew a lot more in SH3 when they were just little paper dolls I scooted around constantly instead of being dialog boxes I had to click through in order to get things done. Also in SH3 they could die, which makes a huge difference in caring about them.

Sonarman 03-24-10 03:52 PM

It would be good if the dialog boxes for the characters had several tabbed pages ie one for general orders, one for chit-chat one for special abilities etc, that would allow a much greater range of options.

Athlonic 03-24-10 04:47 PM

Quote:

Originally Posted by Heretic (Post 1328582)
Browsing through the Dialog AI scripts, I found the function Dialog:GameCommand(command, var, var), which looks like it activates the commands from Commands.cfg

So I think it would be possible. All it'd take was someone motivated enough to figure out how to do it.


I've tried to add a "Give me depth under keel" dialog to the navigator officer :

-adding the text dialog line : OK
-make it clickable : OK
-running a script or animation : OK

but

-executing a command in Commands.cfg file : NO LUCK

here is my code :

in "data\Scripts\AI\Dialogs_Default\DT_Nav_all.ai x" file :

added this line to the rootdialog strategy :
Quote:

strategy RootDialog_NAV(Dialog)
{
strategies
{
DialogLine_RootDialog_NAV_NoCampaign_1200
}
}
and then :

Quote:

strategy DialogLine_RootDialog_NAV_NoCampaign_1200(Dialog)
{
strategies
{
DialogLine_RootDialog_NAV_NoCampaign_1200_Click,
DialogLine_RootDialog_NAV_NoCampaign_1200_Init
}
}
strategy DialogLine_RootDialog_NAV_NoCampaign_1200_Init(Dia log)
{
precond
{
Dialog:IsDialogLineClicked( "DialogLine_RootDialog_NAV_NoCampaign_1200" ) == 0
}
action
{
Dialog:AddDialogLine( "Text_Dialog_1200" );
Dialog:SetDialogLineClickId( "DialogLine_RootDialog_NAV_NoCampaign_1200" );
}
}
strategy DialogLine_RootDialog_NAV_NoCampaign_1200_Click(Di alog)
{
precond
{
Dialog:IsDialogLineClicked( "DialogLine_RootDialog_NAV_NoCampaign_1200" ) == 1
}
action
{
Dialog:GameCommand( "Get_depth_under_sub_keel", 0, 0 );
Dialog:PlayAnimation( "Generic_Agree03" );
}
}
in the "data\UPCDataGE\UPCLocalization\dialogs.tsr" file :

Quote:

Text_Dialog_1200=Give me depth under kell !
assuming this in Commands.cfg

Quote:

[Cmd130]
Name=Get_depth_under_sub_keel
Contexts=1,14,15
Key0=0x44,c,"Ctrl+D"
MnID=0x3F250005
HasDelayedExecution=Yes
The CTRL D key works fine, but using the dialog command I just get the agree animation.

Any help would be appreciated ^^

johan_d 03-24-10 04:59 PM

Lets hope HERETIC comes to the rescue, he understands a lot of this..
fingers crossed!:yeah:

Kostya613 03-24-10 05:03 PM

How to make that on alarm watertight doors between bulk holds automatically would be covered. It is necessary to cover them manually. (It is very inconvenient in time attacks to a boat when it is occupied by management of a boat). And second how to make, what when the captain rests a boat did not go strictly at the rate, and nevertheless bypassed obstacles. (Watch as-as if on the bridge)

Athlonic 03-24-10 05:41 PM

Ok,

Maybe I have something here :

Adding a script file named "Get_depth_under_sub_keel.aix" in "data\Scripts\AI\Crew"

which contain this :

Quote:

strategy Get_depth_under_sub_keel(wp)
{
action
{
Wp:ExecuteCommand( "Get_depth_under_sub_keel" );
Wp:ScriptCompleted();
}
}
Should do the trick, but I can't test it right now.
Will do asap, but if someone wants to ...

Heretic 03-24-10 05:54 PM

Athlonic,
You're definitely on the right track. I copied your code, substituted the "Dive" command, and it worked. The dialog executed the command. No idea why the other command didn't work, but you have everything else working great.

Heretic 03-24-10 06:26 PM

Quote:

Originally Posted by Athlonic (Post 1332282)
Ok,

Maybe I have something here :

Adding a script file named "Get_depth_under_sub_keel.aix" in "data\Scripts\AI\Crew"
...
Should do the trick, but I can't test it right now.
Will do asap, but if someone wants to ...

Guess what? It works! To use a command script, you need to add an entry to the crew_commands.txt file in the submarine folder to assign a crewman to the script. That file is pretty well documented.

I added: Get_depth_under_sub_keel 1 1 1 ( CR_NAV = Get_depth_under_sub_keel ) to assign it to the navigator and used your script as written.

Good job :up:


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