Thank you, Mike, that worked. It took me hours of editing, but I finally have my tra and 2da files updated with the info about scrolls. I could use two 2da tables for this, but I thought it would be more sensible and easier to maintain to keep everything in a single table. In order to do this, though, I had to include the file extensions (spl or itm) in the 2da file, for otherwise there would be name conflicts. So I added some logic to my tp2 file to distinguish between scrolls and spells:
COPY - ~AlonsosMod/spells.2da~ ~AlonsosMod/spells.2da~ READ_2DA_ENTRIES_NOW ~r2en_spells~ 3 FOR (row = 0; row < r2en_spells; row += 1) BEGIN READ_2DA_ENTRY_FORMER ~r2en_spells~ row 0 resource READ_2DA_ENTRY_FORMER ~r2en_spells~ row 1 name READ_2DA_ENTRY_FORMER ~r2en_spells~ row 2 description INNER_ACTION BEGIN ACTION_IF (FILE_EXISTS_IN_GAME ~%resource%~) BEGIN COPY_EXISTING ~%resource%~ ~override~ ACTION_IF (~%resource%~ STRING_CONTAINS_REGEXP ~spl~) BEGIN SAY NAME1 (AT name) SAY UNIDENTIFIED_DESC (AT description) END ACTION_IF (~%resource%~ STRING_CONTAINS_REGEXP ~itm~) BEGIN SAY NAME1 (AT name) SAY DESC (AT description) END BUT_ONLY END END
WeiDU complained about that, though, so I must have broken some syntax rule there. Can you tell what the problem is?