Log in

View Full Version : Standing Orders


Mylander
04-06-07, 09:11 PM
I wonder if it's possible to have orders that are triggered by events a la "ship sighted" check box where you can maintain current orders, go to p depth, etc...

I am thinking of something like: sunrise = go to periscope depth and set speed at 3 knots, etc...

sunset = surface the boat and set speed 10 knots.

This would be an SOP that could of course be overridden by the skipper as needed. You wouldn't want to be under attack by DDs and decide to automatically surface at sunset, for example.

But it could save a lot of mousing and keystrokes in a long uneventful leg of a patrol.

Just an idea - what do y'all think?

Mylander

Seminole
04-07-07, 09:17 AM
"sunset = surface the boat and set speed 10 knots."


That might just work until.... one sunset when you auto surfaced beside a Jap Destroyer....:oops:..while you were away getting a beer or something...:shifty:


But this is a pretty good idea overall...provided it could be implemented and it can be made a selectable option.

Egan
04-07-07, 09:22 AM
I just wish we could add 'crash dive' to that pop up box. I'd use it a damn sight more than I do 'Go to Periscope depth.'

rulle34
04-07-07, 05:54 PM
I just wish we could add 'crash dive' to that pop up box. I'd use it a damn sight more than I do 'Go to Periscope depth.'

Fully agree :yep:

Jams79
04-07-07, 07:26 PM
For what reason can we not add crash dive to the list?

joea
04-08-07, 06:50 AM
For what reason can we not add crash dive to the list?

Hard coded maybe? :hmm: Anyone know?

CaptainCox
04-08-07, 08:16 AM
I just wish we could add 'crash dive' to that pop up box. I'd use it a damn sight more than I do 'Go to Periscope depth.'

Its super easy. I can upload it integrated with "icberg's" Battle stations & Silent Running on all HUD stations mod...or you could just do it like this.

C:\Program Files\Ubisoft\SH4\Data\Menu\cfg\OrdersBar

Put this in the end at every station in the "OrdersBar" ducument

Button9Command=Crash_dive
Button9IconRowColumn=1,2
Button9Tooltip=5602

Now as you see it has a number "Button9Command" and so on

You will have to put in a different number corresponding to what order it comes.

So if its only 6 buttons in the station you put it you have to
do like this

Button7Command=Crash_dive
Button7IconRowColumn=1,2
Button7Tooltip=5602

If there is any other icons you miss you can do the same for them of course.

Like

Button4Command=Get_depth_under_sub_keel
Button4IconRowColumn=1,4
Button4Tooltip=5604

and so on...easy ;)

Egan
04-08-07, 08:20 AM
For what reason can we not add crash dive to the list?
To be honest, I can't remember anyone even trying to do it for SH3 - it seemed to be one of those things that just got ignored.

Surely there must be a file somewhere that tells the computer to activate the call to go to periscope depth. Theoretically, as longs as it isn't hardcoded, it must be possible to add a call to crashdive.

I remember seeing the options in one of the menu files. I can't remember which one though. I might have a look for it as it really is an option that would be useful, given the other choices:

"Captain, Destroyer spotted, bearing 305, short range! What shall we do?"
"Do? Why, we'll continue to potter about on the surface as if nothing is happening! If we're still afloat after lunch we may have to resort to harsh language..."


Edit

I completley ignored CaptainCox's post there. Lol. That'll teach me.

Does it work? Does the option come up? Isn't the ordersbar just the command options at the bottom of the screen, I didn't realise it affected the pop up box as well.

CaptainCox
04-08-07, 08:24 AM
Or simply make a new button... ;) Giving up on the "NaviMap" mod for now...can't find that DAM! function that makes it movable. Will also look into this as it seems more achievable and would also add something nice

CaptainCox
04-08-07, 08:25 AM
Maybe i missunderstood you guys, this is for the "ICONS" at the bottom...what did you mean? :oops:

EDIT! Read the thread again...I get you its the black box that comes if there is a threat
I am with you now ! I look in to that as well.

