SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 08-23-14, 03:32 PM   #1591
niwo
A-ganger
 
Join Date: Aug 2009
Location: 51° 31′ N, 7° 28′ E
Posts: 76
Downloads: 158
Uploads: 0
Default

I have a problem with the Erkennungshandbuch. Its all blank. no text, no images.
Vers. 1.02 no other mods activated.
__________________
My System Specs
niwo is offline   Reply With Quote
Old 08-23-14, 05:24 PM   #1592
DrJones
Samurai Navy
 
Join Date: Jun 2009
Location: Germany, 50 Kilometers away from Kiel
Posts: 576
Downloads: 341
Uploads: 0
Default

Quote:
Originally Posted by niwo View Post
I have a problem with the Erkennungshandbuch. Its all blank. no text, no images.
Vers. 1.02 no other mods activated.
Hey Mate,

please read the post 1...start the sh5Shiffe.exe follow the steps wich are shown there.

Best Regards

DrJones
DrJones is offline   Reply With Quote
Old 08-24-14, 12:25 PM   #1593
niwo
A-ganger
 
Join Date: Aug 2009
Location: 51° 31′ N, 7° 28′ E
Posts: 76
Downloads: 158
Uploads: 0
Default

Quote:
Originally Posted by DrJones View Post
Hey Mate,

please read the post 1...start the sh5Shiffe.exe follow the steps wich are shown there.

Best Regards

DrJones
Hey, its solved. A custom Menu.txt produced the error.

Btw I want to ask, if there is a way to have the old Help (F1) menu back. I use a custom Keymap-mod by thedarkwraith with a handy edited Helpmenu. The list of Magui version V3.06 is a bit confusing.
The script from that mod is:
 
# Edited by TheDarkWraith for NewUIs_TDC_5_1_0; angepasst von ustahl f�r Tastatur-Mod 15.11.2010
# Edited on 11/13/2010 @ 1530
#
# Copyright notice:
# The code in this file is the intellectual property of TheDarkWraith and may not be used, modified, or duplicated in whole,
# or in part, without the express written permission of TheDarkWraith. The code in this file may not be used in any commercial
# application of any form without the express written permission of TheDarkWraith.


# User Options for TheDarkWraith's mods
# Created by TheDarkWraith


# NOTE!!!!
# These are the keys the game recognizes:
# A-Z of the alphabet (Capitalized!)
# Tab, Enter, Shift, Ctrl, Alt, Escape, PageUp, PageDown, End, Home, Left, Up, Right, Down, Insert, Delete, numbers 0-9 (which are Keyx - i.e. 4 would be Key4)
# F1-F11 functions keys are unavailable even though MenuKeyManagerWrapper says they are available. Do not try to use F1-F11.



##################################### UI Stuff (SH3/4/5 modes) ##################################

#+++++++++++++ UI Style ++++++++++++++
# Possible UI Styles:
SH5Enhanced = 0
SH3Style = 1
SH4Style = 2

# the current UI Style
# set below to either SH3Style, SH4Style, or SH5Enhanced
UIStyle = SH3Style


#+++++++++++++ SH5 specific UI Items +++++++++++++++
# integrate the fuel, battery, compressed air, and CO2 interface into the bottom bar
# change below to either True or False
IntegrateLevels = True


#+++++++++++++ SH3/4/5 specific UI items ++++++++++++++++
#
# does the tool helper default to on state at game start (map tools)?
# change below to either True or False
ToolHelperOnAtGameStart = True

# Are all night filters enabled?
# change below to either True or False
NightFiltersEnabled = False

# Above this specified TC level the clock will be visible (levels are in powers of 2)
AboveThisTCLevelShowClock = 512

# Below this depth do not receive radio contacts/reports (in meters)
BelowThisDepthDontReceiveRadio = 30

# are the tables and maps on the navigation map in english or german?
# change below to either True or False
NavigationMapTablesMapsEnglish = False

# is the binocular crosshair visible?
# change below to either True or False
BinocularCrosshairEnabled = False

# are the periscope water level indicators displayed on the attack and obs scopes?
# change below to either True or False
PeriscopeLevelSH5Visible = True

# are the depth and map tools bars visible at game start?
# change below to either True or False
DepthAndMapToolsBarsVisible = True

# are the launching of torpedoes realistic? This means that if you try to launch a torpedo that doesn't have it's torpedo door open then the door will have to be opened first before the torpedo can be fired. For salvo shots this can mean that your shot can be screwed up if you don't have all the doors opened first
# change below to either True or False
RealisticTorpedoFirings = True

# is a delay incurred between when new speed/throttle is requested and when activated (simulate crew response of answering ordered bells)?
# change below to either True or False
DelayNewSpeedThrottleCommand = False

# does the game start with Advanced HUD enabled?
# change below to either True or False
AdvancedHudIsEnabled = False

# what is the most fuel efficient speed?
MostFuelEfficientSpeed = 7.5

# the hotkey used to order most fuel efficient speed
# Format:
#
# MostFuelEfficientSpeedHotKey = [ False, None, False ]
# False = disabled
# None = key used
# False = disabled
#
# if you wanted to enable this without shift required:
# MostFuelEfficientSpeedHotKey = [ False, None, False ]
#
# if you wanted to disable this:
# MostFuelEfficientSpeedHotKey = [ False, None, False ]
#
# Note: Keys.M is used by the Navigation Map in the stock game! It was used only as example here. Also the hotkey will only be recognized if the sub is surfaced
#
MostFuelEfficientSpeedHotKey = [ False, MenuKeyManagerWrapper.Keys.M, False ] # change the M to whatever you want. You can't use M!

# Do the top right bars hide when you mouse out and show when you mouse in?
# change below to either True or False
TopRightBarsScroll = True

# if TopRightBarsScroll is enabled, this is the time delay before hiding the top right bars when moused out:
# below is in seconds
TopRightBarsHideTD = 4.0

# do the essential controls (depth, heading, etc.) hide when moused out and show when moused in?
# change below to either True or False
EssentialControlsScroll = True

# if EssentialControlsScroll is enabled, this is the time delay before hiding the essential controls when moused out:
# below is in seconds
EssentialControlsHideTD = 4.0

# Is the camera bar visible?
# change below to either True or False
CameraBarVisible = True

# does the camera bar scroll out of view when the mouse is not inside it?
# change below to either True or False
CameraBarScrolls = True

# do the warnings (icons to the left of top right bar) hide when moused out and show when moused in?
# NOTE: DOES NOT WORK CURRENTLY!
# change below to either True or False
WarningsScroll = False

# Is the depth group bar visible?
# change below to either True or False
DepthGroupBarVisible = True

# this will add support for the IO Strategic Map mod by Obelix
# change below to either True or False
MapToolsAsObjects = False


#################################### TDC style (SH3/4/5 modes) #################################

#+++++++++++++++++++ TDC modes +++++++++++++++++++++
# Possible TDC modes:
#
# NOTDCDials - no dials
# TDCSpreadAngle - just the spread angle dial for salvo attacks
# TDCMinimalDials - minimal TDC dials
# TDCAllDials - all TDC dials
#
NOTDCDials = 0
TDCMinimalDials = 1
TDCAllDials = 2
TDCSpreadAngle = 3

# the current TDC mode
# change below to either NOTDCDials, TDCSpreadAngle, TDCMinimalDials, or TDCAllDials
AttackTDCMode = TDCAllDials
ObsTDCMode = TDCAllDials
UZOTDCMode = TDCAllDials

# RAOBF enabled for each scope?
# change below to either True or False
AttackRAOBFEnabled = False
ObsRAOBFEnabled = False
UZORAOBFEnabled = False

# Attack Disk enabled for each scope?
# change below to either True or False
AttackAttackDiskEnabled = False
ObsAttackDiskEnabled = False
UZOAttackDiskEnabled = False
NavMapAttackDiskEnabled = False

# the following enables the fix for the resetting of the AOB and Speed dials of the TDC when the stadimeter is used
# change below to either True or False
AOBSpeedTDCFixEnabled = True

# are the TDC dials hidden when the RAOBF is visible?
HideTDCDialsWhenUsingRAOBF = False

# does the depth indicator of the scopes in the top left scroll out of view when moused out and scroll back into view when moused in?
ScopesDepthIndicatorScrolls = False

# if ScopesDepthIndicatorScrolls is enabled, this is the time delay before hiding the depth indicator when moused out:
ScopesDepthIndicatorScrollsTD = 4.0

# does the torpedo box of the scopes in the top left scroll out of view when moused out and scroll back into view when moused in?
ScopesTorpedoBoxScrolls = False

# if ScopesTorpedoBoxScrolls is enabled, this is the time delay before hiding the torpedo box when moused out:
ScopesTorpedoBoxScrollsTD = 4.0


#################################### For Dials - SH3 and SH4 UI Modes only ##################################

#++++++++++++++ Dial zoom/unzoom animation speed +++++++++++++++
# rate at which dials grow and shrink (in seconds)
# default is 0.10 seconds
DialsAnimationSpeed = 0.10

#++++++++++++++ Base Zoom +++++++++++++++
# Base Zoom levels
# when MouseIn the dial will grow by this number
# default is 200
BaseZoomThrottle = 300
# default is 200
BaseZoomSpeed = 300
# default is 200
BaseZoomHeading = 300
# default is 200
BaseZoomRudder = 300
# default is 200
BaseZoomDepth260 = 300
# default is 200
BaseZoomDepth25 = 300

#++++++++++++++ Can Zoom +++++++++++++++
# which dials can zoom
# change True to False to disable zoom on that dial
#
# set below to either True or False for each
ThrottleCanZoom = True
SpeedCanZoom = True
HeadingCanZoom = True
RudderCanZoom = True
Depth260CanZoom = True
Depth25CanZoom = True

#++++++++++++++ Offsets +++++++++++++++
# y offset adjustment when mouse in/out and image goes offscreen (BaseZoom - for dynamically repositioning dials)
DialsBaseZoomOffsetYAdjustment = 10

# x offset adjustment when mouse in/out and image goes offscreen (BaseZoom - for dynamically repositioning dials)
DialsBaseZoomOffsetXAdjustment = 10


##################################### Automatics ################################################## ###
# does the clock automatically show when a torpedo is fired?
# change below to either True or False
AutoShowClockOnTorpFire = True

# Does the clock automatically show when follow target enabled (it will auto hide itself if follow target cancelled and clock isn't called for)?
# change below to either True or False
AutoShowClockOnFollowTarget = False

# when surfacing does the game automatically order recharge mode?
# change below to either True or False
AutomaticallyOrderRechargeModeUponSurfacing = True

# when entering the attack scope station does the scope fully raise automatically?
# change below to either True or False
AutomaticallyRaiseAttackScope = False

# when leaving the attack periscope station does the scope automatically fully lower?
# change below to either True or False
AutomaticallyFullyLowerAttackScope = False

# when leaving the obs scope station does the scope automatically fully lower?
# change below to either True or False
AutomaticallyFullyLowerObsScope = False

# does the Navigator assist you in determing the AOB and Speed of a target based on range readings taken by you?
# change below to either True or False
NavigatorAssistAOBSpeedCalcs = True


################################### Automation ################################################## #####
# the hotkey used to toggle the visibility of the Automation screen (can also be toggled using the 'gears' icon in top right lower bar)
# Format:
#
# AutomationHotKey = [ True, None, False ]
# True = enabled
# None = key used
# False = disabled
#
# if you wanted to enable this without shift required:
# AutomationHotKey = [ True, None, False ]
#
# if you wanted to disable this:
# AutomationHotKey = [ True, None, False ]
#
AutomationHotKey = [ False, MenuKeyManagerWrapper.Keys.U, False ] # change the Q to whatever you want

# Is Automation debugging enabled?
AutomationDebuggingEnabled = False

# Are Automation start, stop, paused, loop, etc. messages displayed in the message box?
AutomationActionMessagesDisplayed = False

# the hotkey used to activate the script associated with Automation hotkey x (1-4)
# Format:
#
# AutomationScriptHotKeyx = [ True, None, False ]
# True = enabled
# None = key used
# False = disabled
#
# if you wanted to enable this without shift required:
# AutomationScriptHotKeyx = [ True, MenuKeyManagerWrapper.Keys.J, False ]
#
# if you wanted to disable this:
# AutomationScriptHotKeyx = [ False, MenuKeyManagerWrapper.Keys.J, False ]
#
# NOTE: set the ones using SHIFT first!
#
AutomationScriptHotKey1 = [ True, MenuKeyManagerWrapper.Keys.X, False ] # change the None to whatever you want
AutomationScriptHotKey2 = [ False, None, False ] # change the None to whatever you want
AutomationScriptHotKey3 = [ False, None, False ] # change the None to whatever you want
AutomationScriptHotKey4 = [ False, None, False ] # change the None to whatever you want


################################### Time Delays ################################################## ####

# opening tube time delay for realistic torpedo launches (in seconds)
RealisticOpenTubeTDBase = 7.5

# the time delay to account for heavy seas to prevent unnecessary switching of items (items that depend on whether submerged/surfaced to control state) (in seconds)
WaterLevelTD = 5.0

# when surfacing, the time delay before checking to see if batteries need to be recharged and then automatic sending of the recharge order (in seconds)
# this value must be greater than WaterLevelTD or you will get an error!
SwitchToRechargePropulsionTDBase = 90.0

# when submerging, the time delay before automatic switching to standard propulsion (in seconds):
# this value must be greater than WaterLevelTD or you will get an error!
SwitchToStdPropulsionTDBase = 90.0

# the base time (in seconds) it takes the Navigator to compute the AOB and Speed of a target from 2 range measurements. There is a random amount added to this
# that is in the range (0, 1.0) * value (i.e. realtimedelay = NavCalcTimeAOBSpeedFromRangeMeasurementsBase + (Random * NavCalcTimeAOBSpeedFromRangeMeasurementsBase)
NavCalcTimeAOBSpeedFromRangeMeasurementsBase = 10.0

# the base time (in seconds) it takes the Navigator to compute the Speed of a target from time measurements. There is a random amount added to this that is in the range
# (0, 1.0) * value (i.e. realtimedelay = NavCalcTimeSpeedFromTimeMeasurementsBase + (Random * NavCalcTimeSpeedFromTimeMeasurementsBase)
NavCalcTimeSpeedFromTimeMeasurementsBase = 5.0

# the min and max base time to wait before ordering of new bell or speed if DelayNewSpeedThrottleCommand is enabled:
# have to be int values!
# values are in seconds of time
NewSpeedThrottleDelayMin = 3
NewSpeedThrottleDelayMax = 6


##################################### Nomograph (SH3/4/5 Modes) ######################################
# the hotkey used to toggle the nomograph visibility on the mini-map. Nomograph is always visible on nav-map
# Format:
#
# NomographVisibleOnMiniMapHotKey = [ False, None ]
# False = disabled
# None = key used
#
# if you wanted to enable this:
# NomographVisibleOnMiniMapHotKey = [ False, None ]
#
# if you wanted to disable this:
# NomographVisibleOnMiniMapHotKey = [ False, None ]
#
NomographVisibleOnMiniMapHotKey = [ True, MenuKeyManagerWrapper.Keys.N ] # change the N to whatever you want

# is the Nomograph visible on the mini-map (TAI) at game start?
# change below to either True or False
NomographVisibleOnMiniMap = False

# is the Nomograph visible on the Navigation map at game start?
# change below to either True or False
NomographVisibleOnNavMap = False


##################################### Heading Bar/Heading/Rudder Dial (SH5 Mode) #####################
# the hotkey used to display the heading/rudder dial
# Format:
#
# HeadingRudderKey = [ False, None ]
# False = disabled
# None = key used
#
# if you wanted to enable this:
# HeadingRudderKey = [ False, None ]
#
# if you wanted to disable this:
# HeadingRudderKey = [ False, None ]
#
HeadingRudderKey = [ True, MenuKeyManagerWrapper.Keys.C ] # change the C to whatever key you want

# the hotkey used to change the heading/rudder dial mode (heading mode or rudder mode) will be the same key
# used to toggle the display of the dial plus the shift key. So you have to press the shift key first then
# the key used to toggle the display of the dial on/off.

# the key used to increase the desired heading when you mouse into the heading bar
HeadingBarIncreaseHeadingKey = MenuKeyManagerWrapper.Keys.E # change the E to whatever key you want
HeadingBarDecreaseHeadingKey = MenuKeyManagerWrapper.Keys.Q # change the Q to whatever key you want

# some users may want the desired heading to increase slower. Modify this value to add delay (increment in 1's!)
HeadingBarUserDelay = 0

# Does the heading bar start expanded at game start?
HeadingBarIsExpanded = True


##################################### Crash Dive (SH3/4/5 Modes) #####################################
# the hotkey used for crash dive
# Format:
#
# CrashDiveKey = [ False, None, False ]
# False = disabled
# None = key used
# False = disabled
#
# so if you wanted the teleport to obs scope hot key to be shift + C:
# CrashDiveKey = [ False, None, False ]
#
# if you didn't want to assign a hotkey for teleport to obs scope:
# CrashDiveKey = [ False, None, False ]
CrashDiveKey = [ False, MenuKeyManagerWrapper.Keys.P, True ]

