Advertisement
ThoraldGM

HH Map Script 20171227

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