View Full Version : [REQ] extended dialog with chief eng.
johan_d
03-22-10, 02:31 PM
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.
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
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
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.aix" file :
added this line to the rootdialog strategy :
strategy RootDialog_NAV(Dialog)
{
strategies
{
DialogLine_RootDialog_NAV_NoCampaign_1200
}
}
and then :
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 :
Text_Dialog_1200=Give me depth under kell !
assuming this in Commands.cfg
[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 :
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
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:
Athlonic
03-24-10, 06:35 PM
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:
Hourra !!!
Time to add some dialogs now !!!!!!!!!
Thank for your testing Heretic, I have free time at work tomorrow ^^
So I will be scripting like mad.
gimpy117
03-25-10, 12:22 AM
good work :up: cant wait for a script mod!!
johan_d
03-25-10, 11:06 AM
Thanks you very much guys.. soon we will be going silent running, lokking up, clicking on the chief, and select a usable order, like periscope depth etc..
Finally imersion, hmm, maybe we can get rid of the hud buttons this way ?
Looking forward to your findings.
thruster
03-25-10, 11:19 AM
awesome, this just keeps getting better:rock:
quick Q, apologies if its answered elsewhere or diverting this thread:
is it possible to set orders [for example with the XO] for 'immediate actions'? things like
- if ship spotted go to PD
- if plane spotted crash dive to 50m
- if plane spotted flak will engage target
etc etc?
cheers.
johan_d
03-25-10, 11:24 AM
I think, an IF is impossible, or maybe not.. but giving commands usually would be an action, also available by the keyboard, but then in dialog..
Like being pinged, and clicking on the chief to go deeper.. instead of using a HUD dial.
But you never know what those bright scripters may come up with..
Athlonic
03-25-10, 11:56 AM
awesome, this just keeps getting better:rock:
quick Q, apologies if its answered elsewhere or diverting this thread:
is it possible to set orders [for example with the XO] for 'immediate actions'? things like
- if ship spotted go to PD
- if plane spotted crash dive to 50m
- if plane spotted flak will engage target
etc etc?
cheers.
Yes actualy the XO have already an "Auto dive abilitie" writed in his abilities strategies, but for some supernatural reason it is not activated right now.
And with thoses scripts I think that ALL is possible ^^
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.