Trap Detection/Recovery/Evasion
![kjeron](https://forums.beamdog.com/uploads/userpics/305/n01K0RDY9VE9V.png)
I've seen several threads related to these ideas, but never any actual mods to implement them, so I decided to try my hand at them. This mod has 4 optional parts:
Fast Trap Detection - Any Monk/Thief/Shaman using "Detect Traps" modal with sufficient Find Traps skill will detect traps as soon as they are within detection range. If they're lore is at least 50% of the necessary detection value, they will also detect what type of trap it is. Some caution must still be taken when going around corners/through doorways (anywhere that blocks LoS).
- The Cleric's Find Trap spell is now also updated to be detected by traps in the same way, and will automatically identify the type of trap.
Trap Recovery - Anytime a trap is disarmed, if the thief's Find Traps skill is at least 125% of the removal score then they will recover the trap, which they may then set similar to their own Snares (dependent on the Set Traps skill). All such traps have a proximity radius of 4 ft and require 15 lore to ID (but not to use). Only traps that can be reproduced (cast spells) can be recovered. Traps that cast normal spells will pull their description from the spell itself, but traps that use trap spells have pre-written descriptions, so there may be some inconsistencies if they've been modified.
Monk Trap Evasion - Monks can bypass (without triggering) traps if their Find Traps skill is high enough to detect the trap.
- This component only applies to area traps, not container/door traps.
(New v0.20)
Anyone Unlock - clicking on a locked door or container, while close enough, will have the character attempt to unlock it with the Open Locks skill.
- Locks that require a key or scripted event will not be attempted.
- Some positioning may be required for certain doors, as the character must be able to see it.
Area files are updated with new trap scripts, so this will not work in any areas that an existing game has already visited. For the same reason, I would not update to a new version of this mod on an existing game.
Fast Trap Detection - Any Monk/Thief/Shaman using "Detect Traps" modal with sufficient Find Traps skill will detect traps as soon as they are within detection range. If they're lore is at least 50% of the necessary detection value, they will also detect what type of trap it is. Some caution must still be taken when going around corners/through doorways (anywhere that blocks LoS).
- The Cleric's Find Trap spell is now also updated to be detected by traps in the same way, and will automatically identify the type of trap.
Trap Recovery - Anytime a trap is disarmed, if the thief's Find Traps skill is at least 125% of the removal score then they will recover the trap, which they may then set similar to their own Snares (dependent on the Set Traps skill). All such traps have a proximity radius of 4 ft and require 15 lore to ID (but not to use). Only traps that can be reproduced (cast spells) can be recovered. Traps that cast normal spells will pull their description from the spell itself, but traps that use trap spells have pre-written descriptions, so there may be some inconsistencies if they've been modified.
Monk Trap Evasion - Monks can bypass (without triggering) traps if their Find Traps skill is high enough to detect the trap.
- This component only applies to area traps, not container/door traps.
(New v0.20)
Anyone Unlock - clicking on a locked door or container, while close enough, will have the character attempt to unlock it with the Open Locks skill.
- Locks that require a key or scripted event will not be attempted.
- Some positioning may be required for certain doors, as the character must be able to see it.
Area files are updated with new trap scripts, so this will not work in any areas that an existing game has already visited. For the same reason, I would not update to a new version of this mod on an existing game.
Post edited by kjeron on
23
Comments
In general, it would be nice for casters to be able to know the type of damage of a trap, since that would allow them to evade them more intelligently than simply walking over or around them.
Of course, it is kinda easy to break a modal state so you'd either have to have the creature stick around and re-apply it or edit the spell in away that makes it clear that the caster has to "concentrate" for the detection to continue.Nvm, at that point it would probably be easier to have the helper creature do the detecting and follow the summoner around?
I'll post an update later today.Updated, also found/fixed a rather obvious bug, not sure how it's gone unnoticed.The changes will require manually uninstalling the old version before replacing it with the new, and it will likely not be compatible with saved games from the prior version.
does it work with IWD:EE ?
give u txt version from debug file
Thx u so much
is this compatible with EET and BGT ?
BGT (or any of the originals) will not work for Trap Detection - support for the Find Traps spell uses EE-only mechanics. The Trap Recovery and Monk-Evasion components might still work, however, I cannot test on the original games.
The monk trap evasion component may be bugged. Walking over a detected trap properly lets the monk ignore it, but the trap will fire as soon as Find Traps mode is turned off for any reason. This happens regardless of distance away from the trap or time elapsed since the trap was walked over.
I say it may be bugged because I also play with Ding0Tweaks which lets anyone set off traps, which could be interfering with it, but I install it before Trap Overhaul.
And a possible bug report: after disarming some traps in the basement of Durlag's Tower, the trap names kept appearing after the traps were disarmed, even after i unlocked the container and taken an item from it.
If it helps, the traps in question were the 3 traps (2 containers and 1 ground traps) in the small room just left of the entrance on the level with Love, Fear, Avarice ...
I've not been able to reproduce the issue, and cannot find anything special about the containers/floor trap you refer to (see image to verify correct room).
Mod version is v0.12 and i have installed only option 2, Fast Trap Detection.
I looked a bit in the install code (the Trap_Overhaul.tp2 and it seems that when option 2 is selected during install, the trap code is missing the part contained in .../inlined_temp_script_subx.baf. I have modified the script to include it (see below) and then the mode behaved correctly.
Also, a bit of a side question: do you know if it is possible to mod the code which handles the Detect Trap/Illusion or that's hard-coded in the game engine?
(What you added will work as long as you don't install the Trap Recovery option, minor change was still needed for both to work.) The general mechanic is hardcoded.
If you don't detect the trap from the bed, the script for the human flesh works as it should and you get the armor; if you detect the trap and then you try to get the armor, you only receive a message that there is nothing under the bed.