Jump to content

Merging Global Reference Scripts?


FreedomFighter4

Recommended Posts

Was curious if I could create a compatibility patch like this?

 

I have assorted images uploaded to Imgur to detail things and hopefully make things go quicker and smoother.

 

< Image Post List >

 

http://i.imgur.com/qZe2AI4.png

 

< Image Post List >

Link to comment
Share on other sites

You can't merge scripts or scriptlets in FNVEdit, this has to be done in GECK.

 

Here is the edited script, you'll have to compile it yourself in GECK in your merge patch.

scn HVBunkerExplosionScript

int ExplosionState
float Timer
float Time

begin OnTrigger player

	if VDialogueHiddenValley.GeneratorSetToBlow == 1

		if ExplosionState == 0

			; Disable fast travel temporarily so the player must witness the explosion
			EnableFastTravel 0

			if Timer >= 1.0

				; Do explosion
				HVBunkerExplosionMarker.PlaceAtMe HVBunkerExplosion			
				set VHiddenValleyDustStorm.BunkerDestroyed to 1

				; JSH 7/28 - Remove Explosive Collar if the player still has it
				player.RemoveItem HVExplosiveCollar 1000

				; Update quests that call for the Brotherhood's destruction
				if GetObjectiveDisplayed VMQ05 50 == 1

					; If the player was about to report to Colonel Moore that the 		BoS is
					; allying with the NCR, update that
					if GetObjectiveDisplayed VMQ05 56 == 1 && GetObjectiveCompleted 	VMQ05 56 == 0
						SetObjectiveDisplayed VMQ05 56 0
						SetObjectiveDisplayed VMQ05 50 0
						SetObjectiveDisplayed VMQ05 50 1
					endif

					SetObjectiveCompleted VMQ05 50 1
					SetObjectiveDisplayed VMQ05 55 1
				elseif GetObjectiveDisplayed VMQ02 70 == 1
					SetObjectiveCompleted VMQ02 70 1
					SetObjectiveDisplayed VMQ02 75 1
				elseif GetObjectiveDisplayed VMQHouse5 60 == 1
					SetObjectiveCompleted VMQHouse5 60 1
					SetObjectiveDisplayed VMQHouse5 64 1

				; Yes Man should be handled by setting the Brotherhood global var

				endif

				; Set global state of the Brotherhood to destroyed
				set VStoryEventBoS to 2

				; vilified with the brotherhood after this. Helps Veronica to react appropriately.
				addreputation repnvbrotherhood 0 5
				addreputation repnvbrotherhood 0 5

				; Lose karma for a dastardly deed
				player.RewardKarma -100

				; Enable rubble in bunker interior - no more entering Hidden Valley
				HVBlockingRubbleREF.enable

				; Kill everyone in Hidden Valley
				; Really, just kill the main guys since they affect quests
				NolanMcNamaraREF.kill
				EdgarHardinREF.kill
				LindaSchulerREF.kill
				LarsTaggartREF.kill
				HVKnightEDEREF.kill
				MelissaWatkinsREF.kill

				; Kill any companions that are still inside the bunker, but only when in hardcore mode
				if player.IsHardcore
					if RoseOfSharonCassidyREF.GetInCell HiddenValley01 || RoseOfSharonCassidyREF.GetInCell HiddenValley02
						RoseOfSharonCassidyREF.SetPlayerTeammate 0
						RoseOfSharonCassidyREF.kill
					elseif LilyREF.GetInCell HiddenValley01 || LilyREF.GetInCell HiddenValley02
						LilyREF.SetPlayerTeammate 0
						LilyREF.kill
					elseif ArcadeREF.GetInCell HiddenValley01 || ArcadeREF.GetInCell HiddenValley02
						ArcadeREF.SetPlayerTeammate 0
						ArcadeREF.kill
					elseif RaulREF.GetInCell HiddenValley01 || RaulREF.GetInCell HiddenValley02
						RaulREF.SetPlayerTeammate 0
						RaulREF.kill
					elseif CraigBooneREF.GetInCell HiddenValley01 || CraigBooneREF.GetInCell HiddenValley02
						CraigBooneREF.SetPlayerTeammate 0
						CraigBooneREF.kill
					elseif VeronicaREF.GetInCell HiddenValley01 || VeronicaREF.GetInCell HiddenValley02
						VeronicaREF.SetPlayerTeammate 0
						VeronicaREF.kill
					endif

					if RexREF.GetInCell HiddenValley01 || RexREF.GetInCell HiddenValley02
						RexREF.SetPlayerTeammate 0
						RexREF.kill
					elseif EDE1REF.GetInCell HiddenValley01 || EDE1REF.GetInCell HiddenValley02
						EDE1REF.SetPlayerTeammate 0
						EDE1REF.kill
					elseif EDE2REF.GetInCell HiddenValley01 || EDE2REF.GetInCell HiddenValley02
						EDE2REF.SetPlayerTeammate 0
						EDE2REF.kill
					elseif EDE3REF.GetInCell HiddenValley01 || EDE3REF.GetInCell HiddenValley02
						EDE3REF.SetPlayerTeammate 0
						EDE3REF.kill
					endif

				elseif player.IsHardcore == 0
					if RoseOfSharonCassidyREF.GetInCell HiddenValley01 || RoseOfSharonCassidyREF.GetInCell HiddenValley02
						set RoseOfSharonCassidyREF.Waiting to 0
						RoseOfSharonCassidyREF.evp
					elseif LilyREF.GetInCell HiddenValley01 || LilyREF.GetInCell HiddenValley02
						set LilyREF.Waiting to 0
						LilyREF.evp
					elseif ArcadeREF.GetInCell HiddenValley01 || ArcadeREF.GetInCell HiddenValley02
						set ArcadeREF.Waiting to 0
						ArcadeREF.evp
					elseif RaulREF.GetInCell HiddenValley01 || RaulREF.GetInCell HiddenValley02
						set RaulRef.Waiting to 0
						RaulREF.evp
					elseif CraigBooneREF.GetInCell HiddenValley01 || CraigBooneREF.GetInCell HiddenValley02
						set CraigBooneRef.Waiting to 0
						CraigBooneREF.evp
					elseif VeronicaREF.GetInCell HiddenValley01 || VeronicaREF.GetInCell HiddenValley02
						set VeronicaREF.Waiting to 0
						VeronicaREF.evp
					endif

					if RexREF.GetInCell HiddenValley01 || RexREF.GetInCell HiddenValley02
						set RexRef.Waiting to 0
						RexREF.evp
					elseif EDE1REF.GetInCell HiddenValley01 || EDE1REF.GetInCell HiddenValley02
						set EDE1REF.Waiting to 0
						EDE1REF.evp
					elseif EDE2REF.GetInCell HiddenValley01 || EDE2REF.GetInCell HiddenValley02
						set EDE2REF.Waiting to 0
						EDE2REF.evp
					elseif EDE3REF.GetInCell HiddenValley01 || EDE3REF.GetInCell HiddenValley02
						set EDE3REF.Waiting to 0
						EDE3REF.evp
					endif
				endif

				if RoseOfSharonCassidyREF.GetInCell HiddenValleyBunker1
					set RoseOfSharonCassidyREF.Waiting to 0
					RoseOfSharonCassidyREF.evp
				elseif LilyREF.GetInCell HiddenValleyBunker1
					set LilyREF.Waiting to 0
					LilyREF.evp
				elseif ArcadeREF.GetInCell HiddenValleyBunker1
					set ArcadeREF.Waiting to 0
					ArcadeREF.evp
				elseif RaulREF.GetInCell HiddenValleyBunker1
					set RaulRef.Waiting to 0
					RaulREF.evp
				elseif CraigBooneREF.GetInCell HiddenValleyBunker1
					set CraigBooneRef.Waiting to 0
					CraigBooneREF.evp
				elseif VeronicaREF.GetInCell HiddenValleyBunker1
					set VeronicaREF.Waiting to 0
					VeronicaREF.evp
				endif

				if RexREF.GetInCell HiddenValleyBunker1
					set RexRef.Waiting to 0
					RexREF.evp
				elseif EDE1REF.GetInCell HiddenValleyBunker1
					set EDE1REF.Waiting to 0
					EDE1REF.evp
				elseif EDE2REF.GetInCell HiddenValleyBunker1
					set EDE2REF.Waiting to 0
					EDE2REF.evp
				elseif EDE3REF.GetInCell HiddenValleyBunker1
					set EDE3REF.Waiting to 0
					EDE3REF.evp
				endif

				; Fail the Hidden Valley quests immediately so the player doesn't have
				; to wait for gamemode scripts to catch up
				if GetStage VMS55 < 100
					SetStage VMS55 200
				endif

				if GetStage VMS55a < 100
					SetStage VMS55a 200
				endif

				if GetStage VMS55b < 100
					SetStage VMS55b 200
				endif

				set ExplosionState to 1			

				; Intentionally not reseting the Timer here

			else

				; Disable fast travel temporarily so the player must witness the explosion
				EnableFastTravel 0

				set Timer to Timer + GetSecondsPassed
			endif
		elseif ExplosionState == 1
			if Timer >= 3.5

				set Time to GetCurrentTime

				; If the sandstorm is currently blowing, turn it off
				if Time > 21.0 || Time < 6.0

					; Reset the weather
					ReleaseWeatherOverride
					ForceWeather WastelandClear 
					set VHiddenValleyDustStorm.WeatherSet to 0

					; Make the sandstorms die down
					HVSandStormNight01REF.PlayGroup Backward 2
					HVSandStormNight02REF.PlayGroup Backward 2
					HVSandStormNight03REF.PlayGroup Backward 2
					HVSandStormNight04REF.PlayGroup Backward 2
					HVSandStormNight05REF.PlayGroup Backward 2
					HVSandStormNight06REF.PlayGroup Backward 2
					HVSandStormNight07REF.PlayGroup Backward 2
					HVSandStormNight08REF.PlayGroup Backward 2
					HVSandStormNight09REF.PlayGroup Backward 2
					HVSandStormNight10REF.PlayGroup Backward 2

				endif

				set ExplosionState to 2
				set Timer to 0.0
			else

				; Disable fast travel temporarily so the player must witness the explosion
				EnableFastTravel 0

				set Timer to Timer + GetSecondsPassed
			endif

		elseif ExplosionState == 2

			if Timer > 2.0

				; Enable smoke
				HVDestroyedSmoke01REF.enable
				HVDestroyedSmoke02REF.enable
				HVDestroyedSmoke03REF.enable
				HVDestroyedSmoke04REF.enable
				HVDestroyedSmoke05REF.enable
				HVDestroyedSmoke06REF.enable
				HVDestroyedSmoke07REF.enable
				HVDestroyedSmoke08REF.enable
				HVDestroyedSmoke09REF.enable
				HVDestroyedSmoke10REF.enable
				HVDestroyedSmoke11REF.enable

				set VDialogueHiddenValley.GeneratorSetToBlow to 2

				; Re-enable fast travel
				EnableFastTravel 1

				; Clean up the dust storm objects
				HVSandStormNight01REF.disable
				HVSandStormNight01REF.MarkForDelete
				HVSandStormNight02REF.disable
				HVSandStormNight02REF.MarkForDelete
				HVSandStormNight03REF.disable
				HVSandStormNight03REF.MarkForDelete
				HVSandStormNight04REF.disable
				HVSandStormNight04REF.MarkForDelete
				HVSandStormNight05REF.disable
				HVSandStormNight05REF.MarkForDelete
				HVSandStormNight06REF.disable
				HVSandStormNight06REF.MarkForDelete
				HVSandStormNight07REF.disable
				HVSandStormNight07REF.MarkForDelete
				HVSandStormNight08REF.disable
				HVSandStormNight08REF.MarkForDelete
				HVSandStormNight09REF.disable
				HVSandStormNight09REF.MarkForDelete
				HVSandStormNight10REF.disable
				HVSandStormNight10REF.MarkForDelete

				Set VDialogueHiddenValley.JoinedBrotherhood to 0

			else

				; Disable fast travel temporarily so the player must witness the explosion
				EnableFastTravel 0

				set Timer to Timer + GetSecondsPassed
			endif
		endif
	endif

	if GetPCEnemyOfFaction BrotherhoodSteelFaction && VDialogueHiddenValley.JoinedBrotherhood == 1
		set VDialogueHiddenValley.JoinedBrotherhood to 0
	endif

