Here is a built-in event handler defined in export_triggers.lua (viewed/edited via Pack File Manager):

Code:
events.CharacterWoundedInAssassinationAttempt[#events.CharacterWoundedInAssassinationAttempt+1] =function (context)
    if conditions.CharacterType("General", context) and not conditions.CharacterHasTrait("S2_boshin_general_protected", context) and conditions.CampaignName("jap_boshin", context) then
        effect.trait("S2_boshin_all_blokes_maimed", "agent", 1, 10, context)
        return true
    end
    return false
end
As with many other event handlers, this one uses a member function of "event" to do something. In comparison, here is a function from event_message.lua (obtained from http://sourceforge.net/p/etw-mod-too...essage.lua#l62):

Code:
function InitialiseRiots(root, details)

    InitialiseStandard(root, details)
    
    UIComponent(root:Find("DY_pop_killed")):SetStateText(details.Data.Population)
    UIComponent(root:Find("DY_buildings_damaged")):SetStateText(details.Data.Buildings)
    
end
This function utilizes UIComponent, which provides a much wider variety of possible effects than "effect" does. I would like to use UIComponent functions in an event handler like the one shown in the first example. Does anyone know if it is possible to do so? If so, could you possibly provide a brief example? Thanks!