CaptainCox
04-08-07, 08:36 AM
Ok in the "Menu" I found this

;Automatic target spotting - DO NOT CHANGE INDEXES ORDER
2670=Engage target!
2671=Maintain current orders!
2672=Dive to periscope depth!
2673=WARSHIP SPOTTED!
2674=MERCHANT SPOTTED!
2675=SUBMARINE SPOTTED!
2676=AIRCRAFT SPOTTED!
2677=GROUND UNIT SPOTTED!
2678=Set as default action
2680=Lock the position on the screen
;Layout
2697=M;meters
2698=KM;kilometers
2699=sec;seconds
2700=Kts;knots
2701=m;meters
2702=x;x times
2703=|Local time: %02d:%02d
2704=Port
2705=Stb
2706=+
2707=-
2708=P;pause
2709=deg;degrees

But I am not sure here as these functions are listed as this
1032=Periscope depth
1033=Snorkel depth
1034=Blow ballast
1035=Crash dive
in the same document

Question is...simply change the text or how to add...:hmm:
It does say DO NOT CHANGE INDEXES ORDER will try it out back in a few

Egan
04-08-07, 08:38 AM
The actual text message would have to be entered in the menu.txt in this section:

;Automatic target spotting - DO NOT CHANGE INDEXES ORDER
2670=Engage target!
2671=Maintain current orders!
2672=Dive to periscope depth!
2673=WARSHIP SPOTTED!
2674=MERCHANT SPOTTED!
2675=SUBMARINE SPOTTED!
2676=AIRCRAFT SPOTTED!
2677=GROUND UNIT SPOTTED!
2678=Set as default action
2680=Lock the position on the screen
;Layout
2697=M;meters
2698=KM;kilometers
2699=sec;seconds
2700=Kts;knots
2701=m;meters
2702=x;x times
2703=|Local time: %02d:%02d
2704=Port
2705=Stb
2706=+
2707=-
2708=P;pause
2709=deg;degrees

Edit:

Err, same as before. Just ignore me - i'm on painkillers for my foot and seem to be trapped in some strange StarTrek-esque time phase thing today...

Egan
04-08-07, 08:41 AM
Question is...simply change the text or how to add...
It does say DO NOT CHANGE INDEXES ORDER
Yeah, but it doesn't say you can't insert new ones....:p

Finding the file that calls these options up on screen is probably the answer.

Personally, I would simply edit the 'Engage' option rather than add a new one. Probably easier.

CaptainCox
04-08-07, 08:46 AM
100% agree...but where :hmm:
I can see the "Periscope" in the "menu_1024_768" but its more button related then calling to some function...I guess...:hmm:

Egan
04-08-07, 08:56 AM
100% agree...but where :hmm:
I can see the "Crash Dive" in the "menu_1024_768" but its more button related then calling to some function...I guess...:hmm:

Is there anything in there relating to the pop up box? There surely must be But I can't find it - there is so much stuff in there.

Egan
04-08-07, 08:58 AM
Found it. It starts at [G3F I141] and goes on for a bit.

CaptainCox
04-08-07, 08:59 AM
My thinking was to find the .dds texture that is the graphics of that box and search on that name...but so far looking at .dds files I have not found something that looks like it...closest is the "ConsoleBgnd.dds" in the "menu/Gui" folder.

Can you maybe look at that and tell me it the one?


CHEERS, this time I was the one that was late :p
Will look now.

CaptainCox
04-08-07, 09:02 AM
Ok this should work. Lets try simply to change "Name=Maintain orders" with the code for crash dive...or something along those lines.
EDIT: or ADD!!!! Crash dive...

Egan
04-08-07, 09:07 AM
The crash dive button info is this:

[G3F I357]
Name=&Crash dive
Type=1032;Button
ItemID=0x3F230002
ParentID=0x3F230000
Pos=162,-494,60,60
Zone= 446 207 60 60 0 1 0x3F230000 0.37156 -0.882143 0x3F230002 0 0 0 0
Materials=4
Display=0;No stretch
Mat 0=data/menu/gui/layout/orders2.tga
Crop 0=0,0.857422,1,1
Mat 1=data/menu/gui/layout/orders2.tga
Crop 1=0,0.857422,1,1
Mat 2=data/menu/gui/layout/orders2.tga
Crop 2=0,0.857422,1,1
Mat 3=data/menu/gui/layout/orders2.tga
Crop 3=0,0.857422,1,1
MatFlags=0x1
TexFmt=0x0
Font=1
TextFlags=0x0
StatesColors=0xB0B0B0FF, 0xFF, 0xFFFFFFFF, 0xFFFFFFFF
ToolTipText=2816

I wonder if editing some of this into the Engage box would do the trick and then linking the text to the menu.txt.

CaptainCox
04-08-07, 09:11 AM
Yup something along those lines or simply add in the "menu" and add in the "menu_1024_768" but taking care with the numbering of the code...

CaptainCox
04-08-07, 10:17 AM
OK got this far. within () explains what I have done

[G3F I411] (found the correct numbering related to the "ParentID")
Name=&Crash dive
Type=1032;Button
ItemID=3F340006 (new "ItemID" not taken by another item)
ParentID=0x3F340000 (this is the "ParentID of the "Group automatic target spotting" group)
Pos=65,-240,320,30 (same as the others in that group, but calculated to be placed above the 1st message)
Zone= 352 334 320 30 0 1 0x3F340000 0.144444 0.37156 -0.800001 3F340006 0 0 0 0 (based on the others including the correct Parent and Item ID and Position)
Materials=4
Display=0;No stretch
Mat 0=data/menu/gui/layout/bkgr.tga (same as the others in the group)
Crop 0=0,0,4,4
Mat 1=data/menu/gui/layout/bkgr.tga
Crop 1=0,0,4,4
Mat 2=data/menu/gui/layout/bkgr.tga
Crop 2=0,0,4,4
Mat 3=data/menu/gui/layout/bkgr.tga
Crop 3=0,0,4,4
MatFlags=0x1
TexFmt=0x0
Font=13
Text=5891 (based on added text in the "Menu" file "5891=Crash Dive")
TextFlags=0x5
StatesColors=0xB0B0B0FF, 0xFF, 0xFFFFFFFF, 0xFFFFFFFF


I am trying to ADD! this to the other three options not replace one of the three and that's maybe why this don't work yet...been overseeing something...but what :hmm:

Jams79
04-08-07, 10:31 AM
Is it just me or does this make no sense?

Menu.txt:

1026=Hard to port
1027=Hard to starboard
1028=Rudder amidships
1029=Current depth %.0f %s
1030=Dive
1031=Surface the boat
1032=Periscope depth
1033=Radar depth
1034=Blow ballast
1035=Crash dive

Menu_1024_768.ini:

[G3F I357]
Name=&Crash dive
Type=1032;Button

Does that mean if we just changed the menu_1024_768.ini to read 1035;Button it would Crash instead of PD?

CaptainCox
04-08-07, 11:05 AM
I think that's just a coincident. The "Type=1032;Button" is a function and A LOT! of other stuff have that to...like buttons in general click click... ;)

Egan
04-08-07, 11:56 AM
I swapped the ItemID's of 'Dive' and 'Engage' around and it swapped the function. Didn't have to change anything else.

the text=variable links to the automatic sightings section of the menu text. changing the text in that will change the text in the pop up menu. You've linked to the 'crash dive' message that comes up in the crew message box at the top of the screen.

I've got theory after theory and I think I'm getting somewhere slowly but it's a bit more difficult than I thought. It must be there somewhere, though.

Mylander
04-08-07, 04:00 PM
Now we're talking! I go away for a few hours, and look at you guys! I don't know if I can help, but let me know. The casual "lalalalala, let's dive to PD" while a enemy A/C is diving on you just doesn't cut it!

Mylander