Jump to content

Stealth Suit Mk2 properties


Metr13

Recommended Posts

Anyone here understands how the whole thing with stealth suit mk2 works? It seems that the perk only gives the movement speed instead of adding the properties per-level, and I can't find which piece of code actually works with the quest and enables the voice part to work.

Link to comment
Share on other sites

So, not sure if it's bad to selfbump, but I need help with scripting here. I'm trying to get the talking part of the suit to work for another armor. So far, no luck. I've tried editing out the checks for what suit is on the player in the quest script used to handle talking, but all I achieved is that now not even the original suit talks. Help?

 

 

 

ScriptName NVDLC03AuralStealthSuitQuestSCRIPT


; Quest script used for object "NVDLC03AuralStealthSuit" functionality.
; ETB 01/10/2011
; RL 02/07/2011	- Added sneak variable for ISFX control of adv optics.
; JDJ 02/21/2011 	- Deleted adv optics section because vr test is being deleted.
; JDJ 03/11/2011 	- Standards update.
; ETB 03/22/2011	- Reduced SayDelay timer amount, fixed pip-boy light comment conditions, added "first-time-outside" bark scripting.
; RL 03/28/2011	- Added override variable so we can prevent automatic barks from happening during scripted VO sequences.
; TLS 04/25/2011	- Re-scripted combat behavior so it will work consistently and logically.
; OMP 04/28/2011	- Added an escape if CharGen mode is active, preventing barks during intro/ending slide sequences.


Short	bDoOnce;
Short	bSneaking;
Short	bWarnOnce;
Short	bEquipBark;
Short	bUnequipBark;
Short	bInCombat;
Short	bStartupSeq;
Short	bSayDelay;
Short	bSayDelayMorphineUsed;									; [NOTE: "Morphine" (Ingestible's ID) = "Med-X" (Ingestible's Name)]
Short	bSayDelayMorphineOut;										; <<<
Short	bSayDelayStimpakUsed; 
Short	bSayDelayStimpakOut;
Short	bSayDelayRandom;
Short	bRandomNumberSet;
Short	nRandomNumber;
Short	bStimpaksChecked;
Short	bMedXChecked;
Short	bPipBoyLightComment;
Short	bFirstTimeOutside;
Short	bOverride;

Float	fSayTimer;
Float	fSayTimerNumber;
Float	fSayDelayTimer;
Float	fStimpakSayDelayTimer;
Float	fMorphineSayDelayTimer;
Float	fStartupSeqTimer;
Float	fSayRandomTimer;
Float	fSayRandomTimerNumber;


