Total War: WARHAMMER III

Total War: WARHAMMER III

One Button Respec
 This topic has been pinned, so it's probably important
DrunkFlamingo  [developer] Apr 21, 2023 @ 4:12am
Making modded characters behave the same as vanilla characters when resetting skills.
Okay, so because resetting a skill which automatically levels up can cause bugs, One Button Respec has two behaviours:

1. When it encounters a lord it has never heard of before (IE: a modded lord, or a lord from a new patch before I update) it will reset only skills which are NOT on the top row of the skill tree. This means that certain skills which should get reset do not, but it also means the mod doesn't break when used with character mods or every time CA updates.

2. When it encounters a whitelisted lord, it resets every visible skill in their skill tree except for specific skills which I have told the script are auto-levelled and should not be reset. This behaviour is used for all vanilla lords.

If you want to make your modded lords use the behaviour that vanilla lords use, you can do so with the following functions:

---@param subtype_key string onebuttonrespec_whitelist_subtype = function(subtype_key) ---@param new_auto_level_skills string[] onebuttonrespec_declare_autolevel_skills = function(new_auto_level_skills)

An example usage of these functions that you could put into a submod would be:

if onebuttonrespec_whitelist_subtype then onebuttonrespec_whitelist_subtype("wh3_dlc23_chd_zhatan") onebuttonrespec_declare_autolevel_skills({"wh3_dlc23_skill_chd_zhatan_mount_lammasu", "wh3_dlc23_skill_chd_zhatan_mount_great_taurus"}) end

You only need to declare each skill once.

This is not necessary for your mod to be compatible with One Button Respec, except for:
1. If you do not do this, nothing on the top row of your skill tree will be reset.
2. If you do not do this and you have placed auto-levelled skills outside of the top row of the skill tree, users will encounter minor bugs when resetting their skills.