# teleport on crash dive? If enabled and you are currently submerged then no teleporting will take place
# change below to either True or False
TeleportOnCrashDive = True

# time interval to wait before giving the crash dive command (simulates crew clearing the topside deck) (this value is in seconds - i.e. 5.5 would be 5 and a half seconds). If submerged then there is no delay
TeleportOnCrashDiveWaitTime = 5


##################################### Follow Target (SH3/5 Modes) ####################################
# the hotkey used to toggle follow target (when you have a target selected you can enable this to have the camera
# automatically follow the target as it moves.)
# Format:
#
# FollowSelectedTargetHotKey = [ False, None ]
# False = disabled
# None = key used
#
# if you wanted to enable this:
# FollowSelectedTargetHotKey = [ False, None ]
#
# if you wanted to disable this:
# FollowSelectedTargetHotKey = [ False, None ]
#
FollowSelectedTargetHotKey = [ True, MenuKeyManagerWrapper.Keys.X ] # change the X to whatever you want


##################################### Message Box (SH3/4/5 modes) ####################################
# these control the maximum height and width of the message box. They are multiplied by a set value so increment in small values!
# when messagebox is maximized, only the height will go to the max value. Width will stay at user dragged (or game start if hasn't been dragged) value
# they define the maximum size of the message box by: 315.0 * MessageBoxWidthFactor (width in pixels), PageDefaultHud_Feedback_BottomBar.Height * MessageBoxHeightFactor (height in pixels)
# minimum value for below is 1
MessageBoxWidthFactor = 2.25 # stock is 2
# minimum value for below is 1
MessageBoxHeightFactor = 3.0 # stock is 3

# this will cause the message box to start in the expanded mode (vertically) when the game starts
# change below to either True or False
MessageBoxStartsExpanded = True

# this will cause the message box to start in widened mode (horizontally) when the game starts
# change below to either True or False
MessageBoxStartsWidened = False

# is the message box displayed at game start?
# change below to either True or False
DisplayTheMessageBox = True

# the hotkey used to toggle the messagebox visibility
# Format:
#
# DisplayTheMessageBoxHotKey = [ False, None ]
# False = disabled
# None = key used
#
# if you wanted to enable this:
# DisplayTheMessageBoxHotKey = [ False, None ]
#
# if you wanted to disable this:
# DisplayTheMessageBoxHotKey = [ False, None ]
#
DisplayTheMessageBoxHotKey = [ True, MenuKeyManagerWrapper.Keys.L ] # change the L to whatever key you want

# to toggle the messagebox between minimized and maximized states use the hotkey used to toggle visibility with the shift key

# at what TDC mode do we ensure the messagebox is shown and maximized (it will show when the TC level is greater than or equal to this value)?
ShowMessageBoxAndExpandAtTCLevel = 32

# when we drop below the ShowMessageBoxAndExpandAtTCLevel do we restore the messagebox?
# change below to either True or False
RestoreMessageBoxAfterTCLevel = True

# number of messages to keep in the messageboxlist. After this number is exceeded, the oldest message is removed from the list. Stock value is 20
# minimum value is 1
NumberMessagesToKeepInMessageBox = 20

# is the messagebox draggable?
# change below to either True or False
MessageBoxIsDraggable = False

# do we go to TCx (where x is defined by TCxOnMessageBoxTextDesiredTCLevel) when one of the following messages is posted in the messagebox?
# change below to either True or False
TCxOnMessageBoxText = False

# if TCxOnMessageBoxText is enabled then it will trigger on the following numbers from menu.txt:
# NOTE: all must be placed on single line with no breaks for options exporter to work correctly!
TCxOnMessageBoxTextNumbers = [ 9200,9201,9202,9203,9204,9205,817,4800,4801,9206,9 207,9208,9209,9210,9211,9212,7666,7667 ]

# if TCxOnMessageBoxText is enabled and one of the texts from TCxOnMessageBoxTextNumbers is found, what TC level do we go to?
TCxOnMessageBoxTextDesiredTCLevel = 1

# do we go to TC1 on any messagebox text?
# change below to either True or False
TC1OnAnyMessageBoxText = False

# does the messagebox show when moused in and hide when moused out?
MessageBoxScrolls = True

# if MessageBoxScrolls is enabled, this is the time delay before hiding the messagebox when moused out:
# below is in seconds
MessageBoxHideTD = 4.0


##################################### Ships Journal ##################################################
# the title of the ship's journal
ShipsJournalTitle = "Schlacht im Atlantik"

# the regular time interval when entries will be made into the ship's journal denoting: Position (Lat and Long), Course, Weather, and whether following waypoints or not. Value is in hours.
# enter a value below for the time period in hours
JournalEntryIntervalTime = 6


##################################### Mini-Map (aka TAI map) (SH3/4/5 modes) ######################################
# change below to either True or False for each
#
# Activates the waypoint tool for setting waypoints when the sub is clicked. Setting to False will totally disable the user from setting any waypoints
TAISetCourseWhenSubIsClicked = True
# When a waypoint is clicked the waypoint tool will be activated allowing user to select new waypoints
TAIActivateWaypointToolWhenWaypointClicked = True
# appears it doesn't work for when enabled it does nothing!
TAIKeepPlayerLookingUp = False
# shows the highlighted hydrophone sensor region extending from the contact (medium-orange shading)
TAIHydrophoneEnabled = True # stock True
# shows the highlighted sonar sensor region extending from the contact (red shading)
TAISonarEnabled = True # stock True
# shows the highlighted visual sensor region extending from the contact (dark-grey/black shading)
TAIVisualEnabled = True # stock True
# ??
TAIRadarEnabled = True # stock True
# ??
TAIMaximumSensorRangesEnabled = True # stock False
# shows the torpedo solution line
TAITorpedoSolutionEnabled = True # stock False
# ??
TAIMapScaleEnabled = False # stock False
# latitude and longitude coordinates
TAIMapCoordinatesEnabled = False # stock False
# highlighted view cone extending out from sub denoting current view bearing
TAICameraPositionAndOrientationEnabled = True # stock True
# draws an animated circle where the shell hit
TAIShellHitEnabled = True # stock False
# causes CTD - DO NOT ENABLE!
TAIKGridEnabled = False # stock False - DO NOT ENABLE AS CAUSES CTD!!
# ??
TAIRadarContactsEnabled = True # stock True
# shows visual contacts in the map
TAIVisualContactsEnabled = True # stock True
# shows the hydrophone contact lines to the contacts
TAIHydrophoneContactsEnabled = True # stock True
# ??
TAISonarContactsEnabled = True # stock True
# ??
TAIViewConesEnabled = True # stock False
# ??
TAIMacroObjectivesEnabled = True # stock False
# ??
TAIStrategicObjectivesEnabled = False # stock False
# Is enabled by page navigation map when it's needed
TAIStrategicUnitsEnabled = False # stock False
# ??
TAIContactInfoTextEnabled = False # stock False
# the round numbers on the torpedo solution line (1, 2, 3, etc. )
TAITorpedoImpactPointsEnabled = True # stock True
# ??
TAILocationsInTAIEnabled = False # stock False
# map mode for TAI is enabled
TAIIsTacticalMapEnabled = True # stock True
# ??
TAIHighlightSonarTargetsEnabled = False # stock False
# ??
TAIHighlightRadarTargetsEnabled = False # stock False
# ??
TAIHighlightVisualTargetsEnabled = False # stock False
# ??
TAIMinefieldsEnabled = True # stock False
# ??
TAIShallowWatersEnabled = True # stock False
# ??
TAIResupplyShipEnabled = True # stock False
#
# others
# leave TAISelectedContactGUIEnabled as False
TAISelectedContactGUIEnabled = False # stock False
TAIParallelCourseButtonEnabled = True # stock False
TAIInterceptCourseButtonEnabled = True # stock False
#
DepthGroupHighlightBitmapEnabled = False # stock False
ThrottleHighlightBitmapEnabled = False # stock False


# should the mini-map switch to TAI mode when the obs, attack, or UZO station is selected?
# set to False to have the mini-map switch to minimized mode on obs, attack, or UZO station selected. When set to True
# the mini-map will set to TAI mode on those stations selected.
# change below to either True or False
TAIModeOnScopeUZOStationSelected = True

# enums for TAIMode on game start (DO NOT CHANGE)
TAIModeMinimized = 0
TAIModeTAI = 1
TAIModeMaximized = 2

# When game starts, what the status of the mini-map? Does user want it minimized, TAI mode, or maximized?
# change below to either Minimized, TAI, or Maximized
TAIModeOnGameStart = TAIModeMinimized

# is the mini-map enabled (visible)? If set to False then the mini-map will not be visible at game start
# change below to either True or False
TAIEnabledInGame = True

# the mini-map has 3 states - minimized, TAI, and maximized. What is the TAI initial width and height?
# below are in screen pixels (Note: in order for map contacts info to show width must be >= 490 and height must be >= 200)
TAIInitialWidth = 490
TAIInitialHeight = 450


##################################### Nav-Map (aka Navigation Map) (SH3/4/5 modes) ######################################
# change below to either True or False for each
#
# Activates the waypoint tool for setting waypoints when the sub is clicked. Setting to False will totally disable the user from setting any waypoints
NavSetCourseWhenSubIsClicked = True
# When a waypoint is clicked the waypoint tool will be activated allowing user to select new waypoints
NavActivateWaypointToolWhenWaypointClicked = True
# appears it doesn't work for when enabled it does nothing!
NavKeepPlayerLookingUp = False
# shows the highlighted hydrophone sensor region extending from the contact (medium-orange shading)
NavHydrophoneEnabled = True # stock True
# shows the highlighted sonar sensor region extending from the contact (red shading)
NavSonarEnabled = True # stock True
# shows the highlighted visual sensor region extending from the contact (dark-grey/black shading)
NavVisualEnabled = True # stock True
# ??
NavRadarEnabled = True # stock True
# ??
NavMaximumSensorRangesEnabled = False # stock False
# shows the torpedo solution line
NavTorpedoSolutionEnabled = False # stock False
# ??
NavMapScaleEnabled = False # stock False
# latitude and longitude coordinates
NavMapCoordinatesEnabled = True # stock True
# highlighted view cone extending out from sub denoting current view bearing
NavCameraPositionAndOrientationEnabled = False # stock False
# draws an animated circle where the shell hit
NavShellHitEnabled = False # stock False
# causes CTD - DO NOT ENABLE!
NavKGridEnabled = False # stock False - DO NOT ENABLE AS CAUSES CTD!!
# ??
NavRadarContactsEnabled = True # stock True
# shows visual contacts in the map
NavVisualContactsEnabled = True # stock True
# shows the hydrophone contact lines to the contacts
NavHydrophoneContactsEnabled = True # stock True
# ??
NavSonarContactsEnabled = True # stock True
# ??
NavViewConesEnabled = False # stock False
# ??
NavMacroObjectivesEnabled = False # stock False
# ??
NavStrategicObjectivesEnabled = False # stock False
# Is enabled by page navigation map when it's needed
NavStrategicUnitsEnabled = False # stock False
# ??
NavContactInfoTextEnabled = False # stock False
# the round numbers on the torpedo solution line (1, 2, 3, etc. )
NavTorpedoImpactPointsEnabled = False # stock True
# ??
NavLocationsInTAIEnabled = True # stock True
# tactical map mode enabled
NavIsTacticalMapEnabled = False # stock False
# ??
NavHighlightSonarTargetsEnabled = False # stock False
# ??
NavHighlightRadarTargetsEnabled = False # stock False
# ??
NavHighlightVisualTargetsEnabled = False # stock False
# ??
NavMinefieldsEnabled = True # stock False
# ??
NavShallowWatersEnabled = True # stock False
# ??
NavResupplyShipEnabled = True # stock False
#
# others
# leave NavSelectedContactGUIEnabled as False
NavSelectedContactGUIEnabled = False # stock False
NavParallelCourseButtonEnabled = False # stock False
NavInterceptCourseButtonEnabled = False # stock False

# is the shipping chart the colored version at game start?
# change below to either True or False
ShippingChartIsColored = True

##################################### Player Guidance (SH3/4/5 modes) ####################################
# are player guidance events enabled? (are they shown)
# change below to either True or False
PlayerGuidanceEnabled = False


##################################### Player Objectives (SH3/4/5 modes) ###################################
# are player objective events enabled? (are they shown)
# change below to either True or False
PlayerObjectivesEnabled = False

# if the mission is a tutorial, are Player Objectives enabled at game start? (overrides PlayerObjectivesEnabled at game start)
# change below to either True or False
IfTutPlayerObjsEnabledAtGameStart = True


##################################### XO TDC Dialog box (SH3/4/5 modes) ###################################
# is the XO and his dialog box visible on the UZO, attack, and obs scopes views?
# change below to either True or False
XOTDCDialogEnabled = False

# if the XO and his dialog box are disabled, are they allowed to pop up when you lock onto a target?
# change below to either True or False
XOTDCDialogAllowedToPop = True

# Is the XO TDC dialog box draggable?
# If the XO TDC dialog box is draggable then the feature of the XO TDC dialog box dynamically repositioning
# based on messagebox visibility is disabled.
# change below to either True or False
XOTDCDialogDraggable = False

# is manual targeting enforced? If True then the option to 'Turn TDC Off' is disabled and not visible
# change below to either True or False
XOTDCManualTargetingEnforced = False


##################################### Item Notes ################################################## ########
# this enables or disables the item notes from showing. The item notes is the text that displays above
# the message box when you mouse over certain items
#
# change below to either True or False
ShowItemNotes = False


################################### Officers and Orders Bars and Order Categories (SH3/5 modes) ##################################
# are the officers enabled (are the officer icons allowed to be rendered)?
# change below to either True or False
RenderOfficerIcons = True

# which officers are shown?
# this is a bit pattern to show them (has to be in hex). You can use the Windows Calculator to configure the bit pattern and transform to Hex
# bit 0 = chief engineer
# bit 1 = navigation
# bit 2 = weapons
# bit 3 = sonar
# bit 4 = radio
# bit 5 = watch officer
#
# value of 0x3F will display all officers
OfficersToRender = 0x3F

# is the officer bar pinned to the bottom of the screen (if you only want to be able to drag it horizontally then set to True)
# change below to either True or False
OfficersPinnedToBottomOfScreen = True

# when user clicks on order from order bar, does the order bar hide itself or stay visible?
# set to True to have order bar hide itself when order selected
# change below to either True or False
HideOrderBarOnOrderClicked = False

# when user presses a key, does the order bar hide itself or stay visible?
# set to True to have order bar hide itself when key is pressed
# change below to either True or False
HideOrderBarOnKeyPress = False

# do the order categories scroll down when moused out and scroll up when moused in?
# set to True to have the order categories scroll
# change below to either True or False
OrderCategoriesScroll = True

# do the officers scroll down when moused out and scroll up when moused in?
# change below to either True or False
OfficersScroll = True

# if OfficersScroll is enabled, this is the time delay before hiding the officers when moused out:
# below is in seconds
OfficersHideTD = 4.0

# allow debug popups for debugging wounded officers not changing their icons to wounded
# If you enable the debugging of this you need to ensure that your \My Documents\SH5\data\cfg\main.cfg file is setup correctly:
# find this section and ensure that it's setup this way:
#
# [DEVELOPING]
# Modding=Yes
# MenuEditor=Yes
# DebugScripts=Yes
#
# change below to either True or False
WoundedOfficersDebugging = True


##################################### Scopes/Lock/Break Lock (SH3/4/5 modes) ###############################################
# The lock/break lock displays in the attack, obs, and UZO views. Set to True to enable them.
# change below to either True or False
ShowLockBreakLock = True

# show the ship's name in the scope views?
# change below to either True or False
DisplayShipNames = False


###################################### Teleporting ##############################################
# the hotkeys assigned to the teleport commands
#
# Format:
#
# TeleportToObsScope = [ False, None, False ]
# False = disabled
# None = key used
# False = disabled
#
# so if you wanted the teleport to obs scope hot key to be shift + T:
# TeleportToObsScope = [ False, None, False ]
#
# if you didn't want to assign a hotkey for teleport to obs scope:
# TeleportToObsScope = [ False, None, False ]
#
TeleportToObsScope = [ False, None, False ]
TeleportToAttackScope = [ False, None, False ]
TeleportToUZO = [ False, None, False ]
TeleportToRadar = [ False, None, False ]
TeleportToHydrophone = [ False, None, False ]
TeleportToDeckGun = [ False, None, False ]
TeleportToFlakGun = [ False, None, False ]

