This came up recently:
http://www.shsforums.net/topic/56670-big-world-setup-an-attempt-to-update-the-program/?p=596273- Something there is messing up kitlist.2da
- Divine Remix messes up alignment.2da
- Siege of Dragonspear, unmodded, ships with a malformed xplevel.2da
- BG2EE, unmodded, ships with a malformed kitlist.2da
Yes it would be nice if we lived in a perfect world where all mods worked perfectly, but problems happen. Question is, how can we make it easy to work around problems. Currently, COUNT_2DA_COLS only counts the maximum number of columns; there is no way to find out what the minimum number of columns is. And currently, if READ_2DA_ENTRY tries to read an entry from a missing column, that the whole install bombs out. It would be nice if:
1) There was a way to detect .2da rows whose column count doesn't match COUNT_2DA_COLS, so we could skip reading those rows; or,
2) READ_2DA_ENTRY on a missing column simply populated the result with a zero or null value and moved on and let the install continue.
To make this more concrete by way of discussing the linked example, my mod needs to read the KITIDS value from a set of kits in kitlist.2da. Several kits fail to populate that column - in fact, a kit added by the game's developers doesn't populate that column. It would be great if I could READ_2DA_ENTRY and then simply ask PATCH_IF IS_AN_INT before trying to perform an operation on the value. But if I'm not mistaking, reading it to even find out that it isn't an int causes the install to bomb out. So I'm kind of at a loss. How do I find and avoid the hole, without stepping in it?