Villages are parties just like the ones you fight. Use (party_add_members, "p_village_x", "trp_whatever", number) from anywhere. If you want to boost it for all villages, look at script_refresh_village_defenders or modify the composition pt_village_defenders.