Total War: WARHAMMER III

Total War: WARHAMMER III

Warband Upgrade Ultimate
Quinner 11 Jun, 2024 @ 2:17pm
Fix for single entity upgrade
Hey Bagholder,

Have you considered a listener such as the following to 'heal' S.E.M's after upgrading? I have only tested the scripted in a limited capacity, but it does seem to restore the health of monsters that would otherwise have 1hp after upgrading.

I don't know exactly if the event is used for any other instances of unit conversions.
core:add_listener( "upgrade_into_SEM_set_health", "UnitConverted", function(context) local converted_unit_key = context:converted_unit():unit_key() local converted_unit_cco = cco("CcoMainUnitRecord", converted_unit_key) local initial_troop_count = converted_unit_cco:Call("UnitDetailsContext.NumEntitiesInitial") return initial_troop_count == 1 end, function(context) local unit = context:unit() cm:set_unit_hp_to_unary_of_maximum(context:converted_unit(), unit:percentage_proportion_of_full_strength() / 100) end, true )