Some general ways to generate items:

  1. Monster drops - killed monsters, except for gremlins or monsters that were bred, have a chance to drop items corresponding to dungeon danger level.
    This is affected by:
    1. The Treasure Hunter talent - roughly speaking you'll get about 1 extra item for every 9-10 monsters you kill with this talent.
    2. Vault monsters are believed to have increased drop rate,
    3. Some monster have typical drops - kobolds often drop bows, balors often drop scourges, all shooters have increased chance of appropriate missile drop, this item might be dropped even if it exceeds dungeon danger level.
    4. Half of the monsters generated in the Small Cave will not drop anything[1]
  2. Pickpocketing - applying Pick pockets skill on humanoid monsters gives a chance of extra item generation. This item is always below or equal to 10s [anything from gold to elven chainmail] and corresponds to the dungeon danger level. There is only one chance of getting item per monster [further applications yield "You already cleaned *foo*" message]. Items generated this way is not connected to the loot you get by killing it. This comes from old versions of game when monster did not have inventories at all. As of 1.2.0, gremlins cannot be pickpocketed either.
  3. Shops and shop restocks - dependent on specialization, shops are generated with certain stuff (ring shop with rings while a general one just has random items):
    1. Certain desirable items such as those that grant wishes, those that give stat boosts, and those that reduce corruption have a lower generation rate at shops.
    2. A Player' s ingame luck has no effect on the quality of items generated.
    3. Restocks - shops sometimes restock their goods, this happens more often if shop is bought out of items or shopkeeper is fooled to believe it is low on items. Later usually is done by simply piling all shop goods in one corner which is usually good enough for one restock.
      Buying shops out repeatedly might be quite expensive unless you can manipulate your Charisma/Appearance and have good race modifier towards shopkeeper. For example, a hurthling merchant can generate quite a lot by buying out HMW shop and selling all the stuff in Dwarftown without losing too much money.  Note that the prices go up every time the shop restocks as well.
      Alternatively Casino money can be used to buy off Casino shop repeatedly to generate a ridiculous amount of items in a rather fast way.
  4. Stuff lying on dungeon floor. This is the most basic type of loot. This could be exploited in versions prior to 1.2.0 in a process known as ID stairhopping.
  5. Gravedigging - gravedigging is a chaotic act which creates a pit on a grave using a pickaxe or or wand of digging. When digging a grave, some form of undead monster will be generated. Keep in mind that pickaxes may break while digging, and also if you dig using a pickaxe you will end up inside the pit and will need a turn to get out (assuming you don't teleport yourself out).
    1. Great treasure graves - these have a lot of stuff inside but also generate dangerous guardians. While most common undead out of them is rather bearable, some high-end nasties like emperor lich or lich king are possibilities. Be prepared for them!
    2. Normal graves - these do not have many items inside (0 items over half the time), but give significantly less danger as the worst you will face is something like a Lich or Skeletal warrior.
      Great treasure graves increase only quantity not quality of items. However, both graveyards are in reasonably high danger level areas, and thus items generated from graves are often valuable.
  6. Wishing - most nonartifact items can be wished for - exceptions include wand of wishing, ring of djinni summoning and moloch armor. Some stuff like potion of gain attributes, girdle of giant strength, whip of the snake, amulet of life saving and seven league boots (as of v. 1.2.0) come one-per-wish; most other items can be wished for in plural form.
  7. Using spell/ scroll of item creation - this generates an item according to dungeon danger level.  The B/U/C status of the scroll determines the B/U/C status of the item generated but has no effect on the quality of the item.
  8. Polymorphing items by dipping them into certain potions might change them into other possibly more desirable stuff. What they are transformed into depends on current dungeon danger level.
    1. potions of exchange - the best known feature is being able to dip a stack of 19 rings into potion of exchange to get rings of djinni summoning (RoDS). Quite a number of players consider this option too game breaking, as 19 wishes would make the further game much easier. On something like D:8 [Cavern of chaos dungeon level 8] you have approximately a 3% chance of rings being polymorphed into RoDS. As of version 1.2.0, though, it is harder to create a "wish engine" from this process since dipping a stack of items in a potion of exchange now polymorphs each item individually[2]. Currently only one dip can generate RoDS, any dips after that do not generate RoDS [3].
      Other possible options are polymorphing bracers to get bracers of resistance, girdles hoping for Girdle of giant strength, boots to get seven league boots,
      Exchanged items will never give you back the same item you started with - so for example spellbooks need two potions to be polymorphed as the first one generates some tomes, which can then be polymorphed back into spellbooks.
    2. Raw chaos polymorphing
  9. Looting water dragon lair. Although these items are generally speaking loot on floor, there are a lot of conditions that need to be met to pick them up safely. Look at proper article for details.
  10. Milking - some monsters actively throw/shoot stuff at character; by running away from them until they throw, you can create a good pile of missiles or weapons.  Most commonly done with orc or gnoll vaults to generate large numbers of knives, spears, or battle axes.  Often, one of these will eventually have a nice modifier, such as 'of devastation'.