# the hotkey used to bring up the Teleporting order bar
# Format:
#
# DisplayTeleportingOrderBarKey = [ False, None, False ]
# False = disabled
# None = key used
# False = disabled
#
# so if you wanted the teleport to obs scope hot key to be shift + T:
# DisplayTeleportingOrderBarKey = [ False, None, False ]
#
# if you didn't want to assign a hotkey for teleport to obs scope:
# DisplayTeleportingOrderBarKey = [ False, None, False ]
#
DisplayTeleportingOrderBarKey = [ True, MenuKeyManagerWrapper.Keys.T, False ]

# if teleported to obs or attack scope and you leave the station, do you teleport back to bridge?
# change below to either True or False
ObsAndAttackReturnToBridge = True

# attack scope's fully lower button causes you to leave station and return to bridge?
# change below to either True or False
AttackFullyLowerButtonLeavesStationForBridge = False


######################################## Contact Spotted ########################################
# enum of the available date time formats
#
MMDDYYTimeFormat = 0
DDMMYYTimeFormat = 1
MMDDYYMilitaryTimeFormat = 2
DDMMYYMilitaryTimeFormat = 3
ContactDateTimeStampFormat = DDMMYYMilitaryTimeFormat


################################### Radio Reports and Messages ##################################
# when a new radio contact report comes in does the TC drop back to 1?
# change below to either True or False
TC1OnNewRadioNavMapContact = False

# does TC drop back to 1 on radio message received?
# change below to either True or False
TC1OnRadioMessageReceived = True

# When a new radio contact report is received and it's range from the sub is greater than this value and TC1OnNewRadioNavMapContact is enabled then do not go to TC 1
# value is in kms (kilometers)
MaxRadioContactRange = 250

# are radio contact reports always clipped to the distance specified above? If not, then they will be subject to the distance specified above if TC1OnNewRadioNavMapContact is enabled.
# change below to either True or False
RadioContactReportsAlwaysClipped = True

# Are the contact's actual speed shown or is a relative speed shown (slow=2-6 knots, medium=7-12 knots, fast=13+ knots)?
# change below to either True or False
ShowContactsActualSpeed = False

# Are the contact's actual course shown or is a relative course shown (E,ENE,SE,S, SW, etc.)?
# change below to either True or False
ShowContactsActualCourse = False

# for radio contact reports, at what range from the sub can the watchstanders see the contact well enough to update it's course (in kms)?
RangeStartUpdatingContacts = 8


##################################### others MODs ###############################################

# emtguf's periscope rework enabled (adds support for his mod)
# change below to either True or False
emtgufPeriscopeReworkEnabled = True


#+-------------------------------------- ottos chalkboard --------------------------------------
# the hotkey used to bring up ottos chalkboard
# Format:
#
# ShowChalkBoardHotKey = [ False, None, False ]
# False = disabled
# None = key used
# False = disabled
#
# so if you wanted to show the chalkboard and hot key to be shift + B:
# ShowChalkBoardHotKey = [ False, None, False ]
#
# if you didn't want to assign a hotkey for ottos chalkboard:
# ShowChalkBoardHotKey = [ False, None, False ]
#
ShowChalkBoardHotKey = [ True, MenuKeyManagerWrapper.Keys.B, True ]

# the hotkey used to increase the chalkboard count
# Format:
#
# IncreaseChalkBoardCountHotKey = [ False, None, False ]
# False = disabled
# None = key used
# False = disabled
#
# so if you wanted the increase chalkboard count hot key to be shift + I:
# IncreaseChalkBoardCountHotKey = [ False, None, False ]
#
# if you didn't want to assign a hotkey for ottos chalkboard:
# IncreaseChalkBoardCountHotKey = [ False, None, False ]
#
IncreaseChalkBoardCountHotKey = [ True, MenuKeyManagerWrapper.Keys.I, False ]

# the message displayed on the chalkboard
# you have to use all 3 messages or you will get error!
# if you want one line to not have a message then use ""
# NOTE: all must be placed on single line with no breaks for options exporter to work correctly!
OttosChalkBoardMessage = [ "Hier ist ein U-Boat Cocktail!", "Die Schlacht im Atlantik", "hat begonnen!" ]


######################################## Debugging ####################################
# for Debugging use only! Do not use!
#
DisplaySapiensKey = MenuKeyManagerWrapper.Keys.Key3
DisplayKeyPressedKey = MenuKeyManagerWrapper.Keys.Key4
DisplayKeyReleasedKey = MenuKeyManagerWrapper.Keys.Key5
DisplayCurrentStationsKey = MenuKeyManagerWrapper.Keys.Key6
DisplayActiveStationKey = MenuKeyManagerWrapper.Keys.Key7
DisplayActiveCameraKey = MenuKeyManagerWrapper.Keys.Key8
ToggleDisplaySubmarineCommandsKey = MenuKeyManagerWrapper.Keys.Key9
ToggleDisplaySubmarineDelayedCommandsKey = MenuKeyManagerWrapper.Keys.Key0


################################################## #####################################

#END USER OPTIONS

# DO NOT CHANGE ANYTHING BELOW!!

######################################## Accessors ############################################
# required to disable the snorkel orders for the officers. DO NOT CHANGE!
DamageControlTeamActive = False
SnorkelEnabled = False
SinglePlayerMode = False
BitmapIndex_NotAvailable = 0
BitmapIndex_NotSelected = 1
BitmapIndex_Selected = 2
BitmapIndex_MouseOver = 3
FollowSelectedTargetWithCamera = False
AttackPeriscopeLevelSH5Handle = None
ObsPeriscopeLevelSH5Handle = None
AllowedToSelectTarget = False
AllowedToPhotographTarget = False
SilentRunning = False
SnorkelRaised = False
BattlestationsActivated = False
SubIsUnderwater = False
ShowNavMapTDC = False
ShipsJournal = []
mastheights = None
IgnoreNewLogMessages = True
GameStartDate = None
SH5InstallPath = None
UserOptionsFilePathname = "data\\Scripts\\Menu\\TheDarkWraithUserOptions .py"
ShipsJournalPath = "Logs\\"
ShipsJournalFile = None
ShipsJournalChanged = False
TutorialsPath = "data\\Tutorials"
TutorialToStart = None
AutomationPath = "data\\Automation"
MagicString = "TheDarkWraithSH5_new"
SelectedTorpTubes = [ 0 ]
TorpDoorsStatus = [ False, False, False, False, False, False ]
TorpDoorsEnabled = [ True, True, True, True, True, True ]
SH5EHeadingRudderDialVisible = False
CurrentlySelectedTube = 0
InSalvoMode = False
RealisticTorpFiringInProgress = False
TDCIsOn = False
CrewDialogLines = None
Automation = None
AutomationIDForTutorial = None
TimerID_UpdateTutorial = 975316316
RadarOneSweep = 0
RadarContinuousSweep = 1
RadarConstantBearing = 2
RadarSweepMode = RadarConstantBearing
#
RadarIsOn = 0
RadarIsOff = 1
RadarMode = RadarIsOff
#
RadarShortRange = 0
RadarMediumRange = 1
RadarRangeMode = RadarShortRange
#
WatchCrewMode = 0
ManDeckGunMode = 1
ManFlakGunMode = 2
ManDeckAndFlakGunMode = 3
CrewOnDeckMode = WatchCrewMode
#
DGunFireModeHold = 0
DGunFireModeFireAtWill = 1
DGunFireMode = DGunFireModeHold
#
DGunRangeModeShort = 0
DGunRangeModeMedium = 1
DGunRangeModeLong = 2
DGunRangeMode = DGunRangeModeShort
#
DGunAimModeCmdDeck = 0
DGunAimModeWeapons = 1
DGunAimModeWaterline = 2
DGunAimModeHull = 3
DGunAimMode = DGunAimModeWaterline
#
AAGunFireModeHold = 0
AAGunFireModeFireAtWill = 1
AAGunFireMode = AAGunFireModeHold
#
AAGunRangeModeShort = 0
AAGunRangeModeMedium = 1
AAGunRangeModeLong = 2
AAGunRangeMode = AAGunRangeModeShort
#
AAGunPriorityModeFighters = 0
AAGunPriorityModeBombers = 1
AAGunPriorityModeAnyAircraft = 2
AAGunPriorityMode = AAGunPriorityModeAnyAircraft
#
AAGunAimModeClosingTargets = 0
AAGunAimModeAnyTarget = 1
AAGunAimMode = AAGunAimModeAnyTarget



def GetDamageControlTeamActive():
global DamageControlTeamActive
return DamageControlTeamActive


def SetDamageControlTeamActive( value ):
global DamageControlTeamActive
DamageControlTeamActive = value


def GetSnorkelEnabled():
global SnorkelEnabled
return SnorkelEnabled


def SetSnorkelEnabled( value ):
global SnorkelEnabled
SnorkelEnabled = value


def GetUIStyle():
global UIStyle
return UIStyle


def GetHeadingBarIncreaseHeadingKey():
global HeadingBarIncreaseHeadingKey
return HeadingBarIncreaseHeadingKey


def GetHeadingBarDecreaseHeadingKey():
global HeadingBarDecreaseHeadingKey
return HeadingBarDecreaseHeadingKey


def GetHeadingBarUserDelay():
global HeadingBarUserDelay
return HeadingBarUserDelay


def GetHeadingRudderKey():
global HeadingRudderKey
return HeadingRudderKey


def GetIntegrateLevels():
global IntegrateLevels
return IntegrateLevels


def GetFollowSelectedTargetHotKey():
global FollowSelectedTargetHotKey
return FollowSelectedTargetHotKey


def GetNomographVisibleOnMiniMapHotKey():
global NomographVisibleOnMiniMapHotKey
return NomographVisibleOnMiniMapHotKey


def GetToolHelperOnAtGameStart():
global ToolHelperOnAtGameStart
return ToolHelperOnAtGameStart


def GetTeleportOnCrashDive():
global TeleportOnCrashDive
return TeleportOnCrashDive


def GetTeleportOnCrashDiveWaitTime():
global TeleportOnCrashDiveWaitTime
return TeleportOnCrashDiveWaitTime


def GetTC1OnNewRadioNavMapContact():
global TC1OnNewRadioNavMapContact
return TC1OnNewRadioNavMapContact


def SetTC1OnNewRadioNavMapContact( value ):
global TC1OnNewRadioNavMapContact
TC1OnNewRadioNavMapContact = value


def GetNightFiltersEnabled():
global NightFiltersEnabled
return NightFiltersEnabled


def GetRenderOfficerIcons():
global RenderOfficerIcons
return RenderOfficerIcons


def GetOfficersToRender():
global OfficersToRender
return OfficersToRender


def GetAttackTDCMode():
global AttackTDCMode
return AttackTDCMode


def SetAttackTDCMode( value ):
global AttackTDCMode
AttackTDCMode = value


def GetObsTDCMode():
global ObsTDCMode
return ObsTDCMode


def SetObsTDCMode( value ):
global ObsTDCMode
ObsTDCMode = value


def GetUZOTDCMode():
global UZOTDCMode
return UZOTDCMode


def SetUZOTDCMode( value ):
global UZOTDCMode
UZOTDCMode = value


def GetDialsAnimationSpeed():
global DialsAnimationSpeed
return DialsAnimationSpeed


def GetBaseZoomThrottle():
global BaseZoomThrottle
return BaseZoomThrottle


def GetBaseZoomSpeed():
global BaseZoomSpeed
return BaseZoomSpeed


def GetBaseZoomHeading():
global BaseZoomHeading
return BaseZoomHeading


def GetBaseZoomRudder():
global BaseZoomRudder
return BaseZoomRudder


def GetBaseZoomDepth260():
global BaseZoomDepth260
return BaseZoomDepth260


def GetBaseZoomDepth25():
global BaseZoomDepth25
return BaseZoomDepth25


def GetThrottleCanZoom():
global ThrottleCanZoom
return ThrottleCanZoom


def GetSpeedCanZoom():
global SpeedCanZoom
return SpeedCanZoom


def GetHeadingCanZoom():
global HeadingCanZoom
return HeadingCanZoom


def GetRudderCanZoom():
global RudderCanZoom
return RudderCanZoom


def GetDepth260CanZoom():
global Depth260CanZoom
return Depth260CanZoom


def GetDepth25CanZoom():
global Depth25CanZoom
return Depth25CanZoom


def GetDialsBaseZoomOffsetYAdjustment():
global DialsBaseZoomOffsetYAdjustment
return DialsBaseZoomOffsetYAdjustment


def GetDialsBaseZoomOffsetXAdjustment():
global DialsBaseZoomOffsetXAdjustment
return DialsBaseZoomOffsetXAdjustment


def GetMessageBoxWidthFactor():
global MessageBoxWidthFactor
return MessageBoxWidthFactor


def SetMessageBoxWidthFactor( value ):
global MessageBoxWidthFactor
MessageBoxWidthFactor = value


def GetMessageBoxHeightFactor():
global MessageBoxHeightFactor
return MessageBoxHeightFactor


def SetMessageBoxHeightFactor( value ):
global MessageBoxHeightFactor
MessageBoxHeightFactor = value


def GetMessageBoxStartsExpanded():
global MessageBoxStartsExpanded
return MessageBoxStartsExpanded


def GetMessageBoxStartsWidened():
global MessageBoxStartsWidened
return MessageBoxStartsWidened


def GetDisplayTheMessageBox():
global DisplayTheMessageBox
return DisplayTheMessageBox


def SetDisplayTheMessageBox( value ):
global DisplayTheMessageBox
DisplayTheMessageBox = value


def GetDisplayTheMessageBoxHotKey():
global DisplayTheMessageBoxHotKey
return DisplayTheMessageBoxHotKey


def GetShowMessageBoxAndExpandAtTCLevel():
global ShowMessageBoxAndExpandAtTCLevel
return ShowMessageBoxAndExpandAtTCLevel


def SetShowMessageBoxAndExpandAtTCLevel( value ):
global ShowMessageBoxAndExpandAtTCLevel
ShowMessageBoxAndExpandAtTCLevel = value


def GetRestoreMessageBoxAfterTCLevel():
global RestoreMessageBoxAfterTCLevel
return RestoreMessageBoxAfterTCLevel


def GetTAISetCourseWhenSubIsClicked():
global TAISetCourseWhenSubIsClicked
return TAISetCourseWhenSubIsClicked


def SetTAISetCourseWhenSubIsClicked( value ):
global TAISetCourseWhenSubIsClicked
TAISetCourseWhenSubIsClicked = value


def GetTAIActivateWaypointToolWhenWaypointClicked():
global TAIActivateWaypointToolWhenWaypointClicked
return TAIActivateWaypointToolWhenWaypointClicked


def SetTAIActivateWaypointToolWhenWaypointClicked( value ):
global TAIActivateWaypointToolWhenWaypointClicked
TAIActivateWaypointToolWhenWaypointClicked = value


def GetTAIKeepPlayerLookingUp():
global TAIKeepPlayerLookingUp
return TAIKeepPlayerLookingUp


def SetTAIKeepPlayerLookingUp( value ):
global TAIKeepPlayerLookingUp
TAIKeepPlayerLookingUp = value


def GetTAIHydrophoneEnabled():
global TAIHydrophoneEnabled
return TAIHydrophoneEnabled


def SetTAIHydrophoneEnabled( value ):
global TAIHydrophoneEnabled
TAIHydrophoneEnabled = value


def GetTAISonarEnabled():
global TAISonarEnabled
return TAISonarEnabled


def SetTAISonarEnabled( value ):
global TAISonarEnabled
TAISonarEnabled = value


def GetTAIVisualEnabled():
global TAIVisualEnabled
return TAIVisualEnabled


def SetTAIVisualEnabled( value ):
global TAIVisualEnabled
TAIVisualEnabled = value


def GetTAIRadarEnabled():
global TAIRadarEnabled
return TAIRadarEnabled


def SetTAIRadarEnabled( value ):
global TAIRadarEnabled
TAIRadarEnabled = value


def GetTAIMaximumSensorRangesEnabled():
global TAIMaximumSensorRangesEnabled
return TAIMaximumSensorRangesEnabled


def SetTAIMaximumSensorRangesEnabled( value ):
global TAIMaximumSensorRangesEnabled
TAIMaximumSensorRangesEnabled = value


def GetTAITorpedoSolutionEnabled():
global TAITorpedoSolutionEnabled
return TAITorpedoSolutionEnabled


def SetTAITorpedoSolutionEnabled( value ):
global TAITorpedoSolutionEnabled
TAITorpedoSolutionEnabled = value


def GetTAIMapScaleEnabled():
global TAIMapScaleEnabled
return TAIMapScaleEnabled


def SetTAIMapScaleEnabled( value ):
global TAIMapScaleEnabled
TAIMapScaleEnabled = value


def GetTAIMapCoordinatesEnabled():
global TAIMapCoordinatesEnabled
return TAIMapCoordinatesEnabled


def SetTAIMapCoordinatesEnabled( value ):
global TAIMapCoordinatesEnabled
TAIMapCoordinatesEnabled = value


def GetTAICameraPositionAndOrientationEnabled():
global TAICameraPositionAndOrientationEnabled
return TAICameraPositionAndOrientationEnabled


def SetTAICameraPositionAndOrientationEnabled( value ):
global TAICameraPositionAndOrientationEnabled
TAICameraPositionAndOrientationEnabled = value


def GetTAIShellHitEnabled():
global TAIShellHitEnabled
return TAIShellHitEnabled


def SetTAIShellHitEnabled( value ):
global TAIShellHitEnabled
TAIShellHitEnabled = value


def GetTAIKGridEnabled():
global TAIKGridEnabled
return TAIKGridEnabled


def SetTAIKGridEnabled( value ):
global TAIKGridEnabled
TAIKGridEnabled = value


def GetTAIRadarContactsEnabled():
global TAIRadarContactsEnabled
return TAIRadarContactsEnabled


def SetTAIRadarContactsEnabled( value ):
global TAIRadarContactsEnabled
TAIRadarContactsEnabled = value


def GetTAIVisualContactsEnabled():
global TAIVisualContactsEnabled
return TAIVisualContactsEnabled


def SetTAIVisualContactsEnabled( value ):
global TAIVisualContactsEnabled
TAIVisualContactsEnabled = value


def GetTAIHydrophoneContactsEnabled():
global TAIHydrophoneContactsEnabled
return TAIHydrophoneContactsEnabled


def SetTAIHydrophoneContactsEnabled( value ):
global TAIHydrophoneContactsEnabled
TAIHydrophoneContactsEnabled = value


def GetTAISonarContactsEnabled():
global TAISonarContactsEnabled
return TAISonarContactsEnabled


def SetTAISonarContactsEnabled( value ):
global TAISonarContactsEnabled
TAISonarContactsEnabled = value


def GetTAIViewConesEnabled():
global TAIViewConesEnabled
return TAIViewConesEnabled


def SetTAIViewConesEnabled( value ):
global TAIViewConesEnabled
TAIViewConesEnabled = value


def GetTAIMacroObjectivesEnabled():
global TAIMacroObjectivesEnabled
return TAIMacroObjectivesEnabled


def SetTAIMacroObjectivesEnabled( value ):
global TAIMacroObjectivesEnabled
TAIMacroObjectivesEnabled = value


def GetTAIStrategicObjectivesEnabled():
global TAIStrategicObjectivesEnabled
return TAIStrategicObjectivesEnabled


def SetTAIStrategicObjectivesEnabled( value ):
global TAIStrategicObjectivesEnabled
TAIStrategicObjectivesEnabled = value


def GetTAIStrategicUnitsEnabled():
global TAIStrategicUnitsEnabled
return TAIStrategicUnitsEnabled


def SetTAIStrategicUnitsEnabled( value ):
global TAIStrategicUnitsEnabled
TAIStrategicUnitsEnabled = value


def GetTAIContactInfoTextEnabled():
global TAIContactInfoTextEnabled
return TAIContactInfoTextEnabled


def SetTAIContactInfoTextEnabled( value ):
global TAIContactInfoTextEnabled
TAIContactInfoTextEnabled = value


def GetTAITorpedoImpactPointsEnabled():
global TAITorpedoImpactPointsEnabled
return TAITorpedoImpactPointsEnabled


def SetTAITorpedoImpactPointsEnabled( value ):
global TAITorpedoImpactPointsEnabled
TAITorpedoImpactPointsEnabled = value


def GetTAILocationsInTAIEnabled():
global TAILocationsInTAIEnabled
return TAILocationsInTAIEnabled


def SetTAILocationsInTAIEnabled( value ):
global TAILocationsInTAIEnabled
TAILocationsInTAIEnabled = value


def GetTAIIsTacticalMapEnabled():
global TAIIsTacticalMapEnabled
return TAIIsTacticalMapEnabled


def SetTAIIsTacticalMapEnabled( value ):
global TAIIsTacticalMapEnabled
TAIIsTacticalMapEnabled = value


def GetTAIHighlightSonarTargetsEnabled():
global TAIHighlightSonarTargetsEnabled
return TAIHighlightSonarTargetsEnabled


def SetTAIHighlightSonarTargetsEnabled( value ):
global TAIHighlightSonarTargetsEnabled
TAIHighlightSonarTargetsEnabled = value


def GetTAIHighlightRadarTargetsEnabled():
global TAIHighlightRadarTargetsEnabled
return TAIHighlightRadarTargetsEnabled


def SetTAIHighlightRadarTargetsEnabled( value ):
global TAIHighlightRadarTargetsEnabled
TAIHighlightRadarTargetsEnabled = value


def GetTAIHighlightVisualTargetsEnabled():
global TAIHighlightVisualTargetsEnabled
return TAIHighlightVisualTargetsEnabled


def SetTAIHighlightVisualTargetsEnabled( value ):
global TAIHighlightVisualTargetsEnabled
TAIHighlightVisualTargetsEnabled = value


def GetTAIMinefieldsEnabled():
global TAIMinefieldsEnabled
return TAIMinefieldsEnabled


def SetTAIMinefieldsEnabled( value ):
global TAIMinefieldsEnabled
TAIMinefieldsEnabled = value


def GetTAIShallowWatersEnabled():
global TAIShallowWatersEnabled
return TAIShallowWatersEnabled


def SetTAIShallowWatersEnabled( value ):
global TAIShallowWatersEnabled
TAIShallowWatersEnabled = value


def GetTAIResupplyShipEnabled():
global TAIResupplyShipEnabled
return TAIResupplyShipEnabled


def SetTAIResupplyShipEnabled( value ):
global TAIResupplyShipEnabled
TAIResupplyShipEnabled = value


def GetTAISelectedContactGUIEnabled():
global TAISelectedContactGUIEnabled
return TAISelectedContactGUIEnabled


def SetTAISelectedContactGUIEnabled( value ):
global TAISelectedContactGUIEnabled
TAISelectedContactGUIEnabled = value


def GetTAIParallelCourseButtonEnabled():
global TAIParallelCourseButtonEnabled
return TAIParallelCourseButtonEnabled


def SetTAIParallelCourseButtonEnabled( value ):
global TAIParallelCourseButtonEnabled
TAIParallelCourseButtonEnabled = value


def GetTAIInterceptCourseButtonEnabled():
global TAIInterceptCourseButtonEnabled
return TAIInterceptCourseButtonEnabled


def SetTAIInterceptCourseButtonEnabled( value ):
global TAIInterceptCourseButtonEnabled
TAIInterceptCourseButtonEnabled = value


def GetDepthGroupHighlightBitmapEnabled():
global DepthGroupHighlightBitmapEnabled
return DepthGroupHighlightBitmapEnabled


def GetThrottleHighlightBitmapEnabled():
global ThrottleHighlightBitmapEnabled
return ThrottleHighlightBitmapEnabled


def GetTAIModeOnScopeUZOStationSelected():
global TAIModeOnScopeUZOStationSelected
return TAIModeOnScopeUZOStationSelected


def GetTAIModeOnGameStart():
global TAIModeOnGameStart
return TAIModeOnGameStart


def GetNavSetCourseWhenSubIsClicked():
global NavSetCourseWhenSubIsClicked
return NavSetCourseWhenSubIsClicked


def SetNavSetCourseWhenSubIsClicked( value ):
global NavSetCourseWhenSubIsClicked
NavSetCourseWhenSubIsClicked = value


def GetNavActivateWaypointToolWhenWaypointClicked():
global NavActivateWaypointToolWhenWaypointClicked
return NavActivateWaypointToolWhenWaypointClicked


def SetNavActivateWaypointToolWhenWaypointClicked( value ):
global NavActivateWaypointToolWhenWaypointClicked
NavActivateWaypointToolWhenWaypointClicked = value


def GetNavKeepPlayerLookingUp():
global NavKeepPlayerLookingUp
return NavKeepPlayerLookingUp


def SetNavKeepPlayerLookingUp( value ):
global NavKeepPlayerLookingUp
NavKeepPlayerLookingUp = value


def GetNavHydrophoneEnabled():
global NavHydrophoneEnabled
return NavHydrophoneEnabled


def SetNavHydrophoneEnabled( value ):
global NavHydrophoneEnabled
NavHydrophoneEnabled = value


def GetNavSonarEnabled():
global NavSonarEnabled
return NavSonarEnabled


def SetNavSonarEnabled( value ):
global NavSonarEnabled
NavSonarEnabled = value


def GetNavVisualEnabled():
global NavVisualEnabled
return NavVisualEnabled


def SetNavVisualEnabled( value ):
global NavVisualEnabled
NavVisualEnabled = value


def GetNavRadarEnabled():
global NavRadarEnabled
return NavRadarEnabled


def SetNavRadarEnabled( value ):
global NavRadarEnabled
NavRadarEnabled = value


def GetNavMaximumSensorRangesEnabled():
global NavMaximumSensorRangesEnabled
return NavMaximumSensorRangesEnabled


def SetNavMaximumSensorRangesEnabled( value ):
global NavMaximumSensorRangesEnabled
NavMaximumSensorRangesEnabled = value


def GetNavTorpedoSolutionEnabled():
global NavTorpedoSolutionEnabled
return NavTorpedoSolutionEnabled


def SetNavTorpedoSolutionEnabled( value ):
global NavTorpedoSolutionEnabled
NavTorpedoSolutionEnabled = value


def GetNavMapScaleEnabled():
global NavMapScaleEnabled
return NavMapScaleEnabled


def SetNavMapScaleEnabled( value ):
global NavMapScaleEnabled
NavMapScaleEnabled = value


def GetNavMapCoordinatesEnabled():
global NavMapCoordinatesEnabled
return NavMapCoordinatesEnabled


def SetNavMapCoordinatesEnabled( value ):
global NavMapCoordinatesEnabled
NavMapCoordinatesEnabled = value


def GetNavCameraPositionAndOrientationEnabled():
global NavCameraPositionAndOrientationEnabled
return NavCameraPositionAndOrientationEnabled


def SetNavCameraPositionAndOrientationEnabled( value ):
global NavCameraPositionAndOrientationEnabled
NavCameraPositionAndOrientationEnabled = value


def GetNavShellHitEnabled():
global NavShellHitEnabled
return NavShellHitEnabled


def SetNavShellHitEnabled( value ):
global NavShellHitEnabled
NavShellHitEnabled = value


def GetNavKGridEnabled():
global NavKGridEnabled
return NavKGridEnabled


def SetNavKGridEnabled( value ):
global NavKGridEnabled
NavKGridEnabled = value


def GetNavRadarContactsEnabled():
global NavRadarContactsEnabled
return NavRadarContactsEnabled


def SetNavRadarContactsEnabled( value ):
global NavRadarContactsEnabled
NavRadarContactsEnabled = value


def GetNavVisualContactsEnabled():
global NavVisualContactsEnabled
return NavVisualContactsEnabled


def SetNavVisualContactsEnabled( value ):
global NavVisualContactsEnabled
NavVisualContactsEnabled = value


def GetNavHydrophoneContactsEnabled():
global NavHydrophoneContactsEnabled
return NavHydrophoneContactsEnabled


def SetNavHydrophoneContactsEnabled( value ):
global NavHydrophoneContactsEnabled
NavHydrophoneContactsEnabled = value


def GetNavSonarContactsEnabled():
global NavSonarContactsEnabled
return NavSonarContactsEnabled


def SetNavSonarContactsEnabled( value ):
global NavSonarContactsEnabled
NavSonarContactsEnabled = value


def GetNavViewConesEnabled():
global NavViewConesEnabled
return NavViewConesEnabled


def SetNavViewConesEnabled( value ):
global NavViewConesEnabled
NavViewConesEnabled = value


def GetNavMacroObjectivesEnabled():
global NavMacroObjectivesEnabled
return NavMacroObjectivesEnabled


def SetNavMacroObjectivesEnabled( value ):
global NavMacroObjectivesEnabled
NavMacroObjectivesEnabled = value


def GetNavStrategicObjectivesEnabled():
global NavStrategicObjectivesEnabled
return NavStrategicObjectivesEnabled


def SetNavStrategicObjectivesEnabled( value ):
global NavStrategicObjectivesEnabled
NavStrategicObjectivesEnabled = value


def GetNavStrategicUnitsEnabled():
global NavStrategicUnitsEnabled
return NavStrategicUnitsEnabled


def SetNavStrategicUnitsEnabled( value ):
global NavStrategicUnitsEnabled
NavStrategicUnitsEnabled = value


def GetNavContactInfoTextEnabled():
global NavContactInfoTextEnabled
return NavContactInfoTextEnabled


def SetNavContactInfoTextEnabled( value ):
global NavContactInfoTextEnabled
NavContactInfoTextEnabled = value


def GetNavTorpedoImpactPointsEnabled():
global NavTorpedoImpactPointsEnabled
return NavTorpedoImpactPointsEnabled


def SetNavTorpedoImpactPointsEnabled( value ):
global NavTorpedoImpactPointsEnabled
NavTorpedoImpactPointsEnabled = value


def GetNavLocationsInTAIEnabled():
global NavLocationsInTAIEnabled
return NavLocationsInTAIEnabled


def SetNavLocationsInTAIEnabled( value ):
global NavLocationsInTAIEnabled
NavLocationsInTAIEnabled = value


def GetNavIsTacticalMapEnabled():
global NavIsTacticalMapEnabled
return NavIsTacticalMapEnabled


def SetNavIsTacticalMapEnabled( value ):
global NavIsTacticalMapEnabled
NavIsTacticalMapEnabled = value


def GetNavHighlightSonarTargetsEnabled():
global NavHighlightSonarTargetsEnabled
return NavHighlightSonarTargetsEnabled


def SetNavHighlightSonarTargetsEnabled( value ):
global NavHighlightSonarTargetsEnabled
NavHighlightSonarTargetsEnabled = value


def GetNavHighlightRadarTargetsEnabled():
global NavHighlightRadarTargetsEnabled
return NavHighlightRadarTargetsEnabled


def SetNavHighlightRadarTargetsEnabled( value ):
global NavHighlightRadarTargetsEnabled
NavHighlightRadarTargetsEnabled = value


def GetNavHighlightVisualTargetsEnabled():
global NavHighlightVisualTargetsEnabled
return NavHighlightVisualTargetsEnabled


def SetNavHighlightVisualTargetsEnabled( value ):
global NavHighlightVisualTargetsEnabled
NavHighlightVisualTargetsEnabled = value


def GetNavMinefieldsEnabled():
global NavMinefieldsEnabled
return NavMinefieldsEnabled


def SetNavMinefieldsEnabled( value ):
global NavMinefieldsEnabled
NavMinefieldsEnabled = value


def GetNavShallowWatersEnabled():
global NavShallowWatersEnabled
return NavShallowWatersEnabled


def SetNavShallowWatersEnabled( value ):
global NavShallowWatersEnabled
NavShallowWatersEnabled = value


def GetNavResupplyShipEnabled():
global NavResupplyShipEnabled
return NavResupplyShipEnabled


def SetNavResupplyShipEnabled( value ):
global NavResupplyShipEnabled
NavResupplyShipEnabled = value


def GetNavSelectedContactGUIEnabled():
global NavSelectedContactGUIEnabled
return NavSelectedContactGUIEnabled


def SetNavSelectedContactGUIEnabled( value ):
global NavSelectedContactGUIEnabled
NavSelectedContactGUIEnabled = value


def GetNavParallelCourseButtonEnabled():
global NavParallelCourseButtonEnabled
return NavParallelCourseButtonEnabled


def SetNavParallelCourseButtonEnabled( value ):
global NavParallelCourseButtonEnabled
NavParallelCourseButtonEnabled = value


def GetNavInterceptCourseButtonEnabled():
global NavInterceptCourseButtonEnabled
return NavInterceptCourseButtonEnabled


def SetNavInterceptCourseButtonEnabled( value ):
global NavInterceptCourseButtonEnabled
NavInterceptCourseButtonEnabled = value


def GetShippingChartIsColored():
global ShippingChartIsColored
return ShippingChartIsColored


def SetShippingChartIsColored( value ):
global ShippingChartIsColored
ShippingChartIsColored = value


def GetPlayerGuidanceEnabled():
global PlayerGuidanceEnabled
return PlayerGuidanceEnabled


def SetPlayerGuidanceEnabled( value ):
global PlayerGuidanceEnabled
PlayerGuidanceEnabled = value


def GetPlayerObjectivesEnabled():
global PlayerObjectivesEnabled
return PlayerObjectivesEnabled


def SetPlayerObjectivesEnabled( value ):
global PlayerObjectivesEnabled
PlayerObjectivesEnabled = value


def GetIfTutPlayerObjsEnabledAtGameStart():
global IfTutPlayerObjsEnabledAtGameStart
return IfTutPlayerObjsEnabledAtGameStart


def GetXOTDCDialogEnabled():
global XOTDCDialogEnabled
return XOTDCDialogEnabled


def SetXOTDCDialogEnabled( value ):
global XOTDCDialogEnabled
XOTDCDialogEnabled = value


def GetXOTDCDialogDraggable():
global XOTDCDialogDraggable
return XOTDCDialogDraggable


