Baldur's Gate Wiki:Game source files/2DA/RNDTRES

is one of several 2da tables that determine which random treasure may be given as a reward for quests or found on creatures or at locations where random treasure is intended to be obtained. It's added with Baldur's Gate: Siege of Dragonspear and serves as an expansion of.

It categorizes the treasure roughly by item values. Each of these categories is referred to by a placeholder "item" with the name that's given in the first, untitled column; these placeholders are actual item files or may be virtual entries in other random treasure tables, scripts or dialog files.

Though the table is also contained in the code of Baldur's Gate II: Enhanced Edition, it is not used to determine random treasure in that game.

Mechanics
At the time the connected game content is "created" – by entering the related area, loading a savegame, or if a creature (re-)spawns through certain conditions –, 1d40 is rolled. The roll determines the table column to look in – for which it is divided by the number of non-empty columns –, while the row is defined by the placeholder. The result of this is the item to be found.

Siege of Dragonspear
This table is used only in Baldur's Gate: Siege of Dragonspear. 2DA     V1.0 1       2        3        4        5        6        7        8        9        10       11       12       13       14       15       16       17       18       19       20       21       22       23       24       25       26       27       28       29       30       31       32       33       34       35       36       37       38       39       40 RNDTRE07 BDRING07 BDRING09 BDRING12 BDAMUL25 *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        * RNDTRE08 POTN02  POTN03   POTN08	POTN09	 POTN10	  POTN11   POTN12	POTN17	 POTN18	  POTN19   POTN20	POTN22	 POTN24   POTN26   POTN27   POTN28   POTN29   POTN30   POTN31   POTN36   POTN37   POTN38   POTN39   POTN42   POTN43   POTN43   POTN44   POTN45   POTN46   POTN52   *        *        *        *        *        *        *        *        *        * RNDTRE09 MISC16  MISC17   MISC18	MISC19	 MISC20	  MISC21   MISC22   MISC23   MISC24   MISC25   MISC26   MISC27   MISC28   MISC29   MISC30	MISC31	 MISC32	  MISC33   MISC34   MISC35	 MISC36   MISC37   MISC38   MISC39   MISC40   MISC41   MISC42   MISC43   MISC44   MISC45   *        *        *        *        *        *        *        *        *        * RNDWAND WAND03   WAND05   WAND06   WAND07   WAND08   *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        * RNDSCRL	 RNDSCR01 *		  *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        * RNDTRI01 RING10  RING11   RING14   AMUL05   AMUL06   AMUL07   *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        * RNDTRI02 RING13  RING15   RING12   RING16   AMUL08   AMUL10   *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        * RNDTRI03 RING17  RING18   RING19   AMUL11   *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        * RNDGEM01 MISC16  MISC17   MISC18   MISC19   MISC21   MISC22   MISC23   MISC24   MISC25   MISC26   *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        * RNDGEM02 MISC20  MISC27   MISC28   MISC29   MISC30   MISC31   MISC32   *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        * RNDGEM03 MISC33  MISC34   MISC35   MISC36   MISC37   MISC38   MISC39   MISC40   *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        * RNDGEM04 MISC41  MISC42   MISC43   MISC6Z   *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        * RNDGEM05 MISC44  MISC45   *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        * RNDARO01 AROW01  AROW02   AROW08   *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        * RNDARO02 AROW09  AROW10   AROW02   *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        * RNDARO03 AROW05  AROW11   AROW04   *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        * RNDPTN01 POTN02  POTN08   POTN19   POTN20   POTN28   *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        * RNDPTN02 POTN52  POTN17   POTN42   POTN24   *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        * RNDPTN03 POTN14  POTN11   POTN12   POTN21   POTN45   *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        * RNDOMAGE SW1H20  SW1H43   SW1H46   SW1H48   *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *        *

Baldur's Gate II: Enhanced Edition
Though the table exists in the code of Baldur's Gate II: Enhanced Edition and is identical to the Baldur's Gate: Siege of Dragonspear file, it is not used to determine random treasure in this game; see above.