Jump to content

Sweet6Shooter

Premium Member
  • Posts

    84
  • Joined

  • Last visited

Posts posted by Sweet6Shooter

  1. They don't even apply seconds later. It's not that they're not savebaked, it's that the changes disappear the moment the script making them is done. All the changes in there are done with GetGameRestarted, so they'll run every time. They even show correctly when I have the script check the values being changed as soon as they're done on the base game weapon, and they print matching values to the GRA versions (except for the baseball bat, for some reason). Then as soon as I check the function of adding an extended mag to a weapon, there's no change in the clip capacity. If I get the mod effect value with the console, it's reverted to 0, across the board.

    If I set the mod value with the console specifically, the value persists during the game session.

     

    I even tried just directly setting the mod's value in the script, no ref holding or value holding, and it still didn't take.

  2. So I'm trying to use the SetWeaponItemModValue command, and it will work, the script that's running it can check the new value and find it correctly, but then when I check it in the game the values are always 0. Anybody know why?

    https://pastebin.com/LirPhmeb

    It prints a new check of the mod value after it gets set, which shows the correct values, but then when I check it in game, the mod's effects don't take, and when I check the values with the console, they're all 0:

    https://pastebin.com/RmEfBXiD

     

    Here's the full script: https://pastebin.com/Lb9mNUUE

    It successfully sets all the models, mods, and sounds correctly, and seems to set the mod's values correctly, according to the script when it runs, but the mod values revert to 0 immediately once the script has finished. The ModValue variable is declared as a float, like it should be.

     

    File can be found here:

    https://www.nexusmods.com/newvegas/mods/73651

  3. This is a script segment ePath sent me, it'll require JIP

    Try doing this and then containing the commands you want to do inside it:

    array_var sCompanions
    array_var aEntry
    
    let sCompanions := player.getteammates
    if sCompanions
       foreach Array_Var aEntry <- sCompanions
       let rCompanion := aEntry["value"]
       do your commands here
    loop
    endif
    
  4. So for the first one, you can make and attach an object effect that uses the DamageHealth base effect. Make sure you set the type to touch, and the actor value to health, then for your conditions, use GetIsCreatureType equal to 1, and set it to abomination for creature type. You can also set it to whatever other creature type you like.

    I'm pretty sure for the latter you could use the flamer base effects, like FlamerBurnMagicEffect or the like, with the same conditions. I'm not sure which one you'll want to use, so noodle around with the different flamer base effects until you find something you like.

  5.  

     

    I also made sure to test this with no other plugins installed, so it's not that.

     

     

     

    okies well scratch my rant about that .

     

    Maybe start again explaining your problem if you still want help .

     

     

    This script works correctly, the first time. The player arrives at the intended marker in the new worldspace with no issues, once the DM slideshow is done. However, the second time the player selects the second menu option after returning, the load screen starts, then restarts, then the player is placed at the default starting marker in DM, right in front of the fountain.

    I've tried commenting out literally every single line I added that the base game doesn't use, and the behavior is still the same.
    This script successfully returns the player to the new worldspace, but with a stuck black screen, that only disappears when the console or start menu is opened. Sometimes the load screen stays visible, flickering as it constantly resets.
    I've tried commenting out every line other than the one that moves the player, and tried subbing the moveto command into menumode instead of gamemode, and neither made a difference.
    It also seems that just raw using the command player.movetofade sDMDryCMapMarkerRef2 in the console fails in the exact same way.
    ...added a debug print that confirmed that the script is indeed seeing the correct marker, but it still fails. Every time the script is fired, it also respawns any enemies that have the respawn flag in the cell. Enabling fast travel manually before the transportation line doesn't change anything.
    I looked into the other mods that allow the player to return, and they use doors that just take you to back and forth. Doing so still has the same problem here. Frequently in tests, the new cell's name is displayed, even though the player hasn't moved.
    ... the player completes Dead Money, then after they watch the ending slideshow, they go to the new worldspace. That works fine the first time. Then, they pass through the new worldspace, and get to an activator which will take them back to the mojave. This also works the first time. They're then provided a flare gun that allows them to return to the new worldspace, and they can use an activator to return to Dead Money as well. Returning to Dead Money works fine, but then it breaks when they try to leave again. The flare gun to return to the new worldspace also fails.
    The line does print in the console, but the player is just moved to the center of the cell again. Sometimes the name of the new cell will show up on the side of the screen, but the player isn't in the new cell. It's so bizarre. Movetofade doesn't do anything different than moveto either.
    I also made sure to test this with no other plugins installed, so it's not that.
    All of the pertinent markers are persistent xmarkerheading references, positioned just above the floor, not clipping into it, with editor ids. The game can successfully print the editor id of the marker the script is referencing, but it just simply won't move the player out of the Villa Fountain cell, and when the player is brought to the Dry Canyon marker, they successfully arrive, but the screen is stuck black and the game isn't active.
    PCB didn't change anything
    I also tried making new markers and switching to those, which didn't work.
  6. All of the pertinent markers are persistent xmarkerheading references, positioned just above the floor, not clipping into it, with editor ids. The game can successfully print the editor id of the marker the script is referencing, but it just simply won't move the player out of the Villa Fountain cell, and when the player is brought to the Dry Canyon marker, they successfully arrive, but the screen is stuck black and the game isn't active.

  7. The line does print in the console, but the player is just moved to the center of the cell again. Sometimes the name of the new cell will show up on the side of the screen, but the player isn't in the new cell. It's so bizarre. Movetofade doesn't do anything different than moveto either.

    Here's a link to a pre release build, if you want to open it up:

    https://www.nexusmods.com/newvegas/images/123329

     

    I also made sure to test this with no other plugins installed, so it's not that.

  8. So the player completes Dead Money, then after they watch the ending slideshow, they go to the new worldspace. That works fine the first time. Then, they pass through the new worldspace, and get to an activator which will take them back to the mojave. This also works the first time. They're then provided a flare gun that allows them to return to the new worldspace, and they can use an activator to return to Dead Money as well. Returning to Dead Money works fine, but then it breaks when they try to leave again. The flare gun to return to the new worldspace also fails.

  9. Tried rewriting the script, aligning it more like the base game script, and added a debug print that confirmed that the script is indeed seeing the correct marker, but it still fails. Every time the script is fired, it also respawns any enemies that have the respawn flag in the cell. Enabling fast travel manually before the transportation line doesn't change anything.

    scn NVDLC01SMGateMojaveSCRIPT
    ; JSH 10.11.10
    ; Script that returns player to BoS Bunker in Mojave Wasteland.
    
    ; CES 10/26/10
    ; Updating the script to move the ending slideshow from here to the Vault Elevator
    
    ;Variables
    
    Short bButton					;Grabs the button pressed for the message box
    short bActivated				;Tracks if the player has exited the DLC
    
    short sButtons
    float sEnds
    float sSurvs
    float sIngestPenalty
    float sSleepPenalty
    string_var TestEditorID
    
    ; Ending must have played at least once
    short bEndingDone
    ref rCountryRadio
    
    BEGIN OnActivate
    
    	if (IsActionRef player) && (GetLocked == 0)
    
    		ShowMessage NVDLC01TravelToMojaveMsg
    
    	endif
    
    END
    
    BEGIN gamemode
    
    	set bButton to GetButtonPressed
    		
    	if ( bButton == 1 ) && (bActivated == 0)
    
    			set bActivated to 1
    	 	printc "bactivated was zero, set to 1"
    
    		;DisablePlayerControls 1 1 1 1 1 1 1
    		;StartQuest NVDLC01Ending
    
    		; Enable FNV Radio Stations on DLC end	
    		RNVTARef.Enable;														;Enable Radio New Vegas
    		set rCountryRadio to vCountryRadioREF.GetLinkedRef;		;Country Radio has no ref name, so getlinked
    		rCountryRadio.Enable;												;Disable Country Radio
    
    		;NVDLC01Bartender.AlwaysShowActorSubtitles 0;				;Set up hologram vendors to stop showing subtitles
    		;NVDLC01HologramVendor1REF.AlwaysShowActorSubtitles 0;
    		;NVDLC01HologramVendor2REF.AlwaysShowActorSubtitles 0;
    		;NVDLC01HologramVendor3REF.AlwaysShowActorSubtitles 0;
    		;NVDLC01HoloDealer03.AlwaysShowActorSubtitles 0;
    		;NVDLC01HoloDealer02.AlwaysShowActorSubtitles 0;
    		;NVDLC01HoloDealer01.AlwaysShowActorSubtitles 0;
    		StarletHologramVillaRef.SetNPCRadio 0 NVDLC01RadioStationRef;	;Stop the Starlet Hologram playing the Starlet Radio audio at the fountain
    
    		; NVDLC01RadioDisable												; Disable DLC Radio Stations on DLC End
    		NVDLC01RadioStationChristineREF.disable;
    		StopQuest NVDLC01RadioChristine;
    		NVDLC01RadioStationDeanREF.disable;
    		StopQuest NVDLC01RadioDeanQuest;
    		NVDLC01RadioStationDogREF.disable;
    		StopQuest NVDLC01RadioDog;
    		NVDLC01RadioStationSpeakersREF.disable;
    		StopQuest NVDLC01RadioSpeakers;
    		NVDLC01RadioStationDeanMusicREF.disable;
    		StopQuest NVDLC01RadioDeanMusic;
    		NVDLC01RadioStationElijahREF.disable;
    		StopQuest NVDLC01RadioElijah;		
    
    		RemoveImageSpaceModifier FriendOfTheNightInteriorISFX
    		RemoveImageSpaceModifier FriendOfTheNightISFX
    		player.DispelAllSpells ; Removes all chem effects.
    		PipBoyRadioOff ; Turn off PipBoy radio.
    		Player.ResetHealth;
    		PlayMusic EndSlideShow;
    
    		StopQuest NVDLC01ChristineBarkTimer;
    
    		; Activate End Game Slides
    		DisablePlayerControls 1 1 1 1 1 1 1
    		StartQuest NVDLC01Ending
    
    									  
    
    		player.MoveTo NVDLC01SlideshowMarker
    	elseif ( bButton == 1 ) && (bActivated == 1)
    		printc "bactivated was 1 already"
    		RemoveImageSpaceModifier FriendOfTheNightInteriorISFX
    		RemoveImageSpaceModifier FriendOfTheNightISFX
    		player.DispelAllSpells ; Removes all chem effects.
    		PipBoyRadioOff ; Turn off PipBoy radio.
    		NVDLC01RadioStationChristineREF.disable;
    		StopQuest NVDLC01RadioChristine;
    		NVDLC01RadioStationDeanREF.disable;
    		StopQuest NVDLC01RadioDeanQuest;
    		NVDLC01RadioStationDogREF.disable;
    		StopQuest NVDLC01RadioDog;
    		NVDLC01RadioStationSpeakersREF.disable;
    		StopQuest NVDLC01RadioSpeakers;
    		NVDLC01RadioStationDeanMusicREF.disable;
    		StopQuest NVDLC01RadioDeanMusic;
    		RNVTARef.Enable;														;Enable Radio New Vegas
    		set rCountryRadio to vCountryRadioREF.GetLinkedRef;		;Country Radio has no ref name, so getlinked
    		rCountryRadio.Enable;		
    		StopQuest NVDLC01GlobalToxicDamage
    		set sIngestPenalty to 500
    		set sSleepPenalty to 500
    		set sEnds to player.getpermanentactorvalue Endurance
    		set sSurvs to player.getpermanentactorvalue Survival
    		set sEnds to 1 - (sEnds / 10)
    		set sSurvs to 1 - (sSurvs / 100)
    		set sIngestPenalty to (sIngestPenalty * sEnds * sSurvs)
    		set sSleepPenalty to (sSleepPenalty * sEnds * sSurvs)
    		player.damageAV hunger sIngestPenalty
    		player.damageAV dehydration sIngestPenalty
    		player.damageAV SleepDeprevation sSleepPenalty
    		TestEditorId = (GetEditorID sDMDryCFromDMMapMarkerREF)
    		printc "%z" TestEditorID
    		EnableFastTravel 1 0 0
    
    		player.movetofade sDMDryCFromDMMapMarkerREF
    	elseif ( bButton == 2 )
    		return
    	endif
    
    END
    
  10. I already made an addition to that script, there's nothing there that precludes the player's return:

    scn NVDLC01VillaTravelTriggerScript
    ; JSH
    ; Knocks the player out and transports him to the Villa.
    
    ;CES 10/18/10
    ;Fine tuning and polishing the gassing part of the script
    
    
    short StartUp														;1= Player has tripped the trigger zone
    short EndStartUp													
    float TimerA															
    float TimerB															
    float TimerC															
    float TimerD
    float TimerE
    float TimerZ											;Added for first timer to trigger player teleportation
    
    short bTimerZDone
    
    BEGIN OnTrigger player
    
    	; Complete NVDLC01MQ00 and get the player set up to be knocked out.
    	if (StartUp == 0) && (GetStageDone NVDLC01MQ00 10 == 1)
    		
    		if (VNPCFollowers.bBooneHired == 1)
    			;set CraigBooneRef.Waiting to 1
    		elseif (VNPCFollowers.ArcadeHired  == 1)
    			;set ArcadeRef.Waiting to 1
    		elseif (VNPCFollowers.RaulHired  == 1)
    			;set RaulRef.Waiting to 1
    		elseif (VNPCFollowers.bVeronicaHired  == 1)
    			;set VeronicaRef.Waiting to 1
    		elseif (VNPCFollowers.bLilyHired  == 1)
    			;set LilyRef.Waiting to 1
    		elseif (VNPCFollowers.bCassHired  == 1)
    			;set RoseOfSharonCassidyRef.Waiting to 1
    		endif
    
    		if (VNPCFollowers.RexHired == 1)
    			;set RexRef.Waiting to 1
    		elseif (VNPCFollowers.bEdEHired == 1)
    			;set EDE1Ref.Waiting to 1
    			;set EDE2Ref.Waiting to 1
    			;set EDE3Ref.Waiting to 1
    		endif
    
    		SetObjectiveCompleted NVDLC01MQ00 10 1
    		SetStage NVDLC01MQ00 100
    		DisablePlayerControls 1 1 1 1 1 1 1
    		Set TimerA to 1
    		Set TimerA to .2
    		Set StartUp to 1
    		ApplyImageSpaceModifier ExplosionInFace
    
    		PlaySound QSTNVDLC01OpeningStinger
    		PlaySound QSTDLCTrap
    
    	endif
      
    END
    
    
    BEGIN GameMode
    
    ; Player gets gassed.
    
    	if ( StartUp == 1 )
    
    		if ( TimerZ > 0 ) && (bTimerZDone== 0)
    			Set TimerZ to ( TimerZ - GetSecondsPassed )												
    		else
    			set bTimerZDone to 1
    			Player.Moveto NVDLC01PlayerGasMarker
    		endif
    
    		if ( TimerA > 0 )
    			Set TimerA to ( TimerA - GetSecondsPassed )												
    		else
    			player.AddScriptPackage NVDLC01PlayerKnockedOut
    			PipboyRadioOff
    			Set TimerB to 2
    			Set StartUp to 2
    		endif
    	endif
    
    ; Player hits the ground, dazed.
    
    	if ( StartUp == 2 )
    		if ( TimerB > 0 )
    			Set TimerB to ( TimerB - GetSecondsPassed )
    			;BeginFX
    			FXSprayJet0101Ref.enable
    			FXSprayJet0102Ref.enable
    			FXSprayJet0103Ref.enable
    			FXSprayJet0104Ref.enable
    			;EndFX											
    		else
    			Set TimerC to 8
    			Set StartUp to 3
    		endif
    	endif
    
    ; Player slowly passes out.
    
    	if ( StartUp == 3 )
    		if ( TimerC > 0 )
    			Set TimerC to ( TimerC - GetSecondsPassed )												
    		else
    
    			StartQuest NVDLC01NewVegasFollowerFireQuest;
    			if GetINIFloat "CustomSettings:sEquipmentRemoval" "DMT Config.ini" == 1
    			player.RemoveAllItems NVDLC01PlayerEquipmentContainerRef
    			endif
    			imod FadeToBlackPermanent
    			Set TimerC to 5
    			Set StartUp to 4
    		endif
    	endif
    
    ; Player wakes up.
    	if ( StartUp == 4 )
    		if ( TimerC > 0 )
    			Set TimerC to ( TimerC - GetSecondsPassed )												
    		else
    			StartQuest NVDLC01Intro
    			Set TimerE to 5
    			Set StartUp to 5
    		endif
    	endif
    
    	if ( StartUp == 5 )
    		if ( TimerC > 0 )
    			Set TimerC to ( TimerC - GetSecondsPassed )												
    		else
    			Player.RemoveScriptPackage
    			Set StartUp to 6
    			;EnablePlayerControls	
    			;DisableFX
    			FXSprayJet0101Ref.disable
    			FXSprayJet0102Ref.disable
    			FXSprayJet0103Ref.disable
    			FXSprayJet0104Ref.disable
    			;DisableFX			
    		endif
    	endif
    
    
    END
    
    
    

    Transition Timer:

    scn NVDLC01VillaTransitionTimerScript
    ; JSH 10.04.10
    ; Timer for fade-to-black transition to Villa.
    
    short	bDoOnce								;Script blocker
    float	fTimer								;Timer used for animation control
    short bFadeOutDone
    
    BEGIN GameMode
    
    		if (bFadeOutDone == 1)
    			return;
    		endif
    
    		if (bDoOnce== 0)
    			;PlaySound QSTEndTransitionStinger
    			PlayMusic EndTransitionStinger
    			set fTimer to 4;
    			set bDoOnce to 1;
    		endif
    
    		set fTimer to ( fTimer - GetSecondsPassed )
    
    		if ( fTimer <= 4 ) && (bDoOnce == 1)
    			IMod FadeToBlackPermanent;
    			set bDoOnce to 2;
    		endif
    
    		if ( fTimer <= 0 ) 
    			set bFadeOutDone to 1;
    			SetInChargen 0;
    			player.MoveTo DLC01StartMarker	;
    			StopQuest NVDLC01VillaTransitionTimer;
    		endif
    
    END
    
    
    
  11. So I've been having constant issues with trying to intercede into the way the player is transported back to the mojave from dead money and move them to a new worldspace, and providing an option to return.

     

    This is my modified version of the mojave gate script:

     

     

    scn NVDLC01SMGateMojaveSCRIPT
    ; JSH 10.11.10
    ; Script that returns player to BoS Bunker in Mojave Wasteland.
    
    ; CES 10/26/10
    ; Updating the script to move the ending slideshow from here to the Vault Elevator
    
    ;Variables
    
    Short bButton					;Grabs the button pressed for the message box
    short bActivated				;Tracks if the player has exited the DLC
    
    short sButtons
    float sEnds
    float sSurvs
    float sIngestPenalty
    float sSleepPenalty
    ref TeleportMarker
    ref TestRef
    
    ; Ending must have played at least once
    short bEndingDone
    ref rCountryRadio
    
    BEGIN OnActivate
    
    	if (IsActionRef player) && (GetLocked == 0)
    
    		ShowMessage NVDLC01TravelToMojaveMsg
    
    	endif
    
    END
    
    BEGIN gamemode
    
    	set bButton to GetButtonPressed
    		
    	if ( bButton == 1 )
    
    
    		;DisablePlayerControls 1 1 1 1 1 1 1
    		;StartQuest NVDLC01Ending
    
    		; Enable FNV Radio Stations on DLC end	
    		RNVTARef.Enable;														;Enable Radio New Vegas
    		set rCountryRadio to vCountryRadioREF.GetLinkedRef;		;Country Radio has no ref name, so getlinked
    		rCountryRadio.Enable;												;Disable Country Radio
    
    		;NVDLC01Bartender.AlwaysShowActorSubtitles 0;				;Set up hologram vendors to stop showing subtitles
    		;NVDLC01HologramVendor1REF.AlwaysShowActorSubtitles 0;
    		;NVDLC01HologramVendor2REF.AlwaysShowActorSubtitles 0;
    		;NVDLC01HologramVendor3REF.AlwaysShowActorSubtitles 0;
    		;NVDLC01HoloDealer03.AlwaysShowActorSubtitles 0;
    		;NVDLC01HoloDealer02.AlwaysShowActorSubtitles 0;
    		;NVDLC01HoloDealer01.AlwaysShowActorSubtitles 0;
    		StarletHologramVillaRef.SetNPCRadio 0 NVDLC01RadioStationRef;	;Stop the Starlet Hologram playing the Starlet Radio audio at the fountain
    
    		; NVDLC01RadioDisable												; Disable DLC Radio Stations on DLC End
    		NVDLC01RadioStationChristineREF.disable;
    		StopQuest NVDLC01RadioChristine;
    		NVDLC01RadioStationDeanREF.disable;
    		StopQuest NVDLC01RadioDeanQuest;
    		NVDLC01RadioStationDogREF.disable;
    		StopQuest NVDLC01RadioDog;
    		NVDLC01RadioStationSpeakersREF.disable;
    		StopQuest NVDLC01RadioSpeakers;
    		NVDLC01RadioStationDeanMusicREF.disable;
    		StopQuest NVDLC01RadioDeanMusic;
    		NVDLC01RadioStationElijahREF.disable;
    		StopQuest NVDLC01RadioElijah;		
    
    		sDMMuteBossesPostEndMasterREF.enable
    		RemoveImageSpaceModifier FriendOfTheNightInteriorISFX
    		RemoveImageSpaceModifier FriendOfTheNightISFX
    		player.DispelAllSpells ; Removes all chem effects.
    		PipBoyRadioOff ; Turn off PipBoy radio.
    		if bActivated == 0
    		Player.ResetHealth;
    		PlayMusic EndSlideShow;
    
    		StopQuest NVDLC01ChristineBarkTimer;
    
    		; Activate End Game Slides
    		DisablePlayerControls 1 1 1 1 1 1 1
    		StartQuest NVDLC01Ending
    
    		player.MoveTo sDMDryCMapMarkerRef2
    		bActivated = 1
    	elseif bActivated == 1
    		RemoveImageSpaceModifier FriendOfTheNightInteriorISFX
    		RemoveImageSpaceModifier FriendOfTheNightISFX
    		player.DispelAllSpells ; Removes all chem effects.
    		PipBoyRadioOff ; Turn off PipBoy radio.
    		NVDLC01RadioStationChristineREF.disable;
    		StopQuest NVDLC01RadioChristine;
    		NVDLC01RadioStationDeanREF.disable;
    		StopQuest NVDLC01RadioDeanQuest;
    		NVDLC01RadioStationDogREF.disable;
    		StopQuest NVDLC01RadioDog;
    		NVDLC01RadioStationSpeakersREF.disable;
    		StopQuest NVDLC01RadioSpeakers;
    		NVDLC01RadioStationDeanMusicREF.disable;
    		StopQuest NVDLC01RadioDeanMusic;
    		RNVTARef.Enable;														;Enable Radio New Vegas
    		set rCountryRadio to vCountryRadioREF.GetLinkedRef;		;Country Radio has no ref name, so getlinked
    		rCountryRadio.Enable;		
    		StopQuest NVDLC01GlobalToxicDamage
    		set sIngestPenalty to 500
    		set sSleepPenalty to 500
    		set sEnds to player.getpermanentactorvalue Endurance
    		set sSurvs to player.getpermanentactorvalue Survival
    		set sEnds to 1 - (sEnds / 10)
    		set sSurvs to 1 - (sSurvs / 100)
    		set sIngestPenalty to (sIngestPenalty * sEnds * sSurvs)
    		set sSleepPenalty to (sSleepPenalty * sEnds * sSurvs)
    		player.damageAV hunger sIngestPenalty
    		player.damageAV dehydration sIngestPenalty
    		player.damageAV SleepDeprevation sSleepPenalty
    		player.movetofade sDMDryCMapMarkerRef2
    	endif
    
    	elseif ( bButton == 2 )
    return
    endif
    
    END
    

     

     

    Sorry it's not indented correctly, something about it crashes Cipsis' script validator, so I haven't been able to use it to fix the indentation.

    This script works correctly, the first time. The player arrives at the intended marker in the new worldspace with no issues, once the DM slideshow is done. However, the second time the player selects the second menu option after returning, the load screen starts, then restarts, then the player is placed at the default starting marker in DM, right in front of the fountain.

    I've tried commenting out literally every single line I added that the base game doesn't use, and the behavior is still the same.

     

    This is the script attached to a flare gun, intended to return the player to the new worldspace:

     

     

    scn sDMSCPTToDryCTravel
    
    short sButtons
    float sEnds
    float sSurvs
    float sIngestPenalty
    float sSleepPenalty
    float fExit
    ref rCompanion
    array_var sCompanions
    array_var aEntry
    
    begin onfire
    	if Player.IsInInterior == 1 || player.IsInCombat == 1
    		showmessage sDMMSGNoTravelInInteriors
    	elseif Player.IsInInterior == 0 && player.IsInCombat == 0
    		showMessage sDMMSGToDryC
    	endif
    end
    
    begin menumode 1001
    set sButtons to GetButtonPressed
    	if sButtons == -1
    		return
    	elseif sButtons == 0
    		set fExit to 1
    	endif
    end
    
    begin ondrop
    player.additem sDMMiscDryCReturnToken 1
    end
    
    begin onsell
    player.additem sDMMiscDryCReturnToken 1
    end
    
    begin gamemode
    if fExit == 1
    		RemoveImageSpaceModifier FriendOfTheNightInteriorISFX
    		RemoveImageSpaceModifier FriendOfTheNightISFX
    		player.DispelAllSpells ; Removes all chem effects.
    		PipBoyRadioOff ; Turn off PipBoy radio.
    		player.unequipitem sDMWeapFlareGunDryC 0 1
    		if (sDMCarMerRef.GetDisabled == 1 || sDMCarBrahminRef.GetDisabled == 1 || sDMCarMerRef.GetDead == 1 || sDMCarBrahminRef.GetDead == 1)
    			set sIngestPenalty to 100
    			set sSleepPenalty to 100
    			set sEnds to player.getpermanentactorvalue Endurance
    			set sSurvs to player.getpermanentactorvalue Survival
    			set sEnds to 1 - (sEnds/10)
    			set sSurvs to 1 - (sSurvs/100)
    			set sIngestPenalty to (sIngestPenalty * sEnds * sSurvs)
    			set sSleepPenalty to (sSleepPenalty * sEnds * sSurvs)
    			player.damageAV hunger sIngestPenalty
    			player.damageAV dehydration sIngestPenalty
    			player.damageAV SleepDeprevation sSleepPenalty
    		endif
    ;			set GameHour to (GameHour + 12)
    
    
    		let sCompanions := player.getteammates
           if sCompanions
    			foreach Array_Var aEntry <- sCompanions
    			let rCompanion := aEntry["value"]
               rCompanion.moveto sDMMojaveToDryCReturnREF
    			loop
          endif
    
    			player.moveto sDMMojaveToDryCReturnREF
    	elseif sButtons == 1
    		player.unequipitem sDMWeapFlareGunDryC 0 1
    		return
    endif
    end
    

     

     

    This script successfully returns the player to the new worldspace, but with a stuck black screen, that only disappears when the console or start menu is opened. Sometimes the load screen stays visible, flickering as it constantly resets.

     

    This script returns the player from the new worldspace to the mojave:

     

     

    scn sDMSCPTDryCtoMojave
    
    short sButtons
    float sEnds
    float sSurvs
    float sIngestPenalty
    float sSleepPenalty
    short fExit
    ref rCompanion
    array_var sCompanions
    array_var aEntry
    ref TeleportMarker
    
    begin onActivate
    
    	if (IsActionRef player == 1)
    		showMessage sDMMSGLeaveDryCtoMojave
    	endif
    end
    
    begin menumode 1001
    		set sButtons to GetButtonPressed
    		if sButtons == -1
    			return
    		elseif sButtons == 0
    			set fExit to 1
    		elseif sButtons == 1
    			return	
    		endif
    end
    
    
    begin gamemode
    if fExit == 1
    		RemoveImageSpaceModifier FriendOfTheNightInteriorISFX
    		RemoveImageSpaceModifier FriendOfTheNightISFX
    		player.DispelAllSpells ; Removes all chem effects.
    		PipBoyRadioOff ; Turn off PipBoy radio.
    		if player.getitemcount sDMWeapFlareGunDryC == 0
    			player.additem sDMWeapFlareGunDryC 1
    		endif
    
    ;        If (VNPCFollowers.bBooneHired == 1)
    ;            set rCompanion to CraigBooneRef 
    ;        ElseIf (VNPCFollowers.ArcadeHired == 1)
    ;            set rCompanion to ArcadeREF
    ;        ElseIf (VNPCFollowers.bCassHired == 1)
    ;            set rCompanion to RoseofSharonCassidyRef
    ;        ElseIf (VNPCFollowers.bVeronicaHired == 1)
    ;            set rCompanion to VeronicaRef 
    ;        ElseIf (VNPCFollowers.RaulHired == 1)
    ;            set rCompanion to RaulRef
    ;       EndIf
    
    		let sCompanions := player.getteammates
            if sCompanions
    			foreach Array_Var aEntry <- sCompanions
    			let rCompanion := aEntry["value"]
                rCompanion.moveto sDMPostDryCMarker
    			loop
           endif
    
    
    		if sDMCarMerRef.GetDead == 1
    			if sDMCarMerRef.GetDisabled == 0
    				sDMCarMerRef.disable
    				sDMCarMerRef.markfordelete
    				sDMCarBrahminRef.disable
    				sDMCarBrahminRef.markfordelete
    			endif
    		endif
    		if sDMCarBrahminRef.GetDead == 1
    			if sDMCarBrahminRef.GetDisabled == 0
    				sDMCarMerRef.disable
    				sDMCarMerRef.markfordelete
    				sDMCarBrahminRef.disable
    				sDMCarBrahminRef.markfordelete
    			endif
    		endif
    		if (sDMCarMerRef.GetDisabled == 1 || sDMCarBrahminRef.GetDisabled == 1 || sDMCarMerRef.GetDead == 0 || sDMCarBrahminRef.GetDead == 0)
    			set sIngestPenalty to 200
    			set sSleepPenalty to 200
    			set sEnds to player.getpermanentactorvalue Endurance
    			set sSurvs to player.getpermanentactorvalue Survival
    			set sEnds to 1 - (sEnds/10)
    			set sSurvs to 1 - (sSurvs/100)
    			set sIngestPenalty to (sIngestPenalty * sEnds * sSurvs)
    			set sSleepPenalty to (sSleepPenalty * sEnds * sSurvs)
    			player.damageAV hunger sIngestPenalty
    			player.damageAV dehydration sIngestPenalty
    			player.damageAV SleepDeprevation sSleepPenalty
    
    		endif
    		player.moveto sDMPostDryCMarker
    ;		set GameHour to (GameHour + 18)
    endif
    end
    

     

     

    It works perfectly and I have no idea why, since it uses the exact same commands as the prior scripts.

    The following script which brings the player from the new worldspace back to DM also works perfectly:

     

     

    scn sDMSCPTDryCtoDM
    
    short sButtons
    float sEnds
    float sSurvs
    float sIngestPenalty
    float sSleepPenalty
    float fExit
    short bEndingDone
    ref rCountryRadio
    ref rCompanion
    array_var sCompanions
    array_var aEntry
    
    begin onActivate
    if (IsActionRef player)
    	showMessage sDMMSGLeaveDryCtoVilla
    endif
    end
    
    begin menumode 1001
    set sButtons to GetButtonPressed
    if sButtons == -1
    	return
    elseif sButtons == 0
    	set fExit to 1
    elseif sButtons == 1
    	return
    endif
    
    end
    
    begin gamemode
    if fExit == 1
    		RemoveImageSpaceModifier FriendOfTheNightInteriorISFX
    		RemoveImageSpaceModifier FriendOfTheNightISFX
    		player.DispelAllSpells ; Removes all chem effects.
    		PipBoyRadioOff ; Turn off PipBoy radio.
    		NVDLC01RadioStationChristineREF.enable;
    		StartQuest NVDLC01RadioChristine;
    		NVDLC01RadioStationDeanREF.enable;
    		StartQuest NVDLC01RadioDeanQuest;
    		NVDLC01RadioStationDogREF.enable;
    		StartQuest NVDLC01RadioDog;
    		NVDLC01RadioStationSpeakersREF.enable;
    		StartQuest NVDLC01RadioSpeakers;
    		NVDLC01RadioStationDeanMusicREF.enable;
    		StartQuest NVDLC01RadioDeanMusic;
    		RNVTARef.disable;														;Enable Radio New Vegas
    		set rCountryRadio to vCountryRadioREF.GetLinkedRef;		;Country Radio has no ref name, so getlinked
    		rCountryRadio.disable;	
    StartQuest NVDLC01GlobalToxicDamage
    	if sDMCarMerRef.GetDead == 1
    		if sDMCarMerRef.GetDisabled == 0
    sDMCarMerRef.disable
    sDMCarMerRef.markfordelete
    sDMCarBrahminRef.disable
    sDMCarBrahminRef.markfordelete
    		endif
    	endif
    	if sDMCarBrahminRef.GetDead == 1
    		if sDMCarBrahminRef.GetDisabled == 0
    sDMCarMerRef.disable
    sDMCarMerRef.markfordelete
    sDMCarBrahminRef.disable
    sDMCarBrahminRef.markfordelete
    		endif
    	endif
    set sIngestPenalty to 300
    set sSleepPenalty to 300
    set sEnds to player.getpermanentactorvalue Endurance
    set sSurvs to player.getpermanentactorvalue Survival
    set sEnds to 1 - (sEnds/10)
    set sSurvs to 1 - (sSurvs/100)
    set sIngestPenalty to (sIngestPenalty * sEnds * sSurvs)
    set sSleepPenalty to (sSleepPenalty * sEnds * sSurvs)
    player.damageAV hunger sIngestPenalty
    player.damageAV dehydration sIngestPenalty
    player.damageAV SleepDeprevation sSleepPenalty
    ;set GameHour to (GameHour + 36)
    
    		let sCompanions := player.getteammates
           if sCompanions
    			foreach Array_Var aEntry <- sCompanions
    			let rCompanion := aEntry["value"]
               rCompanion.moveto sDMMojaveToDryCReturnREF
    			loop
          endif
    
    player.moveto sDMReturnXMarker
    endif
    end
    
    

     

     

     

    I would dearly, dearly love any help that anyone can provide about this. I'm really close to when I want to release this project, and I have no idea how to troubleshoot this further.

    I've tried commenting out every line other than the one that moves the player, and tried subbing the moveto command into menumode instead of gamemode, and neither made a difference.

  12. Looks like I got it working!

    I think my issue was that I didn't set up a placement originally for the radscorpion second configuration, I accidentally copy pasted some mfd lines, so when I removed the mfd lines it didn't fix it right away. Here's the working version:

    scn sDMSCPTTVirusCase
    
    short state
    short sRandCr
    short sRandVar
    ref sPlacedObj
    ref sPlacedObj2
    ref sPlacedObj3
    int sVar
    
    short sCreaType ;1 scorpion, 2 cazador, 3 ant, 4 stalker, 5 centaur, 6 yao, 7 Dclaw, 8 Gecko
    
    
    begin onActivate
    printc "activated"
    	if (IsActionRef player)
    		if state == 1
    		printc "state:%g" state
    			if (isSoundPlaying sDMSNDTVirusCaseOp == 0) && (isSoundPlaying sDMSNDTVirusCaseOp == 0)
    				set state to 0
    				printc "state set to 0"
    				playgroup backward 0
    				playsound sDMSNDTVirusCaseCl
    				printc "sound played"
    				player.additem sDMMiscBioCatalyst 1
    				printc "bio c added"
    			endif
    		elseif state == 0
    		printc "state:%g" state
    			if (isSoundPlaying sDMSNDTVirusCaseCl == 0) && (isSoundPlaying sDMSNDTVirusCaseOp == 0)
    				playgroup forward 1
    				playsound sDMSNDTVirusCaseOp
    				printc "sound played"
    				player.damageAV RadiationRads 20
    				playsound UIPipBoyRadiationB
    				printc "effects done"
    				set sCreaType to 0
    				set sVar to 0
    				set sRandCr to GetRandomPercent
    				set sRandVar to GetRandomPercent
    
    
    				if sRandCr < 25
    					set sCreaType to 1    ;radscorpion
    				elseif sRandCr > 24 && sRandCr < 51
    					set sCreaType to 2    ;yao
    				elseif sRandCr > 50 && sRandCr < 75
    					set sCreaType to 3    ;Dclaw
    				elseif sRandCr > 74 && sRandCr < 100
    					set sCreaType to 4   ;gecko
    				endif
    
    				if sRandVar < 50
    					set sVar to 1
    				elseif sRandVar < 100 && sRandVar > 49
    					set sVar to 2
    				endif
    
    				if sCreaType == 1
    					if sVar == 1
    						set sPlacedObj to CrRadscorpion1Small
    						set sPlacedObj2 to CrRadscorpion2Large
    						set sPlacedObj3 to CrBarkScorpion
    						sDMRefBioAmbClose.placeatme sPlacedObj
    						sDMRefBioAmb3.placeatme sPlacedObj2
    						sDMRefBioAmbFar2.placeatme sPlacedObj3
    					elseif sVar == 2
    						set sPlacedObj to CrRadscorpion1Small
    						set sPlacedObj2 to CrRadscorpion2Large
    						set sPlacedObj3 to CrRadscorpion2Large
    						sDMRefBioAmbClose2.placeatme sPlacedObj
    						sDMRefBioAmb.placeatme sPlacedObj2
    						sDMRefBioAmbFar2.placeatme sPlacedObj3
    					endif
    				elseif sCreaType == 2
    					if sVar == 1
    						set sPlacedObj to NVDLC02CrTier5YaoGuaiLarge
    						set sPlacedObj2 to NVDLC02CrTier4YaoGuaiMed
    						set sPlacedObj3 to NVDLC02CrTier3YaoGuaiSmall
    						sDMRefBioAmbClose3.placeatme sPlacedObj
    						sDMRefBioAmb4.placeatme sPlacedObj3
    						sDMRefBioAmbFar.placeatme sPlacedObj3
    					elseif sVar == 2
    						set sPlacedObj to NVDLC02CrTier4YaoGuaiMed
    						set sPlacedObj2 to NVDLC02CrTier5YaoGuaiLarge
    						set sPlacedObj3 to NVDLC02CrTier5YaoGuaiLarge
    						sDMRefBioAmbClose.placeatme sPlacedObj
    						sDMRefBioAmb2.placeatme sPlacedObj2
    						sDMRefBioAmbFar3.placeatme sPlacedObj3
    					endif
    				elseif sCreaType == 3
    					if sVar == 1
    						set sPlacedObj to CrDeathClawBaby
    						set sPlacedObj2 to VSpawnSpecialTier4DeathclawMedWB
    						set sPlacedObj3 to CrDeathClaw
    						sDMRefBioAmbClose2.placeatme sPlacedObj
    						sDMRefBioAmb4.placeatme sPlacedObj2
    						sDMRefBioAmbFar2.placeatme sPlacedObj3
    					elseif sVar == 2
    						set sPlacedObj to CrDeathClawBaby
    						set sPlacedObj2 to CrDeathClaw
    						set sPlacedObj3 to VSpawnSpecialTier4DeathclawMedWB
    						sDMRefBioAmbClose3.placeatme sPlacedObj
    						sDMRefBioAmb4.placeatme sPlacedObj2
    						sDMRefBioAmbFar.placeatme sPlacedObj3
    					endif
    				elseif sCreaType == 4
    					if sVar == 1
    						set sPlacedObj to NvCrFireGecko
    						set sPlacedObj2 to NVCrGecko
    						set sPlacedObj3 to NvCrFireGecko
    						sDMRefBioAmbClose.placeatme sPlacedObj
    						sDMRefBioAmb.placeatme sPlacedObj2
    						sDMRefBioAmbFar.placeatme sPlacedObj3
    					elseif sVar == 2
    						set sPlacedObj to NVCrGoldenGecko
    						set sPlacedObj2 to NvCrFireGecko
    						set sPlacedObj3 to NVCrGoldenGecko
    						sDMRefBioAmbClose3.placeatme sPlacedObj
    						sDMRefBioAmb4.placeatme sPlacedObj2
    						sDMRefBioAmbFar2.placeatme sPlacedObj3
    					endif
    				endif
    
    
    				printc "creatures placed"
    				set state to 1
    				printc "state set to 1"
    			endif
    		endif
    	endif
    end 
  13. Yeah, I'm not too surprised I was using MFD incorrectly.

     

    The problem is that it doesn't even print "activated" when activated the second time, which is the very first line, before any sound checks.

    Also, each of those placeatme's is hand chosen relative to the creature choices, they're not all the same set of marker placements. They can't be genericized and put below the creature choices. Each state change is also checking for a different sound, not the same one. In addition, each internal creature Var check decides between two marker placement configurations.

     

    Removing the mfd lines didn't change the situation at all :/

  14. It doesn't even print the first "activated" console line when the player activates it the second+ time, regardless of whether the sound/animation are playing or not.

    The intended use is that the player opens the case, enemies spawn and they deal with them, then they can get the item that the case rewards them with when they close it, and they can reopen and close it and fight off enemies to get the reward item as many times as they want.

     

    Now that I think about it, the MarkForDelete command might be causing weird behaviors when it's done to references that are alive. I'll try removing those lines later tonight and see what happens.

  15. This script is attached to an activator, and set to object. It's attached to a T Virus sample case, and it's supposed to play a slow animation of the dials turning, play a sound that matches the length of the animation, and spawn a pseudo-randomized set of enemies to attack the player. When it's activated the second time, it's supposed to add a misc item to the player's inventory, play the reverse animation, and the accompanying sound.

    However, it just abjectly fails to do anything after the first activation.

     

    Script:

    scn sDMSCPTTVirusCase
    
    short state
    short sRandCr
    short sRandVar
    ref sPlacedObj
    ref sPlacedObj2
    ref sPlacedObj3
    int sVar
    
    short sCreaType ;1 scorpion, 2 cazador, 3 ant, 4 stalker, 5 centaur, 6 yao, 7 Dclaw, 8 Gecko
    
    
    begin onActivate
    printc "activated"
    	if (IsActionRef player)
    	activate
    		if state == 1
    		printc "state:%g" state
    			if (isSoundPlaying sDMSNDTVirusCaseOp) == 0
    				printc "state 1, sound playing, no update"
    				set state to 0
    				printc "state set to 0"
    				playgroup backward 0
    				playsound sDMSNDTVirusCaseCl
    				printc "sound played"
    				player.additem sDMMiscBioCatalyst 1
    				printc "bio c added"
    			endif
    		endif
    		if state == 0
    		printc "state:%g" state
    			if (isSoundPlaying sDMSNDTVirusCaseCl) == 0
    				printc "state 0, sound playing, no update"
    				playgroup forward 1
    				playsound sDMSNDTVirusCaseOp
    				printc "sound played"
    				player.damageAV RadiationRads 20
    				playsound UIPipBoyRadiationB
    				printc "effects done"
    				set sCreaType to 0
    				set sVar to 0
    				set sRandCr to GetRandomPercent
    				set sRandVar to GetRandomPercent
    
    
    				if sRandCr < 25
    					set sCreaType to 1    ;radscorpion
    				elseif sRandCr > 24 && sRandCr < 51
    					set sCreaType to 2    ;yao
    				elseif sRandCr > 50 && sRandCr < 75
    					set sCreaType to 3    ;Dclaw
    				elseif sRandCr > 74 && sRandCr < 100
    					set sCreaType to 4   ;gecko
    				endif
    
    				if sRandVar < 50
    					set sVar to 1
    				elseif sRandVar < 100 && sRandVar > 49
    					set sVar to 2
    				endif
    
    				if sCreaType == 1
    					if sVar == 1
    						set sPlacedObj to CrRadscorpion1Small
    						set sPlacedObj2 to CrRadscorpion2Large
    						set sPlacedObj3 to CrBarkScorpion
    						sDMRefBioAmbClose.placeatme sPlacedObj
    						sPlacedObj.MarkForDelete
    						sDMRefBioAmb3.placeatme sPlacedObj2
    						sPlacedObj2.MarkForDelete
    						sDMRefBioAmbFar2.placeatme sPlacedObj3
    						sPlacedObj3.MarkForDelete
    					elseif sVar == 2
    						set sPlacedObj to CrRadscorpion1Small
    						set sPlacedObj2 to CrRadscorpion2Large
    						set sPlacedObj3 to CrRadscorpion2Large
    						sDMRefBioAmbClose3.placeatme sPlacedObj
    						sPlacedObj.MarkForDelete
    						sDMRefBioAmb4.placeatme sPlacedObj2
    						sPlacedObj2.MarkForDelete
    						sDMRefBioAmbFar.placeatme sPlacedObj3
    						sPlacedObj3.MarkForDelete
    					endif
    				elseif sCreaType == 2
    					if sVar == 1
    						set sPlacedObj to NVDLC02CrTier5YaoGuaiLarge
    						set sPlacedObj2 to NVDLC02CrTier4YaoGuaiMed
    						set sPlacedObj3 to NVDLC02CrTier3YaoGuaiSmall
    						sDMRefBioAmbClose3.placeatme sPlacedObj
    						sPlacedObj.MarkForDelete
    						sDMRefBioAmb4.placeatme sPlacedObj3
    						sPlacedObj2.MarkForDelete
    						sDMRefBioAmbFar.placeatme sPlacedObj3
    						sPlacedObj3.MarkForDelete
    					elseif sVar == 2
    						set sPlacedObj to NVDLC02CrTier4YaoGuaiMed
    						set sPlacedObj2 to NVDLC02CrTier5YaoGuaiLarge
    						set sPlacedObj3 to NVDLC02CrTier5YaoGuaiLarge
    						sDMRefBioAmbClose.placeatme sPlacedObj
    						sPlacedObj.MarkForDelete
    						sDMRefBioAmb2.placeatme sPlacedObj2
    						sPlacedObj3.MarkForDelete
    						sDMRefBioAmbFar3.placeatme sPlacedObj3
    						sPlacedObj3.MarkForDelete
    					endif
    				elseif sCreaType == 3
    					if sVar == 1
    						set sPlacedObj to CrDeathClawBaby
    						set sPlacedObj2 to VSpawnSpecialTier4DeathclawMedWB
    						set sPlacedObj3 to CrDeathClaw
    						sDMRefBioAmbClose2.placeatme sPlacedObj
    						sPlacedObj.MarkForDelete
    						sDMRefBioAmb4.placeatme sPlacedObj2
    						sPlacedObj2.MarkForDelete
    						sDMRefBioAmbFar2.placeatme sPlacedObj3
    						sPlacedObj3.MarkForDelete
    					elseif sVar == 2
    						set sPlacedObj to CrDeathClawBaby
    						set sPlacedObj2 to CrDeathClaw
    						set sPlacedObj3 to VSpawnSpecialTier4DeathclawMedWB
    						sDMRefBioAmbClose3.placeatme sPlacedObj
    						sPlacedObj.MarkForDelete
    						sDMRefBioAmb4.placeatme sPlacedObj2
    						sPlacedObj2.MarkForDelete
    						sDMRefBioAmbFar.placeatme sPlacedObj3
    						sPlacedObj3.MarkForDelete
    					endif
    				elseif sCreaType == 4
    					if sVar == 1
    						set sPlacedObj to NvCrFireGecko
    						set sPlacedObj2 to NVCrGecko
    						set sPlacedObj3 to NvCrFireGecko
    						sDMRefBioAmbClose.placeatme sPlacedObj
    						sPlacedObj.MarkForDelete
    						sDMRefBioAmb.placeatme sPlacedObj2
    						sPlacedObj2.MarkForDelete
    						sDMRefBioAmbFar.placeatme sPlacedObj3
    						sPlacedObj3.MarkForDelete
    					elseif sVar == 2
    						set sPlacedObj to NVCrGoldenGecko
    						set sPlacedObj2 to NvCrFireGecko
    						set sPlacedObj3 to NVCrGoldenGecko
    						sDMRefBioAmbClose3.placeatme sPlacedObj
    						sPlacedObj.MarkForDelete
    						sDMRefBioAmb4.placeatme sPlacedObj2
    						sPlacedObj2.MarkForDelete
    						sDMRefBioAmbFar2.placeatme sPlacedObj3
    						sPlacedObj3.MarkForDelete
    					endif
    				endif
    				printc "creatures placed"
    				set state to 1
    				printc "state set to 1"
    			endif
    		endif
    	endif
    end

    The debug prints all fire off perfectly the first time:

    activated

    state:0

    state 0, sound playing, no update

    sound played

    effects done

    creatures placed

    state set to 1

     

    The animation and sounds play correctly, and the creatures are placed.

     

    But then after the first activation, it doesn't even print the "activate" line, which means that the activation is just completely failing wholesale?

     

    If anyone knows what the issue might be, please let me know. This script has given me a headache off and on this whole project, and before I tested it again this round, I had it working, so I don't know why it broke.

×
×
  • Create New...