Advertisement
ThoraldGM

HH_MapScript 20180109

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