Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Edited by TheDarkWraith for NewUIs_TDC_4_2_0
- # Edited on 8/30/2010 @ 1900
- #
- # 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 = SH5Enhanced
- #+++++++++++++ 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 = True
- # Above this specified TC level the clock will be visible (levels are in powers of 2)
- AboveThisTCLevelShowClock = 1024
- # 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 = True
- # does the game start with Advanced HUD enabled?
- AdvancedHudIsEnabled = True
- # 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 = shift required
- #
- # if you wanted to enable this without shift required:
- # MostFuelEfficientSpeedHotKey = [ True, MenuKeyManagerWrapper.Keys.M, False ]
- #
- # if you wanted to disable this:
- # MostFuelEfficientSpeedHotKey = [ False, MenuKeyManagerWrapper.Keys.M, 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 = [ True, MenuKeyManagerWrapper.Keys.Y, False ] # change the M to whatever you want. You can't use M!
- #################################### 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 = TDCSpreadAngle
- ObsTDCMode = TDCSpreadAngle
- UZOTDCMode = TDCSpreadAngle
- # RAOBF enabled for each scope?
- # change below to either True or False
- AttackRAOBFEnabled = False
- ObsRAOBFEnabled = False
- UZORAOBFEnabled = 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
- #################################### 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 = 200
- # default is 200
- BaseZoomSpeed = 200
- # default is 200
- BaseZoomHeading = 200
- # default is 200
- BaseZoomRudder = 200
- # default is 200
- BaseZoomDepth260 = 200
- # default is 200
- BaseZoomDepth25 = 200
- #++++++++++++++ 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 = False
- # 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 = True
- # when surfacing does the game automatically order recharge mode?
- # change below to either True or False
- AutomaticallyOrderRechargeModeUponSurfacing = False
- # 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 = True
- # when leaving the obs scope station does the scope automatically fully lower?
- # change below to either True or False
- AutomaticallyFullyLowerObsScope = True
- # 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 = shift required
- #
- # if you wanted to enable this without shift required:
- # AutomationHotKey = [ True, MenuKeyManagerWrapper.Keys.U, False ]
- #
- # if you wanted to disable this:
- # AutomationHotKey = [ False, MenuKeyManagerWrapper.Keys.U, False ]
- #
- AutomationHotKey = [ True, MenuKeyManagerWrapper.Keys.G, True ] # 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
- ################################### Tutorials ########################################################
- # still a WIP - not complete
- # Is Tutorial debugging Enabled?
- #TutorialDebuggingEnabled = False
- ################################### 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 = 180.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 = 180.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 = enabled
- # None = key used
- #
- # if you wanted to enable this:
- # NomographVisibleOnMiniMapHotKey = [ True, MenuKeyManagerWrapper.Keys.N ]
- #
- # if you wanted to disable this:
- # NomographVisibleOnMiniMapHotKey = [ False, MenuKeyManagerWrapper.Keys.N ]
- #
- NomographVisibleOnMiniMapHotKey = [ True, MenuKeyManagerWrapper.Keys.N ] # change the N to whatever you want
- # is the Nomograph visible on the mini-map at game start?
- # change below to either True or False
- NomographVisibleOnMiniMap = False
- ##################################### Heading Bar/Heading/Rudder Dial (SH5 Mode) #####################
- # the hotkey used to display the heading/rudder dial
- # Format:
- #
- # HeadingRudderKey = [ False, None ]
- # False = enabled
- # None = key used
- #
- # if you wanted to enable this:
- # HeadingRudderKey = [ True, MenuKeyManagerWrapper.Keys.C ]
- #
- # if you wanted to disable this:
- # HeadingRudderKey = [ False, MenuKeyManagerWrapper.Keys.C ]
- #
- 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 = enabled
- # None = key used
- # False = shift key required
- #
- # so if you wanted the teleport to obs scope hot key to be shift + C:
- # CrashDiveKey = [ True, MenuKeyManagerWrapper.Keys.P, True ]
- #
- # if you didn't want to assign a hotkey for teleport to obs scope:
- # CrashDiveKey = [ False, MenuKeyManagerWrapper.Keys.P, False ]
- CrashDiveKey = [ True, MenuKeyManagerWrapper.Keys.X, 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 = 20
- ##################################### 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 = enabled
- # None = key used
- #
- # if you wanted to enable this:
- # FollowSelectedTargetHotKey = [ True, MenuKeyManagerWrapper.Keys.X ]
- #
- # if you wanted to disable this:
- # FollowSelectedTargetHotKey = [ False, MenuKeyManagerWrapper.Keys.X ]
- #
- FollowSelectedTargetHotKey = [ False, 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 = 3 # stock is 2
- # minimum value for below is 1
- MessageBoxHeightFactor = 5.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 = False
- # this will cause the message box to start in widened mode (horizontally) when the game starts
- # change below to either True or False
- MessageBoxStartsWidened = True
- # 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 = enabled
- # None = key used
- #
- # if you wanted to enable this:
- # DisplayTheMessageBoxHotKey = [ True, MenuKeyManagerWrapper.Keys.L ]
- #
- # if you wanted to disable this:
- # DisplayTheMessageBoxHotKey = [ False, MenuKeyManagerWrapper.Keys.L ]
- #
- 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 = 128
- # 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 = 200
- # 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 = True
- # 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,9207,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
- ##################################### Ships Journal ##################################################
- # the title of the ship's journal
- ShipsJournalTitle = "U1618 Abd von Mumit"
- # 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 = 1
- ##################################### 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 = False # stock True
- # shows the highlighted sonar sensor region extending from the contact (red shading)
- TAISonarEnabled = False # stock True
- # shows the highlighted visual sensor region extending from the contact (dark-grey/black shading)
- TAIVisualEnabled = False # stock True
- # ??
- TAIRadarEnabled = False # stock True
- # ??
- TAIMaximumSensorRangesEnabled = False # stock False
- # shows the torpedo solution line
- TAITorpedoSolutionEnabled = False # 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 = False # stock False
- # causes CTD - DO NOT ENABLE!
- TAIKGridEnabled = False # stock False - DO NOT ENABLE AS CAUSES CTD!!
- # ??
- TAIRadarContactsEnabled = False # stock True
- # shows visual contacts in the map
- TAIVisualContactsEnabled = False # stock True
- # shows the hydrophone contact lines to the contacts
- TAIHydrophoneContactsEnabled = False # stock True
- # ??
- TAISonarContactsEnabled = False # stock True
- # ??
- TAIViewConesEnabled = False # stock False
- # ??
- TAIMacroObjectivesEnabled = False # 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 = False # 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 = False # stock False
- TAIInterceptCourseButtonEnabled = False # 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 = False
- # 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 = TAIModeTAI
- # 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 = False
- # 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 = False # stock True
- # shows the highlighted sonar sensor region extending from the contact (red shading)
- NavSonarEnabled = False # stock True
- # shows the highlighted visual sensor region extending from the contact (dark-grey/black shading)
- NavVisualEnabled = False # stock True
- # ??
- NavRadarEnabled = False # 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 = True # 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 = False # stock True
- # shows visual contacts in the map
- NavVisualContactsEnabled = False # stock True
- # shows the hydrophone contact lines to the contacts
- NavHydrophoneContactsEnabled = False # stock True
- # ??
- NavSonarContactsEnabled = False # 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 = False # 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
- ##################################### 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 = True
- # 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 = True
- ##################################### 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 = True
- ################################### 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
- # 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 = False
- # 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 = False
- ##################################### 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 = False
- ###################################### Teleporting ##############################################
- # the hotkeys assigned to the teleport commands
- #
- # Format:
- #
- # TeleportToObsScope = [ False, None, False ]
- # False = enabled
- # None = key used
- # False = shift key required
- #
- # so if you wanted the teleport to obs scope hot key to be shift + T:
- # TeleportToObsScope = [ True, MenuKeyManagerWrapper.Keys.T, True ]
- #
- # if you didn't want to assign a hotkey for teleport to obs scope:
- # TeleportToObsScope = [ False, MenuKeyManagerWrapper.Keys.T, 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 = enabled
- # None = key used
- # False = shift key required
- #
- # so if you wanted the teleport to obs scope hot key to be shift + T:
- # DisplayTeleportingOrderBarKey = [ True, MenuKeyManagerWrapper.Keys.T, True ]
- #
- # if you didn't want to assign a hotkey for teleport to obs scope:
- # DisplayTeleportingOrderBarKey = [ False, MenuKeyManagerWrapper.Keys.T, False ]
- #
- DisplayTeleportingOrderBarKey = [ False, MenuKeyManagerWrapper.Keys.N, 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 = MMDDYYMilitaryTimeFormat
- ################################### 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 = True
- # 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 = 500
- # 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 = 500
- ##################################### others MODs ###############################################
- # emtguf's periscope rework enabled (adds support for his mod)
- # change below to either True or False
- emtgufPeriscopeReworkEnabled = False
- #+-------------------------------------- ottos chalkboard --------------------------------------
- # the hotkey used to bring up ottos chalkboard
- # Format:
- #
- # ShowChalkBoardHotKey = [ False, None, False ]
- # False = enabled
- # None = key used
- # False = shift key required
- #
- # so if you wanted to show the chalkboard and hot key to be shift + B:
- # ShowChalkBoardHotKey = [ True, MenuKeyManagerWrapper.Keys.B, True ]
- #
- # if you didn't want to assign a hotkey for ottos chalkboard:
- # ShowChalkBoardHotKey = [ False, MenuKeyManagerWrapper.Keys.B, False ]
- #
- ShowChalkBoardHotKey = [ True, MenuKeyManagerWrapper.Keys.T, True ]
- # the hotkey used to increase the chalkboard count
- # Format:
- #
- # IncreaseChalkBoardCountHotKey = [ False, None, False ]
- # False = enabled
- # None = key used
- # False = shift key required
- #
- # so if you wanted the increase chalkboard count hot key to be shift + I:
- # IncreaseChalkBoardCountHotKey = [ True, MenuKeyManagerWrapper.Keys.I, True ]
- #
- # if you didn't want to assign a hotkey for ottos chalkboard:
- # IncreaseChalkBoardCountHotKey = [ False, MenuKeyManagerWrapper.Keys.I, False ]
- #
- IncreaseChalkBoardCountHotKey = [ True, MenuKeyManagerWrapper.Keys.T, 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 = [ "Grzegorz Brzeczyszczykiewicz", "Chrzaszczyrzewoszyce", "Powiat Lekolody" ]
- ######################################## 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!
- 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
- ShipsJournalPath = "Logs\\"
- MagicString = "TheDarkWraithSH5"
- 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
- Tutorial = 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 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 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 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 GetShowLockBreakLock():
- global ShowLockBreakLock
- return ShowLockBreakLock
- def SetShowLockBreakLock( value ):
- global ShowLockBreakLock
- ShowLockBreakLock = 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 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 GetShipsJournalPath():
- global ShipsJournalPath
- global SH5InstallPath
- path = SH5InstallPath + ShipsJournalPath
- 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 GetMessageBoxIsDraggable():
- global MessageBoxIsDraggable
- return MessageBoxIsDraggable
- def GetHideTDCDialsWhenUsingRAOBF():
- global HideTDCDialsWhenUsingRAOBF
- return HideTDCDialsWhenUsingRAOBF
- 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 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 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 GetMostFuelEfficientSpeedHotKey():
- global MostFuelEfficientSpeedHotKey
- return MostFuelEfficientSpeedHotKey
- def GetAutomationActionMessagesDisplayed():
- global AutomationActionMessagesDisplayed
- return AutomationActionMessagesDisplayed
- #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()
- #global Tutorial
- #Tutorial = TDWTutorial( "TheDarkWraithUserOptions" )
- #GetCrewDialogLinesFromFiles()
- TDWUO_InitializeVariables()
- ########################################################################################################
- def StartGame():
- #ScriptManagerManaged.ShowPythonError( "StartGame" )
- global TDCIsOn
- TDCIsOn = Game.GetGameplaySettings( GameWrapper.GameplaySettingsEntries.ManualTargetingSystem )
- ########################################################################################################
- def TDWUO_InitializeVariables():
- #ScriptManagerManaged.ShowPythonError( "TDWUO_InitializeVariables" )
- 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 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
- ########################################################################################################
- # 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\\Ubisoft\\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
- 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:
- 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 )
- 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 di[ 1 ] == "" or di[ 2 ] != True or di[ 2 ] != False:
- # raise TypeError, "UserDraggableItem.__init__: Incorrect value(s) passed for UserDraggableItem"
- if not di[ 0 ].IsKindOf( ControlGroupWrapper ):
- raise TypeError, "UserDraggableItem.__init__: " + di[ 1 ] + " is not a ControlGroupWrapper"
- #pass
- 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
- ########################################################################################################
- # the tutorial class
- class TDWTutorial( object ):
- def __init__( self, page ):
- self.Tutorials = Dictionary[ String, TDWTutorial.TutorialInFile ]()
- self.Categories = Dictionary[ String, list ]()
- self.page = page
- self.initsuccess = False
- # open the tutorial files and read in the contents
- installpath = GetSH5InstallPath()
- tutfolder = installpath + "\\data\\Tutorials"
- if not Directory.Exists( tutfolder ):
- ScriptManagerManaged.ShowPythonError( "class TDWTutorial.__init__: folder " + tutfolder + " doesn't exist" )
- self.Tutorials.Clear()
- self.Categories.Clear()
- else:
- tutfiles = Directory.GetFiles( tutfolder, page + "_*.SHT" )
- lineread = None
- newtut = ""
- fs = None
- tutfile = None
- for tf in tutfiles:
- #ScriptManagerManaged.ShowPythonError( tf )
- try:
- fs = FileStream( tf, FileMode.Open )
- tutfile = StreamReader( fs )
- #ScriptManagerManaged.ShowPythonError( "class TDWTutorial.__init__: tutorial file successfully opened" )
- while tutfile.Peek() >= 0:
- args = self.GetTutorial( tutfile )
- if args != False:
- # check for duplicate names (not allowed!)
- duplicatefound = False
- if self.Tutorials.Count > 0:
- for tt in self.Tutorials.Keys:
- if self.Tutorials[ as ].GetName() == args[ 0 ]:
- ScriptManagerManaged.ShowPythonError( "class TDWTutorial.__init__: duplicate tutorial name found!" )
- self.Tutorials.Clear()
- duplicatefound = True
- break
- if duplicatefound:
- break
- if len( args[ 2 ] ) > 0:
- if not self.Categories.ContainsKey( args[ 1 ] ):
- #ScriptManagerManaged.ShowPythonError( "class TDWTutorial.__init__: adding new category " + args[ 1 ] )
- self.Categories[ args[ 1 ] ] = []
- self.Categories[ args[ 1 ] ].append( args[ 0 ] )
- self.Tutorials.Add( args[ 0 ], self.TutorialInFile( args[ 0 ], args[ 1 ], args[ 2 ] ) )
- except:
- ScriptManagerManaged.ShowPythonError( "class TDWTutorial.__init__: Exception! Current file in use: " + tf )
- self.Tutorials.Clear()
- # close the file as we are done with it
- if tutfile != None:
- tutfile.Close()
- #ScriptManagerManaged.ShowPythonError( "class TDWTutorial.__init__: tutorial file successfully closed" )
- # display to user for debugging
- global TutorialDebuggingEnabled
- if TutorialDebuggingEnabled:
- #ScriptManagerManaged.ShowPythonError( "Number of tutorials=" + str( self.Tutorials.Count ) )
- msg = "Listing of all tutorials contained in the files:\n\n"
- if self.Tutorials.Count > 0:
- for ts in self.Tutorials.Keys:
- msg += self.Tutorials[ ts ].Display() + "\n\n"
- ScriptManagerManaged.ShowPythonError( msg )
- # display all categories and what they contain
- msg = "Listing of all categories and their contents:\n"
- keys = self.GetAllCategoryNames()
- for cat in keys:
- msg += "\nCategory " + cat + ":\n"
- names = self.GetAllTutorialNamesForCategory( cat )
- for tn in names:
- msg += "\t" + tn + "\n"
- ScriptManagerManaged.ShowPythonError( msg )
- # signal whether init was successful or not
- self.initsuccess = ( self.Tutorials.Count > 0 )
- # helper class functions
- def GetTutorial( self, file ):
- # look for the [AS] header
- if not self.FindHeader( file, "[TUTORIAL]" ):
- return False
- # read in the script name
- newts = self.ReadALine( file, True, True, True )
- if newts == None or newts.StartsWith( "[" ) or newts == "":
- return False
- # look for the [CATEGORY] header
- if not self.FindHeader( file, "[CATEGORY]" ):
- return False
- # read in the category name
- category = self.ReadALine( file, True, True, True )
- if category == None or category.StartsWith( "[" ) or category == "":
- return False
- # look for the [COMMANDS] header
- if not self.FindHeader( file, "[COMMANDS]" ):
- return False
- # read in the commands
- return [ newts, category, self.GetCommands( file ) ]
- def ReadALine( self, file, ignorecomments, ignorewhiteblank, removetrailingcomments ):
- while file.Peek() >= 0:
- lineread = file.ReadLine().Trim()
- if lineread.StartsWith( ";" ):
- if ignorecomments:
- continue
- else:
- if ignorewhiteblank:
- if lineread == None or lineread == "":
- continue
- if removetrailingcomments:
- index = lineread.IndexOf( ";" )
- if index > 0:
- lineread = lineread.Remove( index ).Trim()
- #ScriptManagerManaged.ShowPythonError( "class TDWTutorial.ReadALine:\n" + "'" + lineread + "'" )
- return lineread
- # EOF
- return None
- def FindHeader( self, file, header ):
- #ScriptManagerManaged.ShowPythonError( "class TDWTutorial.FindHeader: Finding header " + header )
- headerfound = False
- lineread = self.ReadALine( file, True, True, True )
- if lineread != None:
- if lineread.StartsWith( header ):
- headerfound = True
- #ScriptManagerManaged.ShowPythonError( "class TDWTutorial.FindHeader: Found header " + header + "=" + str( headerfound ) )
- return headerfound
- def GetCommands( self, file ):
- commands = []
- endfound = False
- while file.Peek() >= 0:
- lineread = self.ReadALine( file, True, True, True )
- if lineread.StartsWith( "[COMMANDS_END]" ):
- endfound = True
- break
- elif lineread == None:
- break
- else:
- if self.CheckCommand( lineread ):
- commands.append( lineread )
- # ensure at least a command was read in
- if not endfound:
- commands = []
- #ScriptManagerManaged.ShowPythonError( "class TDWTutorial.GetCommands: commands=" + str( commands ) )
- return commands
- def CheckCommand( self, command ):
- try:
- args = command.split( "," )
- paramtime = float( args[ 3 ] )
- #ScriptManagerManaged.ShowPythonError( "class TDWTutorial.CheckCommand: args=" + str( args ) )
- return len( args ) == 4
- except:
- return false
- def GetAllCategoryNames( self ):
- cats = []
- if self.Categories.Count > 0:
- cats = self.Categories.Keys
- return cats
- def GetAllTutorialNamesForCategory( self, cat ):
- names = []
- if self.Categories.ContainsKey( cat ):
- names = self.Categories[ cat ]
- return names
- def GetAllTutorialNames( self ):
- #ScriptManagerManaged.ShowPythonError( "class TDWTutorial.GetAllTutorialNames )
- tutnames = []
- if self.Tutorials.Count > 0:
- for t in self.Tutorials.Keys:
- tutnames.append( self.Tutorials[ s ].GetName() )
- return tutnames
- def Destroy( self ):
- if self.Tutorials.Count > 0:
- for ts in self.Tutorials.Keys:
- self.Tutorials[ ts ].Destroy()
- self.Tutorials.Clear()
- self.Tutorials = None
- self.Categories.Clear()
- self.Categories = None
- # a tutorial
- class TutorialInFile( object ):
- def __init__( self, name, category, commands ):
- #ScriptManagerManaged.ShowPythonError( "class TDWTutorial(" + name + ").__init__" )
- self.commands = []
- self.name = name
- self.ID = TDWUO_RndNumGen.NextDouble()
- self.running = False
- self.paused = False
- self.currentcommandindex = 0
- self.currentcommandindexcomplete = False
- self.category = category
- for command in commands:
- args = command.split( "," )
- self.commands.append( self.TutorialCommand( args[ 0 ], args[ 1 ], args[ 2 ], args[ 3 ] ) )
- def GetName( self ):
- return self.name
- def GetID( self ):
- return self.ID
- def AddTimer( self, time ):
- from Pagelayout import Pagelayout_HPTimer
- Pagelayout_HPTimer.RemoveThenAddItem( TimerID_UpdateTutorial, self.ID, time, False, True )
- def RemoveTimer( self ):
- from Pagelayout import Pagelayout_HPTimer
- Pagelayout_HPTimer.RemoveItem( TimerID_UpdateTutorial, self.ID )
- def PauseTimer( self ):
- from Pagelayout import Pagelayout_HPTimer
- Pagelayout_HPTimer.StopItem( TimerID_UpdateTutorial, self.ID )
- def UnPauseTimer( self ):
- from Pagelayout import Pagelayout_HPTimer
- Pagelayout_HPTimer.StartItem( TimerID_UpdateTutorial, self.ID )
- def Display( self ):
- msg = "Tutorial: " + self.name + "\nCategory: " + self.category + "\n\nCommands:"
- for command in self.commands:
- msg += "\n" + command.Display()
- return msg
- def Destroy( self ):
- try:
- self.RemoveTimer()
- except:
- pass
- self.name = None
- self.category = None
- self.currentcommandindex = None
- self.currentcommandindexcomplete = None
- self.running = None
- self.paused = None
- for command in self.commands:
- command.Destroy()
- self.commands = None
- # Base class for all tutorial objects
- class TutorialCommand( object ):
- def __init__( self, command, param1, param2, time ):
- #ScriptManagerManaged.ShowPythonError( "class TutorialCommand.__init__" )
- self.command = command
- self.param1 = param1
- self.param2 = param2
- self.time = float( time )
- def Execute( self, elapsedtime ):
- return True
- def Display( self ):
- msg = self.command + ", " + str( self.param1 ) + ", " + str( self.param2 ) + ", " + str( self.time )
- return msg
- def Destroy( self ):
- try:
- self.command = None
- self.param1 = None
- self.param2 = None
- self.time = None
- except:
- pass
- ########################################################################################################
- def EndGame():
- Automation.StopAllScripts()
- #pass
- ########################################################################################################
- def UnloadScript():
- #ScriptManagerManaged.ShowPythonError( "TheDarkWraithUserOptions.UnloadScript" )
- global Automation
- Automation.Destroy()
- Automation = None
- #global Tutorial
- #Tutorial.Destroy()
- #Tutorial = 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.tsr"
- # 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
Advertisement
Add Comment
Please, Sign In to add comment