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

INTMOD, short for modified by intelligence, is a 2da table that defines the impact of a characters intelligence score on their chances to learn a wizard spell, which maximum spell level they can learn at all and how many spells they can scribe into their Mage Book. The version after that from the original Baldur's Gate in addition defines the maximum duration of a character being trapped in a Maze by adding values for the number and size of dice being rolled by this spell.

Baldur's Gate and Tales of the Sword Coast
2DA V1.0 0  LEARN_SPELL  MAX_SPELL_LEVEL MAX_SPELLS_PER_LEVEL 0     0                0               0 1      0                0               0 2      0                0               0 3      0                0               0 4      0                0               0 5      0                0               0 6      0                0               0 7      0                0               0 8      0                0               0 9      35               4               6 10     40               5               7 11     45               5               7 12     50               6               7 13     55               6               9 14     60               7               9 15     65               7               11 16     70               8               11 17     75               8               14 18     85               9               18 19     95               9               99 20     96               9               99 21     97               9               99 22     98               9               99 23     99               9               99 24     100              9               99 25     100              9               99

Subsequent table
Besides adding the Maze-relevant dice, the chance to learn wizard spells is increased from 100% to 150% for intelligence scores of 24 and 25. Other values are unaltered throughout game editions. 2DA V1.0 0  LEARN_SPELL  MAX_SPELL_LEVEL MAX_SPELLS_PER_LEVEL MAZE_DURATION_DICE_NUM MAZE_DURATION_DICE_SIZE 0     0                0               0                      4                      4 1      0                0               0                      4                      4 2      0                0               0                      4                      4 3      0                0               0                      4                      4 4      0                0               0                      4                      4 5      0                0               0                      4                      4 6      0                0               0                      4                      4 7      0                0               0                      4                      4 8      0                0               0                      4                      4 9      35               4               6                      4                      4 10     40               5               7                      4                      4 11     45               5               7                      4                      4 12     50               6               7                      3                      4 13     55               6               9                      3                      4 14     60               7               9                      3                      4 15     65               7               11                     2                      4 16     70               8               11                     2                      4 17     75               8               14                     2                      4 18     85               9               18                     1                      4 19     95               9               99                     1                      4 20     96               9               99                     1                      4 21     97               9               99                     1                      4 22     98               9               99                     1                      4 23     99               9               99                     1                      4 24     150              9               99                     1                      4 25     150              9               99                     1                      4