Jump to content

Quest / Script stops functioning after exit / reload


mastahbossu

Recommended Posts

This script works the way it's intended.. as long as you don't quit the game or reload, what kind of functionality do I need to add around it to make sure FNV remembers its functionality and saved variables etc?

 

Thanks!

scn SimpleDLCDelayScript

; Script for Simple DLC Delay Quest

short nNVDLC01Radio

short nNVDLC02Radio

short nNVDLC03Radio

BEGIN GameMode
			
			if ( nNVDLC01Radio != 4 )
				if ( nNVDLC01Radio == 3 && Player.GetInWorldSpace WastelandNV == 1 )
					NVDLC01RadioStationRef.disable
					set nNVDLC01Radio to 4
				elseif ( nNVDLC01Radio == 2 && GetQuestRunning NVDLC01MQ01 == 1 )
					NVDLC01RadioStationRef.SetRadioBroadcastType 1
					set nNVDLC01Radio to 3
				elseif ( nNVDLC01Radio == 1 )
					NVDLC01RadioStationRef.SetRadioBroadcastType 0
					NVDLC01RadioStationRef.SetRadioPosRef AbandonedBoSBunkerMarker
					NVDLC01RadioStationRef.SetRadioRadius 38000
					NVDLC01RadioStationRef.SetRadioStatic 5
					set nNVDLC01Radio to 2
				elseif ( nNVDLC01Radio == 0 && Player.GetDistance2D AbandonedBoSBunkerMarker < 37500 )
					NVDLC01RadioStationRef.enable
					ForceRadioStationUpdate
					ResetPipboyManager
					set nNVDLC01Radio to 1
				endif
	
				if ( NVDLC01RadioStationRef.GetRadioBroadcastType == 1 && nNVDLC01Radio == 2 )
					set nNVDLC01Radio to 1
				endif
				
				if ( nNVDLC01Radio == 2 && NVDLC02ZionToMojaveDoorREF.bNVRadiosOff == 1 )
					NVDLC01RadioStationRef.disable
					set nNVDLC01Radio to 5
				elseif ( nNVDLC01Radio == 2 && NVDLC03Intro.bIntroStarted == 1 )
					NVDLC01RadioStationRef.disable
					set nNVDLC01Radio to 5
				;elseif ( nNVDLC01Radio == 2 && NVDLC04MQ00.bInMojave == 0 )
				;	NVDLC01RadioStationRef.disable
				;	set nNVDLC01Radio to 5
				elseif ( nNVDLC01Radio == 5 && Player.GetInWorldspace WastelandNV == 1 )
					NVDLC01RadioStationRef.enable
					set nNVDLC01Radio to 1
				endif
			endif
			
			if ( nNVDLC02Radio != 3 )
				if ( nNVDLC02Radio == 2 && GetQuestRunning NVDLC02MQ01 == 1 )
					NVDLC02JedRadioTAREF.disable
					set nNVDLC02Radio to 3
				elseif ( nNVDLC02Radio == 1 )			
					NVDLC02JedRadioTAREF.SetRadioBroadcastType 0
					NVDLC02JedRadioTAREF.SetRadioPosRef NorthernPassageMapMarker
					NVDLC02JedRadioTAREF.SetRadioRadius 45000
					NVDLC02JedRadioTAREF.SetRadioStatic 5
					set nNVDLC02Radio to 2
				elseif ( nNVDLC02Radio == 0 && Player.GetDistance2D NorthernPassageMapMarker < 44500 )
					StartQuest NVDLC02RadioMessage
					NVDLC02JedRadioTAREF.enable
					ForceRadioStationUpdate
					ResetPipboyManager
					set nNVDLC02Radio to 1
				endif
	
				if ( NVDLC02JedRadioTAREF.GetRadioBroadcastType == 1 && nNVDLC02Radio == 2 )
					set nNVDLC02Radio to 1
				endif
	
				if ( nNVDLC02Radio == 2 && NVDLC01MQ01.bRadioControl == 1 )
					NVDLC02JedRadioTAREF.disable
					set nNVDLC02Radio to 4
				elseif ( nNVDLC02Radio == 2 && NVDLC03Intro.bIntroStarted == 1 )
					NVDLC02JedRadioTAREF.disable
					set nNVDLC02Radio to 4
				;elseif ( nNVDLC02Radio == 2 && NVDLC04MQ00.bInMojave == 0 )
				;	NVDLC02JedRadioTAREF.disable
				;	set nNVDLC02Radio to 4
				elseif ( nNVDLC02Radio == 4 && Player.GetInWorldspace WastelandNV == 1 )
					NVDLC02JedRadioTAREF.enable
					set nNVDLC02Radio to 2
				endif
			endif
			
			if ( nNVDLC03Radio != 3 )
				if ( nNVDLC03Radio == 2 && GetQuestRunning NVDLC03MQ01 == 1 )
					NVDLC03RadioREF.SetRadioBroadcastType 1
					PipBoyRadio 1 NVDLC03RadioREF
					set nNVDLC03Radio to 3
				elseif ( nNVDLC03Radio == 1 )			
					NVDLC03RadioREF.SetRadioBroadcastType 0
					NVDLC03RadioREF.SetRadioPosRef MojaveDriveInMapMarker
					NVDLC03RadioREF.SetRadioRadius 27000
					NVDLC03RadioREF.SetRadioStatic 5
					set nNVDLC03Radio to 2
				elseif ( nNVDLC03Radio == 0 && Player.GetDistance2D MojaveDriveInMapMarker < 26500 )
					StartQuest NVDLC03RadioBroadcast
					NVDLC03RadioREF.Enable
					ForceRadioStationUpdate
					ResetPipboyManager
					set nNVDLC03Radio to 1
				endif
	
				if ( NVDLC03RadioREF.GetRadioBroadcastType == 1 && nNVDLC03Radio == 2 )
					set nNVDLC02Radio to 1
				endif
	
				if ( nNVDLC03Radio == 2 && NVDLC01MQ01.bRadioControl == 1 )
					NVDLC03RadioREF.disable
					set nNVDLC03Radio to 4
				elseif ( nNVDLC03Radio == 2 && NVDLC02ZionToMojaveDoorREF.bNVRadiosOff == 1 )
					NVDLC03RadioREF.disable
					set nNVDLC03Radio to 4
				;elseif ( nNVDLC03Radio == 2 && NVDLC04MQ00.bInMojave == 0 )
				;	NVDLC03RadioREF.disable
				;	set nNVDLC03Radio to 4
				elseif ( nNVDLC03Radio == 4 && Player.GetInWorldspace WastelandNV == 1 )
					NVDLC03RadioREF.enable
					set nNVDLC03Radio to 2
				endif
			endif

			if ( nNVDLC01Radio == 4 && nNVDLC02Radio == 3 && nNVDLC03Radio == 3 )
				StopQuest SimpleDLCDelay
			endif
END
Link to comment
Share on other sites

The status of quest vars is always saved, so the question is what makes you think they aren't, ie: what exactly goes wrong?

 

The script works fine, but when I save, quit and load none of its functionality is there.

 

For example one of its functions is to enable radio stations when you get within a certain distance of them, but that doesn't work after you load a save game with the mod enabled.

Link to comment
Share on other sites

You should probably check for code in the DLCs that resets/restarts the original refs and quests after a game load. Right-clicking on them and selecting "use info" is how to trace things like that. Alternatively, you could have a look at how other DLC delay mods get around such issues.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...