def GetShowItemNotes():
global ShowItemNotes
return ShowItemNotes


def SetShowItemNotes( value ):
global ShowItemNotes
ShowItemNotes = value


def GetHideOrderBarOnOrderClicked():
global HideOrderBarOnOrderClicked
return HideOrderBarOnOrderClicked


def GetHideOrderBarOnKeyPress():
global HideOrderBarOnKeyPress
return HideOrderBarOnKeyPress


def GetOrderCategoriesScroll():
global OrderCategoriesScroll
return OrderCategoriesScroll


def SetOrderCategoriesScroll( value ):
global OrderCategoriesScroll
OrderCategoriesScroll = value
# do something else to update it


def GetOfficersScroll():
global OfficersScroll
return OfficersScroll


def GetOfficersHideTD():
global OfficersHideTD
return OfficersHideTD


def GetShowLockBreakLock():
global ShowLockBreakLock
return ShowLockBreakLock


def SetShowLockBreakLock( value ):
global ShowLockBreakLock
ShowLockBreakLock = value


def GetDisplayShipNames():
global DisplayShipNames
return DisplayShipNames


def SetDisplayShipNames( value ):
global DisplayShipNames
DisplayShipNames = value


def GetTeleportToObsScope():
global TeleportToObsScope
return TeleportToObsScope


def GetTeleportToAttackScope():
global TeleportToAttackScope
return TeleportToAttackScope


def GetTeleportToUZO():
global TeleportToUZO
return TeleportToUZO


def GetTeleportToRadar():
global TeleportToRadar
return TeleportToRadar


def GetTeleportToHydrophone():
global TeleportToHydrophone
return TeleportToHydrophone


def GetTeleportToDeckGun():
global TeleportToDeckGun
return TeleportToDeckGun


def GetTeleportToFlakGun():
global TeleportToFlakGun
return TeleportToFlakGun


def GetDisplayTeleportingOrderBarKey():
global DisplayTeleportingOrderBarKey
return DisplayTeleportingOrderBarKey


def GetObsAndAttackReturnToBridge():
global ObsAndAttackReturnToBridge
return ObsAndAttackReturnToBridge


def GetContactDateTimeStampFormat():
global ContactDateTimeStampFormat
return ContactDateTimeStampFormat


def GetemtgufPeriscopeReworkEnabled():
global emtgufPeriscopeReworkEnabled
return emtgufPeriscopeReworkEnabled


def GetShowChalkBoardHotKey():
global ShowChalkBoardHotKey
return ShowChalkBoardHotKey


def GetIncreaseChalkBoardCountHotKey():
global IncreaseChalkBoardCountHotKey
return IncreaseChalkBoardCountHotKey


def GetOttosChalkBoardMessage():
global OttosChalkBoardMessage
return OttosChalkBoardMessage


def GetSinglePlayerMode():
global SinglePlayerMode
return SinglePlayerMode


def SetSinglePlayerMode( value ):
global SinglePlayerMode
SinglePlayerMode = value


def GetBitmapIndex_NotAvailable():
global BitmapIndex_NotAvailable
return BitmapIndex_NotAvailable


def GetBitmapIndex_NotSelected():
global BitmapIndex_NotSelected
return BitmapIndex_NotSelected


def GetBitmapIndex_Selected():
global BitmapIndex_Selected
return BitmapIndex_Selected


def GetBitmapIndex_MouseOver():
global BitmapIndex_MouseOver
return BitmapIndex_MouseOver


def GetNomographVisibleOnMiniMap():
global NomographVisibleOnMiniMap
return NomographVisibleOnMiniMap


def SetNomographVisibleOnMiniMap( value ):
global NomographVisibleOnMiniMap
NomographVisibleOnMiniMap = value


def GetNomographVisibleOnNavMap():
global NomographVisibleOnNavMap
return NomographVisibleOnNavMap


def SetNomographVisibleOnNavMap( value ):
global NomographVisibleOnNavMap
NomographVisibleOnNavMap = value


def GetFollowSelectedTargetWithCamera():
global FollowSelectedTargetWithCamera
return FollowSelectedTargetWithCamera


def SetFollowSelectedTargetWithCamera( value ):
global FollowSelectedTargetWithCamera
FollowSelectedTargetWithCamera = value


def GetAttackPeriscopeLevelSH5Handle():
global AttackPeriscopeLevelSH5Handle
return AttackPeriscopeLevelSH5Handle


def SetAttackPeriscopeLevelSH5Handle( value ):
global AttackPeriscopeLevelSH5Handle
AttackPeriscopeLevelSH5Handle = value


def GetObsPeriscopeLevelSH5Handle():
global ObsPeriscopeLevelSH5Handle
return ObsPeriscopeLevelSH5Handle


def SetObsPeriscopeLevelSH5Handle( value ):
global ObsPeriscopeLevelSH5Handle
ObsPeriscopeLevelSH5Handle = value


def GetAllowedToSelectTarget():
global AllowedToSelectTarget
return AllowedToSelectTarget


def SetAllowedToSelectTarget( value ):
global AllowedToSelectTarget
AllowedToSelectTarget = value


def GetAllowedToPhotographTarget():
global AllowedToPhotographTarget
return AllowedToPhotographTarget


def SetAllowedToPhotographTarget( value ):
global AllowedToPhotographTarget
AllowedToPhotographTarget = value


def GetSilentRunning():
global SilentRunning
return SilentRunning


def SetSilentRunning( value ):
global SilentRunning
SilentRunning = value


def GetSnorkelRaised():
global SnorkelRaised
return SnorkelRaised


def SetSnorkelRaised( value ):
global SnorkelRaised
SnorkelRaised = value


def GetBattlestationsActivated():
global BattlestationsActivated
return BattlestationsActivated


def SetBattlestationsActivated( value ):
global BattlestationsActivated
BattlestationsActivated = value


def GetSubIsUnderwater():
global SubIsUnderwater
return SubIsUnderwater


def SetSubIsUnderwater( value ):
global SubIsUnderwater
SubIsUnderwater = value


def GetNumberMessagesToKeepInMessageBox():
global NumberMessagesToKeepInMessageBox
return NumberMessagesToKeepInMessageBox


def SetNumberMessagesToKeepInMessageBox( value ):
global NumberMessagesToKeepInMessageBox
NumberMessagesToKeepInMessageBox = value


def GetTC1OnRadioMessageReceived():
global TC1OnRadioMessageReceived
return TC1OnRadioMessageReceived


def SetTC1OnRadioMessageReceived( value ):
global TC1OnRadioMessageReceived
TC1OnRadioMessageReceived = value


def GetShowNavMapTDC():
global ShowNavMapTDC
return ShowNavMapTDC


def SetShowNavMapTDC( value ):
global ShowNavMapTDC
ShowNavMapTDC = value


def GetAboveThisTCLevelShowClock():
global AboveThisTCLevelShowClock
return AboveThisTCLevelShowClock


def SetAboveThisTCLevelShowClock( value ):
global AboveThisTCLevelShowClock
AboveThisTCLevelShowClock = value


def GetBelowThisDepthDontReceiveRadio():
global BelowThisDepthDontReceiveRadio
return BelowThisDepthDontReceiveRadio


def SetBelowThisDepthDontReceiveRadio( value ):
global BelowThisDepthDontReceiveRadio
BelowThisDepthDontReceiveRadio = value


def GetMaxRadioContactRange():
global MaxRadioContactRange
return MaxRadioContactRange


def SetMaxRadioContactRange( value ):
global MaxRadioContactRange
MaxRadioContactRange = value


def GetRadioContactReportsAlwaysClipped():
global RadioContactReportsAlwaysClipped
return RadioContactReportsAlwaysClipped


def SetRadioContactReportsAlwaysClipped( value ):
global RadioContactReportsAlwaysClipped
RadioContactReportsAlwaysClipped = value


def GetShipsJournal():
global ShipsJournal
return ShipsJournal


def SetShipsJournal( value ):
global ShipsJournal
ShipsJournal = value


def GetShipsJournalTitle():
global ShipsJournalTitle
return ShipsJournalTitle


def SetShipsJournalTitle( value ):
global ShipsJournalTitle
ShipsJournalTitle = value


def GetOfficersPinnedToBottomOfScreen():
global OfficersPinnedToBottomOfScreen
return OfficersPinnedToBottomOfScreen


def SetOfficersPinnedToBottomOfScreen( value ):
global OfficersPinnedToBottomOfScreen
OfficersPinnedToBottomOfScreen = value


def Getmastheights():
global mastheights
return mastheights


def GetNavigationMapTablesMapsEnglish():
global NavigationMapTablesMapsEnglish
return NavigationMapTablesMapsEnglish


def SetNavigationMapTablesMapsEnglish( value ):
global NavigationMapTablesMapsEnglish
NavigationMapTablesMapsEnglish = value


def GetTAIEnabledInGame():
global TAIEnabledInGame
return TAIEnabledInGame


def SetTAIEnabledInGame( value ):
global TAIEnabledInGame
TAIEnabledInGame = value


def GetBinocularCrosshairEnabled():
global BinocularCrosshairEnabled
return BinocularCrosshairEnabled


def SetBinocularCrosshairEnabled( value ):
global BinocularCrosshairEnabled
BinocularCrosshairEnabled = value


def GetIgnoreNewLogMessages():
global IgnoreNewLogMessages
return IgnoreNewLogMessages


def SetIgnoreNewLogMessages( value ):
global IgnoreNewLogMessages
IgnoreNewLogMessages = value


def GetShowContactsActualSpeed():
global ShowContactsActualSpeed
return ShowContactsActualSpeed


def SetShowContactsActualSpeed( value ):
global ShowContactsActualSpeed
ShowContactsActualSpeed = value


def GetRangeStartUpdatingContacts():
global RangeStartUpdatingContacts
return RangeStartUpdatingContacts


def SetRangeStartUpdatingContacts( value ):
global RangeStartUpdatingContacts
RangeStartUpdatingContacts = value


def GetShowContactsActualCourse():
global ShowContactsActualCourse
return ShowContactsActualCourse


def SetShowContactsActualCourse( value ):
global ShowContactsActualCourse
ShowContactsActualCourse = value


def GetGameStartDate():
global GameStartDate
return GameStartDate


def SetGameStartDate( value ):
global GameStartDate
GameStartDate = value


def GetSH5InstallPath():
global SH5InstallPath
return SH5InstallPath


def SetSH5InstallPath( value ):
global SH5InstallPath
SH5InstallPath = value


def GetUserOptionsFilePathname():
global UserOptionsFilePathname
global SH5InstallPath
path = SH5InstallPath + "\\" + UserOptionsFilePathname
return path


def GetShipsJournalPath():
global ShipsJournalPath
global SH5InstallPath
path = SH5InstallPath + "\\" + ShipsJournalPath
return path


def GetShipsJournalFile():
global ShipsJournalFile
return ShipsJournalFile


def SetShipsJournalFile( value ):
global ShipsJournalFile
if value != None:
if value[ len( value ) - 1 ] == "\\":
value = value[ 0 : len( value ) - 1 ]
ShipsJournalFile = value


def GetShipsJournalChanged():
global ShipsJournalChanged
return ShipsJournalChanged


def SetShipsJournalChanged( value ):
global ShipsJournalChanged
ShipsJournalChanged = value


def GetTutorialsPath():
global TutorialsPath
global SH5InstallPath
path = SH5InstallPath + "\\" + TutorialsPath
return path


def GetTutorialToStart():
global TutorialToStart
return TutorialToStart


def SetTutorialToStart( value ):
global TutorialToStart
TutorialToStart = value


def GetTutorialImagePath():
global SH5InstallPath
path = SH5InstallPath + "\\data\\Menu\\Gui\\Tutorial Images"
return path


def GetTutorialImageName():
return "TutorialImage.dds"


def GetAutomationPath():
global AutomationPath
global SH5InstallPath
path = SH5InstallPath + "\\" + AutomationPath
return path



def GetMagicString():
global MagicString
return MagicString


def GetPeriscopeLevelSH5Visible():
global PeriscopeLevelSH5Visible
return PeriscopeLevelSH5Visible


def SetPeriscopeLevelSH5Visible( value ):
global PeriscopeLevelSH5Visible
PeriscopeLevelSH5Visible = value


def GetDepthAndMapToolsBarsVisible():
global DepthAndMapToolsBarsVisible
return DepthAndMapToolsBarsVisible


def SetDepthAndMapToolsBarsVisible( value ):
global DepthAndMapToolsBarsVisible
DepthAndMapToolsBarsVisible = value


def GetJournalEntryIntervalTime():
global JournalEntryIntervalTime
return JournalEntryIntervalTime


def SetJournalEntryIntervalTime( value ):
global JournalEntryIntervalTime
JournalEntryIntervalTime = value


def GetSelectedTorpTubes():
global SelectedTorpTubes
return SelectedTorpTubes


def SetSelectedTorpTubes( value ):
global SelectedTorpTubes
SelectedTorpTubes = value


def GetTorpDoorsStatus():
global TorpDoorsStatus
return TorpDoorsStatus


def SetTorpDoorsStatus( value ):
global TorpDoorsStatus
TorpDoorsStatus = value


def GetTorpDoorsEnabled():
global TorpDoorsEnabled
return TorpDoorsEnabled


def SetTorpDoorsEnabled( value ):
global TorpDoorsEnabled
TorpDoorsEnabled = value


def GetRealisticTorpedoFirings():
global RealisticTorpedoFirings
return RealisticTorpedoFirings


def SetRealisticTorpedoFirings( value ):
global RealisticTorpedoFirings
RealisticTorpedoFirings = value


def GetRealisticOpenTubeTDBase():
global RealisticOpenTubeTDBase
return RealisticOpenTubeTDBase


def SetRealisticOpenTubeTDBase( value ):
global RealisticOpenTubeTDBase
RealisticOpenTubeTDBase = value


def GetWaterLevelTD():
global WaterLevelTD
return WaterLevelTD


def SetWaterLevelTD( value ):
global WaterLevelTD
WaterLevelTD = value


def GetSwitchToRechargePropulsionTDBase():
global SwitchToRechargePropulsionTDBase
return SwitchToRechargePropulsionTDBase


def SetSwitchToRechargePropulsionTDBase( value ):
global SwitchToRechargePropulsionTDBase
SwitchToRechargePropulsionTDBase = value


def GetSwitchToStdPropulsionTDBase():
global SwitchToStdPropulsionTDBase
return SwitchToStdPropulsionTDBase


def SetSwitchToStdPropulsionTDBase( value ):
global SwitchToStdPropulsionTDBase
SwitchToStdPropulsionTDBase = value


def GetSH5EHeadingRudderDialVisible():
global SH5EHeadingRudderDialVisible
return SH5EHeadingRudderDialVisible


def SetSH5EHeadingRudderDialVisible( value ):
global SH5EHeadingRudderDialVisible
SH5EHeadingRudderDialVisible = value


def GetCurrentlySelectedTube():
global CurrentlySelectedTube
return CurrentlySelectedTube


def SetCurrentlySelectedTube( value ):
global CurrentlySelectedTube
CurrentlySelectedTube = value


def GetInSalvoMode():
global InSalvoMode
return InSalvoMode


def SetInSalvoMode( value ):
global InSalvoMode
InSalvoMode = value


def GetAutomaticallyRaiseAttackScope():
global AutomaticallyRaiseAttackScope
return AutomaticallyRaiseAttackScope


def GetRealisticTorpFiringInProgress():
global RealisticTorpFiringInProgress
return RealisticTorpFiringInProgress


def SetRealisticTorpFiringInProgress( value ):
global RealisticTorpFiringInProgress
RealisticTorpFiringInProgress = value


def GetAutomaticallyFullyLowerAttackScope():
global AutomaticallyFullyLowerAttackScope
return AutomaticallyFullyLowerAttackScope


def GetAutomaticallyFullyLowerObsScope():
global AutomaticallyFullyLowerObsScope
return AutomaticallyFullyLowerObsScope


def GetXOTDCDialogAllowedToPop():
global XOTDCDialogAllowedToPop
return XOTDCDialogAllowedToPop


def GetCrashDiveKey():
global CrashDiveKey
return CrashDiveKey


def GetXOTDCManualTargetingEnforced():
global XOTDCManualTargetingEnforced
return XOTDCManualTargetingEnforced


def GetAOBSpeedTDCFixEnabled():
global AOBSpeedTDCFixEnabled
return AOBSpeedTDCFixEnabled


def GetTDCIsOn():
global TDCIsOn
return TDCIsOn


def SetTDCIsOn( value ):
global TDCIsOn
TDCIsOn = value


def GetAutomaticallyOrderRechargeModeUponSurfacing():
global AutomaticallyOrderRechargeModeUponSurfacing
return AutomaticallyOrderRechargeModeUponSurfacing


def GetAutoShowClockOnFollowTarget():
global AutoShowClockOnFollowTarget
return AutoShowClockOnFollowTarget


