Engel
04-27-07, 05:30 AM
Hi..my first Tutorial...be nice okay?
(Moderator: Please correct my bad english..thanks)
Basics:
I wanted to add some buttons to my Attack Periscope, so I took Ducimus´excellent documentation of FTT and fired up \Data\Menu\cfg\OrdersBar.cfg .
http://home.arcor.de/xxerzengel/bild.JPG
As you can see, [Station3] is the third Register with the small Pericsope Icon on it. So if you want to edit your attack Periscope Button line, you have to do it in [Station3].
The Buttons:
I added the "goto attack Map" Button as Button 1 next to my "goto attack Periscope", "Toggle Silent Running" as Button 11 and "Crash-dive" as Button 12.
In the \Data\Menu\cfg\OrdersBar.cfg are the all the buttons for every Station defined. Now scroll down to [Station3].
[Station3]
Name=5621
Tooltip=5621
CommandWhenActivated=Periscope_camera
IconIndex=3
Button1Type=Checkbox
Button1CommandWhenClicked=Attack_2D_map
Button1CommandToCheckIfIsChecked=Is_Attack_2D_map_ station_Active
Button1IconRowColumn=2,1
Button1Tooltip=5613
Button2Type=Checkbox
Button2CommandWhenClicked=Periscope_camera
Button2CommandToCheckIfIsChecked=Is_AttackPeriscop e_camera_station_Active
Button2IconRowColumn=3,1
Button2Tooltip=5622
Button3Type=Checkbox
Button3CommandWhenClicked=Toggle_RiseLower_whole_p eriscope
Button3CommandToCheckIfIsChecked=Is_AttackPeriscop e_risen_at_all
Button3IconRowColumn=3,3
Button3Tooltip=5624
Button4Type=Checkbox
Button4CommandWhenClicked=Obs_periscope_camera
Button4CommandToCheckIfIsChecked=Is_ObservationPer iscope_camera_station_Active
Button4IconRowColumn=3,2
Button4Tooltip=5623
Button5Type=Checkbox
Button5CommandWhenClicked=Toggle_RiseLower_whole_o bs_periscope
Button5CommandToCheckIfIsChecked=Is_ObservationPer iscope_risen_at_all
Button5IconRowColumn=3,7
Button5Tooltip=5626
Button6Command=Periscope_depth
Button6IconRowColumn=1,9
Button6Tooltip=5859
Button7Command=Recognition_manual
Button7CommandToCheckIfIsEnabled=Is_AnyPeriscope_c amera_station_Active
Button7IconRowColumn=3,8
Button7Tooltip=5629
Button8Type=Checkbox
Button8CommandWhenClicked=Toggle_Activate_Clock
Button8CommandToCheckIfIsChecked=Is_Clock_Active
Button8IconRowColumn=3,9
Button8Tooltip=5630
Button9Command=WP_Take_photo
Button9CommandToCheckIfIsEnabled=Is_TakePhoto_Avai lable;Is_AnyPeriscope_camera_station_Active
Button9IconRowColumn=3,10
Button9Tooltip=5631
Button10Command=WP_Identify_target
Button10IconRowColumn=3,11
Button10Tooltip=ID Target
Button11Type=Checkbox
Button11CommandWhenClicked=Toggle_silent_running
Button11CommandToCheckIfIsChecked=Is_Silent_mode_A ctive
Button11CommandToCheckIfIsEnabled=Is_Underwater
Button11IconRowColumn=1,9
Button11Tooltip=5610
Button12Command=Crash_dive
Button12IconRowColumn=1,2
Button12Tooltip=5602
The code consits of:
Button[number]: the number in the row. 1 for the first and so on
Type=Checkbox: Its a toggle. Like "goto attack-map". The Button is pressed and locked.
Button[number]Command= A Command from Data\cfg\Commands.cfg
Checks:
Commands that return a boolean value (enabled and checked) can be negated by adding a ! sign before the actual command. Like in:
Button8CommandWhenClicked=Toggle_Propulsion_Rechar ging
Button8CommandToCheckIfIsChecked=Is_Propulsion_Rec harging_Active
Button8CommandToCheckIfIsEnabled=!Is_Underwater If you click the "Stop Recharging Batteries" Button it Checks if
a: Is it recharging at all?
b: is the Sub NOT under water. (see the "!")
Add a Button:
To add the "goto attack Map" in your Attack Periscope Button row, just add
Button1Type=Checkbox
Button1CommandWhenClicked=Attack_2D_map
Button1CommandToCheckIfIsChecked=Is_Attack_2D_map_ station_Active
Button1IconRowColumn=2,1
Button1Tooltip=5613 to your [Station3]. To add a Icon, open \Data\Menu\Gui\Layout\HUD.tga. Here are all the Icons for the Buttons in the Top right Corner. The Button1IconRowColumn=2,1 refers to these Icons. First Number is the Row upper to lower (1 for the first and so on), the second number is the Icon left to right (1 for the first and so on). If you dont assign a Icon, a blank button will be displayed.
To add a Tooltip, just enter a text behind: Button[Your button number]Tooltip=YOUR TEXT HERE !!!!!
IMPORTANT:
You have to renumber your Button[number] (all of them) to reflect the position in your buttons Row. Button1...... for the first, Button2..... for the second and so on.
Disclaimer:
I run a 2048x1024 resolution ingame which means I have more space to add buttons. If you run a lower ingame resolution.....dunno what happens.
Good Luck.
Me, out
€redits: To Ducimus for his great Mod and very good Documentation !!
(Moderator: Please correct my bad english..thanks)
Basics:
I wanted to add some buttons to my Attack Periscope, so I took Ducimus´excellent documentation of FTT and fired up \Data\Menu\cfg\OrdersBar.cfg .
http://home.arcor.de/xxerzengel/bild.JPG
As you can see, [Station3] is the third Register with the small Pericsope Icon on it. So if you want to edit your attack Periscope Button line, you have to do it in [Station3].
The Buttons:
I added the "goto attack Map" Button as Button 1 next to my "goto attack Periscope", "Toggle Silent Running" as Button 11 and "Crash-dive" as Button 12.
In the \Data\Menu\cfg\OrdersBar.cfg are the all the buttons for every Station defined. Now scroll down to [Station3].
[Station3]
Name=5621
Tooltip=5621
CommandWhenActivated=Periscope_camera
IconIndex=3
Button1Type=Checkbox
Button1CommandWhenClicked=Attack_2D_map
Button1CommandToCheckIfIsChecked=Is_Attack_2D_map_ station_Active
Button1IconRowColumn=2,1
Button1Tooltip=5613
Button2Type=Checkbox
Button2CommandWhenClicked=Periscope_camera
Button2CommandToCheckIfIsChecked=Is_AttackPeriscop e_camera_station_Active
Button2IconRowColumn=3,1
Button2Tooltip=5622
Button3Type=Checkbox
Button3CommandWhenClicked=Toggle_RiseLower_whole_p eriscope
Button3CommandToCheckIfIsChecked=Is_AttackPeriscop e_risen_at_all
Button3IconRowColumn=3,3
Button3Tooltip=5624
Button4Type=Checkbox
Button4CommandWhenClicked=Obs_periscope_camera
Button4CommandToCheckIfIsChecked=Is_ObservationPer iscope_camera_station_Active
Button4IconRowColumn=3,2
Button4Tooltip=5623
Button5Type=Checkbox
Button5CommandWhenClicked=Toggle_RiseLower_whole_o bs_periscope
Button5CommandToCheckIfIsChecked=Is_ObservationPer iscope_risen_at_all
Button5IconRowColumn=3,7
Button5Tooltip=5626
Button6Command=Periscope_depth
Button6IconRowColumn=1,9
Button6Tooltip=5859
Button7Command=Recognition_manual
Button7CommandToCheckIfIsEnabled=Is_AnyPeriscope_c amera_station_Active
Button7IconRowColumn=3,8
Button7Tooltip=5629
Button8Type=Checkbox
Button8CommandWhenClicked=Toggle_Activate_Clock
Button8CommandToCheckIfIsChecked=Is_Clock_Active
Button8IconRowColumn=3,9
Button8Tooltip=5630
Button9Command=WP_Take_photo
Button9CommandToCheckIfIsEnabled=Is_TakePhoto_Avai lable;Is_AnyPeriscope_camera_station_Active
Button9IconRowColumn=3,10
Button9Tooltip=5631
Button10Command=WP_Identify_target
Button10IconRowColumn=3,11
Button10Tooltip=ID Target
Button11Type=Checkbox
Button11CommandWhenClicked=Toggle_silent_running
Button11CommandToCheckIfIsChecked=Is_Silent_mode_A ctive
Button11CommandToCheckIfIsEnabled=Is_Underwater
Button11IconRowColumn=1,9
Button11Tooltip=5610
Button12Command=Crash_dive
Button12IconRowColumn=1,2
Button12Tooltip=5602
The code consits of:
Button[number]: the number in the row. 1 for the first and so on
Type=Checkbox: Its a toggle. Like "goto attack-map". The Button is pressed and locked.
Button[number]Command= A Command from Data\cfg\Commands.cfg
Checks:
Commands that return a boolean value (enabled and checked) can be negated by adding a ! sign before the actual command. Like in:
Button8CommandWhenClicked=Toggle_Propulsion_Rechar ging
Button8CommandToCheckIfIsChecked=Is_Propulsion_Rec harging_Active
Button8CommandToCheckIfIsEnabled=!Is_Underwater If you click the "Stop Recharging Batteries" Button it Checks if
a: Is it recharging at all?
b: is the Sub NOT under water. (see the "!")
Add a Button:
To add the "goto attack Map" in your Attack Periscope Button row, just add
Button1Type=Checkbox
Button1CommandWhenClicked=Attack_2D_map
Button1CommandToCheckIfIsChecked=Is_Attack_2D_map_ station_Active
Button1IconRowColumn=2,1
Button1Tooltip=5613 to your [Station3]. To add a Icon, open \Data\Menu\Gui\Layout\HUD.tga. Here are all the Icons for the Buttons in the Top right Corner. The Button1IconRowColumn=2,1 refers to these Icons. First Number is the Row upper to lower (1 for the first and so on), the second number is the Icon left to right (1 for the first and so on). If you dont assign a Icon, a blank button will be displayed.
To add a Tooltip, just enter a text behind: Button[Your button number]Tooltip=YOUR TEXT HERE !!!!!
IMPORTANT:
You have to renumber your Button[number] (all of them) to reflect the position in your buttons Row. Button1...... for the first, Button2..... for the second and so on.
Disclaimer:
I run a 2048x1024 resolution ingame which means I have more space to add buttons. If you run a lower ingame resolution.....dunno what happens.
Good Luck.
Me, out
€redits: To Ducimus for his great Mod and very good Documentation !!