View Single Post
Old December 20, 2012, 22:31   #3
Angband Devteam member
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Originally Posted by hyperdex View Post
I don't see why you couldn't have the best of both worlds...

I believe the 3.4.1 codebase uses some sort of 'commonness' value, where if the commonness of a dagger is 30 and of a blade of chaos is 1, then a dagger is 30 times more common than a blade of chaos. If I am wrong, ignore the rest of my message. ;-)

Let the sum of the commonesses of objects be O and let the sum of commonnesses of artifacts be A. If we want there to be exactly a 1/400 chance of generating an artifact, we could scale all of the object commonnesses by (399*A)/O and then do a object generation as Derakon suggests. This would lead to artifacts being generated 1/400 of the time, and in addition we can easily calculate the relative rarity of any two objects or artifacts.
I'm not sure you can, because surely multiplying one set of commonnesses by a scalar necessarily breaks the ability to compare artifact commonness directly with base object commonness. I think your suggestion amounts to a way of implementing artifactChance in a single allocation table - interesting and not to be sneezed at, but not, I think, the best of both worlds.
How do you intend to handle this on a level by level basis? Would you basically have 101 allocation tables with commonnesses of every object/artifact on a level by level basis?
Essentially yes - this is how it's been done in V since 3.something, and how it will work in pyrel. There'll be an allocation table for objects at each generation level. More than one, in fact, because some will have filters in (e.g. the allocation table for monsters who can only drop spellbooks).
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions." - Timo Pietila
Magnate is offline   Reply With Quote