Advertisement
ThoraldGM

HH Map Script 20171219

Dec 20th, 2017
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 50.79 KB | None | 0 0
  1. Scriptname HH_MapScript extends ObjectReference
  2. { It just works. }
  3.  
  4. ; Fallout 4 Papyrus script by ThoraldGM | http://thoraldgm.com | Updated 20171219
  5. ; Hitchhiker mod: (url pending)
  6.  
  7. ; SCRIPT SECTIONS:
  8.  
  9. ; LINE : PROPERTIES
  10. ; LINE : ON READ
  11. ; LINE : HH SHOW MAIN MENU
  12. ; LINE : HH SHOW THE ANY MENU
  13. ; LINE : HH SHOW THE SPECIFIC MENU
  14. ; LINE : HH SHOW MENU BUS SHELTERS
  15. ; LINE : HH SHOW MENU DINERS 1
  16. ; LINE : HH SHOW MENU DINERS 2
  17. ; LINE : HH SHOW MENU DINERS 3
  18. ; LINE : HH SHOW MENU DIVES
  19. ; LINE : HH SHOW MENU DRIVE INS
  20. ; LINE : HH SHOW MENU FACTORIES
  21. ; LINE : HH SHOW MENU FARMS
  22. ; LINE : HH SHOW MENU JUNKYARDS 1
  23. ; LINE : HH SHOW MENU JUNKYARDS 2
  24. ; LINE : HH SHOW MENU MILITARY BASES 1
  25. ; LINE : HH SHOW MENU MILITARY BASES 2
  26. ; LINE : HH SHOW MENU MONUMENTS 1
  27. ; LINE : HH SHOW MENU MONUMENTS 2
  28. ; LINE : HH SHOW MENU MONUMENTS 3
  29. ; LINE : HH SHOW MENU POWER LIFTS 1
  30. ; LINE : HH SHOW MENU POWER LIFTS 2
  31. ; LINE : HH SHOW MENU RED ROCKET 1
  32. ; LINE : HH SHOW MENU RED ROCKET 2
  33. ; LINE : HH SHOW MENU VAULTS
  34. ; LINE : HH SHOW DLC OPTIONS
  35. ; LINE : HH SHOW CAMERA OPTIONS
  36. ; LINE : HH SHOW SET MAX
  37. ; LINE : HH SHOW SET MIN
  38. ; LINE : HH SHOW SET DURATION
  39. ; LINE : HH SHOW TELEPORT OPTIONS
  40. ; LINE : HH SHOW SET TIME
  41. ; LINE : HH SHOW SET WEATHER
  42. ; LINE : HH SHOW ADVANCED OPTIONS
  43. ; LINE : HH SHOW SET X
  44. ; LINE : HH SHOW SET Y
  45. ; LINE : HH SHOW SET Z
  46. ; LINE : HH SET MENU DEFAULTS
  47. ; LINE : ON MENU OPEN CLOSE EVENT
  48.  
  49. ; ------------------------------------------------------------------------------------------------------------
  50. ; PROPERTIES
  51. ; ------------------------------------------------------------------------------------------------------------
  52.  
  53. ; ************************************************************************************************************
  54. ; Player menu options (21 here. Plus Force Time Now, Force Weather Now, Spin Idle Camera Now, & Restore Defaults):
  55. ; ************************************************************************************************************
  56. GlobalVariable Property HH_OptionCamMaxDistance Auto Mandatory ; Max camera distance (default: 200, vanilla: 150)
  57. GlobalVariable Property HH_OptionCamMinDistance Auto Mandatory ; Min camera distance (default: 100, vanilla: 0)
  58. GlobalVariable Property HH_OptionDevTracking Auto Mandatory ; Does player want dev messages? (default: no)
  59. GlobalVariable Property HH_OptionExcludeDLC Auto Mandatory ; Turn all DLC on/off in available destinations (default: on if installed)
  60. GlobalVariable Property HH_OptionExcludeFH Auto Mandatory ; Turn Far Harbor DLC on/off in destinations (default: on if installed)
  61. GlobalVariable Property HH_OptionExcludeNW Auto Mandatory ; Turn Nuka-World DLC on/off in destinations (default: on if installed)
  62. GlobalVariable Property HH_OptionExcludeVT Auto Mandatory ; Turn Vault-Tec DLC on/off in destinations (default: on if installed)
  63. GlobalVariable Property HH_OptionFastTravel Auto Mandatory ; Does player want loading screens? (default: yes)
  64. GlobalVariable Property HH_OptionHeal Auto Mandatory ; Does player want to heal after teleport? (default: no)
  65. GlobalVariable Property HH_OptionOffsetX Auto Mandatory ; Player can choose X offset (default: 250)
  66. GlobalVariable Property HH_OptionOffsetY Auto Mandatory ; Player can choose Y offset (default: 250)
  67. GlobalVariable Property HH_OptionOffsetZ Auto Mandatory ; Player can choose Z offset (default: 500)
  68. GlobalVariable Property HH_OptionSetTime Auto Mandatory ; Change time after teleport? (default: no)
  69. GlobalVariable Property HH_OptionSetTimePreference Auto Mandatory ; Preferred game hour (player sets in menu)
  70. GlobalVariable Property HH_OptionSetWeather Auto Mandatory ; Change weather after teleport? (default: no)
  71. GlobalVariable Property HH_OptionSetWeatherPreference Auto Mandatory ; Preferred game weather (player sets in menu)
  72. GlobalVariable Property HH_OptionSitFurniture Auto Mandatory ; If destination is furniture, choose whether to use it (default: yes)
  73. GlobalVariable Property HH_OptionSpinCamera Auto Mandatory ; Does player want teleport to spin camera? (default: yes)
  74. GlobalVariable Property HH_OptionSpinDuration Auto Mandatory ; How long should camera spin? (default: 20 seconds)
  75. GlobalVariable Property HH_OptionSpinGhost Auto Mandatory ; Does player want invulnerable spin? (default: yes)
  76. GlobalVariable Property HH_OptionTeleportSound Auto Mandatory ; Does player want teleport sound? (default: yes)
  77.  
  78. ; ************************************************************************************************************
  79. ; Menus:
  80. ; ************************************************************************************************************
  81. Message Property HH_MenuMessage Auto Const Mandatory ; Main menu
  82. Message Property HH_DestMessageAny Auto Const Mandatory ; Any menu
  83.  
  84. Message Property HH_DestMessageSpecific Auto Const Mandatory ; Specific menu
  85. Message Property HH_DestMessageSpecificBusShelters Auto Const Mandatory ; Specific: Bus Shelters
  86. Message Property HH_DestMessageSpecificDiners1 Auto Const Mandatory ; Specific: Diners 1
  87. Message Property HH_DestMessageSpecificDiners2 Auto Const Mandatory ; Specific: Diners 2
  88. Message Property HH_DestMessageSpecificDiners3 Auto Const Mandatory ; Specific: Diners 3
  89. Message Property HH_DestMessageSpecificDives Auto Const Mandatory ; Specific: Dives
  90. Message Property HH_DestMessageSpecificDriveIns Auto Const Mandatory ; Specific: Drive-Ins
  91. Message Property HH_DestMessageSpecificFactories Auto Const Mandatory ; Specific: Factories
  92. Message Property HH_DestMessageSpecificFarms Auto Const Mandatory ; Specific: Farms
  93. Message Property HH_DestMessageSpecificJunkyards1 Auto Const Mandatory ; Specific: Junkyards 1
  94. Message Property HH_DestMessageSpecificJunkyards2 Auto Const Mandatory ; Specific: Junkyards 2
  95. Message Property HH_DestMessageSpecificMilitaryBases1 Auto Const Mandatory ; Specific: Military Bases 1
  96. Message Property HH_DestMessageSpecificMilitaryBases2 Auto Const Mandatory ; Specific: Military Bases 2
  97. Message Property HH_DestMessageSpecificMonuments1 Auto Const Mandatory ; Specific: Monuments 1
  98. Message Property HH_DestMessageSpecificMonuments2 Auto Const Mandatory ; Specific: Monuments 2
  99. Message Property HH_DestMessageSpecificMonuments3 Auto Const Mandatory ; Specific: Monuments 3
  100. Message Property HH_DestMessageSpecificPowerLifts1 Auto Const Mandatory ; Specific: Power Lifts 1
  101. Message Property HH_DestMessageSpecificPowerLifts2 Auto Const Mandatory ; Specific: Power Lifts 2
  102. Message Property HH_DestMessageSpecificRedRocket1 Auto Const Mandatory ; Specific: Red Rockets 1
  103. Message Property HH_DestMessageSpecificRedRocket2 Auto Const Mandatory ; Specific: Red Rockets 2
  104. Message Property HH_DestMessageSpecificVaults Auto Const Mandatory ; Specific: Vaults
  105.  
  106. Message Property HH_MenuMessageDLCOptions Auto Const Mandatory ; DLCOptions menu
  107.  
  108. Message Property HH_MenuMessageCameraOptions Auto Const Mandatory ; CameraOptions menu
  109. Message Property HH_MenuMessageSetMax Auto Const Mandatory ; Camera: Set Max Distance
  110. Message Property HH_MenuMessageSetMin Auto Const Mandatory ; Camera: Set Min Distance
  111. Message Property HH_MenuMessageSetDuration Auto Const Mandatory ; Camera: Set Spin Duration
  112.  
  113. Message Property HH_MenuMessageTeleportOptions Auto Const Mandatory ; TeleportOptions menu
  114. Message Property HH_MenuMessageSetTime Auto Const Mandatory ; SetTime menu
  115. Message Property HH_MenuMessageSetWeather Auto Const Mandatory ; SetWeather menu
  116.  
  117. Message Property HH_MenuMessageAdvancedOptions Auto Const Mandatory ; AdvancedOptions menu
  118. Message Property HH_MenuMessageSetX Auto Const Mandatory ; SetX menu
  119. Message Property HH_MenuMessageSetY Auto Const Mandatory ; SetY menu
  120. Message Property HH_MenuMessageSetZ Auto Const Mandatory ; SetZ menu
  121.  
  122. ; ************************************************************************************************************
  123. ; Ref quests to avoid persistence / bloat:
  124. ; ************************************************************************************************************
  125. Quest Property QuestRefBusShelters Auto Const Mandatory ; Quest stores Bus Shelters ref aliases
  126. Quest Property QuestRefDiners Auto Const Mandatory ; Quest stores Diners ref aliases
  127. Quest Property QuestRefDives Auto Const Mandatory ; Quest stores Dives ref aliases
  128. Quest Property QuestRefDriveIns Auto Const Mandatory ; Quest stores Drive-Ins ref aliases
  129. Quest Property QuestRefFactories Auto Const Mandatory ; Quest stores Factories ref aliases
  130. Quest Property QuestRefFarms Auto Const Mandatory ; Quest stores Farms ref aliases
  131. Quest Property QuestRefJunkyards Auto Const Mandatory ; Quest stores Junkyards ref aliases
  132. Quest Property QuestRefMilitaryBases Auto Const Mandatory ; Quest stores Military Bases ref aliases
  133. Quest Property QuestRefMonuments Auto Const Mandatory ; Quest stores Monuments ref aliases
  134. Quest Property QuestRefPowerLifts Auto Const Mandatory ; Quest stores Power Lifts ref aliases
  135. Quest Property QuestRefRedRocket Auto Const Mandatory ; Quest stores Red Rocket ref aliases
  136. Quest Property QuestRefVaults Auto Const Mandatory ; Quest stores Vaults ref aliases
  137. Quest Property HH_Quest Auto Const Mandatory ; Hitchhiker main quest
  138. HH_QuestScript Property HHQuestScript Auto ; Hitchhiker main quest script
  139.  
  140. ; ************************************************************************************************************
  141. ; Everything else:
  142. ; ************************************************************************************************************
  143. Actor Player ; Player actor
  144. GlobalVariable Property HH_IsSpinning Auto Mandatory ; Is the camera currently spinning?
  145. GlobalVariable Property HH_PlayerHasFH Auto Mandatory ; Does player have Far Harbor DLC?
  146. GlobalVariable Property HH_PlayerHasNW Auto Mandatory ; Does player have Nuka-World DLC?
  147. GlobalVariable Property HH_PlayerHasVT Auto Mandatory ; Does player have Vault-Tec DLC?
  148. GlobalVariable Property HH_RefAliasID Auto Mandatory ; Which specific location did player select?
  149. GlobalVariable Property HH_ShowMenu Auto Mandatory ; Don't show menu when map not in inventory
  150. GlobalVariable Property HH_Version Auto Mandatory ; The current version of Hitchhiker (for map menu)
  151. Float CurrentStatus ; Placeholder for current global values (for map menu)
  152.  
  153. ; ------------------------------------------------------------------------------------------------------------
  154. ; EVENT: ON READ
  155. ; ------------------------------------------------------------------------------------------------------------
  156.  
  157. Event OnRead()
  158. Player = Game.GetPlayer() ; Player actor
  159. Bool FarHarborInstalled = Game.IsPluginInstalled("DLCCoast.esm") ; Does player have Far Harbor DLC?
  160. Bool NukaWorldInstalled = Game.IsPluginInstalled("DLCNukaWorld.esm") ; Does player have Nuka-World DLC?
  161. Bool VaultTecInstalled = Game.IsPluginInstalled("DLCworkshop03.esm") ; Does player have Vault-Tec DLC?
  162.  
  163. Utility.WaitMenuMode(0.1) ; Wait a moment before using DLC checks
  164.  
  165. If FarHarborInstalled ; If Far Harbor DLC installed,
  166. HH_PlayerHasFH.SetValue(1) ; unlock FH destinations
  167. EndIf
  168.  
  169. If NukaWorldInstalled ; If Nuka-World DLC installed,
  170. HH_PlayerHasNW.SetValue(1) ; unlock NW destinations
  171. EndIf
  172.  
  173. If VaultTecInstalled ; If Vault-Tec DLC installed,
  174. HH_PlayerHasVT.SetValue(1) ; unlock VT destination
  175. EndIf
  176.  
  177. Utility.WaitMenuMode(0.1) ; Wait a moment before using actor
  178.  
  179. If GetContainer() != Player ; If hitchhiker map is not in inventory (on ground, etc)
  180. HH_ShowMenu.SetValue(0) ; do not show the menu
  181. EndIf
  182.  
  183. If HH_ShowMenu.GetValue() as Int == 1 ; Default value is zero so "awesome" message plays on add
  184. Utility.WaitMenuMode(2) ; Give magazine a chance to fill menu background
  185. HH_ShowMainMenu() ; then show the main menu
  186. Else
  187. HH_ShowMenu.SetValue(1) ; Added to inventory, so show menu from now on
  188. EndIf
  189. EndEvent
  190.  
  191. ; ------------------------------------------------------------------------------------------------------------
  192. ; CUSTOM FUNCTION: HH SHOW MAIN MENU
  193. ; ------------------------------------------------------------------------------------------------------------
  194.  
  195. Function HH_ShowMainMenu()
  196. CurrentStatus = HH_Version.GetValue() ; Grab the current version number
  197. Int MainButtonPressed = HH_MenuMessage.Show(CurrentStatus) ; MAIN menu shows and waits for player response
  198.  
  199. If MainButtonPressed == 0 ; Main: Choose Random Location
  200. HH_ShowTheAnyMenu()
  201. ElseIf MainButtonPressed == 1 ; Main: Choose Specific Location
  202. HH_ShowTheSpecificMenu()
  203. ElseIf MainButtonPressed == 2 ; Main: DLC Destination Options
  204. HH_ShowDLCOptions()
  205. ElseIf MainButtonPressed == 3 ; Main: Force Time Now (after Pip-Boy closes)
  206.  
  207. ; IMPORTANT: Game.PassTime has erratic results when menus are open, so wait until Pip-Boy is closed
  208.  
  209. UnregisterForMenuOpenCloseEvent("PipboyMenu") ; Cancel any previous button spams
  210. Utility.WaitMenuMode(0.1) ; Give unregister a moment to work
  211. RegisterForMenuOpenCloseEvent("PipboyMenu") ; then handle time change in the event
  212.  
  213. ElseIf MainButtonPressed == 4 ; Main: Force Weather Now
  214. Int PrefWeather = HH_OptionSetWeatherPreference.GetValue() as Int
  215. Utility.WaitMenuMode(0.1)
  216. HHQuestScript.HH_ForceWeather(PrefWeather)
  217. ElseIf MainButtonPressed == 5 ; Main: Spin Idle Camera Now
  218. HHQuestScript.HH_SpinCamera()
  219. ElseIf MainButtonPressed == 6 ; Main: Stop Idle Camera Now
  220. HHQuestScript.HH_StopSpinning()
  221. ElseIf MainButtonPressed == 7 ; Main: Camera Options
  222. HH_ShowCameraOptions()
  223. ElseIf MainButtonPressed == 8 ; Main: Teleport Options
  224. HH_ShowTeleportOptions()
  225. ElseIf MainButtonPressed == 9 ; Main: Enable Developer Messages
  226. HH_OptionDevTracking.SetValue(1)
  227. HH_ShowMainMenu()
  228. ElseIf MainButtonPressed == 10 ; Main: Disable Developer Messages
  229. HH_OptionDevTracking.SetValue(0)
  230. HH_ShowMainMenu()
  231. ElseIf MainButtonPressed == 11 ; Main: Restore Defaults
  232. HH_SetMenuDefaults()
  233. Utility.WaitMenuMode(0.1)
  234. HH_ShowMainMenu()
  235. ElseIf MainButtonPressed == 12 ; Main: Exit Menu
  236. ; Exit Menu
  237. EndIf
  238. EndFunction
  239.  
  240. ; ------------------------------------------------------------------------------------------------------------
  241. ; CUSTOM FUNCTION: HH SHOW THE ANY MENU
  242. ; ------------------------------------------------------------------------------------------------------------
  243.  
  244. Function HH_ShowTheAnyMenu()
  245. Int Selected = HH_DestMessageAny.Show() ; ANY menu shows and waits for player response
  246.  
  247. If Selected == 0 ; If anywhere,
  248. Selected = Utility.RandomInt(1, 12) ; roll a category for player
  249. EndIf
  250.  
  251. If HH_OptionDevTracking.GetValue() as Int == 1
  252. Debug.TraceAndBox("Hitchhiker: Selected is " + Selected + ".")
  253. EndIf
  254.  
  255. If Selected > 0 && Selected <= 12
  256. HHQuestScript.HH_SetRandomDestination(Selected)
  257. Utility.WaitMenuMode(0.1)
  258. HHQuestScript.HH_StartHitching()
  259. Else
  260. HH_ShowMainMenu()
  261. EndIf
  262. EndFunction
  263.  
  264. ; ------------------------------------------------------------------------------------------------------------
  265. ; CUSTOM FUNCTION: HH SHOW THE SPECIFIC MENU
  266. ; ------------------------------------------------------------------------------------------------------------
  267.  
  268. Function HH_ShowTheSpecificMenu()
  269. Int SpecButtonPressed = HH_DestMessageSpecific.Show() ; SPEC menu shows and waits for player response
  270.  
  271. If SpecButtonPressed == 0
  272. HH_ShowMenuBusShelters()
  273. ElseIf SpecButtonPressed == 1
  274. HH_ShowMenuDiners1()
  275. ElseIf SpecButtonPressed == 2
  276. HH_ShowMenuDriveIns()
  277. ElseIf SpecButtonPressed == 3
  278. HH_ShowMenuDives()
  279. ElseIf SpecButtonPressed == 4
  280. HH_ShowMenuFactories()
  281. ElseIf SpecButtonPressed == 5
  282. HH_ShowMenuFarms()
  283. ElseIf SpecButtonPressed == 6
  284. HH_ShowMenuJunkyards1()
  285. ElseIf SpecButtonPressed == 7
  286. HH_ShowMenuMilitaryBases1()
  287. ElseIf SpecButtonPressed == 8
  288. HH_ShowMenuMonuments1()
  289. ElseIf SpecButtonPressed == 9
  290. HH_ShowMenuPowerLifts1()
  291. ElseIf SpecButtonPressed == 10
  292. HH_ShowMenuRedRocket1()
  293. ElseIf SpecButtonPressed == 11
  294. HH_ShowMenuVaults()
  295. Else
  296. HH_ShowMainMenu()
  297. EndIf
  298. EndFunction
  299.  
  300. ; ------------------------------------------------------------------------------------------------------------
  301. ; CUSTOM FUNCTION: HH SHOW MENU BUS SHELTERS
  302. ; ------------------------------------------------------------------------------------------------------------
  303.  
  304. Function HH_ShowMenuBusShelters()
  305. Int Selected = HH_DestMessageSpecificBusShelters.Show()
  306.  
  307. If Selected >= 0 && Selected <= 9
  308. HHQuestScript.HH_SetDestination(QuestRefBusShelters, Selected)
  309. Utility.WaitMenuMode(0.1)
  310. HHQuestScript.HH_StartHitching()
  311. Else
  312. HH_ShowTheSpecificMenu()
  313. EndIf
  314. EndFunction
  315.  
  316. ; ------------------------------------------------------------------------------------------------------------
  317. ; CUSTOM FUNCTION: HH SHOW MENU DINERS 1
  318. ; ------------------------------------------------------------------------------------------------------------
  319.  
  320. Function HH_ShowMenuDiners1()
  321. Int Selected = HH_DestMessageSpecificDiners1.Show()
  322.  
  323. If Selected >= 0 && Selected <= 9
  324. HHQuestScript.HH_SetDestination(QuestRefDiners, Selected)
  325. Utility.WaitMenuMode(0.1)
  326. HHQuestScript.HH_StartHitching()
  327. ElseIf Selected == 10
  328. HH_ShowMenuDiners2()
  329. Else
  330. HH_ShowTheSpecificMenu()
  331. EndIf
  332. EndFunction
  333.  
  334. ; ------------------------------------------------------------------------------------------------------------
  335. ; CUSTOM FUNCTION: HH SHOW MENU DINERS 2
  336. ; ------------------------------------------------------------------------------------------------------------
  337.  
  338. Function HH_ShowMenuDiners2()
  339. Int Selected = HH_DestMessageSpecificDiners2.Show()
  340.  
  341. If Selected >= 0 && Selected <= 9
  342. HHQuestScript.HH_SetDestination(QuestRefDiners, (Selected + 10))
  343. Utility.WaitMenuMode(0.1)
  344. HHQuestScript.HH_StartHitching()
  345. ElseIf Selected == 10
  346. HH_ShowMenuDiners3()
  347. Else
  348. HH_ShowMenuDiners1()
  349. EndIf
  350. EndFunction
  351.  
  352. ; ------------------------------------------------------------------------------------------------------------
  353. ; CUSTOM FUNCTION: HH SHOW MENU DINERS 3
  354. ; ------------------------------------------------------------------------------------------------------------
  355.  
  356. Function HH_ShowMenuDiners3()
  357. Int Selected = HH_DestMessageSpecificDiners3.Show()
  358.  
  359. If Selected >= 0 && Selected <= 9
  360. HHQuestScript.HH_SetDestination(QuestRefDiners, (Selected + 20))
  361. Utility.WaitMenuMode(0.1)
  362. HHQuestScript.HH_StartHitching()
  363. Else
  364. HH_ShowMenuDiners2()
  365. EndIf
  366. EndFunction
  367.  
  368. ; ------------------------------------------------------------------------------------------------------------
  369. ; CUSTOM FUNCTION: HH SHOW MENU DIVES
  370. ; ------------------------------------------------------------------------------------------------------------
  371.  
  372. Function HH_ShowMenuDives()
  373. Int Selected = HH_DestMessageSpecificDives.Show()
  374.  
  375. If Selected >= 0 && Selected <= 12
  376. HHQuestScript.HH_SetDestination(QuestRefDives, Selected)
  377. Utility.WaitMenuMode(0.1)
  378. HHQuestScript.HH_StartHitching()
  379. Else
  380. HH_ShowTheSpecificMenu()
  381. EndIf
  382. EndFunction
  383.  
  384. ; ------------------------------------------------------------------------------------------------------------
  385. ; CUSTOM FUNCTION: HH SHOW MENU DRIVE INS
  386. ; ------------------------------------------------------------------------------------------------------------
  387.  
  388. Function HH_ShowMenuDriveIns()
  389. Int Selected = HH_DestMessageSpecificDriveIns.Show()
  390.  
  391. If Selected >= 0 && Selected <= 11
  392. HHQuestScript.HH_SetDestination(QuestRefDriveIns, Selected)
  393. Utility.WaitMenuMode(0.1)
  394. HHQuestScript.HH_StartHitching()
  395. Else
  396. HH_ShowTheSpecificMenu()
  397. EndIf
  398. EndFunction
  399.  
  400. ; ------------------------------------------------------------------------------------------------------------
  401. ; CUSTOM FUNCTION: HH SHOW MENU FACTORIES
  402. ; ------------------------------------------------------------------------------------------------------------
  403.  
  404. Function HH_ShowMenuFactories()
  405. Int Selected = HH_DestMessageSpecificFactories.Show()
  406.  
  407. If Selected >= 0 && Selected <= 11
  408. HHQuestScript.HH_SetDestination(QuestRefFactories, Selected)
  409. Utility.WaitMenuMode(0.1)
  410. HHQuestScript.HH_StartHitching()
  411. Else
  412. HH_ShowTheSpecificMenu()
  413. EndIf
  414. EndFunction
  415.  
  416. ; ------------------------------------------------------------------------------------------------------------
  417. ; CUSTOM FUNCTION: HH SHOW MENU FARMS
  418. ; ------------------------------------------------------------------------------------------------------------
  419.  
  420. Function HH_ShowMenuFarms()
  421. Int Selected = HH_DestMessageSpecificFarms.Show()
  422.  
  423. If Selected >= 0 && Selected <= 11
  424. HHQuestScript.HH_SetDestination(QuestRefFarms, Selected)
  425. Utility.WaitMenuMode(0.1)
  426. HHQuestScript.HH_StartHitching()
  427. Else
  428. HH_ShowTheSpecificMenu()
  429. EndIf
  430. EndFunction
  431.  
  432. ; ------------------------------------------------------------------------------------------------------------
  433. ; CUSTOM FUNCTION: HH SHOW MENU JUNKYARDS 1
  434. ; ------------------------------------------------------------------------------------------------------------
  435.  
  436. Function HH_ShowMenuJunkyards1()
  437. Int Selected = HH_DestMessageSpecificJunkyards1.Show()
  438.  
  439. If Selected >= 0 && Selected <= 9
  440. HHQuestScript.HH_SetDestination(QuestRefJunkyards, Selected)
  441. Utility.WaitMenuMode(0.1)
  442. HHQuestScript.HH_StartHitching()
  443. ElseIf Selected == 10
  444. HH_ShowMenuJunkyards2()
  445. Else
  446. HH_ShowTheSpecificMenu()
  447. EndIf
  448. EndFunction
  449.  
  450. ; ------------------------------------------------------------------------------------------------------------
  451. ; CUSTOM FUNCTION: HH SHOW MENU JUNKYARDS 2
  452. ; ------------------------------------------------------------------------------------------------------------
  453.  
  454. Function HH_ShowMenuJunkyards2()
  455. Int Selected = HH_DestMessageSpecificJunkyards2.Show()
  456.  
  457. If Selected >= 0 && Selected <= 9
  458. HHQuestScript.HH_SetDestination(QuestRefJunkyards, (Selected + 10))
  459. Utility.WaitMenuMode(0.1)
  460. HHQuestScript.HH_StartHitching()
  461. Else
  462. HH_ShowMenuJunkyards1()
  463. EndIf
  464. EndFunction
  465.  
  466. ; ------------------------------------------------------------------------------------------------------------
  467. ; CUSTOM FUNCTION: HH SHOW MENU MILITARY BASES 1
  468. ; ------------------------------------------------------------------------------------------------------------
  469.  
  470. Function HH_ShowMenuMilitaryBases1()
  471. Int Selected = HH_DestMessageSpecificMilitaryBases1.Show()
  472.  
  473. If Selected >= 0 && Selected <= 9
  474. HHQuestScript.HH_SetDestination(QuestRefMilitaryBases, Selected)
  475. Utility.WaitMenuMode(0.1)
  476. HHQuestScript.HH_StartHitching()
  477. ElseIf Selected == 10
  478. HH_ShowMenuMilitaryBases2()
  479. Else
  480. HH_ShowTheSpecificMenu()
  481. EndIf
  482. EndFunction
  483.  
  484. ; ------------------------------------------------------------------------------------------------------------
  485. ; CUSTOM FUNCTION: HH SHOW MENU MILITARY BASES 2
  486. ; ------------------------------------------------------------------------------------------------------------
  487.  
  488. Function HH_ShowMenuMilitaryBases2()
  489. Int Selected = HH_DestMessageSpecificMilitaryBases2.Show()
  490.  
  491. If Selected >= 0 && Selected <= 9
  492. HHQuestScript.HH_SetDestination(QuestRefMilitaryBases, (Selected + 10))
  493. Utility.WaitMenuMode(0.1)
  494. HHQuestScript.HH_StartHitching()
  495. Else
  496. HH_ShowMenuMilitaryBases1()
  497. EndIf
  498. EndFunction
  499.  
  500. ; ------------------------------------------------------------------------------------------------------------
  501. ; CUSTOM FUNCTION: HH SHOW MENU MONUMENTS 1
  502. ; ------------------------------------------------------------------------------------------------------------
  503.  
  504. Function HH_ShowMenuMonuments1()
  505. Int Selected = HH_DestMessageSpecificMonuments1.Show()
  506.  
  507. If Selected >= 0 && Selected <= 9
  508. HHQuestScript.HH_SetDestination(QuestRefMonuments, Selected)
  509. Utility.WaitMenuMode(0.1)
  510. HHQuestScript.HH_StartHitching()
  511. ElseIf Selected == 10
  512. HH_ShowMenuMonuments2()
  513. Else
  514. HH_ShowTheSpecificMenu()
  515. EndIf
  516. EndFunction
  517.  
  518. ; ------------------------------------------------------------------------------------------------------------
  519. ; CUSTOM FUNCTION: HH SHOW MENU MONUMENTS 2
  520. ; ------------------------------------------------------------------------------------------------------------
  521.  
  522. Function HH_ShowMenuMonuments2()
  523. Int Selected = HH_DestMessageSpecificMonuments2.Show()
  524.  
  525. If Selected >= 0 && Selected <= 9
  526. HHQuestScript.HH_SetDestination(QuestRefMonuments, (Selected + 10))
  527. Utility.WaitMenuMode(0.1)
  528. HHQuestScript.HH_StartHitching()
  529. ElseIf Selected == 10
  530. HH_ShowMenuMonuments3()
  531. Else
  532. HH_ShowMenuMonuments1()
  533. EndIf
  534. EndFunction
  535.  
  536. ; ------------------------------------------------------------------------------------------------------------
  537. ; CUSTOM FUNCTION: HH SHOW MENU MONUMENTS 3
  538. ; ------------------------------------------------------------------------------------------------------------
  539.  
  540. Function HH_ShowMenuMonuments3()
  541. Int Selected = HH_DestMessageSpecificMonuments3.Show()
  542.  
  543. If Selected >= 0 && Selected <= 9
  544. HHQuestScript.HH_SetDestination(QuestRefMonuments, (Selected + 20))
  545. Utility.WaitMenuMode(0.1)
  546. HHQuestScript.HH_StartHitching()
  547. Else
  548. HH_ShowMenuMonuments2()
  549. EndIf
  550. EndFunction
  551.  
  552. ; ------------------------------------------------------------------------------------------------------------
  553. ; CUSTOM FUNCTION: HH SHOW MENU POWER LIFTS 1
  554. ; ------------------------------------------------------------------------------------------------------------
  555.  
  556. Function HH_ShowMenuPowerLifts1()
  557. ; Power lifts are oldest part of file. Note the extra work because ABC order != AliasID order.
  558.  
  559. Int Selected = HH_DestMessageSpecificPowerLifts1.Show()
  560.  
  561. If Selected == 0
  562. HHQuestScript.HH_SetDestination(QuestRefPowerLifts, 11)
  563. ElseIf Selected == 1
  564. HHQuestScript.HH_SetDestination(QuestRefPowerLifts, 13)
  565. ElseIf Selected == 2
  566. HHQuestScript.HH_SetDestination(QuestRefPowerLifts, 14)
  567. ElseIf Selected == 3
  568. HHQuestScript.HH_SetDestination(QuestRefPowerLifts, 12)
  569. ElseIf Selected == 4
  570. HHQuestScript.HH_SetDestination(QuestRefPowerLifts, 4)
  571. ElseIf Selected == 5
  572. HHQuestScript.HH_SetDestination(QuestRefPowerLifts, 6)
  573. ElseIf Selected == 6
  574. HHQuestScript.HH_SetDestination(QuestRefPowerLifts, 5)
  575. ElseIf Selected == 7
  576. HH_ShowMenuPowerLifts2()
  577. Else
  578. HH_ShowTheSpecificMenu()
  579. EndIf
  580.  
  581. If Selected >= 0 && Selected <= 6
  582. Utility.WaitMenuMode(0.1)
  583. HHQuestScript.HH_StartHitching()
  584. EndIf
  585. EndFunction
  586.  
  587. ; ------------------------------------------------------------------------------------------------------------
  588. ; CUSTOM FUNCTION: HH SHOW MENU POWER LIFTS 2
  589. ; ------------------------------------------------------------------------------------------------------------
  590.  
  591. Function HH_ShowMenuPowerLifts2()
  592. ; Power lifts are oldest part of file. Note the extra work because ABC order != AliasID order.
  593.  
  594. Int Selected = HH_DestMessageSpecificPowerLifts2.Show()
  595.  
  596. If Selected == 0
  597. HHQuestScript.HH_SetDestination(QuestRefPowerLifts, 10)
  598. ElseIf Selected == 1
  599. HHQuestScript.HH_SetDestination(QuestRefPowerLifts, 1)
  600. ElseIf Selected == 2
  601. HHQuestScript.HH_SetDestination(QuestRefPowerLifts, 8)
  602. ElseIf Selected == 3
  603. HHQuestScript.HH_SetDestination(QuestRefPowerLifts, 9)
  604. ElseIf Selected == 4
  605. HHQuestScript.HH_SetDestination(QuestRefPowerLifts, 3)
  606. ElseIf Selected == 5
  607. HHQuestScript.HH_SetDestination(QuestRefPowerLifts, 7)
  608. ElseIf Selected == 6
  609. HHQuestScript.HH_SetDestination(QuestRefPowerLifts, 0)
  610. ElseIf Selected == 7
  611. HHQuestScript.HH_SetDestination(QuestRefPowerLifts, 2)
  612. Else
  613. HH_ShowMenuPowerLifts1()
  614. EndIf
  615.  
  616. If Selected >= 0 && Selected <= 7
  617. Utility.WaitMenuMode(0.1)
  618. HHQuestScript.HH_StartHitching()
  619. EndIf
  620. EndFunction
  621.  
  622. ; ------------------------------------------------------------------------------------------------------------
  623. ; CUSTOM FUNCTION: HH SHOW MENU RED ROCKET 1
  624. ; ------------------------------------------------------------------------------------------------------------
  625.  
  626. Function HH_ShowMenuRedRocket1()
  627. ; Red Rockets are oldest part of file. Note the extra work because ABC order != AliasID order.
  628.  
  629. Int Selected = HH_DestMessageSpecificRedRocket1.Show()
  630.  
  631. If Selected == 0
  632. HHQuestScript.HH_SetDestination(QuestRefRedRocket, 16)
  633. ElseIf Selected == 1
  634. HHQuestScript.HH_SetDestination(QuestRefRedRocket, 20)
  635. ElseIf Selected == 2
  636. HHQuestScript.HH_SetDestination(QuestRefRedRocket, 0)
  637. ElseIf Selected == 3
  638. HHQuestScript.HH_SetDestination(QuestRefRedRocket, 11)
  639. ElseIf Selected == 4
  640. HHQuestScript.HH_SetDestination(QuestRefRedRocket, 9)
  641. ElseIf Selected == 5
  642. HHQuestScript.HH_SetDestination(QuestRefRedRocket, 17)
  643. ElseIf Selected == 6
  644. HHQuestScript.HH_SetDestination(QuestRefRedRocket, 5)
  645. ElseIf Selected == 7
  646. HHQuestScript.HH_SetDestination(QuestRefRedRocket, 18)
  647. ElseIf Selected == 8
  648. HHQuestScript.HH_SetDestination(QuestRefRedRocket, 8)
  649. ElseIf Selected == 9
  650. HHQuestScript.HH_SetDestination(QuestRefRedRocket, 14)
  651. ElseIf Selected == 10
  652. HHQuestScript.HH_SetDestination(QuestRefRedRocket, 1)
  653. ElseIf Selected == 11
  654. HHQuestScript.HH_SetDestination(QuestRefRedRocket, 3)
  655. ElseIf Selected == 12
  656. HH_ShowMenuRedRocket2()
  657. Else
  658. HH_ShowTheSpecificMenu()
  659. EndIf
  660.  
  661. If Selected >= 0 && Selected <= 11
  662. Utility.WaitMenuMode(0.1)
  663. HHQuestScript.HH_StartHitching()
  664. EndIf
  665. EndFunction
  666.  
  667. ; ------------------------------------------------------------------------------------------------------------
  668. ; CUSTOM FUNCTION: HH SHOW MENU RED ROCKET 2
  669. ; ------------------------------------------------------------------------------------------------------------
  670.  
  671. Function HH_ShowMenuRedRocket2()
  672. ; Red Rockets are oldest part of file. Note the extra work because ABC order != AliasID order.
  673.  
  674. Int Selected = HH_DestMessageSpecificRedRocket2.Show()
  675.  
  676. If Selected == 0
  677. HHQuestScript.HH_SetDestination(QuestRefRedRocket, 10)
  678. ElseIf Selected == 1
  679. HHQuestScript.HH_SetDestination(QuestRefRedRocket, 2)
  680. ElseIf Selected == 2
  681. HHQuestScript.HH_SetDestination(QuestRefRedRocket, 21)
  682. ElseIf Selected == 3
  683. HHQuestScript.HH_SetDestination(QuestRefRedRocket, 22)
  684. ElseIf Selected == 4
  685. HHQuestScript.HH_SetDestination(QuestRefRedRocket, 23)
  686. ElseIf Selected == 5
  687. HHQuestScript.HH_SetDestination(QuestRefRedRocket, 12)
  688. ElseIf Selected == 6
  689. HHQuestScript.HH_SetDestination(QuestRefRedRocket, 4)
  690. ElseIf Selected == 7
  691. HHQuestScript.HH_SetDestination(QuestRefRedRocket, 19)
  692. ElseIf Selected == 8
  693. HHQuestScript.HH_SetDestination(QuestRefRedRocket, 7)
  694. ElseIf Selected == 9
  695. HHQuestScript.HH_SetDestination(QuestRefRedRocket, 24)
  696. ElseIf Selected == 10
  697. HHQuestScript.HH_SetDestination(QuestRefRedRocket, 15)
  698. ElseIf Selected == 11
  699. HHQuestScript.HH_SetDestination(QuestRefRedRocket, 6)
  700. ElseIf Selected == 12
  701. HHQuestScript.HH_SetDestination(QuestRefRedRocket, 13)
  702. Else
  703. HH_ShowMenuRedRocket1()
  704. EndIf
  705.  
  706. If Selected >= 0 && Selected <= 12
  707. Utility.WaitMenuMode(0.1)
  708. HHQuestScript.HH_StartHitching()
  709. EndIf
  710. EndFunction
  711.  
  712. ; ------------------------------------------------------------------------------------------------------------
  713. ; CUSTOM FUNCTION: HH SHOW MENU VAULTS
  714. ; ------------------------------------------------------------------------------------------------------------
  715.  
  716. Function HH_ShowMenuVaults()
  717. Int Selected = HH_DestMessageSpecificVaults.Show()
  718.  
  719. If Selected >= 0 && Selected <= 9
  720. HHQuestScript.HH_SetDestination(QuestRefVaults, Selected)
  721. Utility.WaitMenuMode(0.1)
  722. HHQuestScript.HH_StartHitching()
  723. Else
  724. HH_ShowTheSpecificMenu()
  725. EndIf
  726. EndFunction
  727.  
  728. ; ------------------------------------------------------------------------------------------------------------
  729. ; CUSTOM FUNCTION: HH SHOW DLC OPTIONS
  730. ; ------------------------------------------------------------------------------------------------------------
  731.  
  732. Function HH_ShowDLCOptions()
  733. Int DLCOptionsBP = HH_MenuMessageDLCOptions.Show() ; DLCOptions shows and waits for player response
  734.  
  735. If DLCOptionsBP == 0 ; DLCOptions: Disable All DLC Destinations
  736. HH_OptionExcludeDLC.SetValue(1)
  737. HH_OptionExcludeFH.SetValue(1)
  738. HH_OptionExcludeNW.SetValue(1)
  739. HH_OptionExcludeVT.SetValue(1)
  740. ElseIf DLCOptionsBP == 1 ; DLCOptions: Enable All DLC Destinations
  741. HH_OptionExcludeDLC.SetValue(0)
  742. HH_OptionExcludeFH.SetValue(0)
  743. HH_OptionExcludeNW.SetValue(0)
  744. HH_OptionExcludeVT.SetValue(0)
  745. ElseIf DLCOptionsBP == 2 ; DLCOptions: Disable Far Harbor Destinations
  746. HH_OptionExcludeFH.SetValue(1)
  747. ElseIf DLCOptionsBP == 3 ; DLCOptions: Enable Far Harbor Destinations
  748. HH_OptionExcludeFH.SetValue(0)
  749. ElseIf DLCOptionsBP == 4 ; DLCOptions: Disable Nuka-World Destinations
  750. HH_OptionExcludeNW.SetValue(1)
  751. ElseIf DLCOptionsBP == 5 ; DLCOptions: Enable Nuka-World Destinations
  752. HH_OptionExcludeNW.SetValue(0)
  753. ElseIf DLCOptionsBP == 6 ; DLCOptions: Disable Vault-Tec Destinations
  754. HH_OptionExcludeVT.SetValue(1)
  755. ElseIf DLCOptionsBP == 7 ; DLCOptions: Enable Vault-Tec Destinations
  756. HH_OptionExcludeVT.SetValue(0)
  757. ElseIf DLCOptionsBP == 8 ; DLCOptions: Back
  758. HH_ShowMainMenu()
  759. EndIf
  760.  
  761. If DLCOptionsBP >= 0 && DLCOptionsBP < 8 ; If player selected enable/disable button,
  762. HH_ShowDLCOptions() ; refresh the DLCOptions menu on screen
  763. EndIf
  764. EndFunction
  765.  
  766. ; ------------------------------------------------------------------------------------------------------------
  767. ; CUSTOM FUNCTION: HH SHOW CAMERA OPTIONS
  768. ; ------------------------------------------------------------------------------------------------------------
  769.  
  770. Function HH_ShowCameraOptions()
  771. Int CameraOptionsBP = HH_MenuMessageCameraOptions.Show() ; CameraOptions shows and waits for player response
  772.  
  773. If CameraOptionsBP == 0 ; CameraOptions: Disable Spin Camera
  774. HH_OptionSpinCamera.SetValue(0)
  775. ElseIf CameraOptionsBP == 1 ; CameraOptions: Enable Spin Camera
  776. HH_OptionSpinCamera.SetValue(1)
  777. ElseIf CameraOptionsBP == 2 ; CameraOptions: Disable Spin Ghost
  778. HH_OptionSpinGhost.SetValue(0)
  779. ElseIf CameraOptionsBP == 3 ; CameraOptions: Enable Spin Ghost
  780. HH_OptionSpinGhost.SetValue(1)
  781. ElseIf CameraOptionsBP == 4 ; CameraOptions: Set Camera Max Distance
  782. HH_ShowSetMax()
  783. ElseIf CameraOptionsBP == 5 ; CameraOptions: Set Camera Min Distance
  784. HH_ShowSetMin()
  785. ElseIf CameraOptionsBP == 6 ; CameraOptions: Set Spin Duration
  786. HH_ShowSetDuration()
  787. ElseIf CameraOptionsBP == 7 ; CameraOptions: Back
  788. HH_ShowMainMenu()
  789. EndIf
  790.  
  791. If CameraOptionsBP >= 0 && CameraOptionsBP < 4 ; If player selected enable/disable button,
  792. HH_ShowCameraOptions() ; refresh the CameraOptions menu on screen
  793. EndIf
  794. EndFunction
  795.  
  796. ; ------------------------------------------------------------------------------------------------------------
  797. ; CUSTOM FUNCTION: HH SHOW SET MAX
  798. ; ------------------------------------------------------------------------------------------------------------
  799.  
  800. Function HH_ShowSetMax()
  801. Float MaxNum
  802.  
  803. CurrentStatus = HH_OptionCamMaxDistance.GetValue()
  804. Int SetMaxBP = HH_MenuMessageSetMax.Show(CurrentStatus) ; SetMax shows and waits for player response
  805.  
  806. If SetMaxBP == 0 ; SetMax: 150 (vanilla default)
  807. MaxNum = 150
  808. ElseIf SetMaxBP == 1 ; SetMax: 200 (mod default)
  809. MaxNum = 200
  810. ElseIf SetMaxBP == 2 ; SetMax: 250
  811. MaxNum = 250
  812. ElseIf SetMaxBP == 3 ; SetMax: 500
  813. MaxNum = 500
  814. ElseIf SetMaxBP == 4 ; SetMax: 750
  815. MaxNum = 750
  816. ElseIf SetMaxBP == 5 ; SetMax: 1000
  817. MaxNum = 1000
  818. ElseIf SetMaxBP == 6 ; SetMax: Back
  819. HH_ShowCameraOptions()
  820. EndIf
  821.  
  822. If SetMaxBP < 6 ; If player selected a value,
  823. HH_OptionCamMaxDistance.SetValue(MaxNum) ; set camera max distance
  824. HH_ShowSetMax() ; and refresh the SetMax menu on screen
  825. EndIf
  826. EndFunction
  827.  
  828. ; ------------------------------------------------------------------------------------------------------------
  829. ; CUSTOM FUNCTION: HH SHOW SET MIN
  830. ; ------------------------------------------------------------------------------------------------------------
  831.  
  832. Function HH_ShowSetMin()
  833. Float MinNum
  834.  
  835. CurrentStatus = HH_OptionCamMinDistance.GetValue()
  836. Int SetMinBP = HH_MenuMessageSetMin.Show(CurrentStatus) ; SetMin shows and waits for player response
  837.  
  838. If SetMinBP == 0 ; SetMin: 0 (vanilla default)
  839. MinNum = 0
  840. ElseIf SetMinBP == 1 ; SetMin: 100 (mod default)
  841. MinNum = 100
  842. ElseIf SetMinBP == 2 ; SetMin: 150
  843. MinNum = 150
  844. ElseIf SetMinBP == 3 ; SetMin: 200
  845. MinNum = 200
  846. ElseIf SetMinBP == 4 ; SetMin: 250
  847. MinNum = 250
  848. ElseIf SetMinBP == 5 ; SetMin: 500
  849. MinNum = 500
  850. ElseIf SetMinBP == 6 ; SetMin: Back
  851. HH_ShowCameraOptions()
  852. EndIf
  853.  
  854. If SetMinBP < 6 ; If player selected a value,
  855. HH_OptionCamMinDistance.SetValue(MinNum) ; set camera min distance
  856. HH_ShowSetMin() ; and refresh the SetMin menu on screen
  857. EndIf
  858. EndFunction
  859.  
  860. ; ------------------------------------------------------------------------------------------------------------
  861. ; CUSTOM FUNCTION: HH SHOW SET DURATION
  862. ; ------------------------------------------------------------------------------------------------------------
  863.  
  864. Function HH_ShowSetDuration()
  865. Float MinNum
  866.  
  867. CurrentStatus = HH_OptionSpinDuration.GetValue()
  868. Int SetMinBP = HH_MenuMessageSetDuration.Show(CurrentStatus) ; SetDuration shows and waits for player response
  869.  
  870. If SetMinBP == 0 ; SetDuration: 10
  871. MinNum = 10
  872. ElseIf SetMinBP == 1 ; SetDuration: 15
  873. MinNum = 15
  874. ElseIf SetMinBP == 2 ; SetDuration: 20 (mod default)
  875. MinNum = 20
  876. ElseIf SetMinBP == 3 ; SetDuration: 25
  877. MinNum = 25
  878. ElseIf SetMinBP == 4 ; SetDuration: 30
  879. MinNum = 30
  880. ElseIf SetMinBP == 5 ; SetDuration: 60
  881. MinNum = 60
  882. ElseIf SetMinBP == 6 ; SetDuration: Back
  883. HH_ShowCameraOptions()
  884. EndIf
  885.  
  886. If SetMinBP < 6 ; If player selected a value,
  887. HH_OptionSpinDuration.SetValue(MinNum) ; set camera spin duration
  888. HH_ShowSetDuration() ; and refresh the SetDuration menu on screen
  889. EndIf
  890. EndFunction
  891.  
  892. ; ------------------------------------------------------------------------------------------------------------
  893. ; CUSTOM FUNCTION: HH SHOW TELEPORT OPTIONS
  894. ; ------------------------------------------------------------------------------------------------------------
  895.  
  896. Function HH_ShowTeleportOptions()
  897. Int TeleportOptionsBP = HH_MenuMessageTeleportOptions.Show() ; TeleportOptions shows and waits for player response
  898.  
  899. If TeleportOptionsBP == 0 ; TeleportOptions: Disable Auto Time Change
  900. HH_OptionSetTime.SetValue(0)
  901. ElseIf TeleportOptionsBP == 1 ; TeleportOptions: Enable Auto Time Change
  902. HH_OptionSetTime.SetValue(1)
  903. ElseIf TeleportOptionsBP == 2 ; TeleportOptions: Set Preferred Time
  904. HH_ShowSetTime()
  905. ElseIf TeleportOptionsBP == 3 ; TeleportOptions: Disable Auto Weather Change
  906. HH_OptionSetWeather.SetValue(0)
  907. ElseIf TeleportOptionsBP == 4 ; TeleportOptions: Enable Auto Weather Change
  908. HH_OptionSetWeather.SetValue(1)
  909. ElseIf TeleportOptionsBP == 5 ; TeleportOptions: Set Preferred Weather
  910. HH_ShowSetWeather()
  911. ElseIf TeleportOptionsBP == 6 ; TeleportOptions: Disable Heal On Teleport
  912. HH_OptionHeal.SetValue(0)
  913. ElseIf TeleportOptionsBP == 7 ; TeleportOptions: Enable Heal On Teleport
  914. HH_OptionHeal.SetValue(1)
  915. ElseIf TeleportOptionsBP == 8 ; TeleportOptions: Disable Loading Screens
  916. HH_OptionFastTravel.SetValue(0)
  917. ElseIf TeleportOptionsBP == 9 ; TeleportOptions: Enable Loading Screens
  918. HH_OptionFastTravel.SetValue(1)
  919. ElseIf TeleportOptionsBP == 10 ; TeleportOptions: Disable Spin Camera
  920. HH_OptionSpinCamera.SetValue(0)
  921. ElseIf TeleportOptionsBP == 11 ; TeleportOptions: Enable Spin Camera
  922. HH_OptionSpinCamera.SetValue(1)
  923. ElseIf TeleportOptionsBP == 12 ; TeleportOptions: Disable Teleport Sounds
  924. HH_OptionTeleportSound.SetValue(0)
  925. ElseIf TeleportOptionsBP == 13 ; TeleportOptions: Enable Teleport Sounds
  926. HH_OptionTeleportSound.SetValue(1)
  927. ElseIf TeleportOptionsBP == 14 ; TeleportOptions: Advanced Options
  928. HH_ShowAdvancedOptions()
  929. ElseIf TeleportOptionsBP == 15 ; TeleportOptions: Back
  930. HH_ShowMainMenu()
  931. EndIf
  932.  
  933. If TeleportOptionsBP >= 0 && TeleportOptionsBP < 14 ; If player selected enable/disable button,
  934. If TeleportOptionsBP == 2 || TeleportOptionsBP == 5
  935. ; do not refresh submenu choices
  936. Else
  937. HH_ShowTeleportOptions() ; refresh the TeleportOptions menu on screen
  938. EndIf
  939. EndIf
  940. EndFunction
  941.  
  942. ; ------------------------------------------------------------------------------------------------------------
  943. ; CUSTOM FUNCTION: HH SHOW SET TIME
  944. ; ------------------------------------------------------------------------------------------------------------
  945.  
  946. Function HH_ShowSetTime()
  947. Float PrefTime
  948.  
  949. CurrentStatus = HH_OptionSetTimePreference.GetValue()
  950. Int SetTimeBP = HH_MenuMessageSetTime.Show(CurrentStatus) ; SetTime shows and waits for player response
  951.  
  952. If SetTimeBP == 0 ; SetTime: 3 AM
  953. PrefTime = 3
  954. ElseIf SetTimeBP == 1 ; SetTime: 6 AM
  955. PrefTime = 6
  956. ElseIf SetTimeBP == 2 ; SetTime: 9 AM
  957. PrefTime = 9
  958. ElseIf SetTimeBP == 3 ; SetTime: Noon
  959. PrefTime = 12
  960. ElseIf SetTimeBP == 4 ; SetTime: 3 PM
  961. PrefTime = 15
  962. ElseIf SetTimeBP == 5 ; SetTime: 6 PM
  963. PrefTime = 18
  964. ElseIf SetTimeBP == 6 ; SetTime: 9 PM
  965. PrefTime = 21
  966. ElseIf SetTimeBP == 7 ; SetTime: Midnight
  967. PrefTime = 24
  968. ElseIf SetTimeBP == 8 ; SetTime: Back
  969. HH_ShowTeleportOptions()
  970. EndIf
  971.  
  972. If SetTimeBP < 8 ; If player selected a value,
  973. HH_OptionSetTimePreference.SetValue(PrefTime) ; set preferred time
  974. HH_ShowSetTime() ; and refresh the SetTime menu on screen
  975. EndIf
  976. EndFunction
  977.  
  978. ; ------------------------------------------------------------------------------------------------------------
  979. ; CUSTOM FUNCTION: HH SHOW SET WEATHER
  980. ; ------------------------------------------------------------------------------------------------------------
  981.  
  982. Function HH_ShowSetWeather()
  983. Float PrefWeather
  984.  
  985. CurrentStatus = HH_OptionSetWeatherPreference.GetValue()
  986. Int SetWeatherBP = HH_MenuMessageSetWeather.Show(CurrentStatus) ; SetWeather shows and waits for player response
  987.  
  988. If SetWeatherBP == 0 ; SetWeather: CommonwealthClear
  989. PrefWeather = 1
  990. ElseIf SetWeatherBP == 1 ; SetWeather: CommonwealthDusty
  991. PrefWeather = 2
  992. ElseIf SetWeatherBP == 2 ; SetWeather: CommonwealthFoggy
  993. PrefWeather = 3
  994. ElseIf SetWeatherBP == 3 ; SetWeather: CommonwealthMisty
  995. PrefWeather = 4
  996. ElseIf SetWeatherBP == 4 ; SetWeather: CommonwealthMistyRainy
  997. PrefWeather = 5
  998. ElseIf SetWeatherBP == 5 ; SetWeather: CommonwealthOvercast
  999. PrefWeather = 6
  1000. ElseIf SetWeatherBP == 6 ; SetWeather: CommonwealthGSRadstorm
  1001. PrefWeather = 7
  1002. ElseIf SetWeatherBP == 7 ; SetWeather: CommonwealthRain
  1003. PrefWeather = 8
  1004. ElseIf SetWeatherBP == 8 ; SetWeather: Back
  1005. HH_ShowTeleportOptions()
  1006. EndIf
  1007.  
  1008. If SetWeatherBP < 8 ; If player selected a value,
  1009. HH_OptionSetWeatherPreference.SetValue(PrefWeather) ; set preferred weather
  1010. HH_ShowSetWeather() ; and refresh the SetWeather menu on screen
  1011. EndIf
  1012. EndFunction
  1013.  
  1014. ; ------------------------------------------------------------------------------------------------------------
  1015. ; CUSTOM FUNCTION: HH SHOW ADVANCED OPTIONS
  1016. ; ------------------------------------------------------------------------------------------------------------
  1017.  
  1018. Function HH_ShowAdvancedOptions()
  1019. Int AdvancedOptionsBP = HH_MenuMessageAdvancedOptions.Show() ; AdvancedOptions shows and waits for player response
  1020.  
  1021. If AdvancedOptionsBP == 0 ; AdvancedOptions: Set X Offset
  1022. HH_ShowSetX()
  1023. ElseIf AdvancedOptionsBP == 1 ; AdvancedOptions: Set Y Offset
  1024. HH_ShowSetY()
  1025. ElseIf AdvancedOptionsBP == 2 ; AdvancedOptions: Set Z Offset
  1026. HH_ShowSetZ()
  1027. ElseIf AdvancedOptionsBP == 3 ; AdvancedOptions: Back
  1028. HH_ShowTeleportOptions()
  1029. EndIf
  1030. EndFunction
  1031.  
  1032. ; ------------------------------------------------------------------------------------------------------------
  1033. ; CUSTOM FUNCTION: HH SHOW SET X
  1034. ; ------------------------------------------------------------------------------------------------------------
  1035.  
  1036. Function HH_ShowSetX()
  1037. Float MinNum
  1038.  
  1039. CurrentStatus = HH_OptionOffsetX.GetValue()
  1040. Int SetX = HH_MenuMessageSetX.Show(CurrentStatus) ; SetX shows and waits for player response
  1041.  
  1042. If SetX == 0 ; SetX: 0
  1043. MinNum = 0
  1044. ElseIf SetX == 1 ; SetX: 100
  1045. MinNum = 100
  1046. ElseIf SetX == 2 ; SetX: 250 (mod default)
  1047. MinNum = 250
  1048. ElseIf SetX == 3 ; SetX: 500
  1049. MinNum = 500
  1050. ElseIf SetX == 4 ; SetX: 750
  1051. MinNum = 750
  1052. ElseIf SetX == 5 ; SetX: 1000
  1053. MinNum = 1000
  1054. ElseIf SetX == 6 ; SetX: Back
  1055. HH_ShowAdvancedOptions()
  1056. EndIf
  1057.  
  1058. If SetX < 6 ; If player selected a value,
  1059. HH_OptionOffsetX.SetValue(MinNum) ; set X offset
  1060. HH_ShowSetX() ; and refresh the SetX menu on screen
  1061. EndIf
  1062. EndFunction
  1063.  
  1064. ; ------------------------------------------------------------------------------------------------------------
  1065. ; CUSTOM FUNCTION: HH SHOW SET Y
  1066. ; ------------------------------------------------------------------------------------------------------------
  1067.  
  1068. Function HH_ShowSetY()
  1069. Float MinNum
  1070.  
  1071. CurrentStatus = HH_OptionOffsetY.GetValue()
  1072. Int SetY = HH_MenuMessageSetY.Show(CurrentStatus) ; SetY shows and waits for player response
  1073.  
  1074. If SetY == 0 ; SetY: 0
  1075. MinNum = 0
  1076. ElseIf SetY == 1 ; SetY: 100
  1077. MinNum = 100
  1078. ElseIf SetY == 2 ; SetY: 250 (mod default)
  1079. MinNum = 250
  1080. ElseIf SetY == 3 ; SetY: 500
  1081. MinNum = 500
  1082. ElseIf SetY == 4 ; SetY: 750
  1083. MinNum = 750
  1084. ElseIf SetY == 5 ; SetY: 1000
  1085. MinNum = 1000
  1086. ElseIf SetY == 6 ; SetY: Back
  1087. HH_ShowAdvancedOptions()
  1088. EndIf
  1089.  
  1090. If SetY < 6 ; If player selected a value,
  1091. HH_OptionOffsetY.SetValue(MinNum) ; set Y offset
  1092. HH_ShowSetY() ; and refresh the SetY menu on screen
  1093. EndIf
  1094. EndFunction
  1095.  
  1096. ; ------------------------------------------------------------------------------------------------------------
  1097. ; CUSTOM FUNCTION: HH SHOW SET Z
  1098. ; ------------------------------------------------------------------------------------------------------------
  1099.  
  1100. Function HH_ShowSetZ()
  1101. Float MinNum
  1102.  
  1103. CurrentStatus = HH_OptionOffsetZ.GetValue()
  1104. Int SetZ = HH_MenuMessageSetZ.Show(CurrentStatus) ; SetZ shows and waits for player response
  1105.  
  1106. If SetZ == 0 ; SetZ: 0
  1107. MinNum = 0
  1108. ElseIf SetZ == 1 ; SetZ: 100
  1109. MinNum = 100
  1110. ElseIf SetZ == 2 ; SetZ: 250
  1111. MinNum = 250
  1112. ElseIf SetZ == 3 ; SetZ: 500 (mod default)
  1113. MinNum = 500
  1114. ElseIf SetZ == 4 ; SetZ: 750
  1115. MinNum = 750
  1116. ElseIf SetZ == 5 ; SetZ: 1000
  1117. MinNum = 1000
  1118. ElseIf SetZ == 6 ; SetZ: Back
  1119. HH_ShowAdvancedOptions()
  1120. EndIf
  1121.  
  1122. If SetZ < 6 ; If player selected a value,
  1123. HH_OptionOffsetZ.SetValue(MinNum) ; set Z offset
  1124. HH_ShowSetZ() ; and refresh the SetZ menu on screen
  1125. EndIf
  1126. EndFunction
  1127.  
  1128. ; ------------------------------------------------------------------------------------------------------------
  1129. ; CUSTOM FUNCTION: HH SET MENU DEFAULTS
  1130. ; ------------------------------------------------------------------------------------------------------------
  1131.  
  1132. Function HH_SetMenuDefaults()
  1133. HH_OptionCamMaxDistance.SetValue(200)
  1134. HH_OptionCamMinDistance.SetValue(100)
  1135. HH_OptionDevTracking.SetValue(0)
  1136. HH_OptionExcludeDLC.SetValue(0)
  1137. HH_OptionExcludeFH.SetValue(0)
  1138. HH_OptionExcludeNW.SetValue(0)
  1139. HH_OptionExcludeVT.SetValue(0)
  1140. HH_OptionFastTravel.SetValue(1)
  1141. HH_OptionOffsetX.SetValue(250)
  1142. HH_OptionOffsetY.SetValue(250)
  1143. HH_OptionOffsetZ.SetValue(500)
  1144. HH_OptionSetTime.SetValue(0)
  1145. HH_OptionSetTimePreference.SetValue(9)
  1146. HH_OptionSetWeather.SetValue(0)
  1147. HH_OptionSetWeatherPreference.SetValue(1)
  1148. HH_OptionSitFurniture.SetValue(1)
  1149. HH_OptionSpinCamera.SetValue(1)
  1150. HH_OptionSpinDuration.SetValue(20)
  1151. HH_OptionSpinGhost.SetValue(1)
  1152. HH_OptionHeal.SetValue(0)
  1153. HH_OptionTeleportSound.SetValue(1)
  1154. EndFunction
  1155.  
  1156. ; ------------------------------------------------------------------------------------------------------------
  1157. ; EVENT: ON MENU OPEN CLOSE EVENT
  1158. ; ------------------------------------------------------------------------------------------------------------
  1159.  
  1160. Event OnMenuOpenCloseEvent(string asMenuName, bool abOpening)
  1161. UnregisterForMenuOpenCloseEvent("PipboyMenu") ; Cancel player button spams
  1162.  
  1163. If (asMenuName== "PipboyMenu") ; When the Pip-Boy
  1164. If (!abOpening) ; closes,
  1165. Int PrefTime = HH_OptionSetTimePreference.GetValue() as Int ; get player's preferred time
  1166. Utility.Wait(5)
  1167. HHQuestScript.HH_ForceTime(PrefTime) ; Send time to ForceTime function
  1168. EndIf
  1169. EndIf
  1170. EndEvent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement