Okay! I did that pretty quickly. Here is rc8:
https://github.com/s...eleases/tag/0.8
This adds support for mod kits, as I described above. After patching the base HLA tables for each vanilla kit and multiclass combo it runs a routine that looks for any kits added later, patching their HLA tables with the same changes applied to the trueclass kits. The code looks like this:
ACTION_IF ENGINE_IS ~soa tob bgt~ BEGIN
OUTER_SET kitlist_row = 31
END
ACTION_IF GAME_IS ~bgee bg2ee eet iwdee~ BEGIN
OUTER_SET kitlist_row = 40
END
COPY_EXISTING ~kitlist.2da~ ~override~
// COUNT_2DA_ROWS num_rows
COUNT_2DA_COLS num_cols
READ_2DA_ENTRIES_NOW ~r2en_kitlist~ num_cols
PATCH_IF (%r2en_kitlist% >= %kitlist_row%) BEGIN
FOR (row = %kitlist_row%; row < r2en_kitlist; row += 1) BEGIN
READ_2DA_ENTRY_FORMER ~r2en_kitlist~ row 1 kitlist_name
READ_2DA_ENTRY_FORMER ~r2en_kitlist~ row 8 class_num
PATCH_IF (class_num == 12) BEGIN // ranger
INNER_ACTION BEGIN
LAF action_remove_hla STR_VAR kit_name = EVAL ~%kitlist_name%~ remove_ability = ~GA_SPCL901~ END
LAF action_remove_hla STR_VAR kit_name = EVAL ~%kitlist_name%~ remove_ability = ~GA_SPCL902~ END
LAF action_remove_hla STR_VAR kit_name = EVAL ~%kitlist_name%~ remove_ability = ~GA_SPCL903~ END
LAF action_add_hla STR_VAR kit_name = EVAL ~%kitlist_name%~ ability = ~AP_TG#TOUG~ num_allowed = ~5~ END
LAF action_add_hla STR_VAR kit_name = EVAL ~%kitlist_name%~ ability = ~GA_TG#ENDU~ num_allowed = ~1~ END
LAF action_add_hla STR_VAR kit_name = EVAL ~%kitlist_name%~ ability = ~AP_TG#AMBI~ num_allowed = ~1~ END
LAF action_add_hla STR_VAR kit_name = EVAL ~%kitlist_name%~ ability = ~AP_TB#HATE~ num_allowed = ~1~ END
END
END
END
END
BUT_ONLY
So, this should definitively be installed *after* any kit mods. Note, this uses my table-patching functions, so if there is a mod kit like a Revised Archer or something, with crazy HLA Called Shots and other stuff relating to ranged combat, all that that will still be there. That Revised Archer kit will have its own custom HLAs but will also get access to Toughness, Endurance, Ambidexterity, and Racial Nemesis.
A note about Rogue Rebalancing: I have suggested that RR adopt these HLA functions in order to be compatible with other HLA-changing mods that use them, but it seems that such a major change in the code is not in the cards for RR. The thing is, no matter what kind of table-changing code it uses, the RR thief and bard HLAs currently do NOT apply to mod kits. I cannot fix that from here, in the Refinements code. What I can do is, in the case of mod kits, where Refinements would ordinarily defer to RR HLAs if they are detected? In those cases Refinements will *not* defer to RR (which isn't in those tables anyway). So for mod kits, all Refinements HLAs will be installed regardless of whether RR is present. It's not perfect (perfect would be RR applying something like the code I posted above), but the important thing is that, if you install Refinements, no kit will be stuck with the stupid vanilla HLA selection.
Any feedback is welcome on this point!
Edited by subtledoctor, 15 August 2016 - 06:00 PM.