PDA

View Full Version : Trap changes


CunningGabe
March 1, 2012, 21:22
One of the things I've been itching to change for a long time is the trap system. ewert has coded up a system that allows for passive trap detection in line-of-sight, and also allows for trap evasion. I am planning to port these changes to v4 and build from there.

In a nutshell, this is what the new system would be:
- Trap detection scrolls, spells, etc would go away entirely.
- You can passively detect traps (and secret doors) up to 3 squares away.
- Your chance to detect a trap is (Searching skill)/(distance) %. That is, you get your full searching skill for traps adjacent to you, half of it for traps 2 squares away, etc.
- Your searching skill is affected by class, race, wis, and int. As you level, it improves.
- While in Searching mode, your speed is reduced by 2, and your search skill is increased by 20%.
- It is possible to avoid the effects of a trap when you walk into the square. The chance is based on your dex, and it is easier if you know the trap is there.

That is more-or-less where ewert's changes end.

Now, along with this are some other changes I have planned:
- Review the list of traps. Summoning and Teleportation will probably change so that they are less deadly.
- Extend the trap/secret door detection to mimics and lurkers.
- Add some more mimics and lurkers.

Eventually, I'd like to add more traps and trap-like features, but I think that is quite difficult with the current terrain system.

Obviously, getting the numbers just right will take some work. How do people feel about this system in general, though? What traps need to be toned down and how if there is no longer an infallible way to detect them?

Magnate
March 1, 2012, 22:01
At last! There have been SO many threads about traps, it's awesome that someone is going to grapple with it.

Slightly tangentially to your questions, I think we have the following circular problem:

1. If traps do not significantly perturb the player (i.e. neither irritating nor deadly), they are hard to make interesting.

2. If they are really irritating and/or deadly, and the chances of detecting/avoiding them are too low, gameplay worsens with frustration (assuming you allow only one chance to detect each trap, otherwise it encourages grinding)

3. If they are irritating and/or deadly and the chances of detecting/avoiding them are too high, it is hard to make them interesting again.

So I don't envy you trying to solve this. But for my two penn'orth, I'd say that both paralysis and blindness traps need to be shorter duration, to give people a slightly better chance of surviving them.

Derakon
March 1, 2012, 22:08
Yeah, there's been a ton of discussion. I continue to maintain that the best way to handle traps is to not hide them, and make it challenging for the player to work around them -- basically making them into some merger between terrain and stationary monsters. Damage fields, NPP turret traps, sirens (basically shrieker mushroom patches), etc.

Magnate sums up why the hidden-trap thing is so problematic. You have to decide: are players going to be able to detect traps 100% of the time or not? If not, should traps be allowed to kill the player? Answering "yes" to that implies that random unavoidable instadeath is okay; some people are okay with that but personally I am not.

I suppose another possibility would be for the player to always know that a trap is there, but not what the trap will do, so they at least have to decide if they want to take their chances. We want to encourage the player to be making meaningful decisions, after all.

buzzkill
March 1, 2012, 22:20
1. If traps do not significantly perturb the player (i.e. neither irritating nor deadly), they are hard to make interesting.

Exactly. I like what I read in the OP, the gist of it, but would be wary of taking the bite out of traps even if detection is no longer fool proof. Traps were mostly a joke. Imperfect detection will help to make them somewhat of a hazard. I say implement the detection changes and hold off on the nerfing until rabid complaints of unfair deaths starts pouring in. At least that's what I'd do.

On the other hand. You could split traps in two distinct groups, physical and magical. Summoning and teleportation would be good examples of magical traps. Darts and pits and trap doors, obviously physical. Physical must be found, LoS searching. Magical are harder to find, but can be magically detected, though I'd tone down the volume and tune up the cost of magical trap detection.

CunningGabe
March 1, 2012, 22:28
Yeah, there's been a ton of discussion. I continue to maintain that the best way to handle traps is to not hide them, and make it challenging for the player to work around them -- basically making them into some merger between terrain and stationary monsters. Damage fields, NPP turret traps, sirens (basically shrieker mushroom patches), etc.

Magnate sums up why the hidden-trap thing is so problematic. You have to decide: are players going to be able to detect traps 100% of the time or not? If not, should traps be allowed to kill the player? Answering "yes" to that implies that random unavoidable instadeath is okay; some people are okay with that but personally I am not.

I suppose another possibility would be for the player to always know that a trap is there, but not what the trap will do, so they at least have to decide if they want to take their chances. We want to encourage the player to be making meaningful decisions, after all.

In the long-run, I agree with you -- I really want an overhaul of the whole trap system. But that's a lot of work, and in the meanwhile, I'll settle for a system that is less dumb then "cast detect traps every time I hit a trap detection border". Porting ewert's changes would take an hour or two.

My goal is for trap detection to not be 100% (unless you optimize for it), but for traps to not be deadly (in isolation).

dionysian
March 2, 2012, 00:25
Always liked hallucination or amnesia for trap effects that provide plenty of disincentive to setting them off, without leading to too many YASD that make the game less fun.

Antoine
March 2, 2012, 02:19
I continue to maintain that the most important trap change is to place them in somewhat predictable places so that there is some skill in anticipating where they might be found

EpicMan
March 2, 2012, 04:24
I like the trap setup in Dungeons of Dredmor:
-Traps are hidden initially, but are always revealed when they are within the player's Trap Sense range (normally one).

Traps can be disarmed, the difficulty based on the trap type and the player's trap disarming ability. Most traps are one-shot, though not all. Failing to disarm a trap always sets it off.

Non-flying monsters can set off traps.

The best traps are basically triggers, with a corresponding turret on a wall. When triggered, the turret fires and arrow / blast / whatever is fired. You can protect yourself by making sure there is something between you and the turret (say, a monster), or even use them against the monsters. These traps are not one-shot, of course.

jevansau
March 2, 2012, 05:12
If traps are no longer 100% detectable and disarmable, I think the amount of traps will need to be greatly reduced, especially in vaults. A few strategically placed traps is good, a vast mass of them will just make vaults completely impossible.
I remember this being a major issue in early versions of FAY.

d_m
March 2, 2012, 06:15
I think Gabe should proceed with his changes, since V4 is all about trying things out.

I agree with Derakon that traps which are likely to kill and/or hard to disarm should probably be obvious or detectable. Ideally, I think I'd like some traps to be obvious but hard to disarm/avoid, and others to be hidden but (in general) less dangerous.

That said, I don't mind the idea that "small" traps will be unnoticed 5-10% of the time (where small traps means things that aren't summoning, trap doors, or teleport).

andrewdoull
March 2, 2012, 10:23
Please ensure that there's no advantage in spamming the 's' key - that is for each location, once you've searched from it by moving into it with searching mode enabled, searching again doesn't reveal more traps.

ekolis
March 2, 2012, 17:42
Would this involve creation of a new zone, similar to the DTrap zone, which indicates "I've searched here for traps"? Otherwise you might forget where you've searched already, and waste time searching again!

Actually, though, I think you SHOULD be able to find more traps by re-searching previously searched areas, but ONLY if your searching skill has increased in the meantime. (Why should you be penalized for searching early? It doesn't make sense that just because you've searched somewhere once, you can't come back later once your skill has increased and search again to find any traps you missed!)

Scatha
March 2, 2012, 18:22
Actually, though, I think you SHOULD be able to find more traps by re-searching previously searched areas, but ONLY if your searching skill has increased in the meantime. (Why should you be penalized for searching early? It doesn't make sense that just because you've searched somewhere once, you can't come back later once your skill has increased and search again to find any traps you missed!)

The natural way to implement this mechanic is to have each trap get a random difficulty level assigned on creation (distribution can depend on depth and trap type), and you spot it if your searching (+distance modifier + searching bonus) is ever high enough.

(Sil doesn't actually use that mechanic, but we considered it for a couple of places in the game (Lore master and Cursebreaking, which are currently both automatic successes). The game has a take on traps which is similar to that which is being aimed for here - you are never completely safe, but they shouldn't kill you in isolation; we do allow spending more time searching to give better odds of success, but there's a turn limit on the game, so this isn't abusive.)

Presumably summoning traps would be interesting rather than instant death if set up so that the player always got the next turn before the summoned monsters?

buzzkill
March 2, 2012, 18:59
Here's yet another approach. (which Scatha just nosed me out on, sort of)

Every trap has a rating from 1 to 100 base (but could be modified higher). This rating indicates the quality of construction and therefore how well disguised or hidden the trap is, not necessarily how powerful or dangerous it is. 1 indicates that it is extraordinarily obvious (reflectors and neon paint), and 100 (or higher) indicates that it's almost entirely unable to be noticed (damn near invisible).

Every character has a detection skill that ranges for 1 to 100 base (but could be modified higher). If your detection skill exceeds the trap's rating, then you notice it every time. A master rogue will never overlook a shoddy trap.

If a characters detection skill is less then the trap's rating then he has a % chance of noticing the trap (player skill) / (trap rating) = (% chance to detect). This would be a one time only check, meaning that only one check for each trap within passive detection range, from each individual gird. One check per grid, per trap. I hope that makes sense in conjunction with the theme laid out in the OP.

The interesting part:

Realistically, traps placed randomly around the dungeon, presumably in haste by previous adventurers of questionable skill and also subject to the ravages of time, would be of lower quality and thus more easily noticed. I'd say that traps near doors or stairs, which while random, have some hint of intelligent placement, would be of a slightly higher quality. Specifically, placed traps, such as those in special rooms would be even better, and vaults would contain the highest quality of trap, placed there by experts to protect the valuables within.

I was also thinking that when a monster moves over a trap, while it shouldn't be able to activate or destroy the trap, could damage it's camouflage making it more noticeable, or make it more noticeable by the visible actions taken to avoid it (jumping over or squeezing around, etc).

The advantages:

1. Randomly placed traps in meaningless locations become easily detected and thus far less dangerous.
2. Stealthy classes will find most in-depth traps. Non-stealthy classes while not being clueless, would fail to find some. Isn't that the point of all this.
3. Traps in vaults will actually be harder to detect, thus more dangerous than other traps. Fewer vault traps will be necessary.
4. If we pair the trap rating to the type of trap (assuming more dangerous trap type such as summoning are rated higher), then we can have a situation where trap that are placed randomly about the dungeon are not only more easily noticed but are also of the less dangerous type.

The numbers (subject to tweaking):

Traps rating = DL*2 base, then further modify by specific placement and damage, and then throw in some random variation.
Character ability = CL*1. Double for stealthy classes. Halve for clumsy classes. Further modify by character race and 'items of searching'.

That's pretty much it. I'd also advocate a similar 'danger level' for traps with a similar 1-100+ rating system. Lots of teleport and summoning traps in dangerous locations such as vaults. Bigger explosions too. While just the opposite would hold true for a trap placed in the middle of an anonymous corridor (for no apparent reason).

I'd also advocate random placement of traps within vaults, or (maybe 1/2 a dozen) identical vault designs with alternate trap placements, cause some people just know way too much about this game.

Nemesis
March 2, 2012, 23:04
Traps that aren't detectable, especially summoning and teleportation traps but also things like confusion or blind, would discourage players from diving. I don't like that idea at all.

fizzix
March 2, 2012, 23:29
Traps don't need to be hidden. Perhaps the most dangerous traps (summoning) should always be visible. Also, always visible traps that can be detected but act at a distance are good. (essentially this is what potion, scroll, ring and chest mimics are, as well as nexus Qs)

Searching for traps is hard to make interesting. But the risk of disarming is worthwhile. You'd need to do something about the spells though. Perhaps only rogues and mages should be able to disarm traps with spells.

Lord Tom
March 3, 2012, 01:03
Ever so slightly off-topic, I'd love to see trapped chests just go away. The need to perfunctorily search/disarm every time I see one is 99 parts annoying to just 1 part gameplay-enriching.

But back to the OP, I think it's an intriguing direction. It does seem silly to always detect at every trap boundary, just because of the slight chance of hitting a deadly trap.

I guess a big part of the challenge (along with the too-dangerous vs not-dangerous enough paradox) is differentiating them from monsters, gameplay-wise. If they can't be detected, then you want scenarios where you're setting up to kill a monster or grab an item, but turn the corner into LOS and encounter a trap...forcing you to change your plans...somehow.

As a final thought, enemies that create traps would be more interesting if they scattered them in an area around the player rather than predictably in a ring.

Magnate
March 3, 2012, 09:27
As a final thought, enemies that create traps would be more interesting if they scattered them in an area around the player rather than predictably in a ring.This is exactly the kind of thing that will be possible when v4 tests out the new effects framework. You'll be able to specify a target square, a radius around it, a percent chance for an effect on each square in that radius.

(No, this isn't imminent - but once the remaining combat wrinkles are ironed out it's my next project, I think.)

buzzkill
March 3, 2012, 15:53
I'm beginning to see an overarching vibe in this thread that players want traps to remain largely meaningless. That rogues and thieves shouldn't have an advantage in a trapped environment versus other non-stealthy classes, which IMO make this whole exercise largely useless. Just my 2 cents.

Right now, no class has a fear of traps. I fear that after 'community approved' changes are made, this will still hold true. People fear change. I fear no eggs will be broken.

Magnate
March 3, 2012, 15:59
I'm beginning to see an overarching vibe in this thread that players want traps to remain largely meaningless. That rogues and thieves shouldn't have an advantage in a trapped environment versus other non-stealthy classes, which IMO make this whole exercise largely useless. Just my 2 cents.

Right now, no class has a fear of traps. I fear that after 'community approved' changes are made, this will still hold true. People fear change. I fear no eggs will be broken.If this were the old situation of V development circa 2010-11, you'd be right. But the whole point of v4 is to allow eggs to get broken, in defiance of the lowest common denominator of community consensus. Here's to an interesting omelette!

Nick
March 3, 2012, 20:50
How about making magical trap detection, physical disarming, and magical disarming all have the same failure rate, and make physical searching a one chance thing. Simple, makes traps relevant, makes guessing where they could be a skill.

Oh, and potentially multiple traps per grid - FA has this already.

Magnate
March 4, 2012, 00:05
Oh, and potentially multiple traps per grid - FA has this already.Isn't that ... like ... something to do with ... *layers*?

ghengiz
March 4, 2012, 15:04
FA has this already.

Personally, I nicknamed FA "emacs-band" for it includes almost everything :D
I prefer vim though, no offence :)

d_m
March 5, 2012, 18:44
Please ensure that there's no advantage in spamming the 's' key - that is for each location, once you've searched from it by moving into it with searching mode enabled, searching again doesn't reveal more traps.

This is my number one priority.

CunningGabe
March 5, 2012, 19:16
Thank you all for the suggestions. I've decided to go ahead and start trying to completely overhaul the trap system. In particular, I am making traps their own "layer", separate from terrain, which should make some modifications much easier.

I'm putting together a trap.txt file that is similar to the monster and object edit files. Each trap will have the following characteristics:
- How difficult it is to detect. (Not every trap will start hidden.)
- How difficult it is to disarm.
- Average depth
- Experience for disarming
- Trap effect

There are probably other characteristics I'm forgetting as well. Once this is in place, then there are a lot of things I'd like to add:
- Traps that act every so often -- like the turrets in NPP.
- Trapped doors
- "Traps" with positive effects -- like a glyph on the floor that gives you a burst of speed when you step on it.
- Unique traps? Traps with "friends"? (e.g. a bunch of flame-jets in a row)
Furthermore, I can create different levels of trap types -- a teleportation trap might have different ranges at different dungeon levels, for example.

As for the exact mechanics of detection, I like buzzkill's idea. Once I successfully separate traps out from terrain, I'll start working on a detection system.

d_m
March 5, 2012, 20:30
This sounds amazing! Please keep us in the loop :)

Mikko Lehtinen
March 5, 2012, 20:57
You may want to take a look at EyAngband's trap layer, which sounds pretty similar. (And of course UnAngband's terrain features.)

In the development version of Fay, I've managed to hack Eytan's trap layer into a more general terrain feature layer.

I have warding runes in walls that may be turned on and off if you have good enough Disarming. They affect both the player and monsters.

d_m
March 5, 2012, 21:09
I have warding runes in walls that may be turned on and off if you have good enough Disarming. They affect both the player and monsters.

It would be awesome if monsters could be affected by traps. I'm not saying all traps should necessarily affect all monsters, but for instance pits and turrets are both traps that would seem to be pretty "equal-opportunity".

CunningGabe
March 6, 2012, 15:17
It would be awesome if monsters could be affected by traps. I'm not saying all traps should necessarily affect all monsters, but for instance pits and turrets are both traps that would seem to be pretty "equal-opportunity".

Having monsters set off traps wouldn't be too difficult. But how do you decide how likely a monster is to notice or evade a trap? And once you figure that out, you need a lot of storage if you want every monster to maintain its own list of which traps it knows about. Maybe it would be easiest to only allow "obvious" traps to hit monsters.

CunningGabe
March 6, 2012, 19:32
I've put some more thought into the way I think trap detection should work (for players). Here is what I have come up with, building off of buzzkill's idea:

1. Each trap has a rating of how hidden it is. A rating of 0 indicates that it is immediately obvious. A positive rating indicates that the trap starts out hidden.
2. Each player has a searching range and a search rating.
3. Whenever a hidden trap is within your search range, if your search rating is at least as high as its hidden rating, then the trap is revealed. This is completely passive detection; i.e., it does not require you to 's'earch or to be in 'S'earching mode.
4. Whenever you 's'earch, you make a check to spot traps as if you were using passive detection, but your search range is increased by 1, and your search rating is increased by 20. As before, if your (modified) search rating meets or exceeds the hidden rating, then the trap is revealed. 'S'earching mode remains the same as before; i.e., when it is on, you make a 's'earch with every step you take.
5. If your search rating does not exceed the rating of the trap, there is no chance to find the trap.

I expect this last point to be the most contentious, so let me say how I decided on it:
1. It meets the important criterion of "Standing around and hammering the 's' key is never optimal play."
2. It makes gear that increases your searching ability more relevant. It also leaves open the possibility of some kind of magical trap detection (though there would certainly be changes from the status quo).
3. It makes it easy to use the same system for finding secret doors and mimics, or any other hidden feature we might want to include.

Now, my plan is to determine each trap's hidden ratings based on how dramatic of an impact they have on the immediate tactical situation. For example, teleporting, summoning, paralyzing -- these would all have low hidden ratings. In contrast, the stat-draining darts, and traps that do minor damage would be hidden better.

Incidentally, handling trap detection this way makes it a little easier to support monsters being affected by traps -- but I would still have to figure out how to decide if a monster notices a trap.

Mikko Lehtinen
March 6, 2012, 20:01
Sounds excellent! I've got no complaints.

jevansau
March 6, 2012, 21:51
Sounds very good.

One way to deal with the magical side would be to change the locate trap spells to a "improve searching ability/radius for a turn" spell.

Have you thought yet about the other side of the problem - disarming traps?

It is exciting to see work in this long neglected area.

Regards,
Jonathan

Magnate
March 6, 2012, 23:48
Having monsters set off traps wouldn't be too difficult. But how do you decide how likely a monster is to notice or evade a trap? And once you figure that out, you need a lot of storage if you want every monster to maintain its own list of which traps it knows about. Maybe it would be easiest to only allow "obvious" traps to hit monsters.Sangband deals well with monsters' awareness of player traps (you don't mention those, so I presume they're not in this phase). But I don't think it uses a separate trap layer - I think there is some hackery that treats traps as objects.

FA, however, does have a separate trap layer, or rather a more generalised separate terrain feature layer. I understand it's really quite brilliant - not sure how easy it would be to borrow rather than reinvent.

A traps.txt file is excellent, and fits well with my ideas for effects.

d_m
March 7, 2012, 00:55
Sounds like a great plan.

Personally I would remove the (s)earch command altogether, since under your scheme the "optimal" play is to travel until you hit the "search detection boundary" and hit s. But maybe it wouldn't be such a big deal.

Probably, the best thing to do is get it coded up and let us all playtest it! :)

Gorbad
March 7, 2012, 03:10
If we assume CunningGabe's plan is followed and the s key is only effective once, a magical 'detection-aid' could also be a timed effect which:

a) increases you search skill and/or radius for a timed period and
b) gives a guaranteed warning if a trap is within your radius (just not where) for that timed period ('Spidey sense is tingling')

This would increase anxiety (a good thing!) and provide the player with a choice ("I've dropped consumables earlier on the level, better get them before I hit a trapdoor" or "How badly do I want to see what that unID'd potion is over there, I know the area is trapped").

Mikko Lehtinen
March 7, 2012, 08:13
1. Each trap has a rating of how hidden it is. A rating of 0 indicates that it is immediately obvious. A positive rating indicates that the trap starts out hidden.

Are you planning to randomize the concealment rating? For example, a trap door could have a rating 1d20, rolled when the trap is created. This would prevent gaming the system to get "just good enough perception to detect trap doors".

3. Whenever a hidden trap is within your search range, if your search rating is at least as high as its hidden rating, then the trap is revealed. This is completely passive detection; i.e., it does not require you to 's'earch or to be in 'S'earching mode.
4. Whenever you 's'earch, you make a check to spot traps as if you were using passive detection, but your search range is increased by 1, and your search rating is increased by 20. As before, if your (modified) search rating meets or exceeds the hidden rating, then the trap is revealed. 'S'earching mode remains the same as before; i.e., when it is on, you make a 's'earch with every step you take.

I would personally like to see Wisdom increasing Perception.

In D&D 3rd edition, Wisdom is associated with passive perception and Intelligence with active searching. Maybe INT could affect how much perception increases when you are searching?

I don't really think trap detection spells are worth implementing unless they add some tactical depth to trap detection. If the correct play is to always cast trap detection spell when you leave your detection area, it becomes just boring "extra work".

In Fay, I'm moving effects like Protection from Traps to scrolls to make them a limited resource. That way the player has to make a choice.

Also, only some kind of rooms are trapped. If a room has closets, it also has lots of traps on the floor; if a room has painted walls, it may have dangerous warding runes.

Mikko Lehtinen
March 7, 2012, 08:44
One way of implementing trap detection spells in a strategically interesting way, and without extra work for the player, is this:

You only need to cast trap detection once per level. If you do, the spell lowers your maximum mana and increases your detection abilities for as long as you stay on the level.

EDIT: I really like Gorbad's detection-aid spell with the Spidey sense!

Mikko Lehtinen
March 7, 2012, 09:01
Maybe Searching mode should be changed to work like this: If you are Searching, you will automatically perform the search command whenever there is an unsearched square next to you -- unless you see a monster.

That way you could usually just leave the Searching mode on and not bother with it.

Of course then you would need to track the searched status of each square. Or maybe even track the perception skill score used to search each square. Then you would only search if your current perception skill is higher.

Mikko Lehtinen
March 7, 2012, 09:49
I got an inspiration from this trap discussion.

I decided to add a monster ability SET_TRAPS. If a monster with SET_TRAPS is generated with the dungeon level (not summoned), it has put some traps in the nearby dungeon!

This replaces the Create Traps monsters spell.

CunningGabe
March 7, 2012, 15:18
Are you planning to randomize the concealment rating? For example, a trap door could have a rating 1d20, rolled when the trap is created. This would prevent gaming the system to get "just good enough perception to detect trap doors".
That's a good point -- I'll introduce some variability into the hidden rating. I'm also thinking of using something like buzzkill's idea where a trap might be better hidden depending on where it is placed. Also, I am planning to give traps level ratings, so a vault would include out-of-depth traps, just as it does with monsters and items.


I would personally like to see Wisdom increasing Perception.

In D&D 3rd edition, Wisdom is associated with passive perception and Intelligence with active searching. Maybe INT could affect how much perception increases when you are searching?
One of the changes ewert made in his fork (and which I incorporated) was to make WIS and INT both contribute to searching skill. At the moment, they both contribute equally.

fizzix
March 7, 2012, 22:43
Having monsters set off traps wouldn't be too difficult. But how do you decide how likely a monster is to notice or evade a trap? And once you figure that out, you need a lot of storage if you want every monster to maintain its own list of which traps it knows about. Maybe it would be easiest to only allow "obvious" traps to hit monsters.

Here's how I envision this

Obvious/unavoidable traps (example pits) If you enter this square you fall into the pit. You cannot disarm these traps, they are a feature of the dungeon. The best you can do is climb out the other side. Monsters always avoid these if possible, if not they just take the damage.

Obvious/avoidable traps (example turrets) Everyone can see this trap. However, you can avoid the effect with sufficiently high dexterity (or proper resistance). Again intelligent monsters avoid these if possible. If they can't, (and they're intelligent) they may attempt to disarm it.

Unobvious/avoidable traps. (example darts, teleportation squares) Entering the square will set off the trap. Monsters don't know about these, and don't bother avoiding them. You always get a saving throw against the trap. Monsters don't bother avoiding these, but get a saving throw just as a player. Generally monsters get a better saving throw than the player. These traps can be created by spells.

We could even include a "IMM_TRAP" flag for some skilled monsters like master thieves, master rogues, harowen, sauron, wormtongue, etc. These monsters never set off avoidable traps, and always succeed in disarming avoidable ones.

So basically the idea is that monsters are generally dumb or overconfident in their abilities to avoid a trap. Can this be manipulated for player benefit? Yes. But I think it's actually a fun way of manipulating monsters.

Of course we need to figure out how to deal with a stat-drain dart hitting a monster. Or even more confusing, one that steps on a summoning square.

Old Coach
March 8, 2012, 04:28
With the ideas put forth so far, there are just awesome things that can be implemented to enrich the game. Everything from Varyo placing fire turrets to the elemental themed vaults.

The vault with air, fire, earth, and water turrets in opposite corners (or wings), maybe with their appropriate monsters, with halls that spiral or lead into the central room with the chromatic turret that fires off something attention grabbing like power dragon breath. Only rogues need apply to this vault...

And let us not forget about the monster turret - that shoots (summons) a monster every few turns once activated (by stepping into the room or inspecting a chest). Of course, I like the idea of it shooting snaga at the @'s head for damage equal to the hapless goblin's health, but I have strange idiosyncrasies like that.

I am getting giddy with the coolness that an updated trap system can bring!

CunningGabe
March 12, 2012, 19:31
The basic functionality is mostly done; I should have something playtestable in a day or two. I'll post here once I make the pull request to summarize what is included and what I still plan to do (which is quite a lot).

CunningGabe
March 15, 2012, 11:45
The new trap code is now in v4! Here is a summary of the changes so far:


Changes:
1. Detection
a. All characters have a detection radius of 1, or 2 when they search.
b. Secret doors are always detected when they are within detection radius.
c. Some races/classes have had their search skill changed, and WIS/INT both contribute to search skill.
d. Mimics and Lurkers are detected if search skill surpasses 45 + DL/2.
e. Traps are detected if search skill surpasses their hiddenness rating, which is approximately 35 + DL/2 +/- 5 for an average trap.
f. Trap detection spells haven't been changed yet, nor has the DTrap border.
2. Evasion
a. It is now possible to evade a trap if your DEX is high enough.
3. Trap types
a. Traps now enforce a min level and a max level.
b. Many traps have been split into multiple types, with deeper traps being more dangerous.
c. Chest traps are completely gone.
4. Under the hood
a. Traps have been removed from terrain.txt, and a new trap layer has been created.
b. Some small amount of work has been done to make use of the terrain flags, and unhardcode terrain types.
(For example, try adding PWALK to the granite walls, and then walk right through them!)

I would encourage you to try to play without using trap detection. I haven't decided yet how I will deal with that exactly, but for the moment, I think the game is playable without it.

There are currently not very many kinds of "deep" traps -- only 3 kinds are possible after DL50. Fixing this is one of my first priorities, and I will be drawing from the trap brainstorming thread. You can add your own traps if you want them to use an effect that already exists.

I am also planning to work on the other 2 mechanical aspects of traps -- disarming and evasion. Eventually, a trap will have a rating for how hidden it is, how hard it is to disarm, and how hard it is to avoid setting it off. One of the thoughts I've had is that magical traps, like teleportation and summoning, could possibly be made so that they cannot be disarmed except by magical means. So you either avoid them completely, or try to tiptoe on to them and evade the trap.

Any comments, bug reports, etc. are welcome!

Derakon
March 15, 2012, 15:47
Neat! I should probably fire up v4 one of these days and get some actual playing in...

CunningGabe
March 15, 2012, 21:04
What would people think of removing all repeatable trap detection, and having scrolls of trap detection detect the entire level? (The scrolls would become deeper and rarer in this case.)

half
March 15, 2012, 22:09
What would people think of removing all repeatable trap detection, and having scrolls of trap detection detect the entire level? (The scrolls would become deeper and rarer in this case.)

Sounds excellent. Just do it, and then let the traps themselves be balanced around this change.

Derakon
March 15, 2012, 22:50
You could fold Trap Detection into the Enlightenment effect, and let that be the only source of magical trap detection. Only problem then is the Clairvoyance spell / Arkenstone.

buzzkill
March 16, 2012, 00:31
c. Chest traps are completely gone.

While I'll admit that chest traps were fairly useless, having chests entirely unprotected isn't a good alternative. I hope chests are still locked, ideally locked better that they were pre trap removal.

CunningGabe
March 16, 2012, 00:44
While I'll admit that chest traps were fairly useless, having chests entirely unprotected isn't a good alternative. I hope chests are still locked, ideally locked better that they were pre trap removal.

Chests are still locked, and they will probably be trapped again once the rest of the trap system settles down and I can figure out how to best integrate them.

Gorbad
March 16, 2012, 04:02
What would people think of removing all repeatable trap detection, and having scrolls of trap detection detect the entire level? (The scrolls would become deeper and rarer in this case.)

I'll restate my idea from earlier in the thread:

Assuming:

- Removal of all magical trap detection (with the possible exception Enlightenment)
- The s key is only effective once

Detect Traps effect:

- Timed effect
- Possibly an increase in passive detection radius.
- Larger area of effect (like ESP) in which you will receive a warning when a trap is present in that area (this could be a message, or a status effect on screen).

Including my earlier reasons:
"This would increase anxiety (a good thing!) and provide the player with a choice ("I've dropped consumables earlier on the level, better get them before I hit a trapdoor" or "How badly do I want to see what that unID'd potion is over there, I know the area is trapped")."

Cons:
You could 'game' the system by moving around in a pattern, to see where the warning activates, and triangulate the position of the trap... but in all fairness, this seems like a pretty realistic search pattern for a fantasy rogue anyway :)

Mikko Lehtinen
March 16, 2012, 07:56
While I'll admit that chest traps were fairly useless, having chests entirely unprotected isn't a good alternative. I hope chests are still locked, ideally locked better that they were pre trap removal.

Here's one approach for chest locks:

Roll for the potency of chest trap. You simply cannot open it until your Disarming skill is equal to the trap potency (no random chance).

There may be alternative ways of opening chests, like bashing, but they risk breaking stuff inside.

CunningGabe
March 17, 2012, 15:21
I'll restate my idea from earlier in the thread:

Assuming:

- Removal of all magical trap detection (with the possible exception Enlightenment)
- The s key is only effective once

Detect Traps effect:

- Timed effect
- Possibly an increase in passive detection radius.
- Larger area of effect (like ESP) in which you will receive a warning when a trap is present in that area (this could be a message, or a status effect on screen).

Including my earlier reasons:
"This would increase anxiety (a good thing!) and provide the player with a choice ("I've dropped consumables earlier on the level, better get them before I hit a trapdoor" or "How badly do I want to see what that unID'd potion is over there, I know the area is trapped")."

Cons:
You could 'game' the system by moving around in a pattern, to see where the warning activates, and triangulate the position of the trap... but in all fairness, this seems like a pretty realistic search pattern for a fantasy rogue anyway :)

I was a little resistant to this at first, just because I like the simplicity of just detecting traps on the whole level. However, it occurs to me that your proposal works nicely with monsters that can create traps. Maybe we could use the DTrap status indicator, and color it depending on how close the nearest trap is. Green means no traps within, say, 10 squares; yellow means a trap within 6-10 squares; red means a trap within 1-5 squares. I kind of like that that would force the player to slow down for a moment and walk especially carefully.

d_m
March 17, 2012, 16:57
I think I still prefer the "if your search is at or over the trap's concealment number, you see it, otherwise you don't" just because it's simple and it would be hard to derive repetitive play from it.

But really, I'm easy. Excited to see this stuff get finalized! :)

buzzkill
March 17, 2012, 17:56
re: trap detection.

What if, rather than traditional trap detection or even spidey-senses, magical trap detection gave the character a different type of insight. In addition to revealing all traps within LoS, it would reveal if a grid, within a larger detection area, was definitely not trapped and thus absolutely safe. It would have to be non-omnipotent, so lets say it only identifies 95% (chosen randomly) of the safe (non-trapped) grids in its detection area.

The other 5% could be traps, or could just be an odd rock formation that looks like a trap. It's blocking the corridor, and active searching didn't reveal a trap. Do you walk through it, tunnel around it, or backtrack and look for another way. This gets even more fun if traps and objects can occupy the same grid.

It's a little convoluted, but I'm trying to satisfy the nay-sayers lobbying against deadly trap types on the grounds than (newly revised) detection will be imperfect. Under this scheme trap detection will be imperfect, but you'll be never have to venture from a safe grid unless you choose to (and once precisely balanced, I think there will be occasions when you will choose to), and so deadly and sadistic traps can re-enter the mix.

Ideally, I think that about 20% of questionable grids should really be traps (about 1% of the typical dungeon). This gives players an incentive to risk it every once in a while. In vaults this could probably be bumped up to about 50%, meaning that once inside a vault you won't see many 'safe' grids (1/2 will be traps, the other 1/2 you won't be sure of, pending search results), so you had best be prepared with a combination of searching, detection and disarming.

Once again, just thought of it, so I'm just throwing it out there. It seemed interesting to me.

CunningGabe
March 17, 2012, 18:08
I think I still prefer the "if your search is at or over the trap's concealment number, you see it, otherwise you don't" just because it's simple and it would be hard to derive repetitive play from it.

That is the base mechanic. What we are discussing here is just the added benefit from a trap detection spell / scroll / whatever.

Nick
March 17, 2012, 20:56
What if, rather than traditional trap detection or even spidey-senses, magical trap detection gave the character a different type of insight. In addition to revealing all traps within LoS, it would reveal if a grid, within a larger detection area, was definitely not trapped and thus absolutely safe. It would have to be non-omnipotent, so lets say it only identifies 95% (chosen randomly) of the safe (non-trapped) grids in its detection area.

A variation on this: magical trap detection gives the character a sense of danger based on how many traps are in the area, but no actual locations.
This leads to interesting decisions based on risk vs reward.

This gets even more fun if traps and objects can occupy the same grid.

FA 1.2 has this :)

Mikko Lehtinen
March 17, 2012, 21:40
A variation on this: magical trap detection gives the character a sense of danger based on how many traps are in the area, but no actual locations.
This leads to interesting decisions based on risk vs reward.

Yep, that would be fun.

In Fay, I'm playtesting terrain features -- closets -- that often hold items but also have traps around them. The player has to think about risk vs. reward, and optimize for the least amount of squares travelled in the trapped terrain. There are also Scrolls of Protection from Traps for these situations, so there's some resource management going on, too. Fun!

Fay has traps and items in same grid, too. :)

CunningGabe
March 18, 2012, 02:32
Fay has traps and items in same grid, too. :)

How do you display such a square? The current v4 code has traps and items in the same grid too, but not so much by design as by accident. Currently it only displays the trap.

d_m
March 18, 2012, 02:54
How do you display such a square? The current v4 code has traps and items in the same grid too, but not so much by design as by accident. Currently it only displays the trap.

You piss off Magnate by supporting changing the background color of the square! ;)

(I don't have a more serious answer than this one.)

Derakon
March 18, 2012, 03:16
You can just use a special character to indicate "trapped square with item on it", without trying to be specific as to what the item is. For example, a green ampersand or asterisk. Presumably this will be a sufficiently rare scenario that requiring the player to manually look at the square isn't a huge hardship.

Nick
March 18, 2012, 03:45
How do you display such a square? The current v4 code has traps and items in the same grid too, but not so much by design as by accident. Currently it only displays the trap.

FA shows the trap, on the grounds that you can't get the object until you disarm the trap anyway.

Mikko Lehtinen
March 18, 2012, 08:55
You can just use a special character to indicate "trapped square with item on it", without trying to be specific as to what the item is. For example, a green ampersand or asterisk. Presumably this will be a sufficiently rare scenario that requiring the player to manually look at the square isn't a huge hardship.

Ey and Fay show a red ampersand by default but there's an option to show the trap.

In the next version of Fay you can only try once to disarm a trap. Sometimes you will have to step on a trap to retrieve the item.

CunningGabe
March 25, 2012, 20:34
Here is a brief summary of the changes made since the initial trap overhaul:

- All repeatable trap detection is gone. The mage and priest spells now just detect stairs and doors; the rods of trap detection are gone; and rods of detection no longer detect traps.
- Scrolls of trap detection now detect the whole level for traps. They now cost more than they used to, as well.
- Items can be on the same square as a trap. When an item is on the same square as a known trap, the symbol is a red '&'.
- A few new trap types added: alarms, trap spawners, and earthquake traps.
- Trap evasion chance (which was added with the initial commit) has decreased significantly.

Here is what I am planning to work on soon:
- Make vault traps less common but more dangerous. Instead of each '^' in the vault layout becoming a trap, maybe only 25% of them will become traps (on average), and with a 10 level boost.
- Let different traps have different ratings of how hard they are to evade.
- Replace the class and race dependent Perception (which now does nothing) with a boost in detection radius. For example, rogues, hobbits, and kobolds should all get a boost. Also, consider whether the default search radius for any character should be higher than 1.
- Make the "Searching" flag also boost detection radius.
- Start thinking about how best to deal with autonomous traps (i.e., traps that affect you without you stepping on them).

As always, feedback is appreciated!

Old Coach
March 26, 2012, 03:00
I am a fan of the 'autonomous' traps in npp. Some of the turrets can hurt if you don't have the correct resistance. I have not played NPP past DL 60, so I don't know if they continue to be interesting at the deeper levels.

mixer
March 27, 2012, 11:23
If you want traps to be interesting you need to reduce trap detection. I would remove the rod & staff and increase the cost of the spell to say 30 mana a time. Then people will have to search for the traps or take the risk. This will mean that when you add an interesting trap it is likely to be triggered.

CyclopsSlayer
March 28, 2012, 19:42
Were these trap changes partially implemented?

I am running a char in angband-win-v4-716-gf7c33f8 and while all the Detect Trap scrols, and the Find traps/doors/stairs spells are still in game, it seems they don't find the traps, or at least not always?

Entered the mini-vaault room, the cross-shaped two 3x10 rooms east and west, and two 2x3 rooms north and south, a single spaced room in the center with object and mob in it, there are always several traps in these rooms. Cast the Find and 2-3 steps later I stepped on a still invisible gas trap.

If the Mage spell no longer detects traps, maybe the name and description should be changed?

edit: the Scrolls work, the Find spell does not.

CunningGabe
March 28, 2012, 20:35
edit: the Scrolls work, the Find spell does not.

The spells have changed to not find traps. The scrolls are now the only foolproof way of finding traps, but the really dangerous ones are always visible. I'll update the descriptions -- sorry for the surprise!

CyclopsSlayer
March 29, 2012, 01:15
Ahh, cool! I just assumed since it had said it found traps, that it would. No biggie.

Sadly though that drops the value of the now "Find Doors and Stairs" spell in my priority, a LOT

CunningGabe
March 29, 2012, 02:00
Ahh, cool! I just assumed since it had said it found traps, that it would. No biggie.

Sadly though that drops the value of the now "Find Doors and Stairs" spell in my priority, a LOT

The mana cost could change, though I understand that that won't make it much more exciting. Is there some other way to give the spell an interesting boost now that trap detection is gone?

fizzix
March 29, 2012, 03:35
The mana cost could change, though I understand that that won't make it much more exciting. Is there some other way to give the spell an interesting boost now that trap detection is gone?

Well, it could also detect interesting dungeon features (if we had them) things that indicate that certain groups of monsters are nearby.

CyclopsSlayer
March 30, 2012, 22:56
The mana cost could change, though I understand that that won't make it much more exciting. Is there some other way to give the spell an interesting boost now that trap detection is gone?

Well, is it possible to add scaling effects?
ie. @level 5 it just finds doors and stairs, @15 it adds say also lights current room/area, @25 also detects monsters, all the way to eventually doing something like a full detect, and map.

With traps, is there any passive detection now, or are we back to Angband 1.0, search, step, search, step, search, etc... Maybe my High Elf Mage is just diving too fast and so not in a 'proper' level range, but I cannot recall ever spotting a trap without actively searching first or walking onto it. :)
Died due to over confidence, most common reason, so it will be a while until I can get deep enough to compare again. :eek:

BTW, this change just made, if they still exist, Rods that can detect traps mandatory gear imo.

Derakon
March 30, 2012, 23:14
I think the presumption is that active trap detection should not be necessary -- any trap that could kill you will be obvious even without detection, and the more subtle traps won't kill you unless you were already in over your head, in which case they're just providing the last nail in the coffin.

Whether or not this has actually been achieved yet, I don't know; Gabe's been working quickly and it's hard to keep up, playtesting-wise.

CunningGabe
March 31, 2012, 00:31
With traps, is there any passive detection now, or are we back to Angband 1.0, search, step, search, step, search, etc... Maybe my High Elf Mage is just diving too fast and so not in a 'proper' level range, but I cannot recall ever spotting a trap without actively searching first or walking onto it. :)
There is passive detection, but some traps are harder to spot than others. The really dangerous ones (like summoning and teleport) aren't hidden at all. Traps that are not very dangerous are better hidden, and some of them you might not find even if you actively search.

Rods of trap detection no longer exist :)

grinder
April 10, 2012, 04:40
One thing I don't recall being mentioned, which is fairly easy to add and would already have interesting uses is a command to set off a trap on purpose. Even if trap types don't change much or don't start to affect monsters, I can see some scenarios where setting off an earthquake or teleport trap can save you. Making an alarm ring or triggering summon trap can also be tactically interesting (and a bit prone to monster farming...).

Derakon
April 10, 2012, 05:19
The '-' command should toggle auto-alter-on move for one step, if I recall correctly. So if you really want to set off a trap, hit '-' and then walk onto it.

takkaria
April 10, 2012, 08:29
The '-' command should toggle auto-alter-on move for one step, if I recall correctly. So if you really want to set off a trap, hit '-' and then walk onto it.

In modern V, the command is 'W' for 'Walk into'.

CunningGabe
April 10, 2012, 13:52
The '-' command should toggle auto-alter-on move for one step, if I recall correctly. So if you really want to set off a trap, hit '-' and then walk onto it.

Technically, that doesn't quite work as grinder intends (and as takkaria points out, the command is now 'W'). 'W'alking onto a trap does let you move there without trying to disarm it, but with the current setup, a high dex helps you avoid setting off a trap. So if your dex is high enough and you don't have the time to try several times to disarm a trap, you could just walk onto it and hope that it doesn't trigger.

saarn
May 17, 2012, 15:41
I find the new trap scheme to be very playable, but traps feel defanged. Playing with rogues, traps never bother me now. I don't think this is the mechanism's fault, because the reason they feel "easier" is because the system is preventing careless errors (whoops, I hit left arrow, not d left arrow. crap). This seems like a positive.

I was wondering if the system might be modified a bit so that perception gets reduced during combat (hitting/being hit by monsters) with some sort of a timer in player turns. This would roughly parallel the idea that the character is too busy fighting things to notice subtle traps. I would imagine the timer working both ways (gradually reducing perception, and requiring some cool down before it returns to normal). With this change, fleeing down an unknown corridor, or teleporting away from monsters and walking around would be a lot more dangerous. If traps could get re-hidden based on current perception, that would be even nastier. . .

Taha
May 27, 2012, 14:50
Playing the latest nightly from May 20th. Description and name on the priest spell of find traps doors and stairs are unchanged. Took using a scroll of trap detection to realize that yes, the green DTRAP indicator still worked, and no the spell didn't. Keeping descriptions and names updated is pretty important to playtesting when making backend changes like this. Also, that spell is worth less now.

Preface for the rest of this: I thought the old trap system was a good balance between occasionally interesting and mostly ignored. Detecting traps after the early game was always part of another detection, so not an irritant to me.

I don't understand the goal of making traps in general interesting. Interesting things in the game provide experience, drops, or have a high potential to kill you. Usually 2 out of three. Traps have none of the first two and very little of the third - similar to molds, but less experience and less dangerous.

To get traps to be "interesting" requires increasing the danger or the reward. On the danger side, always visible + effects stay within their square makes that impossible. Deadly + hidden adds random instadeaths, currently discouraged. And changing traps to operate outside their territory (turrets?) is probably too far in variant territory to be backported to vanilla. They already meet the interesting test in the early game for disarming experience / potentially deadly / helpful for id-by-use, but are nearly irrelevant past dlvl 15-20.

Increasing rewards is currently traps in vaults, when you have to disarm and get past to get to good items, and tunneling around is not an option.

I have read through this thread, but don't see any persuasive reasons to think you can make interesting, rewarding, dangerous but not-instadeath traps that remain that way through the end game. It's like making the mold varieties interesting and rewarding to the end - maybe not possible, is it actually worth focusing on? - In the vanilla framework that is, obviously massive changes make it possible.