item generation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bron
    Knight
    • May 2008
    • 515

    item generation

    At the end of the "Your views wanted on artifacts in V" thread, Magnate says:

    >I think Takk will rein in ego generation a bit further for 3.2, as
    > we're still getting too many (compared with stuff like stat potions
    > and other high-end consumables).

    While I don't necessarily disagree with this statement, I think a lot of it has to do with two significant changes to object generation that were made in 3.1.0 that I never saw mentioned in the announcements:

    1) The calculation for the "level" of an object dropped is now the *maximum* of either the dungeon level or the monster level, whereas before it was the *average* of the dungeon level and the monster level (I note BTW that the comment in monster2.c was not updated when the code was changed, and still erroneously claims to use the average).

    This change has far reaching implications, and personally, I don't like it. In particular it means that you no longer have to fight tough monsters to get high level drops. No longer do you have to descend to level 85 and kill a Hell Wyrm to have a good chance of getting a =Speed; a novice priest will do, and on level 75. It also means that the boring but reasonably safe tactic of "breed black oozes until you get what you want" is probably a winner. Previously you could do this to find stat potions, but not the really high level items since black oozes are only level 23. Appropos Magnate's original comment, this change also means that ego (or better) items are a lot more common at deeper levels, because every item dropped by every monster at a deep level will be a deep level item with a correspondingly higher chance of being a great item. This change greatly facilitates the "dive fast, dive deep" method of play because in addition to hoping to find stuff on the floor, you can also kill any weak monsters that happen to be on the level, and get drops just as good as the monsters that could instantly kill you. This is not necessarily a bad thing depending on your point of view (*I* think it is a bad thing, but could imagine others holding different views) but it is a serious change.


    2) The *Heal*, and Life, and stat gain potions are no longer considered to be "good" items in the sense of monsters that have the DROP_GOOD flag. This alone makes them much less common (Magnate's second point). Admittedly these items only recently make it *on* to the "good" list (in 3.0.x I think?). but now that they're back off, the items are more rare. In fact, annoyingly enough, if you're looking for *Heal* or *Life* for the final battle with Morgoth (and IMO you need at least a half-dozen; more is definitely better), there is no point in killing Wryms or high level Demons, since monster with DROP_GOOD will *never* drop these items.

    [Admittedly you don't want these items to be too easy to find either. But I do think that there should be at least some chance that the high level monsters will drop them.]
  • Magnate
    Angband Devteam member
    • May 2007
    • 5110

    #2
    Originally posted by bron
    At the end of the "Your views wanted on artifacts in V" thread, Magnate says:

    >I think Takk will rein in ego generation a bit further for 3.2, as
    > we're still getting too many (compared with stuff like stat potions
    > and other high-end consumables).
    My bad - I think I meant 3.1.2, as we are still a way away from 3.2 (which is when this is all supposed to be sorted).
    1) The calculation for the "level" of an object dropped is now the *maximum* of either the dungeon level or the monster level, whereas before it was the *average* of the dungeon level and the monster level (I note BTW that the comment in monster2.c was not updated when the code was changed, and still erroneously claims to use the average).
    <grins> This is a bad habit, but something that affects a lot of devs. Some of the comments in the current code are positively harmful, they bear so little resemblance to the code.
    This change greatly facilitates the "dive fast, dive deep" method of play because in addition to hoping to find stuff on the floor, you can also kill any weak monsters that happen to be on the level, and get drops just as good as the monsters that could instantly kill you. This is not necessarily a bad thing depending on your point of view (*I* think it is a bad thing, but could imagine others holding different views) but it is a serious change.
    Well, IIUC the change was made to encourage faster diving, so from that POV it has succeeded - but it does still need tweaking. Personally rather than see it reversed, I'd prefer to see more granular control of who can drop what. It's good that you can get *something* decent from killing a novice priest at 4000', but I agree that the drop from a great wyrm should be a lot better.
    2) The *Heal*, and Life, and stat gain potions are no longer considered to be "good" items in the sense of monsters that have the DROP_GOOD flag. This alone makes them much less common (Magnate's second point). Admittedly these items only recently make it *on* to the "good" list (in 3.0.x I think?). but now that they're back off, the items are more rare. In fact, annoyingly enough, if you're looking for *Heal* or *Life* for the final battle with Morgoth (and IMO you need at least a half-dozen; more is definitely better), there is no point in killing Wryms or high level Demons, since monster with DROP_GOOD will *never* drop these items.

    [Admittedly you don't want these items to be too easy to find either. But I do think that there should be at least some chance that the high level monsters will drop them.
    IMO there is a fundamental brokenness to the system in which only weapons and armour can go down the normal -> good -> ego -> artifact route. Here's a very poorly thought-through alternative:

    There are four tiers of drops: normal, good, great, artifact. All potions, scrolls, devices, mushrooms, books etc. are assigned a tier from 1 to 4 (well, 1 to 3 as things stand, but there has been talk of artifact staves and spellbooks). All normal drops start at tier 1, but instead of rolling for the exact item, every drop has a chance of being upgraded to a higher tier. So a normal monster's normal drop is "a potion" or "a scroll" or "a pair of soft leather boots", and then the good/great/artifact checks are made. Only after all that is the actual item type determined.

    Then you need careful control of monster drops: my suggestion would be that each monster had four flags: number of normal drops, chance to upgrade to good, chance to great, chance to artifact. These chances would be applied to each drop, continuing only where successful. So, e.g.

    novice mage: 1, 1-in-20, 1-in-200, 0.
    great wrym of thunder: 6, 1-in-2, 1-in-10, 1-in-50.

    The numbers are not balanced - I just made them up. But you see how you could very carefully tweak each monster drop without penalising either divers or non-divers. (Yes you would still need OOD checks for items of any tier which are OOD - I'm not proposing to do away with item depth completely, because it should still be relevant to the drop calculation.)

    Just a few opening thoughts - I agree with you that item generation needs overhauling, but not that we should revert the max depth change.
    "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

    Comment

    • bron
      Knight
      • May 2008
      • 515

      #3
      Frankly, that sounds like way too much work :-)

      My own half-formed idea would be to apply a penalty to the level of the object generated if the monster is way out of depth. Something like say:
      ...
      level = MAX(p_ptr->depth, r_ptr->level); /* The current calculation */
      wimpyness = p_ptr->depth - r_ptr->level;
      if (wimpyness > 1) {
      int penalty = m_bonus(wimpyness, wimpyness);
      level = level - penalty;
      }
      ...
      The way m_bonus works, this would make very little difference for monsters near their natural depth, but would (usually) apply a substantial penalty for monsters that were significantly weaker than the current dlvl.

      Comment

      • Magnate
        Angband Devteam member
        • May 2007
        • 5110

        #4
        Originally posted by bron
        Frankly, that sounds like way too much work :-)

        My own half-formed idea would be to apply a penalty to the level of the object generated if the monster is way out of depth. Something like say:
        ...
        level = MAX(p_ptr->depth, r_ptr->level); /* The current calculation */
        wimpyness = p_ptr->depth - r_ptr->level;
        if (wimpyness > 1) {
        int penalty = m_bonus(wimpyness, wimpyness);
        level = level - penalty;
        }
        ...
        The way m_bonus works, this would make very little difference for monsters near their natural depth, but would (usually) apply a substantial penalty for monsters that were significantly weaker than the current dlvl.
        Sure - but that won't reduce the preponderance of ego items, I think. If anything it will make things like *heal* and Life even rarer.
        "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

        Comment

        • bron
          Knight
          • May 2008
          • 515

          #5
          Originally posted by Magnate
          Sure - but that won't reduce the preponderance of ego items, I think. If anything it will make things like *heal* and Life even rarer.
          I was thinking that it would affect egos indirectly as a consequence of generating items with a lower level. But if I'm reading apply_magic correctly, then the chance of getting an ego is already maxed out at level 40 (at 50% (!)). Putting in a 20 or 30 level penalty for wimpyness won't really do much at deep levels.

          Since *Heal* starts at level 40, and Life at level 60, I don't think they'd be rarer. But I don't really know.

          Comment

          • s0be
            Apprentice
            • Jan 2008
            • 96

            #6
            Code:
            +	if(p_ptr->depth > r_ptr->level)
            +	{
            +		int weight = rand_int(100);
            +		level = p_ptr->depth * weight / 100 + r_ptr->level * (100 - weight) / 100;
            +	} else {
            +		level = p_ptr->depth * 80 / 100 + r_ptr->level * 20 / 100;
            +	}
            That's an excerpt from the original code I proposed that re-worked monster drops a bit. What it did was:

            If the player is deeper than the monster's native depth, it randomly chose a depth in beteween the two and used that as the drop depth. If the monster is out of depth, it gave a depth bonus of 20% more than the players current depth. This means a level 10 monster on level 70 could drop at any level between 10 and 70, while a level 15 monster on level 10 will always drop at level 11.

            It worked quite well at taming strong drops from weak deep enemies, as well as more accurately portrayed what you would expect. In a pack of orcs on level 80, you'd expect some to have found good deep items, while others have not been so lucky (or had their stuff stolen by stronger orcs). On the flipside, you'd expect most ood monsters to be weaker... why else would they be in the shallower levels?

            Comment

            • fizzix
              Prophet
              • Aug 2009
              • 3025

              #7
              An alternative approach that I've thought about (and that would make the game significantly more difficult) would be to limit monsters to a certain range of depths. So, you won't see novice mages at all past dlevel 20, 25 or so. You won't see orcs in the later sections of the dungeon, unless they're part of Azog's escort (and he would probably be capped at around dlevel 60) Pits and escorts are considered at the level of the strongest member or associated unique. Vaults would be able to have monsters at all depths because presumably they don't ever leave and run back upstairs to where they belong.

              The bottom levels of the dungeon would have fewer monsters, but much more difficult ones. Gone would be the orc and troll pits from the bottom of the dungeon, filled instead with dragon pits and graveyards. Gone would be crappy summons from Morgoth or Sauron. Diving would be much more dangerous.

              Monster range could look something like:

              (Min level) to max(min level + 20, min level *2) with the same penalties that are applied to OoD monsters on one end applied to the other end.

              Comment

              • buzzkill
                Prophet
                • May 2008
                • 2939

                #8
                Originally posted by s0be
                In a pack of orcs on level 80, you'd expect some to have found good deep items, while others have not been so lucky (or had their stuff stolen by stronger orcs). On the flipside, you'd expect most ood monsters to be weaker... why else would they be in the shallower levels?
                You would also expect these DL80 orcs to be stronger than the ones encountered on DL10 (esp. when you pair it with the OOD flipside).
                www.mediafire.com/buzzkill - Get your 32x32 tiles here. UT32 now compatible Ironband and Quickband 9/6/2012.
                My banding life on Buzzkill's ladder.

                Comment

                • Nick
                  Vanilla maintainer
                  • Apr 2007
                  • 9634

                  #9
                  Originally posted by fizzix
                  An alternative approach that I've thought about (and that would make the game significantly more difficult) would be to limit monsters to a certain range of depths.
                  The Oangband system is a softened version of this; it divides the dungeon above the current level into thirds, and adjusts generation chances based on that. So if you're on level 30, level 20-30 monsters have their normal chance of appearing, level 10-20 monsters have 1/4 their normal chance, and level 1-10 have 1/16 their normal chance.
                  One for the Dark Lord on his dark throne
                  In the Land of Mordor where the Shadows lie.

                  Comment

                  • s0be
                    Apprentice
                    • Jan 2008
                    • 96

                    #10
                    I have preliminary patches to limit monsters to certain depths also. I began coding up patches to scale monsters as well, but after talking in IRC, these patches lead to some problems:

                    It'd require more monsters! If we limit orcs to only be so deep, either the deep dungeons need to be nearly barren of monsters, or everything is going to be a nearly lethal fight, and it would make any sort of diving REALLY risky. Hundreds of new monsters would be needed to fill in the gaps to keep diving interesting. If monsters were made such that they got stronger as the got deeper, the deeper monsters would need to be toned down a bit. About all you could do is to do something like adding .5 * rand_int( p_ptr->depth - r_ptr->level ) HP to monsters HP and/or AC, but that ruins your monster memory where a level 50 monster on level 98 could potentially be a lethal foe... Suddenly you're taking one of the few aspects of skill out of the game. All the discussion I had with Tak, and maybe d_m and others (don't remember, it was Feb of 08) lead to the point that the only real thing you could tweak there (easily) was the monster's drop level, which lead to that patch I shared above that made it a pot-luck, rather than a HUGE bonus for diving. Any attempt to make monsters scale with depth leads to levels that are too dangerous without scaling back how many show up or removing some deep monsters. Same goes for limiting how deep monsters go. I still stand by my previous patch being better than what's in there now, bringing some fun to what could be dropped, while not entirerly nerfing things.

                    If anyone has any ideas on a better way to scale the depth (maybe max it at min(2 x r_ptr->level, r_ptr->level + 20 or something like that?) I'd be glad to make a patch for testing.

                    Comment

                    • s0be
                      Apprentice
                      • Jan 2008
                      • 96

                      #11
                      Originally posted by Nick
                      The Oangband system is a softened version of this; it divides the dungeon above the current level into thirds, and adjusts generation chances based on that. So if you're on level 30, level 20-30 monsters have their normal chance of appearing, level 10-20 monsters have 1/4 their normal chance, and level 1-10 have 1/16 their normal chance.


                      That's the approach I took to adjusting the ranges monsters could show up in... never got around to documenting it, and can't remember why it didn't work properly (think it was a raw file problem) :-/

                      Comment

                      • Nick
                        Vanilla maintainer
                        • Apr 2007
                        • 9634

                        #12
                        Originally posted by s0be
                        http://angband.erley.org/patchs/mons...e-r835-v2.diff

                        That's the approach I took to adjusting the ranges monsters could show up in... never got around to documenting it, and can't remember why it didn't work properly (think it was a raw file problem) :-/
                        In O it's done by directly modifying the probabilities for the monster selection table:
                        Code:
                        	/* Low-level monsters avoid the deep dungeon. */
                        	int depth_rare = 2 * level / 3;
                        	int depth_very_rare = level / 3;
                        and
                        Code:
                        			/* Keep low-level monsters rare */
                        			if (table[i].level < depth_rare) table[i].prob3 /= 4;
                        			if (table[i].level < depth_very_rare) table[i].prob3 /= 4;
                        One for the Dark Lord on his dark throne
                        In the Land of Mordor where the Shadows lie.

                        Comment

                        • TJS
                          Swordsman
                          • May 2008
                          • 473

                          #13
                          I really don't like the way it uses max(monster level, dungeon level) either. It means there is no reward for killing more difficult monsters at higher levels which seems to reverse the risk/reward mechanic which I find fun. If I manage to kill something nasty then I'd like to be rewarded for it.

                          I much prefer the idea where it uses a random level between monster level and dungeon level (inclusive) so you might still get lucky and get a good drop from an easy monster, but you're much less likely to do so.

                          This would reintroduce the problem of too much junk, but then you can simply put a maximum level on which an object is created. So for example if the RNG decided a slay ego is the drop of a novice mage on level 80 then they simply wouldn't drop it at all.

                          Comment

                          • fizzix
                            Prophet
                            • Aug 2009
                            • 3025

                            #14
                            Originally posted by TJS
                            This would reintroduce the problem of too much junk, but then you can simply put a maximum level on which an object is created. So for example if the RNG decided a slay ego is the drop of a novice mage on level 80 then they simply wouldn't drop it at all.
                            This brings up another point that I've been thinking about. There is a problem with the drops being created after the monster is destroyed as opposed to when they spawn. The problem is that they don't use the items they have. If a novice ranger is carrying a wand of acid bolts, don't you think he would use it when he was in mortal danger? I understand that some monsters, like dragons, probably can't wield the weapons they are carrying.

                            Ok, so this is more realistic for the game, but seems to be a pretty difficult problem, and probably nowhere near implementable. At the very least, we can try to remove some of the incoherent drops.

                            Why would a demon carry a weapon of slay demon? It'd probably destroy it on sight, or at least drop it and bury it under rubble. Why on earth would a novice mage be carrying pb1, or a novice priest mb2. Why would a priest be carrying an edged weapon? If you were limited to carrying 1 item, would it be one that you have absolutely no way of possibly using? More to the point, shouldn't *every* novice mage have a copy of mb1? If not, how is he casting magic missiles? Ok, so the process of meleeing destroys many of the books and makes them unusable. But still, mb1 should be a more likely drop than anything else from a novice mage.

                            Ok, I think I'm sufficiently off-topic and rambling now. I'll stop.

                            Comment

                            • zaimoni
                              Knight
                              • Apr 2007
                              • 590

                              #15
                              Originally posted by fizzix
                              This brings up another point that I've been thinking about. There is a problem with the drops being created after the monster is destroyed as opposed to when they spawn. The problem is that they don't use the items they have. If a novice ranger is carrying a wand of acid bolts, don't you think he would use it when he was in mortal danger? I understand that some monsters, like dragons, probably can't wield the weapons they are carrying.
                              There is always NetHack and Crawl.
                              Originally posted by fizzix
                              Ok, so this is more realistic for the game, but seems to be a pretty difficult problem, and probably nowhere near implementable. At the very least, we can try to remove some of the incoherent drops.

                              Why would a demon carry a weapon of slay demon? It'd probably destroy it on sight, or at least drop it and bury it under rubble.
                              I wouldn't mind banning the drop of any item a monster cannot pick up. That covers this (there already is a check preventing demons from picking up slay demon weapons, etc.).
                              Why on earth would a novice mage be carrying pb1, or a novice priest mb2. Why would a priest be carrying an edged weapon? If you were limited to carrying 1 item, would it be one that you have absolutely no way of possibly using? More to the point, shouldn't *every* novice mage have a copy of mb1? If not, how is he casting magic missiles? Ok, so the process of meleeing destroys many of the books and makes them unusable. But still, mb1 should be a more likely drop than anything else from a novice mage.
                              Ignoring that the monster mage, paladin, etc. are not Borgs (the spell list for the paladin line suggests that they are not even the same class as a @ paladin): this causes a fairly radical rebalancing problem by creating Too Much Junk. (In RAngband, it is literally impossible to "hoover" DL6 and lower as a fighter because your pack will fill up with {excellent} weapons and armor first.)
                              Zaiband: end the "I shouldn't have survived that" experience. V3.0.6 fork on Hg.
                              Zaiband 3.0.10 ETA Mar. 7 2011 (Yes, schedule slipped. Latest testing indicates not enough assert() calls to allow release.)
                              Z.C++: pre-alpha C/C++ compiler system (usable preprocessor). Also on Hg. Z.C++ 0.0.10 ETA December 31 2011

                              Comment

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