BEGIN GameMode

	; Prevent any barks when in CharGen mode
	If ( GetInCharGen == 1 )
		Return;
	EndIf

	If ( bOverride == 0 )

		; -----------------------------------------------------------------------------	Dialogue Delay Timers -------------------------------------------------------------	\/
		If ( bSayDelay == 1 )
			If ( fSayDelayTimer < fSayTimerNumber )
				Set fSayDelayTimer To fSayDelayTimer + GetSecondsPassed;
			Else
				Set bSayDelay To 0;
				Set fSayDelayTimer To 0;
			EndIf
		EndIf
		If ( bSayDelayMorphineUsed == 1 )
			If ( fMorphineSayDelayTimer < 5 )
				Set fMorphineSayDelayTimer To ( fMorphineSayDelayTimer + GetSecondsPassed );
			Else
				Set fMorphineSayDelayTimer To 0;
				Set bSayDelayMorphineUsed To 0;
			EndIf
			If ( Player.GetActorValue EnduranceCondition >= 50 && Player.GetActorValue PerceptionCondition >= 50 && Player.GetActorValue LeftMobilityCondition >= 50 && Player.GetActorValue RightMobilityCondition >= 50 && Player.GetActorValue LeftAttackCondition >= 50 && Player.GetActorValue RightAttackCondition >= 50 )
				Set bSayDelayMorphineUsed To 0;
			EndIf
		EndIf
		If ( bSayDelayMorphineOut == 1 )
			If ( fMorphineSayDelayTimer < 10 )
				Set fMorphineSayDelayTimer To ( fMorphineSayDelayTimer + GetSecondsPassed );
			Else
				Set fMorphineSayDelayTimer To 0;
				Set bSayDelayMorphineUsed To 0;
			EndIf

			If ( Player.GetItemCount Morphine >= 1 )
				Set bSayDelayMorphineOut To 0;
			EndIf
		EndIf
		If ( bSayDelayStimpakUsed == 1 )
			If ( fStimpakSayDelayTimer < 5 )
				Set fStimpakSayDelayTimer To ( fStimpakSayDelayTimer + GetSecondsPassed );
			Else
				Set fStimpakSayDelayTimer To 0;
				Set bSayDelayStimpakUsed To 0;
			EndIf
			If ( Player.GetHealthPercentage >= 0.75 )
				Set bSayDelayStimpakUsed To 0;
			EndIf
		EndIf
		If ( bSayDelayStimpakOut == 1 )
			If ( fStimpakSayDelayTimer < 10 )
				Set fStimpakSayDelayTimer To ( fStimpakSayDelayTimer + GetSecondsPassed );
			Else
				Set fStimpakSayDelayTimer To 0;
				Set bSayDelayStimpakOut To 0;
			EndIf
			If ( Player.GetItemCount Stimpak >= 1 )
				Set bSayDelayStimpakOut To 0;
			ElseIf ( Player.GetHealthPercentage >= 0.5 )
				Set bSayDelayStimpakOut To 0;
			EndIf
		EndIf

		If ( bSayDelayRandom == 1 )
			If ( fSayRandomTimer < fSayRandomTimerNumber )
				Set fSayRandomTimer To ( fSayRandomTimer + GetSecondsPassed );
			Else
				Set bSayDelayRandom To 0;
				Set fSayRandomTimer To 0;
			EndIf
		EndIf

		; -----------------------------------------------------------------------------	Equip/Unequip Barks ----------------------------------------------------------------	\/
		If ( bEquipBark == 1 && bSayDelay == 0 )
			NVDLC03StealthSuitVoiceCrREF.Say StealthSuitEQUIP 1 NVDLC03StealthSuitVoiceCr 1;						; <Suit introduces itself>
			Set bSayDelay To 1;
			Set fSayTimerNumber To 5;																									; "Say Delay" set to 10 seconds
			Set bEquipBark To 0;
			Set bStartupSeq To 1;
		Else
			Set bEquipBark To 0;
		EndIf

		If ( bUnequipBark == 1 && bSayDelay == 0 )
			NVDLC03StealthSuitVoiceCrREF.Say StealthSuitUNEQUIP 1 NVDLC03StealthSuitVoiceCr 1;					; <Suit comments on removal>
			Set bSayDelay To 1;
			Set fSayTimerNumber To 3;
			Set bUnequipBark To 0;
			Set bStartupSeq To 0;
		Else
			Set bUnequipBark To 0;
		EndIf

		; -----------------------------------------------------------------------------	Out-of-Combat Barks -----------------------------------------------------------------	\/
		;If ( Player.GetEquipped NVDLC03AuralStealthsuit == 1 ) && ( Player.IsInCombat == 0) && (bSayDelay == 0 )
		If ( Player.IsInCombat == 0) && (bSayDelay == 0 )
			; --------------------------------	Status-of-Chemical Barks ----------------------------	 \/
			If ( bStartupSeq == 1 )
				If ( bStimpaksChecked == 0 )
					If ( Player.GetItemCount Stimpak == 0 )
						Set bSayDelay To 1;
						Set fSayTimerNumber To 5;
						NVDLC03StealthSuitVoiceCrREF.Say StealthSuitStartupSeq 1 NVDLC03StealthSuitVoiceCr 1;			; <Suit comments on missing Stimpak supply>
					ElseIf ( Player.GetItemCount Stimpak >= 1 && Player.GetItemCount Stimpak <= 3 )
						Set bSayDelay To 1;
						Set fSayTimerNumber To 5;
						NVDLC03StealthSuitVoiceCrREF.Say StealthSuitStartupSeq 1 NVDLC03StealthSuitVoiceCr 1;			; <Suit comments on low Stimpak supply>	
					ElseIf ( Player.GetItemCount Stimpak >= 4 )
						Set bSayDelay To 1;
						Set fSayTimerNumber To 5;
						NVDLC03StealthSuitVoiceCrREF.Say StealthSuitStartupSeq 1 NVDLC03StealthSuitVoiceCr 1;			; <Suit comments on sufficient Stimpak supply>
					EndIf
					Set bStimpaksChecked To 1;
					Return;
				EndIf
				If ( bStimpakschecked == 1 && bMedXChecked == 0 )
					If ( Player.GetItemCount Morphine == 0 )	
						Set bSayDelay To 1;
						Set fSayTimerNumber To 5;
						NVDLC03StealthSuitVoiceCrREF.Say StealthSuitStartupSeq 1 NVDLC03StealthSuitVoiceCr 1;			; <Suit comments on missing Morphine supply>
					ElseIf ( Player.GetItemCount Morphine >= 1 && Player.GetItemCount Morphine <= 3 )
						Set bSayDelay To 1;
						Set fSayTimerNumber To 5;
						NVDLC03StealthSuitVoiceCrREF.Say StealthSuitStartupSeq 1 NVDLC03StealthSuitVoiceCr 1;			; <Suit comments on low Morphine supply>
					ElseIf ( Player.GetItemCount Morphine >= 4 )
						Set bSayDelay To 1;
						Set fSayTimerNumber To 5;
						NVDLC03StealthSuitVoiceCrREF.Say StealthSuitStartupSeq 1 NVDLC03StealthSuitVoiceCr 1;			; <Suit comments on sufficient Morphine supply>
					EndIf
					Set bMedXChecked To 1;
					Return;
				EndIf
				If ( bStimpaksChecked == 1 && bMedXChecked == 1 )
					Set bStartupSeq To 0;
					Set bStimpaksChecked To 0;
					Set bMedXChecked To 0;
				EndIf
			EndIf

			; ----------------------------------------------------	Detection-of-Pipboy Light -------------------------------------------	\/
			If ( Player.IsSpellTarget PipBoyLight == 1 && Player.IsSneaking == 1 && bPipBoyLightComment == 0 )
				Set bPipBoyLightComment To 1;
				NVDLC03StealthSuitVoiceCrREF.Say StealthSuitPipBoyLight 1 NVDLC03StealthSuitVoiceCr 1;				;<Suit comments that the PipBoy light is on>
				Set bSayDelay To 1;
				Set fSayTimerNumber To 5;
			ElseIf ( Player.IsSneaking == 0 || Player.IsSpellTarget PipBoyLight == 0 )
				Set bPipBoyLightComment To 0;
			EndIf

			; ----------------------------------------------------	First-Time-Outside ------------------------------------------------------	\/
			If ( NVDLC03PlotReactionBark.nX13Done == 2 && bFirstTimeOutside == 0 )										; Makes sure Mobius/Klein aren't talking.
				Set bFirstTimeOutside To 1;
				If ( Player.GetInWorldSpace NVDLC03BigMT )
					NVDLC03StealthSuitVoiceCrREF.Say StealthSuitX13LeaveBark 1 NVDLC03StealthSuitVoiceCr 1;			;<Suit comments on being outside for the first time>
				EndIf
			EndIf

			; ----------------------------------------------------	Random Barks -----------------------------------------------------------	\/
			If ( bRandomNumberSet == 0 )
				Set nRandomNumber To GetRandomPercent;
				Set bRandomNumberSet To 1;
			EndIf

			If ( bRandomNumberSet == 1 )
				If ( bSayDelayRandom == 0 && bSayDelay == 0 )
					If ( nRandomNumber <= 33 )
						Set bSayDelayRandom To 1;
						Set bRandomNumberSet To 0;
						Set fSayRandomTimerNumber To 300;
						Return;
					Else ( nRandomNumber > 33 )
						Set bSayDelayRandom To 1;
						Set bRandomNumberSet To 0;
						Set fSayRandomTimerNumber To 300;
						NVDLC03StealthSuitVoiceCrREF.Say StealthSuitFunnyLines 1 NVDLC03StealthSuitVoiceCr 1;		; <Suit says a random funny line>
						Set bSayDelay To 1;
						Set fSayTimerNumber To 5;
					EndIf
				EndIf
			EndIf

		; -----------------------------------------------------------------------------	In-Combat Behavior ------------------------------------------------------------------	\/
		;ElseIf ( Player.GetEquipped NVDLC03AuralStealthsuit == 1 ) && ( Player.IsInCombat == 1 )
		ElseIf ( Player.IsInCombat == 1 )
			If ( Player.GetHealthPercentage < 0.5 )
				If ( Player.GetItemCount Stimpak > 0 )																						; <Does the player have a Stimpak?>
					If ( Player.HasMagicEffect RestoreHealth == 0 ) && ( Player.IsHardcore == 1 )											; If the player is in hardcore mode, don't apply more than one Stimpak at a time
						PlaySound NPCHumanUsingStimpak;
						Player.CastImmediateOnSelf NVDLC03StealthSuitStimpak;													; <Suit gives player a Stimpak use>
						Player.RemoveItem Stimpak 1;
						If ( bSayDelayStimpakUsed == 0 ) && ( bSayDelay == 0 )														; <If suit hasn't said a Stimpak line yet...>
							NVDLC03StealthSuitVoiceCrREF.Say StealthSuitStimpak 1 NVDLC03StealthSuitVoiceCr 1;			; <Suit comments on Stimpak injection>
							Set bSayDelayStimpakUsed To 1;
							Set bSayDelay To 1;
							Set fSayTimerNumber To 5;
						EndIf
					ElseIf ( Player.IsHardcore == 0 )																							; If the player is not Hardcore, apply Stimpaks until the player's Health is above 50%
						PlaySound NPCHumanUsingStimpak;
						Player.CastImmediateOnSelf NVDLC03StealthSuitStimpak;													; <Suit gives player a Stimpak use>
						Player.RemoveItem Stimpak 1;
						If ( bSayDelayStimpakUsed == 0 ) && ( bSayDelay == 0 )														; <If suit hasn't said a Stimpak line yet...>
							NVDLC03StealthSuitVoiceCrREF.Say StealthSuitStimpak 1 NVDLC03StealthSuitVoiceCr 1;			; <Suit comments on Stimpak injection>
							Set bSayDelayStimpakUsed To 1;
							Set bSayDelay To 1;
							Set fSayTimerNumber To 5;
						EndIf
					EndIf
				ElseIf ( Player.GetItemCount Stimpak == 0 )																				; If the player is out of Stimpaks...>
					If ( bSayDelayStimpakOut == 0 ) && ( bSayDelay == 0 )																						; <If suit hasn't said a Stimpak line yet...>
						NVDLC03StealthSuitVoiceCrREF.Say StealthSuitStimpak 1 NVDLC03StealthSuitVoiceCr 1;			; <Suit comments on missing Stimpak supply>	
						Set bSayDelayStimpakOut To 1;
						Set bSayDelay To 1;
						Set fSayTimerNumber To 10;
					EndIf
				EndIf
			EndIf

			If ( Player.HasMagicEffect ChemIncDmgResistPsycho == 0 )																		; player doesn't have morphine in his system.
				If ( Player.GetActorValue EnduranceCondition <= 25 ) || ( Player.GetActorValue PerceptionCondition <= 25 ) || ( Player.GetActorValue LeftMobilityCondition <= 25 ) || ( Player.GetActorValue RightMobilityCondition <= 25 ) || ( Player.GetActorValue LeftAttackCondition <= 25 ) || ( Player.GetActorValue RightAttackCondition <= 25 )
					If ( Player.GetItemCount Morphine > 0 )																			; player has morphine available in his inventory and isn't currently using Med-X
						Player.EquipItem Morphine 1;
						If ( bSayDelayMorphineUsed == 0 ) && ( bSayDelay == 0 )
							NVDLC03StealthSuitVoiceCrREF.Say StealthSuitMedX 1 NVDLC03StealthSuitVoiceCr 1;			; <Suit comments on Med-X injection>
							Set bSayDelayMorphineUsed To 1;
							Set bSayDelay To 1;
							Set fSayTimerNumber To 5;
						EndIf
					ElseIf ( Player.GetItemCount Morphine == 0 && bSayDelayMorphineOut == 0 )	 && (bSayDelay == 0)
						Set bSayDelayMorphineOut To 1;														
						NVDLC03StealthSuitVoiceCrREF.Say StealthSuitMedX 1 NVDLC03StealthSuitVoiceCr 1;			; <Suit comments on missing Med-X supply>
						Set bSayDelay To 1;
						Set fSayTimerNumber To 10;
					EndIf
				EndIf
			EndIf
		EndIf; in/out-of-combat barks conditions

		; -----------------------------------------------------------------------------	Detection-of-Combat Barks -------------------------------------------------------	\/
		;If ( Player.GetEquipped NVDLC03AuralStealthsuit == 1 && bInCombat == 0 && bSayDelay == 0 )
		 ( bInCombat == 0 && bSayDelay == 0 )
			If ( Player.IsInCombat == 1 )
				NVDLC03StealthSuitVoiceCrREF.Say StealthSuitCombatStart 1 NVDLC03StealthSuitVoiceCr 1;			;<Suit comments on the start of combat>
				Set bSayDelay To 1;
				Set fSayTimerNumber To 5;
				Set bInCombat To 1;
			EndIf
		;ElseIf ( Player.GetEquipped NVDLC03AuralStealthSuit == 1 && bInCombat == 1 && bSayDelay == 0 )
		ElseIf ( && bInCombat == 1 && bSayDelay == 0 )
			If ( Player.IsInCombat == 0 )
				NVDLC03StealthSuitVoiceCrREF.Say StealthSuitCombatEnd 1 NVDLC03StealthSuitVoiceCr 1;			;<Suit comments on the end of combat>
				Set bSayDelay To 1;
				Set fSayTimerNumber To 5;
				Set bInCombat To 0;
			EndIf
		EndIf
	EndIf

