Traps, again

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Ingwe Ingweron
    replied
    I was surprised when a rock dropped on @'s head and he was left stunned. Setting off the undiscovered trap at DL 100 and CL 46 was surprising in itself, but since @ had pStun, why did the rock falling not just cause damage but allow @ to avoid the stunning effect?

    Leave a comment:


  • Nomad
    replied
    Traps are definitely more interesting now, especially in the mid to late game. I just tried to sneak past a sleeping AMHD and stepped on a siren trap. You don't get that kind of drama with always-visible traps!

    Leave a comment:


  • chknflyrice
    replied
    I love that I read the entirety of those posts like I understand any of it.

    Leave a comment:


  • Nick
    replied
    OK, fixed version has been pushed - should be built and on the nightlies page within the next half hour.

    Originally posted by PowerWyrm
    - square_note_spot() calls square_reveal_trap() without checking square_issecrettrap() -- maybe that's the reason stuff is detected out of LOS
    - square_reveal_trap() does a flat "skill search < trap power", meaning that trap detection is an "on/off" switch -- is that intended?
    I'm not sure that checking square_issecrettrap() is needed, but I did it anyway - I need to check the whole logic of that.

    Yes, trap detection is meant to be on/off - if the player has sufficient skill, they will always detect the trap, and if not, they never will. There is (usually) some randomness involved in the visibility rating of the particular trap instance, but once the trap is created it's deterministic.

    Leave a comment:


  • Nick
    replied
    OK, thanks for finding all this nonsense everyone (although I'm slightly hurt that my inspired name-change for "Searching has been reported as a bug).

    Didn't get to do anything on it as planned yesterday because my dev machine had issues, but will get to fixing soon.

    Leave a comment:


  • Nomad
    replied
    Amulet of Searching comes up as "an Amulet of 246:Searching".

    Leave a comment:


  • PowerWyrm
    replied
    Originally posted by Nick
    Looks like I might have messed up the trap selection process. Will check.
    See above

    Other remarks:
    - square_note_spot() calls square_reveal_trap() without checking square_issecrettrap() -- maybe that's the reason stuff is detected out of LOS
    - square_reveal_trap() does a flat "skill search < trap power", meaning that trap detection is an "on/off" switch -- is that intended?

    Leave a comment:


  • PowerWyrm
    replied
    Originally posted by Nomad
    I don't seem to be encountering any trap types other than trap doors and pits in the early game. (Messing about in debug mode with scrolls of Create Traps, it seems as if you only get those two types until devel 20, after which summoning traps show up, and then the other types don't seem to show until dlevel 40.)

    Also, the trap.txt file has stray extra "visibility:0" lines at the end of the entries for 'summon foe' and 'hellhole'.
    Yeah the probability calculation in pick_trap() is incorrect. Say you have 3 traps, first and third one of rarity 1 and second one of rarity 0. The correct probability table would be (100, 100, 200) but it's currently (100, 0, 100) since previous probability is only added for valid traps. Then there's an off-by-one error when picking the trap: if pick = randint0(200) returns 100, the code doing (pick > trap_probs[i]) returns the first trap when it should return the third trap with (pick >= trap_probs[i]) since you have two sets of equal probablility, one of (0-99) and one of (100-199).

    Something like this:

    Code:
    for (i = 0; i < z_info->trap_max; i++)
        {
            /* Get this trap */
            struct trap_kind *kind = &trap_info[i];
    
            trap_probs[i] = trap_prob_max;
    
            /* Ensure that this is a valid player trap */
            ...
    
            /* Trap is okay, store the cumulative probability */
            trap_probs[i] += (100 / kind->rarity);
            trap_prob_max = trap_probs[i];
        }
    
        /* No valid trap */
        ...
    
        /* Pick at random. */
        pick = randint0(trap_prob_max);
        for (i = 0; i < z_info->trap_max; i++)
        {
            if (pick < trap_probs[i]) break;
        }
    Last edited by PowerWyrm; March 16, 2017, 16:24.

    Leave a comment:


  • Clearshade
    replied
    FYI,
    @ now at DL18 and have found following trap types since DL1:
    poison gas, acid, blinding gas, poison pit, pit, teleport rune, dart, and summoning rune

    I am playing from a download of yesterday March 15.

    Leave a comment:


  • Nick
    replied
    Looks like I might have messed up the trap selection process. Will check.

    Leave a comment:


  • chknflyrice
    replied
    Originally posted by Nomad
    I don't seem to be encountering any trap types other than trap doors and pits in the early game. (Messing about in debug mode with scrolls of Create Traps, it seems as if you only get those two types until devel 20, after which summoning traps show up, and then the other types don't seem to show until dlevel 40.).
    Agreed. I'm in DL35 and I don't think I have used a single >.

    Also summoning runes are showing with the ^ symbol in original tiles.

    Also my saves aren't saving. It is trying to pull my saves from vanilla and not showing my @ on this version. How do I fix?

    Sorry just read the trap file... they are supposed to look like that.
    Last edited by chknflyrice; March 16, 2017, 02:50.

    Leave a comment:


  • Nomad
    replied
    I don't seem to be encountering any trap types other than trap doors and pits in the early game. (Messing about in debug mode with scrolls of Create Traps, it seems as if you only get those two types until devel 20, after which summoning traps show up, and then the other types don't seem to show until dlevel 40.)

    Also, the trap.txt file has stray extra "visibility:0" lines at the end of the entries for 'summon foe' and 'hellhole'.

    Leave a comment:


  • chknflyrice
    replied
    With the specific instance you are talking about I feel the only interesting choice is if they didn't always create same amount of traps every time. The point was to have an interesting decision but really I cant see a scenario that you wouldn't take the one turn guaranteed clear. The other option is to search/det then disarm (two turns minimum) or step on it (possibly disastrous).

    Unless I misunderstood.

    EDIT:OK so by the time I saw/commented you already addressed it. Good show.
    Last edited by chknflyrice; March 15, 2017, 22:27.

    Leave a comment:


  • Nick
    replied
    OK, latest plan is now implemented in current master on the nightlies page (this change breaks savefiles). Changes:
    • Searching skill is back, with new values. Currently (ignoring race and equipment bonuses) rogue gets 100% at CL50, ranger 90%, priest 80%, others 70%. Each +1 to searching from equipment gives +5%
    • Traps get a visibility rating between 0 and 99, player notices trap when it comes into LoS if player searching is greater than trap visibility
    • Mages get early trap detection spell (detects all traps), priests get it as part of Detection, no other magical trap detection
    • Create traps now scatters traps (1 in 4 chance for any grid) in a radius of 3 about the player
    • Vault records still say where to put traps, but a trap will appear in the appointed place 1 time in 4


    These are the major points, but there is obviously a lot of detail in searching skill progress, trap visibilities etc which I'm skimming over. I'd really like people to play this for balance and bugs; in particular the trap visibilities may require adjustment.

    Leave a comment:


  • Sideways
    replied
    The "cackles evilly about traps" message used to be just "cackles evilly", with no direct mention of traps.

    Leave a comment:

Working...
😀
😂
🥰
😘
🤢
😎
😞
😡
👍
👎