gsanders
Grandmaster Knight

Redleg said:I think I solved my problem. I was playing in WB 1.158 and when I tried it in 1.166, the messages appeared and the opcode errors in the log disappeared.
Hours later after some more testing.....
Oops. Getting an opcode 2335 error invalid faction ID 223 in simple trigger 131. I think this trigger pertains to the KAOS kit because I haven't changed any other simple trigger in the module. Any help would be appreciated. Should I copy and paste from the module_simple_triggers.py instead of allowing modmerger to do it?
If you have too many factions declared there will be overwrite of some of your slots due to native with diplomacy making assumptions regarding the number of factions. Native uses 6+1 for your faction, diplomacy adds 1 for a pretender, and allocates
in total space for 10 factions before they overwrite slots.
KAOS kit offers native 6 + rebels 6 + kingdom restore 6 + your private faction == 19 factions.
With diplomacy this immediately means you must move the slots used, as declared in module_constants.py
and this affects all factions slots after the one you move.
Watch:
Diplomacy faction slot 120 slot_faction_truce_days_with_factions_begin
130 slot_faction_provocation_days_with_factions_begin
140 slot_faction_war_damage_inflicted_on_factions_begin
150 slot_faction_sum_advice_about_factions_begin
in similar fashion, increasing the number of lords can have unexpected side effects:
troop slot 165 troop_slots_reserved_for_relations_start
to 297 (implicit in use for lords relation, but nowhere made obvious)
but what if you have many more lords? Or kingdom ladies that may be promoted to lords?
Companions as vassals? It's possible, with a complex mod, to break the assumptions.
Been there/done that.
source? Silverstag v26 documentation has the excellent reference slots.xlsx
look through the slots listing for diplomacy and native slots in use
your issue where unexpected numbers appear may not really be coming from KAOS kit in the manner you expect, but from changes in ASSUMPTIONS that KAOS adjusted -- in this case, number of factions. This said from experience after 7 man days with this. If you merge KAOS kit to vanilla, it should be at most a half day job. But if you have a highly tweaked mod and you drop KAOS kit into it, you need to be prepared to run down side effects that arent all of them really from KAOS kit itself. Most especially
recognizing diplomacy presumes a limited number of factions, which is no longer so. You'll end up moving slots, if you solve it at all...
- GS