Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- The force of an explosion is calculated as:
- force = (explosion damage + explosion force) / 10
- if (force > player skill)
- force = skill
- The above calculation is used to let you know if you can even unlock an object with explosives.
- For calculating the actual chance of an explosive to unlock an object, the following formula is used:
- force = (explosion damage + explosion force) / 10
- if (force > player skill)
- force = skill
- distance = distance from explosion to locked object
- lockLevel = level of lock (0 = very easy; 25 = easy; 50 = average; 75 = hard; 100 = very hard; 255 = impossible)
- if (distance < 150) && (lockLevel < Impossible) && (object is locked)
- if (force - lockLevel) >= 0
- object is unlocked
- if (is a container) && random number between 0 and 99 inclusive < (rawForce - lockLevel) * (Luck / 5)
- if (not a quest item) && (is a food, armor, weapon, ammo, or misc)
- destroy items
- Here's an example of how this would be applied using the GrenadeFragExplosion explosion and the following stats. We will assume that all other checks are true to allow this to work.
- Player Skill = 32
- Player Luck = 6
- Explosion Damage= 100
- Explosion Force = 185
- Lock Level = 50 (average)
- Distance = 80
- 28.5 = (100 + 185) / 10
- if (28.5 > 32)
- not true so we don't do this
- if (80 < 150) && (50 < 255) && (locked == true)
- if (28.5 - 50) >= 0 ; this is equal to -21.5, so the door is not unlocked
- We'll try again with a more powerful explosive, this time we'll use a FatManNukeExplosion:
- Player Skill = 32
- Player Luck = 6
- Explosion Damage= 1600
- Explosion Force = 550
- Lock Level = 50 (average)
- Distance = 80
- 215 = (1600+ 550) / 10
- if (215 > 32)
- force is set to the player skill instead, so now it is 32
- if (80 < 150) && (50 < 255) && (locked == true)
- if (32 - 50) >= 0 ; this is equal to -18, so the door is not unlocked
- ; This is where the use of PN EO comes in handy to disable the skill check
- ; by disabling the skill check both of the tests we've done here would work.
Advertisement
Add Comment
Please, Sign In to add comment