END; gamemode

 

 

Here's the code. I commented the proper checks out not to loose them in case I forget (and to check with them in case of anything).

 

Basically what I've done to other armour is give it same script as the stealthsuit has (all it does is sound the equip/unequip barks).

 

...maybe it doesn't work any more because it's always triggered? Eh.

Link to comment
Share on other sites

I tried the same thing once, didnt work very well either, but i think about picking it up again...

maybe we could work together?

 

also, dont mess with the original files, ALWAYS make copies of stuff, and rename then accordingly.

For example, for my mod i use "ROMM" as a prefix.

so when i search for romm in the object window, only my stuff, but all of my stuff appears.

so i would take the script "NVDLC03AuralStealthSuitQuestSCRIPT", duplicate it, and rename it "RMOMAuralStealthSuitQuestSCRIPT"

- gives you easy access to the original and you dont have to comment everything or read over the comments, stuff gets a lot easier :D

Link to comment
Share on other sites

Well, I managed to solve the problem with talking, by giving my armour the aural suit object script and ripping out all the checks for getequipped from the topics over at the controlling quest.

 

Would be better to create a copy of the quest, but copying doesn't actually copy the topics (which kinda sucks) and I don't really know how to add already-present files into my mods. Guess I need to unpack the dlc package for that.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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