def GetAutoShowClockOnTorpFire():
global AutoShowClockOnTorpFire
return AutoShowClockOnTorpFire


def GetNavigatorAssistAOBSpeedCalcs():
global NavigatorAssistAOBSpeedCalcs
return NavigatorAssistAOBSpeedCalcs

def GetTAIInitialWidth():
global TAIInitialWidth
return TAIInitialWidth


def GetTAIInitialHeight():
global TAIInitialHeight
return TAIInitialHeight


def GetNavCalcTimeAOBSpeedFromRangeMeasurementsBase():
global NavCalcTimeAOBSpeedFromRangeMeasurementsBase
return NavCalcTimeAOBSpeedFromRangeMeasurementsBase


def GetNavCalcTimeSpeedFromTimeMeasurementsBase():
global NavCalcTimeSpeedFromTimeMeasurementsBase
return NavCalcTimeSpeedFromTimeMeasurementsBase


def GetAttackFullyLowerButtonLeavesStationForBridge():
global AttackFullyLowerButtonLeavesStationForBridge
return AttackFullyLowerButtonLeavesStationForBridge


def GetAttackRAOBFEnabled():
global AttackRAOBFEnabled
return AttackRAOBFEnabled


def SetAttackRAOBFEnabled( value ):
global AttackRAOBFEnabled
AttackRAOBFEnabled = value


def GetObsRAOBFEnabled():
global ObsRAOBFEnabled
return ObsRAOBFEnabled


def SetObsRAOBFEnabled( value ):
global ObsRAOBFEnabled
ObsRAOBFEnabled = value


def GetUZORAOBFEnabled():
global UZORAOBFEnabled
return UZORAOBFEnabled


def SetUZORAOBFEnabled( value ):
global UZORAOBFEnabled
UZORAOBFEnabled = value


def GetAttackAttackDiskEnabled():
global AttackAttackDiskEnabled
return AttackAttackDiskEnabled


def SetAttackAttackDiskEnabled( value ):
global AttackAttackDiskEnabled
AttackAttackDiskEnabled = value


def GetObsAttackDiskEnabled():
global ObsAttackDiskEnabled
return ObsAttackDiskEnabled


def SetObsAttackDiskEnabled( value ):
global ObsAttackDiskEnabled
ObsAttackDiskEnabled = value


def GetUZOAttackDiskEnabled():
global UZOAttackDiskEnabled
return UZOAttackDiskEnabled


def SetUZOAttackDiskEnabled( value ):
global UZOAttackDiskEnabled
UZOAttackDiskEnabled = value


def GetNavMapAttackDiskEnabled():
global NavMapAttackDiskEnabled
return NavMapAttackDiskEnabled


def SetNavMapAttackDiskEnabled( value ):
global NavMapAttackDiskEnabled
NavMapAttackDiskEnabled = value


def GetMessageBoxIsDraggable():
global MessageBoxIsDraggable
return MessageBoxIsDraggable


def GetHideTDCDialsWhenUsingRAOBF():
global HideTDCDialsWhenUsingRAOBF
return HideTDCDialsWhenUsingRAOBF


def GetScopesDepthIndicatorScrolls():
global ScopesDepthIndicatorScrolls
return ScopesDepthIndicatorScrolls


def GetScopesDepthIndicatorScrollsTD():
global ScopesDepthIndicatorScrollsTD
return ScopesDepthIndicatorScrollsTD


def GetScopesTorpedoBoxScrolls():
global ScopesTorpedoBoxScrolls
return ScopesTorpedoBoxScrolls


def GetScopesTorpedoBoxScrollsTD():
global ScopesTorpedoBoxScrollsTD
return ScopesTorpedoBoxScrollsTD


def GetTCxOnMessageBoxText():
global TCxOnMessageBoxText
return TCxOnMessageBoxText


def SetTCxOnMessageBoxText( value ):
global TCxOnMessageBoxText
TCxOnMessageBoxText = value


def GetTCxOnMessageBoxTextNumbers():
global TCxOnMessageBoxTextNumbers
return TCxOnMessageBoxTextNumbers


def GetTCxOnMessageBoxTextDesiredTCLevel():
global TCxOnMessageBoxTextDesiredTCLevel
return TCxOnMessageBoxTextDesiredTCLevel


def GetAutomation():
global Automation
return Automation


def GetAutomationIDForTutorial():
global AutomationIDForTutorial
return AutomationIDForTutorial


def SetAutomationIDForTutorial( value ):
global AutomationIDForTutorial
AutomationIDForTutorial = value


def GetAutomationHotKey():
global AutomationHotKey
return AutomationHotKey


def GetRadarSweepMode():
global RadarSweepMode
return RadarSweepMode


def SetRadarSweepMode( value ):
global RadarSweepMode
RadarSweepMode = value


def GetRadarMode():
global RadarMode
return RadarMode


def SetRadarMode( value ):
global RadarMode
RadarMode = value


def GetRadarRangeMode():
global RadarRangeMode
return RadarRangeMode


def SetRadarRangeMode( value ):
global RadarRangeMode
RadarRangeMode = value


def GetAutomationDebuggingEnabled():
global AutomationDebuggingEnabled
return AutomationDebuggingEnabled


def GetDelayNewSpeedThrottleCommand():
global DelayNewSpeedThrottleCommand
return DelayNewSpeedThrottleCommand


def GetNewSpeedThrottleDelayMin():
global NewSpeedThrottleDelayMin
return int( NewSpeedThrottleDelayMin )


def GetNewSpeedThrottleDelayMax():
global NewSpeedThrottleDelayMax
return int( NewSpeedThrottleDelayMax )


def GetTC1OnAnyMessageBoxText():
global TC1OnAnyMessageBoxText
return TC1OnAnyMessageBoxText


def SetTC1OnAnyMessageBoxText( value ):
global TC1OnAnyMessageBoxText
TC1OnAnyMessageBoxText = value


def GetMessageBoxScrolls():
global MessageBoxScrolls
return MessageBoxScrolls


def GetMessageBoxHideTD():
global MessageBoxHideTD
return MessageBoxHideTD


def GetCrewOnDeckMode():
global CrewOnDeckMode
return CrewOnDeckMode


def SetCrewOnDeckMode( value ):
global CrewOnDeckMode
CrewOnDeckMode = value


def GetDGunFireMode():
global DGunFireMode
return DGunFireMode


def SetDGunFireMode( value ):
global DGunFireMode
DGunFireMode = value


def GetDGunRangeMode():
global DGunRangeMode
return DGunRangeMode


def SetDGunRangeMode( value ):
global DGunRangeMode
DGunRangeMode = value


def GetDGunAimMode():
global DGunAimMode
return DGunAimMode


def SetDGunAimMode( value ):
global DGunAimMode
DGunAimMode = value


def GetAAGunFireMode():
global AAGunFireMode
return AAGunFireMode


def SetAAGunFireMode( value ):
global AAGunFireMode
AAGunFireMode = value


def GetAAGunRangeMode():
global AAGunRangeMode
return AAGunRangeMode


def SetAAGunRangeMode( value ):
global AAGunRangeMode
AAGunRangeMode = value


def GetAAGunPriorityMode():
global AAGunPriorityMode
return AAGunPriorityMode


def SetAAGunPriorityMode( value ):
global AAGunPriorityMode
AAGunPriorityMode = value


def GetAAGunAimMode():
global AAGunAimMode
return AAGunAimMode


def SetAAGunAimMode( value ):
global AAGunAimMode
AAGunAimMode = value


def GetHeadingBarIsExpanded():
global HeadingBarIsExpanded
return HeadingBarIsExpanded


def GetAdvancedHudIsEnabled():
global AdvancedHudIsEnabled
return AdvancedHudIsEnabled


def GetMostFuelEfficientSpeed():
global MostFuelEfficientSpeed
return MostFuelEfficientSpeed


def GetTopRightBarsScroll():
global TopRightBarsScroll
return TopRightBarsScroll


def GetTopRightBarsHideTD():
global TopRightBarsHideTD
return TopRightBarsHideTD


def GetEssentialControlsScroll():
global EssentialControlsScroll
return EssentialControlsScroll


def GetEssentialControlsHideTD():
global EssentialControlsHideTD
return EssentialControlsHideTD


def GetCameraBarVisible():
global CameraBarVisible
return CameraBarVisible


def SetCameraBarVisible( value ):
global CameraBarVisible
CameraBarVisible = value


def GetCameraBarScrolls():
global CameraBarScrolls
return CameraBarScrolls


def GetWarningsScroll():
global WarningsScroll
return WarningsScroll


def SetWarningsScroll( value ):
global WarningsScroll
WarningsScroll = value


def GetDepthGroupBarVisible():
global DepthGroupBarVisible
return DepthGroupBarVisible


def SetDepthGroupBarVisible( value ):
global DepthGroupBarVisible
DepthGroupBarVisible = value


def GetMapToolsAsObjects():
global MapToolsAsObjects
return MapToolsAsObjects


def GetMostFuelEfficientSpeedHotKey():
global MostFuelEfficientSpeedHotKey
return MostFuelEfficientSpeedHotKey


def GetAutomationActionMessagesDisplayed():
global AutomationActionMessagesDisplayed
return AutomationActionMessagesDisplayed


def GetAutomationScriptHotKey1():
global AutomationScriptHotKey1
return AutomationScriptHotKey1


def GetAutomationScriptHotKey2():
global AutomationScriptHotKey2
return AutomationScriptHotKey2


def GetAutomationScriptHotKey3():
global AutomationScriptHotKey3
return AutomationScriptHotKey3


def GetAutomationScriptHotKey4():
global AutomationScriptHotKey4
return AutomationScriptHotKey4


#def GetCrewDialogLines():
# global CrewDialogLines
# return CrewDialogLines


################################################## ######## Debugging ################################################## ###############
MasterDebugEnabled = False


def GetMasterDebugEnabled():
global MasterDebugEnabled
return MasterDebugEnabled


def SetMasterDebugEnabled( value ):
global MasterDebugEnabled
MasterDebugEnabled = value


def GetDisplaySapiensKey():
global DisplaySapiensKey
return DisplaySapiensKey


def SetDisplaySapiensKey( value ):
global DisplaySapiensKey
DisplaySapiensKey = value


def GetDisplayKeyPressedKey():
global DisplayKeyPressedKey
return DisplayKeyPressedKey


def SetDisplayKeyPressedKey( value ):
global DisplayKeyPressedKey
DisplayKeyPressedKey = value


def GetDisplayKeyReleasedKey():
global DisplayKeyReleasedKey
return DisplayKeyReleasedKey


def SetDisplayKeyReleasedKey( value ):
global DisplayKeyReleasedKey
DisplayKeyReleasedKey = value


def GetDisplayCurrentStationsKey():
global DisplayCurrentStationsKey
return DisplayCurrentStationsKey


def SetDisplayCurrentStationsKey( value ):
global DisplayCurrentStationsKey
DisplayCurrentStationsKey = value


def GetDisplayActiveStationKey():
global DisplayActiveStationKey
return DisplayActiveStationKey


def SetDisplayActiveStationKey( value ):
global DisplayActiveStationKey
DisplayActiveStationKey = value


def GetDisplayActiveCameraKey():
global DisplayActiveCameraKey
return DisplayActiveCameraKey


def SetDisplayActiveCameraKey( value ):
global DisplayActiveCameraKey
DisplayActiveCameraKey = value


def GetToggleDisplaySubmarineCommandsKey():
global ToggleDisplaySubmarineCommandsKey
return ToggleDisplaySubmarineCommandsKey


def SetToggleDisplaySubmarineCommandsKey( value ):
global ToggleDisplaySubmarineCommandsKey
ToggleDisplaySubmarineCommandsKey = value


def GetToggleDisplaySubmarineDelayedCommandsKey():
global ToggleDisplaySubmarineDelayedCommandsKey
return ToggleDisplaySubmarineDelayedCommandsKey


def SetToggleDisplaySubmarineDelayedCommandsKey( value ):
global ToggleDisplaySubmarineDelayedCommandsKey
ToggleDisplaySubmarineDelayedCommandsKey = value


################################################## ################################################## ################################
import clr
clr.AddReference( "System" )
from System import String, Text, Array
from System.IO import Directory, File, FileMode, FileStream, StreamReader, BinaryReader, BinaryWriter, FileAccess, SeekOrigin
from System.Text import Encoding
from System.Collections.Generic import Dictionary, List
#clr.AddReference( "System.Windows.Forms" )
#from System.Windows.Forms import DialogResult, FolderBrowserDialog
from game import Game
from menu import Menu

from TheDarkWraithAutomation import TheDarkWraithAutomation
TheDarkWraithAutomation.MakeSureIsLoaded( MenuPageWrapper.InitializeScript.Now )
from TheDarkWraithAutomation import TDWAutomation


################################################## ################################################## ####
def InitializeScript():
#ScriptManagerManaged.ShowPythonError( "InitializeScript" )
SetShipMastHeights()
global Automation
Automation = TDWAutomation()

#GetCrewDialogLinesFromFiles()
TDWUO_InitializeVariables()


################################################## ################################################## ####
def StartGame():
#ScriptManagerManaged.ShowPythonError( "StartGame" )
global TDCIsOn
TDCIsOn = Game.GetGameplaySettings( GameWrapper.GameplaySettingsEntries.ManualTargetin gSystem )


################################################## ################################################## ####
def TDWUO_InitializeVariables():
#ScriptManagerManaged.ShowPythonError( "TDWUO_InitializeVariables" )
global DamageControlTeamActive
DamageControlTeamActive = False
global SnorkelEnabled
SnorkelEnabled = False
global FollowSelectedTargetWithCamera
FollowSelectedTargetWithCamera = False
global SilentRunning
SilentRunning = False
global SnorkelRaised
SnorkelRaised = False
global BattlestationsActivated
BattlestationsActivated = False
global ShowNavMapTDC
ShowNavMapTDC = False
global IgnoreNewLogMessages
IgnoreNewLogMessages = True
global RealisticTorpFiringInProgress
RealisticTorpFiringInProgress = False
#global ShipsJournal
#ShipsJournal = []
#global ShipsJournalTitle
#ShipsJournalTitle = ""
global SelectedTorpTubes
SelectedTorpTubes = [ 0 ]
global SH5EHeadingRudderDialVisible
SH5EHeadingRudderDialVisible = False
global TorpDoorsStatus
TorpDoorsStatus = [ False, False, False, False, False, False ]
global TorpDoorsEnabled
TorpDoorsEnabled = [ True, True, True, True, True, True ]
global CurrentlySelectedTube
CurrentlySelectedTube = 0
global InSalvoMode
InSalvoMode = False

global CrewOnDeckMode
global WatchCrewMode
CrewOnDeckMode = WatchCrewMode
global DGunFireMode
global DGunFireModeHold
DGunFireMode = DGunFireModeHold
global DGunRangeMode
global DGunRangeModeShort
DGunRangeMode = DGunRangeModeShort
global DGunAimMode
global DGunAimModeWaterline
DGunAimMode = DGunAimModeWaterline
global AAGunFireMode
global AAGunFireModeHold
AAGunFireMode = AAGunFireModeHold
global AAGunRangeMode
global AAGunRangeModeShort
AAGunRangeMode = AAGunRangeModeShort
global AAGunPriorityMode
global AAGunPriorityModeAnyAircraft
AAGunPriorityMode = AAGunPriorityModeAnyAircraft
global AAGunAimMode
global AAGunAimModeAnyTarget
AAGunAimMode = AAGunAimModeAnyTarget

global AutomationIDForTutorial
AutomationIDForTutorial = None

global TutorialToStart
TutorialToStart = None


################################################## ################################################## ####
# handles the automation event for when a script completes
def AutomationEvent( scriptname ):
try:
from PageAutomation import SetActivatedScriptStartStopPause
SetActivatedScriptStartStopPause( scriptname )
except:
pass


################################################## ################################################## ####
def SetShipMastHeights():
global mastheights

# read the registry key for SH5 to get the path to it
from Microsoft.Win32 import Registry
# try 32 bit first
registryRootNode = "HKEY_LOCAL_MACHINE\\Software\\Ubisoft\\Silent Hunter 5\\GameUpdate"
testkey = "installdir"
installpath = Registry.GetValue(registryRootNode, testkey, None)
if installpath == None:
#ScriptManagerManaged.ShowPythonError( "users system is 64bit" )
registryRootNode = "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Ubisof t\\Silent Hunter 5\\GameUpdate"
installpath = Registry.GetValue(registryRootNode, testkey, None)
if installpath == None:
ScriptManagerManaged.ShowPythonError( "Can't find Silent Hunter 5 installation folder in registry.\nUnable to set mast heights for units" )
return
else:
#ScriptManagerManaged.ShowPythonError( "64bit Key found. Value='" + str( installpath ) + "'" )
pass
else:
#ScriptManagerManaged.ShowPythonError( "32bit Key found. Value='" + str( installpath ) + "'" )
pass

