Here, more or less, is the latest roster of CSEE (Campaign Series Event Engine) functions:
LUA_FUNCTIONS_REFERENCE
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
TRIGGERS
on_air_attack (hc, pid, name, side, nation, points, strength)
on_arty_attack (hc, trackid, pid, name, side, nation, oid, orgname, points, strength, HQ, Leader)
on_build_barrier (hc, trackid, pid, name, side, nation, oid, orgname)
on_build_light_bridge (hc, dir, trackid, pid, name, side, nation, oid, orgname)
on_build_vehicle_bridge (hc, dir, trackid, pid, name, side, nation, oid, orgname)
on_clear_hex (hc)
on_clear_lz (hc, trackid, pid, name, side, nation, oid, orgname)
on_damage (hc, trackid, pid, name, side, nation, oid, orgname)
on_entrench_hex (hc, trackid, pid, name, side, nation, oid, orgname)
on_hex_assault (hc, side)
on_hex_attack (hc, side, nation, attype)
on_ied_attack (hc, trackid, pid, name, side, nation, oid, orgname, points, strength, HQ, Leader)
on_improve_hex (hc, trackid, pid, name, side, nation, oid, orgname)
on_lay_mine_field (hc, trackid, pid, name, side, nation, oid, orgname)
on_mine_attack (hc, trackid, pid, name, side, nation, oid, orgname, points, strength, HQ, Leader)
on_next_phase (turn, side)
on_next_turn (turn)
on_objective_capture (hc, values, side)
on_resume ()
on_set_ied (hc, trackid, pid, name, side, nation, oid, orgname)
on_shutdown ()
on_startup ()
on_unit_arty_fire (hc, trackid, pid, name, side, nation, oid, orgname, strength)
on_unit_attack (hc, trackid, pid, name, side, nation, oid, orgname, points, strength, HQ, Leader, attype)
on_unit_fire (hc, trackid, pid, name, side, nation, oid, orgname, strength)
on_unit_kill (hc, trackid, pid, name, side, nation, oid, orgname, points, strength, HQ, Leader)
on_unit_move (hc_from, hc_to, trackid)
on_unit_reduce (hc, trackid, pid, name, side, nation, oid, orgname, points, strength, HQ, Leader, loss)
on_unit_reinforce (hc, trackid, pid, name, side, nation, oid, orgname, points, strength, HQ, Leader)
on_unit_release (trackid, pid, name, side, nation, oid, orgname, points, strength, HQ, Leader)
on_unit_remove (hc, trackid, pid, name, side, nation, oid, orgname, points, strength, HQ, Leader)
AI
ai (side) [internal system function, undocumented]
is_ai (side)
is_human (side)
ai_sides ()
human_sides ()
both_sides ()
ai_index (parm)
ai_parameter (index)
adaptive_ai (side, nation, index)
inc_adaptive_ai (side, nation, index, increment)
max_ai_index ()
set_adaptive_ai (side, nation, index, value)
COUNTERS
counter_airlevel (trackid)
counter_assault (trackid)
counter_ctrackid (trackid)
counter_defend (trackid)
counter_exists (trackid)
counter_flags (trackid)
counter_hex (trackid)
counter_hq (trackid)
counter_leader (trackid)
counter_losses (trackid)
counter_morale (trackid)
counter_more_flags (trackid)
counter_name (trackid)
counter_nation (trackid)
counter_oid (trackid)
counter_orgname (trackid)
counter_pid (trackid)
counter_points (trackid)
counter_side (trackid)
counter_strackid (trackid)
counter_strength (trackid)
counter_turns_until_refuel (trackid)
counter_type (trackid)
counter_x (trackid)
counter_y (trackid)
counter_unit_carry_flags (trackid)
counter_unit_fire_flags (trackid)
counter_unit_more_flags (trackid)
counter_unit_move_flags (trackid)
counter_unit_other_flags (trackid)
counter_is_airborne (trackid)
counter_is_air_transport (trackid)
counter_is_civilian (trackid)
counter_is_hq (trackid)
counter_is_indirect_fire (trackid)
counter_is_leader (trackid)
counter_is_supply (trackid)
counter_is_transport (trackid)
counter_is_underground (trackid)
is_disrupted (trackids)
is_carried (trackids)
is_unloaded (trackids)
is_loaded (trackids)
is_concealed (trackids)
is_outofammo (trackids)
is_diggingin (trackids)
is_fatigued (trackids)
is_buybullet (trackids)
is_buywheel (trackids)
is_fixed (trackids)
is_lowonammo (trackids)
is_isolated (trackids)
is_buyrecon (trackids)
is_reduced (trackids)
is_lowonfuel (trackids)
is_outoffuel (trackids)
is_refueled (trackids)
is_attacked (trackids)
is_captured (trackids)
is_not_disrupted (trackids)
is_not_carried (trackids)
is_not_unloaded (trackids)
is_not_loaded (trackids)
is_not_concealed (trackids)
is_not_outofammo (trackids)
is_not_diggingin (trackids)
is_not_fatigued (trackids)
is_not_buybullet (trackids)
is_not_buywheel (trackids)
is_not_fixed (trackids)
is_not_lowonammo (trackids)
is_not_isolated (trackids)
is_not_buyrecon (trackids)
is_not_reduced (trackids)
is_not_lowonfuel (trackids)
is_not_outoffuel (trackids)
is_not_refueled (trackids)
is_not_attacked (trackids)
is_not_captured (trackids)
counter_on_map (trackid, verified_only)
counters_all (side, onmap_only)
counters_aorg (trackids, onmap_only)
counters_sorg (strackids, onmap_only)
hexes_aorg (trackids, onmap_only)
counters_highest_strength (trackids, verified_only)
counters_strongest (trackids, verified_only)
counters_lowest_strength (trackids, verified_only)
counters_weakest (trackids, verified_only)
counters_highest_morale (trackids, verified_only)
counters_lowest_morale (trackids, verified_only)
counters_highest_assault (trackids, verified_only)
counters_lowest_assault (trackids, verified_only)
counters_highest_defend (trackids, verified_only)
counters_lowest_defend (trackids, verified_only)
counters_highest_points (trackids, verified_only)
counters_lowest_points (trackids, verified_only)
counters_airborne (trackids)
counters_waterborne (trackids)
counters_land (trackids)
map_trackid (hc, number)
map_trackid_count (hc)
map_trackids (hc)
max_counters ()
max_turns_until_refuel (nation)
GENERAL
first_side ()
current_side ()
other_side (side)
sideof (nation)
current_turn ()
next_turn ()
previous_turn ()
final_turn ()
current_visibility ()
night (turn)
fow (side)
is_fow (side)
set_fow (side, switch)
is_night ()
HEXES
has_barrier (hc)
has_big_wrecks (hc)
has_block (hc)
has_bunker (hc)
has_cave (hc)
has_damage (hc, dir)
has_ied (hc)
has_ied1 (hc)
has_ied2 (hc)
has_ied3 (hc)
has_improved_position (hc)
has_landing_zone (hc)
has_light_bridge (hc)
has_minefield (hc)
has_minefield1 (hc)
has_minefield2 (hc)
has_minefield3 (hc)
has_obstacle (hc)
has_pillbox (hc)
has_pontoon_bridge (hc)
has_rubble (hc)
has_smoke (hc)
has_trench (hc)
has_tunnel (hc)
has_vehicle_bridge (hc)
has_wrecks (hc)
has_spotted (hc)
hexes_minefield (hcs, side)
hexes_ied (hcs, side)
hexes_block (hcs, side)
hexes_tunnel (hcs, side)
hexes_cave (hcs, side)
hexes_bunker (hcs, side)
hexes_improved_position (hcs, side)
hexes_pillbox (hcs, side)
hexes_trench (hcs, side)
hexes_fortification (hcs)
hexes_landing_zone (hcs)
hexes_wrecks (hcs)
hexes_terrain (hcs, terrain)
empty_transports_count (hc)
has_empty_air_transport (hc)
has_empty_transport (hc)
has_transport (hc)
max_transport_strength (hc)
is_sidea_aware (hc)
is_sidea_exclude (hc)
is_sideb_aware (hc)
is_sideb_exclude (hc)
is_airfield_hex (hc)
is_beach_hex (hc)
is_building_hex (hc)
is_cactus_hex (hc)
is_canal_hex (hc)
is_canal_shallow_hex (hc)
is_city_hex (hc)
is_clear_hex (hc)
is_colored_dirt_hex (hc)
is_dense_jungle_hex (hc)
is_dry_paddy_hex (hc)
is_forest_hex (hc)
is_grain_field_hex (hc)
is_hammada_hex (hc)
is_impass_hex (hc)
is_industrial_hex (hc)
is_installation_hex (hc)
is_light_jungle_hex (hc)
is_major_canal_hex (hc)
is_major_canal_shallow_hex (hc)
is_major_river_hex (hc)
is_major_river_shallow_hex (hc)
is_marsh_hex (hc)
is_meadow_hex (hc)
is_orchard_hex (hc)
is_palm_tree_hex (hc)
is_produce_field_hex (hc)
is_river_hex (hc)
is_river_shallow_hex (hc)
is_rough_hex (hc)
is_scrub_hex (hc)
is_shallow_hex (hc)
is_soft_sand_hex (hc)
is_suburb_hex (hc)
is_swamp_hex (hc)
is_tall_grass_hex (hc)
is_thicket_hex (hc)
is_village_hex (hc)
is_vineyard_hex (hc)
is_wadi_hex (hc)
is_water_hex (hc)
is_wet_paddy_hex (hc)
MAP
on_map (hc)
map_center (x, y)
map_height ()
map_sector (x, y)
map_up ()
map_width ()
map_up_half (x, y)
map_low_half (x, y)
map_left_half (x, y)
map_right_half (x, y)
map_up_left_quadrant (x, y)
map_up_right_quadrant (x, y)
map_low_right_quadrant (x, y)
map_low_left_quadrant (x, y)
map_nw_quadrant (x, y)
map_ne_quadrant (x, y)
map_se_quadrant (x, y)
map_sw_quadrant (x, y)
map_north_half (x, y)
map_south_half (x, y)
map_east_half (x, y)
map_west_half (x, y)
hexcoor (x, y)
x (hc)
y (hc)
map_side (hc)
occupied (hcs, side)
not_occupied (hcs, side)
owned (objectives, side)
not_owned (objectives, side)
hexes_all ()
hex_box (hc_upleft, hc_lowright)
hexes_within (hc, extent)
hex_adjacent (hc, dir)
hex_random (hc, extent)
hexes_nearest (hc, hcs)
hexes_farthest (hc, hcs)
range (from, to)
MESSAGING
_message (title, text)
message (title, text, reveal, phase)
message_once (title, text, reveal, phase)
_note (title, text)
note (title, text, reveal, phase)
note_once (title, text, reveal, phase)
_report (title, text)
report (title, text, reveal, phase)
report_once (title, text, reveal, phase)
log (logfile, loglevel, text)
show_briefing (side)
DEBUGGING
aistop (text)
exestop (text)
trace (event, line)
traceon ()
traceoff ()
LISTS
identical (list1, list2)
equivalent (list1, list2)
join (lists, unique_only)
member (element, list)
members (elements, list)
subset (list1, list2)
member_count (list)
union (list1, list2)
intersection (list1, list2)
difference (list1, list2)
remove (list, elements)
sort (list)
reverse (list)
duplicates (list)
singles (list)
uniques (list)
head (list)
tail (list)
MISC
upper_case (text)
lower_case (text)
ordinal (number)
dieroll (x)
random ()
random_index (l, u)
random_pick (list)
even (x)
odd (x)
round (x)
dir_from (origin, point)
hexdir_from (origin, point)
has_flag (flags, flag)
is_move_tracking ()
move_tracking ()
set_move_tracking ()
unset_move_tracking ()
is_qa_testing ()
qa_testing ()
set_qa_testing ()
unset_qa_testing ()
OBJECTIVES
objective_owner (hc)
objective_points ()
objective_values (hc)
set_objective (hc, values, side)
set_objective_values (hc, values)
REINFORCEMENTS
reinforcement_flags (id)
reinforcement_hex (id)
reinforcement_prob (id)
reinforcement_scatter (id)
reinforcement_turn (id)
reinforcement_x (id)
reinforcement_y (id)
set_reinforcement (id, hc, turn, prob, flags, scatter)
set_reinforcement_flags (id, flags)
set_reinforcement_hex (id, hc)
set_reinforcement_prob (id, prob)
set_reinforcement_scatter (id, scatter)
set_reinforcement_turn (id, turn)
set_reinforcement_x (id, x)
set_reinforcement_y (id, y)
inc_reinforcement_prob (id, increment)
arrived (id)
RELEASES
release_prob (id)
release_turn (id)
released (id)
set_release (id, turn, prob)
set_release_prob (id, prob)
set_release_turn (id, turn)
inc_release_prob (id, increment)
SCENARIO
options ()
set_options (value)
set_option (value)
unset_option (value)
event_points (side)
set_event_points (side, value)
inc_event_points (side, increment)
total_points ()
total_strength (side, onmap_only, verified_only, exclude_killed)
strength (trackids, verified_only)
total_losses (side)
losses (trackids, verified_only)
total_loss_rate (side, onmap_only, verified_only, exclude_killed)
loss_rate (trackids, onmap_only, verified_only, exclude_killed)
total_loss_points (side)
average_morale (side)
morale_shift (nation)
set_morale_shift (nation, value)
inc_morale_shift (nation, increment)
advantage ()
aggressiveness (side)
air_support (side)
ammo_level (side)
arty_ammo_level (side)
set_advantage (value)
set_aggressiveness (side, value)
set_air_support (side, value)
set_ammo_level (side, value)
set_arty_ammo_level (side, value)
inc_advantage (increment)
inc_aggressiveness (side, increment)
inc_air_support (side, increment)
inc_ammo_level (side, increment)
inc_arty_ammo_level (side, increment)
major_defeat ()
major_victory ()
minor_defeat ()
minor_victory ()
set_major_defeat (value)
set_major_victory (value)
set_minor_defeat (value)
set_minor_victory (value)
set_victory (majordefeat, minordefeat, minorvictory, majorvictory)
smoke_ammo (side)
star_shells (side)
set_smoke_ammo (side, value)
set_star_shells (side, value)
inc_smoke_ammo (side, increment)
inc_star_shells (side, increment)
SIDES
is_bocage_side (hc, dir)
is_cliff_side (hc, dir)
is_crest_side (hc, dir)
is_ditch_side (hc, dir)
is_dune_side (hc, dir)
is_embank_side (hc, dir)
is_escarpment_side (hc, dir)
is_ford_side (hc, dir)
is_gully_side (hc, dir)
is_heavy_bridge_side (hc, dir)
is_hedge_side (hc, dir)
is_high_side (hc, dir)
is_light_bridge_side (hc, dir)
is_medium_bridge_side (hc, dir)
is_minor_river_side (hc, dir)
is_path_side (hc, dir)
is_rail_side (hc, dir)
is_reef_side (hc, dir)
is_road_side (hc, dir)
is_stone_side (hc, dir)
is_stream_side (hc, dir)
is_unpaved_side (hc, dir)
UNITS
in_box (trackids, hc_upleft, hc_lowright, verified_only)
within (trackids, hc, extent, verified_only)
in_area (trackids, hcs, verified_only)
not_in_box (trackids, hc_upleft, hc_lowright, verified_only)
not_within (trackids, hc, extent, verified_only)
beyond (trackids, hc, extent, verified_only)
not_in_area (trackids, hcs, verified_only)
units_in_hex (hc)
units_in_hex_count (hc)
units_in_box (hc_upleft, hc_lowright, side, verified_only)
units_in_box_count (hc_upleft, hc_lowright, side, verified_only)
units_within (hc, extent, side, verified_only)
units_within_count (hc, extent, side, verified_only)
units_in_area (hcs, side, verified_only)
units_in_area_count (hcs, side, verified_only)
units_adjacent (hc, side, verified_only)
above (trackids, row, verified_only)
below (trackids, row, verified_only)
left_of (trackids, col, verified_only)
right_of (trackids, col, verified_only)
units_above (row, side, verified_only)
units_below (row, side, verified_only)
units_left_of (col, side, verified_only)
units_right_of (col, side, verified_only)
units_above_count (row, side, verified_only)
units_below_count (row, side, verified_only)
units_left_of_count (col, side, verified_only)
units_right_of_count (col, side, verified_only)
units_extent (trackids, verified_only)
units_nearest (hc, side, verified_only)
units_with_order (trackids, _aiorder)
units_with_orders (trackids, _aiorders)
SCRIPTED AI
at (trackids, hc)
defend_weak (trackids, hc, dir, radius, actprob)
defend_normal (trackids, hc, dir, radius, actprob)
defend_strong (trackids, hc, dir, radius, actprob)
defend_fanatical (trackids, hc, dir, radius, actprob)
move_norush (trackids, hc, dir, radius, actprob)
move_rush (trackids, hc, dir, radius, actprob)
move_recon (trackids, hc, dir, radius, actprob)
move_roam (trackids, hc, dir, radius, actprob)
attack_weak (trackids, hc, dir, radius, actprob)
attack_strong (trackids, hc, dir, radius, actprob)
attack_normal (trackids, hc, dir, radius, actprob)
attack_fanatical (trackids, hc, dir, radius, actprob)
attack_banzai (trackids, hc, dir, radius, actprob)
load (trackids, hc, actprob)
unload (trackids, hc, actprob)
disembark (trackids, hc, dir, actprob)
embark (trackids, hc, dir, actprob)
take_off (trackids, hc, actprob)
land (trackids, hc, actprob)
ascend (trackids, hc, actprob)
ascend_ground (trackids, hc, actprob)
ascend_noe (trackids, hc, actprob)
ascend_low (trackids, hc, actprob)
ascend_high (trackids, hc, actprob)
descend (trackids, hc, actprob)
descend_low (trackids, hc, actprob)
descend_noe (trackids, hc, actprob)
descend_ground (trackids, hc, actprob)
descend_underground (trackids, hc, actprob)
ascend_move (trackids, hc, radius, actprob)
move_descend (trackids, hc, radius, actprob)
exit (trackids, hc, actprob)
dig_in (trackids, hc, actprob)
reconnoiter (trackids, hc, actprob)
build_light_bridge (trackids, hc, dir, actprob)
build_vehicle_bridge (trackids, hc, dir, actprob)
lay_minefield (trackids, hc, actprob)
set_ied (trackids, hc, actprob)
build_barrier (trackids, hc, actprob)
build_block (trackids, hc, actprob)
damage (trackids, hc, dir, actprob)
clear_lz (trackids, hc, actprob)
fire_direct (trackids, hc, dir, radius, actprob)
fire_indirect (trackids, hc, dir, radius, actprob)
fire_special (trackids, hc, dir, radius, actprob)
air_strike (hc, actprob)
assault (trackids, hc, dir, radius, actprob)
withdraw (trackids, hcs, dir, radius, dftype)
hold (trackids, hc, actprob)
halt (trackids, hc, actprob)
unleash (trackids, hc, actprob)
move_way_point (trackids, hcs, dir, radius, actprob)
attack_way_point (trackids, hcs, dir, radius, actprob, attype)
defend_way_point (trackids, hcs, dir, radius, actprob, dftype)
landing (trackids, hc_from, hc_to)
taking_off (trackids, hc_from, hc_to)
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
USER.LUA (all subject to change)
adjust_adaptive_ai (side, nation, parameter, adjustment)
air_mission_fire (trackids, basept, targetpt, proximity, _range, airlevel)
air_mission_gunship_sortie (trackids, entrypt, targetpt, proximity, _range, airlevel)
air_mission_spot (trackids, basept, targetpt, proximity, airlevel)
air_transport_carriers (trackids, loadpt, unloadpt, roundtrip, airlevel)
air_transport_evacuate (trackids, entrypt, loadpt, roundtrip, airlevel)
air_transport_passengers (trackids, loadpt, unloadpt, assemblypt, airlevel)
air_transport_reinforce (trackids, entrypt, unloadpt, roundtrip, airlevel)
attack_nearest (trackids, dir, radius, attype, ground_only, unverified)
attack_nearest_to_hex (trackids, hc, dir, radius, attype, ground_only)
attack_nearest_way_point (trackids, hcs, dir, radius, actprob, attype, ground_only, unverified)
attack_supply (trackids, extent)
column_move (trackids, hc, dir, radius)
company_kill_check (trackid, coys, sides, eps, nations, mshifts)
company_reduce_check (trackid, coys, sides, eps, nations, mshifts, rate)
csee_check (turn, side)
fire_direct_nearest (trackids, ground_only)
fire_indirect_area (trackids, hc, radius, verified_only)
land_transport_carriers (trackids, loadpt, unloadpt, roundtrip)
land_transport_passengers (trackids, loadpt, unloadpt, assemblypt)
losses_dump (turn, side)
luaval_dump (all)
move_air_transport (ptrackids, ctrackids, loadpt, unloadpt, assemblypt, roundtrip, airlevel)
move_land_transport (ptrackids, ctrackids, loadpt, unloadpt, assemblypt, roundtrip)
move_water_transport (ptrackids, ctrackids, embarkpt, loadpt, disembarkpt, unloadpt, assemblypt, roundtrip)
victory_dump (turn, side)
water_transport_carriers (trackids, loadpt, unloadpt, roundtrip)
water_transport_passengers (trackids, embarkpt, loadpt, disembarkpt, unloadpt, assemblypt)
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
That's over 560 different functions. So many tools to work with!