Total War: WARHAMMER III

Total War: WARHAMMER III

Console Commands (Modding Tool), the mod works 100000% please just use it and enable the script break warning
Crazy Devil 3 Oct, 2024 @ 10:39am
New command healid
So I wanted to heal an army between two fight in a turn, but the selection wasnt working while on pre battle screen/during end turns. So I made a new command, healid, to be able to do it, you just need to grab the id from the context viewer.
Here is the function (add it to script/campaign/pj_console.lua):
local healid = function(id, percent) local char = cm:get_character_by_cqi(id) if not char then return end if not char:has_military_force() then return end local unit_list = char:military_force():unit_list() local num_units = unit_list:num_items() for i=0, num_units-1 do local unit = unit_list:item_at(i) cm:set_unit_hp_to_unary_of_maximum(unit, percent/100) end end

Also ofc you need to add it to the lists of commands
["healid (.+) (.+)"] = healid,
["healid"] = healid,