Jump to content

fMoveEncumEffect


drithius

Recommended Posts

Does the Gamesetting fMoveEncumEffect exist in New Vegas? I've tried testing it in the console to no avail - as well as in the following script... but it doesn't seemingly do anything.

Scn DakzEncumbranceScript

Float fCurrentWeight
Float fMaxWeight
Float fEncumEffectDefault
Float fEncumEffectNew
Float fEncumRatioCurrent
Float fRatioRatio
int iDoOnce
int iTemp


Begin GameMode

	Set fCurrentWeight to (player.getAV InventoryWeight)
	Set fMaxWeight to (player.getAV CarryWeight)
	
	if fCurrentWeight > fMaxWeight							;avoid unecessary computations
	
		if iDoOnce != 1
					Set fEncumEffectDefault to (GetNumericGameSetting fMoveEncumEffect)
					Set iDoOnce to 1
		endif

		Set fEncumRatioCurrent to (fCurrentWeight / fMaxWeight)
		Set fRatioRatio to (fEncumRatioCurrent / fEncumRatioMaxGLOB)
		
		if fRatioRatio > 1.0
			set fRatioRatio to 1.0
		endif
		
		Set fEncumEffectNew to (fEncumEffectDefault * (1.0 - fRatioRatio))
		SetNumericGameSetting fMoveEncumEffect fEncumEffectNew

		if iTemp == 0
			player.modAV LeftMobilityCondition -1
			set iTemp to 1
		else
			player.modAV LeftMobilityCondition 1
			set iTemp to 0
		endif

	else
		Return
	
	endif

End

Edited by drithius
Link to comment
Share on other sites

  • Recently Browsing   0 members

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