# save the install path
if installpath[ len( installpath ) - 1 ] == "\\":
#ScriptManagerManaged.ShowPythonError( "\ found!" )
installpath = installpath[ 0 : len( installpath ) - 1 ]
#ScriptManagerManaged.ShowPythonError( "InstallPath=" + installpath )
SetSH5InstallPath( installpath )

rostersea = List[ Array[ String ] ]()
mastheights = Dictionary[ String, float ]()
# get all the names defined in roster's Sea
namespath = installpath + "\\data\\Roster"
rosterfilename = "\\Names.cfg"

rosterfilepath = namespath + rosterfilename
#ScriptManagerManaged.ShowPythonError( "rosterfilepath=" + rosterfilepath )
fs = None
rosterfile = ""
if File.Exists( rosterfilepath ):
fs = FileStream( rosterfilepath, FileMode.Open )
rosterfile = StreamReader( fs, Encoding.Default )
else:
ScriptManagerManaged.ShowPythonError( rosterfilepath + " doesn't exist!" )
mastheights.Clear()
return
lineread = None
seafound = False
while rosterfile.Peek() >= 0:
lineread = rosterfile.ReadLine()
#ScriptManagerManaged.ShowPythonError( "lineread=" + lineread )
if lineread.StartsWith( "[Sea]" ):
#ScriptManagerManaged.ShowPythonError( "[Sea] found!" )
seafound = True
break

if not seafound:
ScriptManagerManaged.ShowPythonError( installpath + "data\\Sea\\Names.cfg file corrupt. EOF reached" )
rosterfile.Close()
mastheights.Clear()
return

submarinefound = False
while rosterfile.Peek() >= 0:
lineread = rosterfile.ReadLine()
#ScriptManagerManaged.ShowPythonError( "lineread=" + lineread )
if lineread.StartsWith( "[Submarine]" ):
#ScriptManagerManaged.ShowPythonError( "[Submarine] found!" )
submarinefound = True
break
index = lineread.IndexOf( "=" )
if index == -1:
continue
classname = lineread.Substring( 0, index )
name = lineread.Substring( index + 1 )
#ScriptManagerManaged.ShowPythonError( "Name=" + name + "\t\tClass=" + classname )
params = Array[ String ]( ( name, classname ) )
#ScriptManagerManaged.ShowPythonError( "Name=" + params[ 0 ] + "\t\tClass=" + params[ 1 ] )
rostersea.Add( params )

if not submarinefound:
ScriptManagerManaged.ShowPythonError( installpath + "data\\Sea\\Names.cfg file corrupt. EOF reached" )
rosterfile.Close()
mastheights.Clear()
return

rosterfile.Close()
#msg = ""
#for entry in rostersea:
# msg += "Name=" + entry[ 0 ] + "\tClass=" + entry[ 1 ] + "\n"
#ScriptManagerManaged.ShowPythonError( msg )

# get all the folders in \data\Sea
#msg = "Mast Heights:\n\n"
seapath = installpath + "\\data\\Sea"
#ScriptManagerManaged.ShowPythonError( "seapath=" + seapath )
#ScriptManagerManaged.ShowPythonError( str( Directory.GetDirectories( seapath ) ) )
for unit in rostersea:
classesfoundequal = False
for seafolder in Directory.GetDirectories( seapath ):
if seafolder[ len( seafolder ) - 1 ] == "\\":
#ScriptManagerManaged.ShowPythonError( "\ found as last character in seafolder!" )
seafolder = seafolder[ 0 : len( seafolder ) - 1 ]
seafoldername = seafolder[ seafolder.LastIndexOf( "\\" ) + 1 : len( seafolder ) ]
#ScriptManagerManaged.ShowPythonError( "seafoldername=" + seafoldername )
cfgfilepath = seafolder + "\\" + seafoldername + ".cfg"
#ScriptManagerManaged.ShowPythonError( "cfgfilepath=" + cfgfilepath )
if File.Exists( cfgfilepath ):
#ScriptManagerManaged.ShowPythonError( cfgfilepath + " exists! Opening..." )
fs = FileStream( cfgfilepath, FileMode.Open )
cfgfile = StreamReader( fs, Encoding.Default )
while cfgfile.Peek() >= 0:
lineread = cfgfile.ReadLine()
#ScriptManagerManaged.ShowPythonError( "lineread='" + lineread + "'" )
if lineread == None:
#ScriptManagerManaged.ShowPythonError( "Mast height not found! (LR == None)" )
mastheights[ unit[ 0 ] ] = float( 0.0 )
return
elif lineread.StartsWith( "ClassName=" ):
#ScriptManagerManaged.ShowPythonError( "ClassName found!" )
index = lineread.IndexOf( "=" )
name = lineread.Substring( index + 1 )
#ScriptManagerManaged.ShowPythonError( "'" + unit[ 1 ] + "'\t'" + name + "'" )
if unit[ 1 ] == name:
classesfoundequal = True
#ScriptManagerManaged.ShowPythonError( "classnames equal" )
mastheightrecorded = False
while cfgfile.Peek() >= 0:
lineread = cfgfile.ReadLine()
if lineread == None:
return
try:
if lineread.StartsWith( "Mast=" ):
#ScriptManagerManaged.ShowPythonError( "Mast height found!" )
index = lineread.IndexOf( "=" )
value = lineread.Substring( index + 1 )
mastheights[ unit[ 0 ] ] = float( value )
#msg += unit[ 0 ] + " : " + value.ToString() + "\n"
mastheightrecorded = True
break
elif lineread.StartsWith( "ShowInRecognitionManual" ):
#ScriptManagerManaged.ShowPythonError( "Mast height not found!" )
mastheights[ unit[ 0 ] ] = float( 0.0 )
#msg += unit[ 0 ] + " : " + "0.0\n"
mastheightrecorded = True
break
except:
#ScriptManagerManaged.ShowPythonError( "Mast height not found! (Exception)" )
break

if not mastheightrecorded:
#ScriptManagerManaged.ShowPythonError( "Mast height not found! (EOF)" )
mastheights[ unit[ 0 ] ] = float( 90.0 )
#msg += unit[ 0 ] + " : " + "90.0\n"
break
else:
break
elif lineread.startswith( "ShowInRecognitionManual" ):
#ScriptManagerManaged.ShowPythonError( "Mast height not found! (SIRM)" )
mastheights[ unit[ 0 ] ] = float( 0.0 )
#msg += unit[ 0 ] + " : " + "0.0\n"
break
cfgfile.Close()
#ScriptManagerManaged.ShowPythonError( cfgfilepath + " closed" )
if classesfoundequal:
break

#ScriptManagerManaged.ShowPythonError( msg )


################################################## ###################################

# high precision game timer
class GameTimer( object ):
def __init__( self, tclevel, eventtoraise ):
self.timerrunning = False

import clr
clr.AddReference("System")
from System.Diagnostics import Stopwatch

self.timer = Stopwatch()
self.tclevel = float( tclevel )
self.items = []
self.eventtoraise = eventtoraise
#ScriptManagerManaged.ShowPythonError( "New GameTimer created!" )

def Start( self ):
self.timerrunning = True
self.timer.Start()

def Stop( self ):
self.Update()
self.timerrunning = False
self.timer.Stop()

def AddItem( self, ID, SubID, duration, loop, running ):
for item in self.items:
if item.ID == ID and item.SubID == SubID:
ScriptManagerManaged.ShowPythonError( "GameTimer: attempted to add an item (ID " + str( ID ) + ") that already exists!" )
return
newitem = self.TimerObject( ID, SubID, duration, loop, running )
self.Update()
self.items.append( newitem )
#ScriptManagerManaged.ShowPythonError( "Added ID " + str( ID ) + " to high precision timer" )

def RemoveItem( self, ID, SubID ):
itemtoremove = None
for item in self.items:
if item.ID == ID and item.SubID == SubID:
itemtoremove = item
break
if itemtoremove != None:
try:
self.items.remove( itemtoremove )
except:
ScriptManagerManaged.ShowPythonError( "Unable to remove item ID " + str( itemtoremove.ID ) + " from items" )
#pass

def RemoveThenAddItem( self, ID, SubID, duration, loop, running ):
self.RemoveItem( ID, SubID )
self.AddItem( ID, SubID, duration, loop, running )

def RemoveItems( self, items ):
for item in items:
self.RemoveItem( item[ 0 ], item[ 1 ] )

def RemoveAllItems( self ):
self.items = []

def StartItem( self, ID, SubID ):
self.Update()
for item in self.items:
if item.ID == ID and item.SubID == SubID:
item.UpdateRunning( True )
break

def StopItem( self, ID, SubID ):
self.Update()
for item in self.items:
if item.ID == ID and item.SubID == SubID:
item.UpdateRunning( False )
break

def StartAllItems( self ):
self.Update()
for item in self.items:
item.UpdateRunning( True )

def StopAllItems( self ):
self.Update()
for item in self.items:
item.UpdateRunning( False )

def Update( self ):
if self.timerrunning:
self.timer.Stop()
elapsedtime = ( self.timer.ElapsedMilliseconds * self.tclevel ) / 1000.0
self.timer.Reset()
self.timer.Start()
itemIDstodelete = []
eventstoraise = []
for item in self.items:
item.Update( elapsedtime )
if item.finished:
#ScriptManagerManaged.ShowPythonError( "Item ID " + str( item.ID ) + " finished!" )
if item.loop:
item.finished = False
else:
itemIDstodelete.append( [ item.ID, item.SubID ] )
eventstoraise.append( [ item.ID, item.SubID, item.elapsedtime ] )
for ID in itemIDstodelete:
#ScriptManagerManaged.ShowPythonError( "Removing item ID " + str( ID ) )
self.RemoveItem( ID[ 0 ], ID[ 1 ] )
for ID in eventstoraise:
self.eventtoraise( ID[ 0 ], ID[ 1 ], ID[ 2 ] )

def Reset( self ):
self.timerrunning = False
self.timer.Stop()
self.timer.Reset()

def GetTCLevel( self ):
return self.tclevel

def UpdateTCLevel( self, tclevel ):
#ScriptManagerManaged.ShowPythonError( "class GameTimer.UpdateTCLevel: new TC level is " + str( tclevel ) )
self.Update()
self.tclevel = float( tclevel )

def Destroy( self ):
self.timerrunning = False
self.items = []
self.eventtoraise = None
self.timer.Stop()
self.timer = None



class TimerObject( object ):
def __init__( self, ID, SubID, duration, loop, running ):
self.elapsedtime = 0.0
self.finished = False
self.ID = ID
self.SubID = SubID
self.duration = duration
self.loop = loop
self.running = running
#ScriptManagerManaged.ShowPythonError( "New TimerObject (ID " + str( ID ) + ") created!" )

def Update( self, elapsedtime ):
if self.running:
self.elapsedtime += elapsedtime
#ScriptManagerManaged.ShowPythonError( "ElapsedTime=" + str( self.elapsedtime ) + "\tDuration=" + str( self.duration ) )
if self.elapsedtime >= self.duration:
self.finished = True
#if self.loop:
# #ScriptManagerManaged.ShowPythonError( "ID " + str( self.ID ) + " looping!" )
# pass
#else:
# #ScriptManagerManaged.ShowPythonError( "ID " + str( self.ID ) + " finished! Total elapsed time=" + str( self.elapsedtime ) )
# pass

def UpdateRunning( self, running ):
self.running = running


################################################## ################################################## ####

# holds all the user's draggable items for a Page
class PageDraggableItems( object ):
draggablesfilebase = "_Draggables.TDW"

def __init__( self, page ):
self.items = []
self.page = page
self.draggablespath = GetSH5InstallPath() + "\\" + self.page + PageDraggableItems.draggablesfilebase
#ScriptManagerManaged.ShowPythonError( self.page + "'s draggables path=" + self.draggablespath )

if not File.Exists( self.draggablespath ):
try:
fs = FileStream( self.draggablespath, FileMode.CreateNew )
fs.Close()
#ScriptManagerManaged.ShowPythonError( self.draggablespath + " created!" )
except:
ScriptManagerManaged.ShowPythonError( "Unable to create file " + self.draggablespath )

def AddDraggable( self, mi, name, isdraggable ):
self.VerifyMI( mi )

for di in self.items:
if di.MenuItem == mi:
ScriptManagerManaged.ShowPythonError( name + " has already been added!" )
return
c = self.UserDraggableItem( [ mi, name, isdraggable ] )
self.items.append( c )

def AddDraggableItem( self, newdi ):
try:
if type(newdi).__name__ != "UserDraggableItem":
raise TypeError, "Attempted to add non UserDraggableItem!"
except:
raise TypeError, "Attempted to add non UserDraggableItem!"

for di in self.items:
if di.MenuItem == newdi.MenuItem:
ScriptManagerManaged.ShowPythonError( "UserDraggableItem: " + str( newdi.MenuItem ) + " has already been added!" )
return
self.items.append( newdi )

def DisplayDraggable( self, mi ):
self.VerifyMI( mi )

if len( self.items ) > 0:
for item in self.items:
if item.MenuItem == mi:
ScriptManagerManaged.ShowPythonError( item.Display() )
break
else:
ScriptManagerManaged.ShowPythonError( self.page + " has no draggable items thus it cannot display " + mi.Name )

def DisplayAllDraggables( self ):
msg = "Current draggable items:\n"
if len( self.items ) > 0:
for item in self.items:
msg += item.Display() + "\n"
else:
msg += "None"
ScriptManagerManaged.ShowPythonError( msg )

def SetDraggablePosition( self, mi, arx, ary, drx, dry, offsetx, offsety ):
self.VerifyMI( mi )
for item in self.items:
if item.MenuItem == mi:
item.SetPosition( arx, ary, drx, dry, offsetx, offsety )
break

def StoreAllDraggables( self ):
if len( self.items ) > 0:
for di in self.items:
di.StorePosition()
else:
ScriptManagerManaged.ShowPythonError( self.page + " has no draggable items to store!" )

def RestoreAllDraggables( self ):
if len( self.items ) > 0:
for di in self.items:
di.RestorePosition()
#ScriptManagerManaged.ShowPythonError( self.page + "'s draggables restored!" )
return 1
else:
ScriptManagerManaged.ShowPythonError( self.page + " has no draggable items to restore!" )
return 0

def GetAndSetDraggableItems( self, dis ):
fs = None
if File.Exists( self.draggablespath ):
try:
fs = FileStream( self.draggablespath, FileMode.Open )
except:
self.items = []
ScriptManagerManaged.ShowPythonError( "Unable to open and read " + self.draggablespath )
return
else:
ScriptManagerManaged.ShowPythonError( "GetDraggableItems: " + self.draggablespath + " doesn't exist!" )
self.items = []
return

draggablesset = []

br = BinaryReader( fs )

try:
while True:
name = br.ReadString()
arx = br.ReadSingle()
ary = br.ReadSingle()
drx = br.ReadSingle()
dry = br.ReadSingle()
offsetx = br.ReadSingle()
offsety = br.ReadSingle()

for di in dis:
if di[ 1 ] == name:
draggablesset.append( di[ 1 ] )
newdi = self.UserDraggableItem( di )
newdi.SetPosition( arx, ary, drx, dry, offsetx, offsety )
self.AddDraggableItem( newdi )
break
except EOFError:
pass

except:
br.Close()
ScriptManagerManaged.ShowPythonError( "Error reading draggable items from " + self.draggablespath + ". Reinitializing" )
self.InitializeDraggableItems( dis )
return

br.Close()

if len( self.items ) < 1:
self.InitializeDraggableItems( dis )
return

if len( draggablesset ) != len( dis ):
for di in dis:
onefound = False
for ds in draggablesset:
if di[ 1 ] == ds:
onefound = True
break
if not onefound:
newdi = self.UserDraggableItem( di )
self.AddDraggableItem( newdi )


def SaveDraggableItems( self ):
if len( self.items ) == 0:
ScriptManagerManaged.ShowPythonError( self.page + " has no draggable items!" )
return

fs = None
if File.Exists( self.draggablespath ):
try:
sf = File.Open( self.draggablespath, FileMode.Create, FileAccess.Write )
except:
ScriptManagerManaged.ShowPythonError( "Unable to save " + self.page + "'s draggable items to " + self.draggablespath )
return
else:
ScriptManagerManaged.ShowPythonError( "SaveDraggableItems: " + self.draggablespath + " doesn't exist!" )
return

bw = BinaryWriter( sf )

try:
for di in self.items:
if di.isdraggable:
di.StorePosition()

bw.Write( di.name )
bw.Write( di.arx )
bw.Write( di.ary )
bw.Write( di.drx )
bw.Write( di.dry )
bw.Write( di.offsetx )
bw.Write( di.offsety )
except:
bw.Close()
ScriptManagerManaged.ShowPythonError( "Unable to save draggable items for page " + self.page )
return

bw.Flush()
bw.Close()

#ScriptManagerManaged.ShowPythonError( self.page + "'s draggables saved successfully to " + self.draggablespath )


