@agb1 Ah, I see. It might be worth stepping back here and considering the big picture.
Some years ago it was very popular for people to extend their game out to 50 levels. I forget which mod did this - it might have been BG2Tweaks. I got into the habit of using 50 rows in .2da files because doing that in CLAB giles is harmless. And back then there was no such thing as backstab.2da or such.
Big Picture (BP) component 50 ("level 50 rules") does this. There is an EE version of BP including that component.
BG2Tweaks (revised spellcasting tables go to level 50), Tweaks Anthology (ditto + this backstab tweak).
Rogue Rebalancing (component 6) and Song & Silence (component 0) replace the spellcasting tables for bards. RR goes to level 40. S&S goes to level 50. S&S for EE also adds 40-column entries to backstab.2da for Adventurer and Sharpshooter kits.
Just a few examples. So yes, there are definitely mods for EE that go to 50 levels. I always use level-50 rule sets in my own games.
Now I guess not many people use 50-level table extenders? So maybe I should convert all of my mods to assume 40 levels.
BUT would that solve things? I mean I'm happy to do it, but then what about people who want to play to level 50? How should modders in general treat this? Is there a best practice? If so, it should be very prominently published somewhere.
For the sake of completeness and compatibility, I suggest the following steps:
1) Modders should reduce their tables to only 40 levels.
2) Whichever mod extends the game to level 50 should make sure it does so for ALL mod-added content, not just vanilla tables.
3) This component of Tweaks Anthology (and other similar ones), instead of counting the 2da rows once and then blindly patching, should move the COUNT_2DA_COLS command inside the patching loop so that it counts the correct number of columns in every row and can successfully patch every row even if there are discrepancies. This would eat up a few more processing cycles, but I seriously doubt anyone would notice the difference.
Honestly 3) by itself would be a fix here, but it seems to me that everyone should operate by agreed-upon best practices all around.
I'm not sure of a best practice here in general. Spell tables are usually replaced entirely by tweak mods and/or modern kits have custom tables and ignore the vanilla maxspl** 2das.
I'd suggest for backstab.2da specifically that it seems safe to follow the example of S&S and only put 40 rows in backstab.2da (i.e., use 40 columns in STR_VAR backstab = ~. . .~ for fl#add_kit_ee).
Also note that the Tweaks Anthology component that complained about this file actually did extend the table to 50 columns/levels when I installed it after I manually truncated all of the rows to 40 columns.
Edit: since Imp edited his post above mine, I want to clarify that I was thinking that a mod could add a kit with 40 columns in backstab.2da while defining up to 50 levels for all other kit-related tables, but I'm assuming that raising level above 40 on CHARNAME or an NPC that is using a kit that has only 40 columns defined in backstab.2da won't cause the game to explode. We should probably test that.
Edited by agb1, 08 November 2016 - 02:35 PM.