exclusion control for ego prefixes?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • saarn
    Adept
    • Apr 2009
    • 112

    exclusion control for ego prefixes?

    I'm looking at the black market and there are a "blackrock short bow" and "blackrock heavy crossbow" The description says they are made of heavy, sharp stone. This doesn't really make a lot of sense for a launcher. It wouldn't make a lot of sense for many weapons come to think of it (a stone rapier?? a stone whip?).

    It feels like there should be some sort of limitation on what kind of egos can attach to what kind of weapons. Fixing the problem of "blackstone whip" might be hard, but it seems like you could use the weapon subtypes to limit different bonuses to some combination of launchers, swords, blunt weapons, and poleaxes (e.g. a "supple" modifier to launchers, "sharp" to swords and axes, and "hefty" to poleaxes and blunt weapons).
  • Magnate
    Angband Devteam member
    • May 2007
    • 5110

    #2
    Originally posted by saarn
    I'm looking at the black market and there are a "blackrock short bow" and "blackrock heavy crossbow" The description says they are made of heavy, sharp stone. This doesn't really make a lot of sense for a launcher. It wouldn't make a lot of sense for many weapons come to think of it (a stone rapier?? a stone whip?).

    It feels like there should be some sort of limitation on what kind of egos can attach to what kind of weapons. Fixing the problem of "blackstone whip" might be hard, but it seems like you could use the weapon subtypes to limit different bonuses to some combination of launchers, swords, blunt weapons, and poleaxes (e.g. a "supple" modifier to launchers, "sharp" to swords and axes, and "hefty" to poleaxes and blunt weapons).
    You can already do this. The T: lines in ego_item.txt delineate exactly which base items can receive the affix. The only limitation is the ordering of svals - you need one T: line for each contiguous range of svals you wish to allow. So if you want an affix that applies to a shortbow and a light xbow but not a longbow, you'd need two T: lines.

    If you want to go through ego_item.txt and change it so that nonsense affixes cannot appear, please be my guest. Ideally push it to github and open a pull request against v4-master; otherwise just post it here.

    If you're feeling ambitious, think up some new affixes to ensure that items like bows can still have a good number of affixes to choose from (for each of make, material and quality, in the case of prefixes).

    If you're feeling even more ambitious, write a function that parses an allowed *combination* of affixes, so that we can prevent, e.g. "rusty" and "crystal" being chosen for the same item.
    "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

    Comment

    • saarn
      Adept
      • Apr 2009
      • 112

      #3
      ok, sounds like a fun background task.

      For the ego combination limiter, I'm thinking that it could make sense to do something like this:

      X:131:150 #block combination with egos 131 150
      S:130:Etched #replace affix 130 name with Etched
      D: Its clarity has been diminished by sand. #replacement description for affix 130

      Comment

      • Magnate
        Angband Devteam member
        • May 2007
        • 5110

        #4
        Originally posted by saarn
        ok, sounds like a fun background task.

        For the ego combination limiter, I'm thinking that it could make sense to do something like this:

        X:131:150 #block combination with egos 131 150
        S:130:Etched #replace affix 130 name with Etched
        D: Its clarity has been diminished by sand. #replacement description for affix 130
        I'm not sure I understand the S: - do you mean that if the generator adds affix 130 to an item that already has this affix then it gets added with a different name? That sounds a bit complicated - can you give an example of where it would be worth doing? (The alternative is simply to disallow 130 and create a separate "etched" affix which would be allowed).
        "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

        Comment

        • saarn
          Adept
          • Apr 2009
          • 112

          #5
          Yep, you understood what I was suggesting (S for substitute)

          I was thinking that something like "rusted", which would be good for iron items, might be better named "tarnished" for silver/brass and "etched" for crystal (I presume the affix would be entirely blocked for gold). You'd want these to have the same effect, but if you have a bunch of different names for different affects that can only attach to a couple materials, you could imagine the exclusion list getting really complicated ("tarnished" excludes "rusted", "etched" excludes "tarnished" and "rusted", all materials that can be rusted exclude "tarnished" and "etched", etc.

          [Edit]
          Thinking about this some more, maybe a better path would be to also limit quality modifiers (sharp, rusted, tough, polished) to particular materials. This would be helped a lot by renumbering the affixes so that all the materials are contiguous.

          Does the code at present allow multiple qualities per item? That is, could I get a majestic keen broadsword? If not, would this sort of thing be desirable? If you can only get at most one each of quality, material, and suffix, then maybe the explicit blocking problem goes away.
          Last edited by saarn; May 15, 2012, 05:54.

          Comment

          • Magnate
            Angband Devteam member
            • May 2007
            • 5110

            #6
            Originally posted by saarn
            Yep, you understood what I was suggesting (S for substitute)

            I was thinking that something like "rusted", which would be good for iron items, might be better named "tarnished" for silver/brass and "etched" for crystal (I presume the affix would be entirely blocked for gold). You'd want these to have the same effect, but if you have a bunch of different names for different affects that can only attach to a couple materials, you could imagine the exclusion list getting really complicated ("tarnished" excludes "rusted", "etched" excludes "tarnished" and "rusted", all materials that can be rusted exclude "tarnished" and "etched", etc.

            [Edit]
            Thinking about this some more, maybe a better path would be to also limit quality modifiers (sharp, rusted, tough, polished) to particular materials. This would be helped a lot by renumbering the affixes so that all the materials are contiguous.

            Does the code at present allow multiple qualities per item? That is, could I get a majestic keen broadsword? If not, would this sort of thing be desirable? If you can only get at most one each of quality, material, and suffix, then maybe the explicit blocking problem goes away.
            Ah yes, thanks - that's a lot clearer. You're right that having the same quality affix with different names for different substrates would be better than lots of different affixes with exclusion headaches. I take your point now.

            At the moment items can only have one each of make, material and quality - because there's no way currently to allow "majestic keen" without also allowing "sharp rusty" and so on. Once we implement exclusions properly this restriction can go - you'd still want only one make and material, but could have more than one quality modifier.
            "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

            Comment

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