def InitializeDraggableItems( self, dis ):
for di in dis:
self.AddDraggableItem( self.UserDraggableItem( di ) )
self.SaveDraggableItems()
#ScriptManagerManaged.ShowPythonError( self.page + "'s draggable items initialized!" )

def VerifyMI( self, mi ):
try:
if not mi.IsKindOf( ControlGroupWrapper ):
raise TypeError, "VerifyMI: " + str( mi ) + " is not a ControlGroupWrapper"
except:
raise TypeError, "VerifyMI exception: " + str( mi ) + " is not a ControlGroupWrapper"

def Destroy( self ):
self.items = None



# for storing the locations of the user's draggable items so that they can be restored
class UserDraggableItem( object ):
def __init__( self, di ):
self.arx = 0
self.ary = 0
self.drx = 0
self.dry = 0
self.offsetx = 0
self.offsety = 0
self.MenuItem = None
self.name = None
self.isdraggable = True

try:
#ScriptManagerManaged.ShowPythonError( str( di ) )
if not di[ 0 ].IsKindOf( ControlGroupWrapper ):
raise TypeError, "UserDraggableItem.__init__: " + di[ 1 ] + " is not a ControlGroupWrapper"
except:
raise TypeError, "UserDraggableItem.__init__ exception: " + di[ 1 ] + " is not a ControlGroupWrapper"

self.MenuItem = di[ 0 ]
self.name = di[ 1 ]
self.StorePosition()
self.isdraggable = di[ 2 ]

def SetPosition( self, arx, ary, drx, dry, offsetx, offsety ):
self.arx = arx
self.ary = ary
self.drx = drx
self.dry = dry
self.offsetx = offsetx
self.offsety = offsety

if self.isdraggable:
self.MenuItem.SnapFromAnchor.AnchorRelativeX = arx
self.MenuItem.SnapFromAnchor.AnchorRelativeY = ary
self.MenuItem.SnapFromAnchor.DependentRelativeX = drx
self.MenuItem.SnapFromAnchor.DependentRelativeY = dry
self.MenuItem.SnapFromAnchor.OffsetX = offsetx
self.MenuItem.SnapFromAnchor.OffsetY = offsety
self.MenuItem.SnapFromAnchor.SetDependentPosition( )
self.MenuItem.SnapChildZones()

def StorePosition( self ):
if self.isdraggable:
self.arx = self.MenuItem.SnapFromAnchor.AnchorRelativeX
self.ary = self.MenuItem.SnapFromAnchor.AnchorRelativeY
self.drx = self.MenuItem.SnapFromAnchor.DependentRelativeX
self.dry = self.MenuItem.SnapFromAnchor.DependentRelativeY
self.offsetx = self.MenuItem.SnapFromAnchor.OffsetX
self.offsety = self.MenuItem.SnapFromAnchor.OffsetY

def RestorePosition( self ):
if self.isdraggable:
self.SetPosition( self.arx, self.ary, self.drx, self.dry, self.offsetx, self.offsety )

def SetDraggableState( self, value ):
self.isdraggable = value
self.StorePosition()

def Display( self ):
msg = self.name + ":\n"
msg += "ARX=" + str( self.MenuItem.SnapFromAnchor.AnchorRelativeX ) + "\tARY=" + str( self.MenuItem.SnapFromAnchor.AnchorRelativeY ) + "\n"
msg += "DRX=" + str( self.MenuItem.SnapFromAnchor.DependentRelativeX ) + "\tDRY=" + str( self.MenuItem.SnapFromAnchor.DependentRelativeY ) + "\n"
msg += "OffX=" + str( self.MenuItem.SnapFromAnchor.OffsetX ) + "\toffY=" + str( self.MenuItem.SnapFromAnchor.OffsetY )
return msg


################################################## ################################################## ####
def EndGame():
Automation.StopAllScripts()
#pass


################################################## ################################################## ####
def UnloadScript():
#ScriptManagerManaged.ShowPythonError( "TheDarkWraithUserOptions.UnloadScript" )
global Automation
Automation.Destroy()
Automation = None
#pass


################################################## ################################################## ####
#def GetCrewDialogLinesFromFiles():
# global CrewDialogLines
# dialoglines = []
# #ScriptManagerManaged.ShowPythonError( str( dialoglines.GetType() ) )
# CrewDialogLines = Dictionary[ String, dialoglines.GetType() ]()
#
# root = "strategy RootDialog_"
# adialogfile = "DT_"
# dialoglinestrategies = None
# lineread = ""
# crewname = ""
#
# crewAIFilesPath = GetSH5InstallPath() + "\\data\\Scripts\\AI\\Dialogs_Default"
# #ScriptManagerManaged.ShowPythonError( "crewAIFilesPath=" + crewAIFilesPath )
#
# # get all the files in the crewAIFilesPath folder
# for dialogfilepath in Directory.GetFiles( crewAIFilesPath ):
# #ScriptManagerManaged.ShowPythonError( "dailogfilepath=" + dialogfilepath )
# dialogfilename = dialogfilepath[ dialogfilepath.LastIndexOf( "\\" ) + 1 : len( dialogfilepath ) ]
# if not dialogfilename.StartsWith( adialogfile ):
# continue
# #ScriptManagerManaged.ShowPythonError( "dialogfilename=" + dialogfilename )
# crewname = dialogfilename[ dialogfilename.IndexOf( "_" ) + 1 : dialogfilename.LastIndexOf( "_" ) ]
# #ScriptManagerManaged.ShowPythonError( "crewname=" + crewname )
# fs = FileStream( dialogfilepath, FileMode.Open )
# dialogfile = StreamReader( fs, Encoding.Default )
# found = False
# while dialogfile.Peek() >= 0:
# lineread = dialogfile.ReadLine().Trim()
# if lineread.StartsWith( root ):
# # find the dialog lines
# found = True
# break
# elif lineread.StartsWith( "}" ):
# break
#
# if found:
# value = GetCrewDialogLineStrategies( fs, dialogfile )
# if value != None:
# if len( value ) > 0:
# CrewDialogLines[ crewname ] = value
#
# dialogfile.Close()
#
# TranslateTextNumbers()
#
# # show everything
# keys = CrewDialogLines.Keys
# msg = "Dialog Lines:\n\n"
# for key in keys:
# msg += "\t" + key + ":\n"
# msg += "\t\t" + str( CrewDialogLines[ key ] ) + "\n\n"
# ScriptManagerManaged.ShowPythonError( msg )
#
#
#def GetCrewDialogLineStrategies( fs, dialogfile ):
# dialogline = "DialogLine_"
# found = False
#
# dialoglinestrategies = []
# value = None
#
# while dialogfile.Peek() >= 0:
# lineread = dialogfile.ReadLine().Trim()
# if lineread.StartsWith( dialogline ):
# indexofcomma = lineread.LastIndexOf( "," )
# if indexofcomma > 0:
# lineread = lineread.Remove( indexofcomma )
# dialoglinestrategies.append( lineread )
# found = True
# elif lineread.StartsWith( "}" ):
# break
#
# if found:
# #ScriptManagerManaged.ShowPythonError( "strategies=" + str( dialoglinestrategies ) )
# value = GetCrewDialogLineTextAbility( fs, dialogfile, dialoglinestrategies )
#
# return value
#
#
#def GetCrewDialogLineTextAbility( fs, dialogfile, dialoglinestrategies ):
# #ScriptManagerManaged.ShowPythonError( str( dialoglinestrategies ) )
# dialoglines = []
# for strat in dialoglinestrategies:
# fs.Seek(0, SeekOrigin.Begin)
# dialogtext = ""
# dialogability = ""
# dialogstate = None
# stratinit = "strategy " + strat + "_Init"
# actionfound = False
# while dialogfile.Peek() >= 0:
# lineread = dialogfile.ReadLine().Trim()
# if lineread.StartsWith( stratinit ):
# while dialogfile.Peek() >= 0:
# lineread = dialogfile.ReadLine().Trim()
# if lineread == "action":
# actionfound = True
# while dialogfile.Peek() >= 0:
# lineread = dialogfile.ReadLine().Trim()
# if lineread.StartsWith( "Dialog:AddDialogLine" ):
# dialogtext = lineread[ lineread.IndexOf( '"' ) + 1 : lineread.LastIndexOf( '"' ) ]
# while dialogfile.Peek() >= 0:
# lineread = dialogfile.ReadLine().Trim()
# if lineread.StartsWith( "Dialog:SetAbilityToRun" ):
# dialogability = lineread[ lineread.IndexOf( '"' ) + 1 : lineread.LastIndexOf( '"' ) ]
# elif lineread.StartsWith( "}" ):
# break
# elif lineread.StartsWith( "}" ):
# break
#
# elif lineread == "precond":
# while dialogfile.Peek() >= 0:
# lineread = dialogfile.ReadLine().Trim()
# if lineread.StartsWith( "Dialog:" ):
# io = lineread.IndexOf( "Dialog:IsAbilityActive" )
# if io > 0:
# ioe = lineread.IndexOf( "==", io ) + 2
# dialogstate = int( lineread[ ioe : ioe + 2 ].Trim() )
# break
# elif lineread.StartsWith( "}" ):
# break
#
# elif lineread.StartsWith( "}" ) and actionfound:
# break
#
# if dialogtext != "" and dialogability != "":
# dialoglines.append( [ dialogtext, dialogability, dialogstate ] )
# break
#
# if len( dialoglines ) > 0:
# return dialoglines
# else:
# return None
#
#
#def TranslateTextNumbers():
# global CrewDialogLines
#
# textnumberfilepath = GetSH5InstallPath() + "\\data\\UPCDataGE\\UPCLocalization\\dialogs.t sr"
# fs = FileStream( textnumberfilepath, FileMode.Open )
# textfile = StreamReader( fs, Encoding.Default )
#
# for key in CrewDialogLines.Keys:
# numbers = CrewDialogLines[ key ]
# #ScriptManagerManaged.ShowPythonError( "numbers=" + str( numbers ) )
# for index in range( 0, len( numbers ) ):
# fs.Seek(0, SeekOrigin.Begin)
# while textfile.Peek() >= 0:
# lineread = textfile.ReadLine().Trim()
# if lineread.StartsWith( numbers[ index ][ 0 ] ):
# ioe = lineread.IndexOf( "=" ) + 1
# txt = lineread.Remove( 0, ioe )
# numbers[ index ][ 0 ] = txt
# break
#
# textfile.Close()
#
#
################################################## ################################################## ####
#class UserSelectFolder( object ):
# desc = "Unable to determine the install directory for Silent Hunter 5 from registry. Please select the main Silent Hunter 5 folder"
# selectedpath = ""
#
# def __init__( self ):
# self.folderBrowserDialog = FolderBrowserDialog()
# self.folderBrowserDialog.ShowNewFolderButton = False
# self.folderBrowserDialog.Description = self.desc
#
# def execute( self ):
# fbd = self.folderBrowserDialog
# if fbd.ShowDialog() == DialogResult.OK:
# self.selectedpath = self.folderBrowserDialog.SelectedPath
#
#
#def GetInstallPathFromUser():
# installpath = UserSelectFolder()
# installpath.execute()
# selpath = installpath.selectedpath
# ScriptManagerManaged.ShowPythonError( "Selected folder=" + selpath )
# installpath.Destroy()
# return selpath
__________________
My System Specs
niwo is offline   Reply With Quote
Old 09-01-14, 01:04 PM   #1594
wastelandwonder
Bilge Rat
 
Join Date: Aug 2014
Posts: 1
Downloads: 12
Uploads: 0
Default a good TDC

Does anyone know of a TDC mod that places a 360 degree around your sun for plotting course on sound contact ?i found one for sh4 that is amazing best TDC so far. This one looks amazing, thank the gods for the mod community
wastelandwonder is offline   Reply With Quote
Old 09-01-14, 01:24 PM   #1595
Aktungbby
Gefallen Engel U-666
 
Aktungbby's Avatar
 
Join Date: Jul 2013
Location: On a tilted, overheated, overpopulated spinning mudball on Collision course with Andromeda Galaxy
Posts: 27,918
Downloads: 22
Uploads: 0


Default Welcome Aboard


wasteandwonder!
__________________

"Only two things are infinite; The Universe and human squirrelyness; and I'm not too sure about the Universe"
Aktungbby is offline   Reply With Quote
Old 09-01-14, 03:40 PM   #1596
Jimbuna
Chief of the Boat
 
Jimbuna's Avatar
 
Join Date: Feb 2006
Location: 250 metres below the surface
Posts: 181,344
Downloads: 63
Uploads: 13


Default

Quote:
Originally Posted by wastelandwonder View Post
Does anyone know of a TDC mod that places a 360 degree around your sun for plotting course on sound contact ?i found one for sh4 that is amazing best TDC so far. This one looks amazing, thank the gods for the mod community
I'm unaware of one but welcome to SubSim
__________________
Wise men speak because they have something to say; Fools because they have to say something.
Oh my God, not again!!


GWX3.0 Download Page - Donation/instant access to GWX (Help SubSim)
Jimbuna is offline   Reply With Quote
Old 09-02-14, 08:19 AM   #1597
niwo
A-ganger
 
Join Date: Aug 2009
Location: 51° 31′ N, 7° 28′ E
Posts: 76
Downloads: 158
Uploads: 0
Default

Is there a way to save the Layout? (I have the Menu pinned so that it is not autohiding) I have to click a lot everytime i load a game.
__________________
My System Specs
niwo is offline   Reply With Quote
Old 09-02-14, 10:18 AM   #1598
DrJones
Samurai Navy
 
Join Date: Jun 2009
Location: Germany, 50 Kilometers away from Kiel
Posts: 576
Downloads: 341
Uploads: 0
Default

Quote:
Originally Posted by niwo View Post
Is there a way to save the Layout? (I have the Menu pinned so that it is not autohiding) I have to click a lot everytime i load a game.
Hey mate,

that is still a very good idea....i still thougt about a feature to save the choosen ingame Options and Buttons...

That will be resolved in the next fix....

still Need some more time...

Best Regards

DrJones
DrJones is offline   Reply With Quote
Old 09-03-14, 04:57 AM   #1599
Silent Steel
Sea Lord
 
Join Date: Jun 2008
Location: Noch dabei
Posts: 1,732
Downloads: 618
Uploads: 0
Default

Take your time, mate. No need to rush.
Silent Steel is offline   Reply With Quote
Old 09-12-14, 05:30 PM   #1600
Choum
Sparky
 
Join Date: Aug 2012
Posts: 157
Downloads: 343
Uploads: 3
Default

Great ui !

There's a small sound/text bug when you click on one of the torpedo tube selection (with the popup windows located on the top left), If you click on tube 1 for example, you will have a random text and sound like "closing Tube X" where X is never the good tube number you click on.

I'm not sure if I am clear enough.
Choum is offline   Reply With Quote
Old 09-14-14, 04:09 AM   #1601
DrJones
Samurai Navy
 
Join Date: Jun 2009
Location: Germany, 50 Kilometers away from Kiel
Posts: 576
Downloads: 341
Uploads: 0
Default

Quote:
Originally Posted by Choum View Post
Great ui !

There's a small sound/text bug when you click on one of the torpedo tube selection (with the popup windows located on the top left), If you click on tube 1 for example, you will have a random text and sound like "closing Tube X" where X is never the good tube number you click on.

I'm not sure if I am clear enough.
Hey Mate...

Hmmm will have a look at it...

Best Regards

DrJones
DrJones is offline   Reply With Quote
Old 09-16-14, 07:16 AM   #1602
moha14881
Loader
 
Join Date: May 2014
Posts: 85
Downloads: 264
Uploads: 0
Default AOB reset

Hi,
I found after using the stadimeter that my AOB is reset!!!
Anyway to circumvent this problem!!!
moha14881 is offline   Reply With Quote
Old 09-16-14, 03:31 PM   #1603
Silent Steel
Sea Lord
 
Join Date: Jun 2008
Location: Noch dabei
Posts: 1,732
Downloads: 618
Uploads: 0
Default

Quote:
Originally Posted by moha14881 View Post
Hi,
I found after using the stadimeter that my AOB is reset!!!
Anyway to circumvent this problem!!!

Let me think a bit...
Silent Steel is offline   Reply With Quote
Old 09-16-14, 11:59 PM   #1604
niwo
A-ganger
 
Join Date: Aug 2009
Location: 51° 31′ N, 7° 28′ E
Posts: 76
Downloads: 158
Uploads: 0
Default

I know the problem, there was a fix for that. I think it was fixed with the generic file patcher, but correct me if i am wrong
__________________
My System Specs
niwo is offline   Reply With Quote
Old 09-17-14, 02:31 AM   #1605
moha14881
Loader
 
Join Date: May 2014
Posts: 85
Downloads: 264
Uploads: 0
Default

Quote:
Originally Posted by niwo View Post
I know the problem, there was a fix for that. I think it was fixed with the generic file patcher, but correct me if i am wrong
Fascinating, where can I find it??? It's not the dark wraith's I hope!!
moha14881 is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:32 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.