[3.3.2] Experiments with artifact.txt

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bonart
    Rookie
    • Mar 2012
    • 5

    [3.3.2] Experiments with artifact.txt

    I am engaged in some experiments and has changed parameter A of some artifacts to "A:100:1 to 127" (in artifact.txt in folder edit).
    But arts don't appear neither on the 1st nor at the 10th level of deep...

    What's wrong?
    Last edited by bonart; March 2, 2012, 16:59.
  • CunningGabe
    Swordsman
    • Feb 2008
    • 250

    #2
    Originally posted by bonart
    I am engaged in some experiments and has changed parameter A of some artifacts to "A:100:1 to 127" (in artifact.txt in folder edit).
    But arts don't appear neither on the 1st nor at the 10th level of deep...

    What's wrong?
    The "100" doesn't mean that the artifact will be generated with a 100% chance. What happens is that when the game generates an object, there is a chance (depending on your depth) that it will generate an artifact. Once it decides to generate an artifact, it then scans the list for which artifacts it could create at this depth, and picks one randomly. The "100" is just a relative rarity that helps the artifact-picking code decide whether to pick this artifact or another one.

    Long story short: by changing the min depth to 1, it should be possible to see that artifact as early as DL1, but highly unlikely.

    Comment

    • bonart
      Rookie
      • Mar 2012
      • 5

      #3
      Originally posted by CunningGabe
      The "100" doesn't mean that the artifact will be generated with a 100% chance. What happens is that when the game generates an object, there is a chance (depending on your depth) that it will generate an artifact.
      Thanks.
      How artifact (and/or ego items) occurrence depends on depth (in numbers approximately)?

      Comment

      • CunningGabe
        Swordsman
        • Feb 2008
        • 250

        #4
        Originally posted by bonart
        Thanks.
        How artifact (and/or ego items) occurrence depends on depth (in numbers approximately)?
        I've looked at the code a little more, and I was partially wrong about the 100. As far as I can tell, this is what happens when an object is generated:

        1. There is a (depth + 2)*3 % chance that the item is upgraded to good.
        2. If the item is upgraded to good, there is a 1.25*depth % chance that it is upgraded to great (but this caps at 50%).
        3. If the item is upgraded to great, then we try 2-4 times to make it an artifact by scanning every item in the artifact list that matches the object type and depth. Each time we find a matching item, there is a p% chance that we keep it, where p is the first number in the A line.

        For example, let's say that you change one of the artifact daggers to have A:100:1 to 127. Whenever a dagger is created on dungeon level 10, there is a 36% chance that it is upgraded to good. If it is good, there is a 12.5% chance that it is upgraded to excellent, and if that happens, it should automatically become an artifact (due to your changes). Overall, any given dagger has a (36%)*(12.5%) = 4.5% chance to be the given artifact on DL10. On DL1, the chance would be (9%)*(1.25%) = 0.1125%. That is, about one time in 900.

        Note that special artifacts, like the Phial, follow a completely different procedure that I don't know off-hand.

        Comment

        • bonart
          Rookie
          • Mar 2012
          • 5

          #5
          Thanks a lot!

          So, can it possible to give to the character an artifact (or ego item) in a p_class.txt (section E)?

          Comment

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