@4ltair The bed with the Human Flesh isn't trapped, nor is it a container, door, or a proximity trigger (it's classified as an info trigger), so the mod shouldn't even be looking at it, which is what I see on my end. Do you have any other mods that might be altering the bed prior, I may need to add something for compatibility?
You are correct, that script of the bed with the human flesh is not touched by the mod but it has a "Bed" variable and the same "Bed" variable is also present in the script of the trapped bed, which is modified by the mod.
If the trap script changes this variable first, the human flesh script is not working anymore (it checks for Bed variable with value 0 or 1 and the trap script changes it to 12 or -1).
I did a test where i did not detect the trap on the bed and the human flesh script is working ok but as soon as i detect that trap before interacting with the other bed, i only get the message that there is nothing under it.
This is the human flesh script:
IF
Clicked([ANYONE])
Range(LastTrigger,9)
Global("Bed","AR0502",0)
THEN
RESPONSE #100
DisplayString(Myself,27913) // There is a revolting stench coming from beneath the bed. It smells of decay. You could search beneath the bed if you wish to.
SetGlobal("Bed","AR0502",1)
END
IF
Clicked([ANYONE])
Range(LastTrigger,9)
Global("Bed","AR0502",1)
THEN
RESPONSE #100
DisplayString(Myself,27914) // Beneath the bed, you find a mass of pale skin sewn into the shape of a tunic.
GiveItemCreate("LEAT22",LastTrigger,0,0,0) // Human Flesh
SetGlobal("Bed","AR0502",2)
END
IF
Clicked([ANYONE])
Range(LastTrigger,9)
THEN
RESPONSE #100
DisplayString(Myself,27915) // There is naught else beneath the bed but flies and blood stains.
END
This is the trap code:
IF
Disarmed([ANYONE])
THEN
RESPONSE #100
SetGlobal("Bed","MYAREA",-1)
END
IF
OR(3)
Detect([GOODCUTOFF.0.0.THIEF_ALL])
Detect([GOODCUTOFF.0.0.MONK])
Detect([GOODCUTOFF.0.0.SHAMAN])
Range(LastSeenBy,15)
!StateCheck(LastSeenBy,STATE_BLIND)
!CheckStatLT(LastSeenBy,20,TRAPS)
!CheckStatLT(LastSeenBy,5,LORE)
TriggerOverride(LastSeenBy,ModalState(DETECTTRAPS))
!GlobalTimerNotExpired("Bed","MYAREA")
ActionListEmpty()
THEN
RESPONSE #100
Wait(1)
DisplayStringHead(Myself,103256) // Call Lightning Trap
ReallyForceSpellRES("__0000",Myself) // No such index
SetGlobalTimer("Bed","MYAREA",TWO_ROUNDS)
END
IF
OR(3)
Detect([GOODCUTOFF.0.0.THIEF_ALL])
Detect([GOODCUTOFF.0.0.MONK])
Detect([GOODCUTOFF.0.0.SHAMAN])
Range(LastSeenBy,15)
!StateCheck(LastSeenBy,STATE_BLIND)
!CheckStatLT(LastSeenBy,20,TRAPS)
CheckStatLT(LastSeenBy,5,LORE)
TriggerOverride(LastSeenBy,ModalState(DETECTTRAPS))
!GlobalTimerNotExpired("Bed","MYAREA")
ActionListEmpty()
THEN
RESPONSE #100
Wait(1)
DisplayStringHead(Myself,103243) // Trap
ReallyForceSpellRES("__0000",Myself) // No such index
SetGlobalTimer("Bed","MYAREA",TWO_ROUNDS)
END
IF
Detect([GOODCUTOFF])
Range(LastSeenBy,15)
CheckSpellState(LastSeenBy,FIND_TRAPS)
!CheckStatLT(LastSeenBy,5,LORE)
!GlobalTimerNotExpired("Bed","MYAREA")
ActionListEmpty()
THEN
RESPONSE #100
Wait(1)
DisplayStringHead(Myself,103256) // Call Lightning Trap
ReallyForceSpellRES("__0000",Myself) // No such index
SetGlobalTimer("Bed","MYAREA",TWO_ROUNDS)
END
IF
Detect([GOODCUTOFF])
Range(LastSeenBy,15)
CheckSpellState(LastSeenBy,FIND_TRAPS)
CheckStatLT(LastSeenBy,5,LORE)
!GlobalTimerNotExpired("Bed","MYAREA")
ActionListEmpty()
THEN
RESPONSE #100
Wait(1)
DisplayStringHead(Myself,103243) // Trap
ReallyForceSpellRES("__0000",Myself) // No such index
SetGlobalTimer("Bed","MYAREA",TWO_ROUNDS)
END
IF
Opened([ANYONE])
THEN
RESPONSE #100
DisplayString(LastTrigger,14381) // Trap Sprung
ForceSpell(LastTrigger,TRAP_CALL_LIGHTNING) // SPPR987.SPL (Call Lightning)
END
Ah, conflicting script names between the different beds, I misunderstood you the first time.
Thanks for the details. I've added some code to differentiate them, the bed with the Human Flesh will now use a variable matching it's name (bed_click).
AR0502 is technically already a part of both variable names, added on automatically as "AR0502BED", so it doesn't conflict with other areas.
I derive the variable name for each script from it's object name, which is supposed to be unique within each area anyway, so this should just be a rare exception, but if it's not I'll look into extending the variable name with an extra unique ID.
@kjeron I crashed to desktop when I set multiple traps near one another. Had 3 in the same area (Durlag's Tower), Fear tripped one before chasing me. When I led him to the others, CtD while he approached them. One trap was a web, a fireball, and call lightning. I think the web had been fired, but not positive, since I was running in the opposite direction at the time (didn't want to be hit by my own fireballs LOL). This is in Windows, EET using cdTweaks and a few NPC mods that shouldn't have interfered. If you need me to repeat the process to gather data, let me know. I didn't make incremental saves so would have to do it all again, but that's ok.
EDIT: Verified in NI that the 2 that were left were the call lightning and fireball traps.
@LZenner its the Call Lightning Trap. Apparently the hard-coded Call Lightning projectiles cannot be used as explosion projectiles. I'll likely insert an exception to replace any recovered Call Lightning Trap with a single-shot version, as soon as I finish testing uploaded.
I would not update an existing game though, just avoid using the Call Lightning traps you recover.
@kjeron
May we get the latest version of this uploaded to GitHub and the first page's link be updated to that so the mod has more visibility and we know what's latest?
Is this mod compatible with EET? Rogue Rebalancing? Might and Guile? Epic Thieving? Other similar mods? What's the best place for it in the install order?
@kjeron
May we get the latest version of this uploaded to GitHub and the first page's link be updated to that so the mod has more visibility and we know what's latest?
I do not use GitHub. The latest version is listed in the first post (as part of the filename).
Is this mod compatible with EET? Rogue Rebalancing? Might and Guile? Epic Thieving? Other similar mods? What's the best place for it in the install order?
No reason it wouldn't be - it makes no changes to thieves or any other class, the changes are strictly to the areas and their trap scripts. The later the better, but at least after mods that add/alter areas and/or alter spells (enough to alter their description).
The en_US.tra file of this mod's encoded in ANSI, corrupting the description of the Dire Charm traps, the Magic Missile trap and the Fireball trap. (noticed it via NI's relatively new check for corrupted texts option).
That's what I get for directly copying them from Near Infinity. Damn — character. Was time for a new version anyway.
v0.20 adds new option - Anyone Unlock. Anyone can click on locked door/container and will attempt to unlock it.
@kjeron
May we get cross-mod compatibility with Thieving Skills for Bards, especially for Fast Trap Detection? What about allowing anyone (optionally only anyone with thieving skills) to use Fast Trap Detection?
May we also get formal EET compatibility if it doesn't already exist in this mod?
Can you clarify what the new component does? The "anyone" on the name makes me think that anyone can actually pick locks. Or it's just that it's a kind of automated check to make a character use the pick locks on a nearby container? I'm confused, sorry. :-)
It will trigger a "PickLock()" action for any character, no matter class, but it is still dependent on the characters actual skill with Pick Locks.
By default, it's not much more than a convenience for the Cleric/Thief, whose thieving button is hidden in the special abilities menu.
This is mostly because non-thieves do not receive their DEX/RACE bonuses to thieving skills (because of a 0x multiplier).
However, any modded item/class/kit that gives points to Open Locks skill, or grants them their DEX/RACE bonus, will be able to utilize it without requiring the Thieving button.
What version of WeiDU are you using? DEFINE_DIMORPHIC_FUNCTION was added with WeiDU version 247, so you need that or a more recent version in order to install this mod. The latest version is 249, available here.
What version of WeiDU are you using? DEFINE_DIMORPHIC_FUNCTION was added with WeiDU version 247, so you need that or a more recent version in order to install this mod. The latest version is 249, available here.
@gregyk75 Unless this is a some weird disconnect between Windows and MacOS weidu versions, I have no idea how such a parse error could be user-dependent like this.
And this looks exactly like a "old version of WeiDU" error. It's a syntax error in the preamble. Which definitely should work, because this has been tested. I just checked for myself, and saw the menu properly.
My setup: Mac, using the Mac WeiDU Launcher tool, with WeiDU v249 - that is, the copy of WeiDU contained in MWL is v249.
2) I also noticed that the mod linked above also has "Increase detection range" ("Increases the range to line of sight"). Does yours have it too, or the detection range is "vanilla"? (even if I tend to this you increase it to LoS given your statement "Some caution must still be taken when going around corners/through doorways (anywhere that blocks LoS)."
I think the only differences are which Classes and which States are checked:
I only check for not being Blinded, since being in Find Traps modal already excludes having other problematic states.
I don't run any CLASS check, any character that manages the Find Traps modal or Find Traps spell active can detect them.
2) I also noticed that the mod linked above also has "Increase detection range" ("Increases the range to line of sight"). Does yours have it too, or the detection range is "vanilla"? (even if I tend to this you increase it to LoS given your statement "Some caution must still be taken when going around corners/through doorways (anywhere that blocks LoS)."
Comments
You are correct, that script of the bed with the human flesh is not touched by the mod but it has a "Bed" variable and the same "Bed" variable is also present in the script of the trapped bed, which is modified by the mod.
If the trap script changes this variable first, the human flesh script is not working anymore (it checks for Bed variable with value 0 or 1 and the trap script changes it to 12 or -1).
I did a test where i did not detect the trap on the bed and the human flesh script is working ok but as soon as i detect that trap before interacting with the other bed, i only get the message that there is nothing under it.
This is the human flesh script:
This is the trap code:
Thanks for the details. I've added some code to differentiate them, the bed with the Human Flesh will now use a variable matching it's name (bed_click).
I derive the variable name for each script from it's object name, which is supposed to be unique within each area anyway, so this should just be a rare exception, but if it's not I'll look into extending the variable name with an extra unique ID.
This mod looks fantastic !!!
Is it possible to install for my current run or do I need to wait for my next playthrough ?
Thanks
EDIT: Verified in NI that the 2 that were left were the call lightning and fireball traps.
I would not update an existing game though, just avoid using the Call Lightning traps you recover.
May we get the latest version of this uploaded to GitHub and the first page's link be updated to that so the mod has more visibility and we know what's latest?
Is this mod compatible with EET? Rogue Rebalancing? Might and Guile? Epic Thieving? Other similar mods? What's the best place for it in the install order?
What else at present?
Thankee!
v0.20 adds new option - Anyone Unlock. Anyone can click on locked door/container and will attempt to unlock it.
May we get cross-mod compatibility with Thieving Skills for Bards, especially for Fast Trap Detection? What about allowing anyone (optionally only anyone with thieving skills) to use Fast Trap Detection?
May we also get formal EET compatibility if it doesn't already exist in this mod?
Thankee!
Can you clarify what the new component does? The "anyone" on the name makes me think that anyone can actually pick locks. Or it's just that it's a kind of automated check to make a character use the pick locks on a nearby container? I'm confused, sorry. :-)
By default, it's not much more than a convenience for the Cleric/Thief, whose thieving button is hidden in the special abilities menu.
This is mostly because non-thieves do not receive their DEX/RACE bonuses to thieving skills (because of a 0x multiplier).
However, any modded item/class/kit that gives points to Open Locks skill, or grants them their DEX/RACE bonus, will be able to utilize it without requiring the Thieving button.
Thanks for the mod. I'm new to the forum, am having issues with the v0.20 (installing on MacOS):
Parse error (state 852) at ~~
[TRAP_OVERHAUL/SETUP-TRAP_OVERHAUL.TP2] PARSE ERROR at line 6 column 16-40
Near Text: DEFINE_DIMORPHIC_FUNCTION
GLR parse error
[TRAP_OVERHAUL/SETUP-TRAP_OVERHAUL.TP2] ERROR at line 6 column 16-40
Near Text: DEFINE_DIMORPHIC_FUNCTION
Parsing.Parse_error
ERROR: parsing [TRAP_OVERHAUL/SETUP-TRAP_OVERHAUL.TP2]: Parsing.Parse_error
ERROR: problem parsing TP file [TRAP_OVERHAUL/SETUP-TRAP_OVERHAUL.TP2]: Parsing.Parse_error
FATAL ERROR: Parsing.Parse_error
Many thanks in advance !
Loving your various mods so far
Thanks for the quick reply.
No it's not that, I'm using v249 already.
My setup: Mac, using the Mac WeiDU Launcher tool, with WeiDU v249 - that is, the copy of WeiDU contained in MWL is v249.
I ended up creating a new game folder and it worked fine, not sure what happened but now it's on and it's great !
two questions:
1) What are the differences between this mod and the following one (https://github.com/BGforgeNet/bg2-tweaks-and-tricks) when it comes to fast trap detection?
2) I also noticed that the mod linked above also has "Increase detection range" ("Increases the range to line of sight"). Does yours have it too, or the detection range is "vanilla"? (even if I tend to this you increase it to LoS given your statement "Some caution must still be taken when going around corners/through doorways (anywhere that blocks LoS)."
I only check for not being Blinded, since being in Find Traps modal already excludes having other problematic states.
I don't run any CLASS check, any character that manages the Find Traps modal or Find Traps spell active can detect them. My Range is 15', which I think is vanilla.