end
Link to comment
Share on other sites

Sorry for the delayed reponse, I really can't thank you enough for going out of your way and doing that. Seen plenty of your great mods by you and didn't know you helped out around the forums as well. Haha, thanks again for pulling through.

 

The only thing now is that I don't know much about using G.E.C.K but if you could point me in the right direction. I'm sure I could manage. I looked around in GECK and it's tools and googled Compiling Scripts or anything script related in GECK and got nothing that was straight to the point or could find a reference for the subject.

 

If you or someone in general could give me a simple step by step rundown, i'd appreciate it.

Link to comment
Share on other sites

Open GECK, in the file > Data menu check your plugin and set it as the active file. In the edit menu select Find Text , put HVBunkerExplosionScript in the box and hit the Find Text button. Go to the Scripts tab and double click on the script to open it up. You can use standard ctrl-a, ctrl-c, ctrl-v hot keys to select all, copy and paste. Just copy the script above and paste it over the existing script, press the grey disk icon to compile it. Do *not* press the red disk icon. You can then hit the X to close the script window and then use the File menu to save the plugin.

Link to comment
Share on other sites

Finally got around to trying this out, been looking at a lot of other mods >~<. Anywho, after following your steps (Once again, can't thank you enough.), I checked the ESP in FNVEdit and it was still showing a conflict. Comparing references didn't show any different but i'm gonna have to assume it wouldn't or it'll still show a conflict just for the overwrite of combining both.

 

I have a few other scripts throughout other mods that conflict with YUP fixes so I was curious if there was a easy way to learn how to fix these myself with a little bit of your help. If that's a tad weary, then instead, would you recommend to just make a mash patch combing what I can and for scripts/other things that can't just be fixed by a simple FNVEdit patch to just let YUP overwrite anything there.

Link to comment
Share on other sites

Conflicts aren't errors for one thing, so don't assume because there are conflicts that something is broken. You'll need to compare the scripts and see, usually in YUP there are comments about what is changed and why.

 

Some mods (like mine) will already have YUP's fixes forwarded into them. Others will not, and without some scripting knowledge it will be hard to know. The GECK wiki is the place to start for learning scripting and most of these issues are probably pretty easy to deal with.

 

Also, I applaud you for wanting to take the time to really take control of your game and fix the conflicts yourself. You're on the right track, so just keep plugging at it. If you have *specific* questions feel free to post in the forum and I or someone else will help you. This is better than personal message because others can find this information and also fix their issues.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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