Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- scn bonfireLockOnCrosshairUDF
- ref rMaybeLocked
- int iPlayerLockpick
- int iLockDifficulty
- float fDifficultyMult
- int iResultMult
- float fBonusHealth
- float fConcentric
- begin Function {rMaybeLocked}
- if rMaybeLocked.GetLocked == 1
- let iPlayerLockpick := Player.GetAV Lockpick
- let iLockDifficulty := rMaybeLocked.GetLockLevel
- print "Started script"
- ;;; ! BELOW IS THE CODE FOR THE BASIC SCALING DIFFICULTY !
- ;;; In summary, for every POINT of Skill the Player misses the Lock check by, the difficulty scales linearly
- set iResultMult to iPlayerLockpick - iLockDifficulty
- set fDifficultyMult to iResultMult / 100
- print "scaling is done"
- ;;; Max that this can reach in regular gameplay appears to be -0.99 to 0.99
- ;;; Negative also means harder, which might need to be swapped so equations make sense(?)
- ;;; ! BELOW IS THE CODE FOR THE STEPPING DIFFICULTY !
- ;;; Basically means that for every LEVEL of Skill the Player misses a Lock by, the difficulty increases more than the formula alone
- if iLockDifficulty > iPlayerLockpick
- if ( (iPlayerLockpick - iLockDifficulty) <= -25 ) && ( (iPlayerLockpick - iLockDifficulty) > -50 )
- let fDifficultyMult *= 0.75 ;(25% harder)
- elseif ( (iPlayerLockpick - iLockDifficulty) <= -50 ) && ( (iPlayerLockpick - iLockDifficulty) > -75 )
- let fDifficultyMult *= 0.50 ;(50% harder)
- elseif ( (iPlayerLockpick - iLockDifficulty) <= -75 ) && ( (iPlayerLockpick - iLockDifficulty) > -100 )
- let fDifficultyMult *= 0.25 ;(75% harder)
- endif
- elseif iPlayerLockpick > iLockDifficulty
- if ( (iPlayerLockpick - iLockDifficulty) >= 25 ) && ( (iPlayerLockpick - iLockDifficulty) < 50 )
- let fDifficultyMult *= 1.15 ;(15% easier)
- elseif ( (iPlayerLockpick - iLockDifficulty) >= 50 ) && ( (iPlayerLockpick - iLockDifficulty) < 75 )
- let fDifficultyMult *= 1.35 ;(35% easier)
- elseif ( (iPlayerLockpick - iLockDifficulty) >= 75 ) && ( (iPlayerLockpick - iLockDifficulty) < 100 )
- let fDifficultyMult *= 1.50 ;(50% easier)
- endif
- endif
- print "leveled scaling is done"
- ;;; ! BELOW LIES SPECIAL DIRECTIONS FOR EACH LOCK LEVEL !
- ;;; To be frank, no idea what this will do yet... will update in the future if anything is done here
- ;; Idea is that this would handle basic balancing of each Lock's general level (say if the Player meets the req nearly exactly)
- if iLockDifficulty == 0 ;very easy
- ;code
- elseif iLockDifficulty == 25 ;easy
- ;code
- elseif iLockDifficulty == 50 ;average
- ;code
- elseif iLockDifficulty == 75 ;hard
- ;code
- elseif iLockDifficulty == 100 ;very hard
- ;code
- elseif iLockDifficulty > 100 ;impossible
- ;code
- endif
- ;;; ! BELOW LIES THE FINAL TALLY GAMEPLAY MULTS !
- let fBonusHealth := (GetNumericGameSetting fLockpickBonusHealth)
- let fBonusHealth *= (fDifficultyMult * 1)
- SetNumericGameSetting fLockpickBonusHealth fBonusHealth
- print "Gave the lockpick bonus health!"
- let fConcentric := (200 * (fDifficultyMult * 2.25) )
- if fConcentric < 150
- let fConcentric := 150
- endif
- SetNumericINISetting iConcentricLengthMaxVeryEasy fConcentric
- SetNumericINISetting iConcentricLengthMaxEasy fConcentric
- SetNumericINISetting iConcentricLengthMaxAverage fConcentric
- SetNumericINISetting iConcentricLengthMaxHard fConcentric
- SetNumericINISetting iConcentricLengthMaxVeryHard fConcentric
- SetNumericINISetting iConcentricLengthMinVeryEasy fConcentric
- SetNumericINISetting iConcentricLengthMinEasy fConcentric
- SetNumericINISetting iConcentricLengthMinAverage fConcentric
- SetNumericINISetting iConcentricLengthMinHard fConcentric
- SetNumericINISetting iConcentricLengthMinVeryHard fConcentric
- print "Adjusted the concentrics!"
- ;iLockDifficulty will look like this:
- ;0 = very easy
- ;25 = easy
- ;50 = average
- ;75 = hard
- ;100 = very hard
- ;255 = impossible
- ;;;;;;LIST OF GAMESETTINGS YOU MAY WANT TO TWEAK HERE, BASED OFF SKILL + LOCKPICK DIFFICULTY (some may be unused)
- ;Note that some settings may not update properly while in this menu; you may have to switch implementation entirely.
- ;SetNumericGameSetting fLockpickBonusHealth ;??? ;default value = 0.01 ;seems to be used
- ;SetNumericGameSetting fLockPickBreakBase ;??? ;default = 0.05
- ;SetNumericGameSetting fLockPickBreakMult ;??? ;default = -0.001
- ;fLockPickQualityBase
- ;fLockPickQualityMult
- ;fLockLevelBase - unused
- ;fLockLevelMult - unused
- ;fLockSkillBase
- ;fLockSkillMult - unused
- ;fLockpickBonusHealth
- ;fLockPickBreakBase - unused
- ;fLockPickBreakMult - unused
- ;fLockPickQualityBase - unused
- ;fLockPickQualityMult - unused
- ;fLockTrapGoOffBase - unused
- ;fLockTrapGoOffMult - unused
- ;fPickBreakSecs ;default = 1.00
- ;;;;;;LIST OF INI SETTINGS, MUST USE GET/ SETINI STRING/ FLOAT
- ;iSweetSpotLengthMinVeryEasy - 400
- ;iSweetSpotLengthMinEasy - 200
- ;iSweetSpotLengthMinAverage - 100
- ;iSweetSpotLengthMinHard - 50
- ;iSweetSpotLengthMinVeryHard - 25
- ;iSweetSpotLengthMaxVeryEasy - 400
- ;iSweetSpotLengthMaxEasy - 200
- ;iSweetSpotLengthMaxAverage - 100
- ;iSweetSpotLengthMaxHard - 50
- ;iSweetSpotLengthMaxVeryHard - 25
- ;iConcentricLengthMinVeryEasy - 200
- ;iConcentricLengthMinEasy - 200
- ;iConcentricLengthMinAverage - 200
- ;iConcentricLengthMinHard - 200
- ;iConcentricLengthMinVeryHard - 200
- ;iConcentricLengthMaxVeryEasy - 200
- ;iConcentricLengthMaxEasy - 200
- ;iConcentricLengthMaxAverage - 200
- ;iConcentricLengthMaxHard - 200
- ;iConcentricLengthMaxVeryHard - 200
- endif
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement