Going by past experience, I've decided to start a question and answers thread for the CoH modding section as well.
Everything will be the same as the old one, I will answer any questions I can and update this post with new functions as time passes.
Here are a few new ones I've found (with a couple of older ones as well).
EDIT: First update already in, added a weapon section and a few other things.Code:-- Here is a compilation of different lua functions used in CoH dug out for people at the Relicnews forum -- Each entry will contain a small description of what it does and everything will be sorted by what type of file they will be in (ability, ebps etc) ---------------------------- Ability --------------------------- -- Sets actions for use when ability is activated (end_self_actions, end_target_actions and start_self_actions may replace start_target_actions) GameData["ability_bag"]["action_list"]["start_target_actions"]["action_01"] = Reference([[action\ability_action\name_of_action.lua]]) GameData["ability_bag"]["action_list"]["start_target_actions"]["action_01"]["minimum_pop_used"] = n GameData["ability_bag"]["action_list"]["start_target_actions"]["action_01"]["points_total"] = n GameData["ability_bag"]["action_list"]["start_target_actions"]["action_01"]["squad_table"]["squad_01"] = [[sbps\races\axis\vehicles\tiger_ace_squad.lua]] -- Sets how ability is activated after pressing the button (timed, targeted, always on, toggled) GameData["ability_bag"]["activation"] = timed etc -- Sets if ability can be targeted in FOW GameData["ability_bag"]["can_target_in_fow"] = true\false -- Sets cost of ability (action, command, fuel, manpower, munition) GameData["ability_bag"]["cost"]["name_of_cost_type"] = n -- Sets time (in seconds) for the ability to be activated GameData["ability_bag"]["duration"] = n -- Sets how long entity is busy and can't do anything else GameData["ability_bag"]["entity_busy_time"] = n -- Sets whether or not recharge is global or not (ie, one use, then no other unit with the ability can use it before recharged) GameData["ability_bag"]["global_recharge"] = true\false -- Sets how long the delay from when you activate the ability to when the ability takes effect GameData["ability_bag"]["initial_delay_time"] = n -- Sets whether or not the ability has to recharge when unit is built GameData["ability_bag"]["initial_recharge"] = true\false -- Sets the range of the ability GameData["ability_bag"]["range"] = n -- Sets if the ability ignores range GameData["ability_bag"]["range_ignore"] = true\false -- Sets recharge time in seconds GameData["ability_bag"]["recharge_time"] = n -- Sets which entities in the squad that casts the ability (all_entities, squad, one_entity, may be more, but that's all I found right now) GameData["ability_bag"]["squad_caster"] = who is casting ---------------------------- Ebps ---------------------------- -- Sets which construction menu a building will appear in (may have several entries) GameData["construction_ext"]["construction_menus"]["construction_menu_entry_0x"]["construction_type"] = "name of construction menu" -- Sets the max number of engineers\pioneers that may work on a single building at any given time GameData["construction_ext"]["max_engineers"] = n -- Sets whether or not building have to be in owners territory to be built GameData["construction_ext"]["must_be_in_command_territory"] = true\false -- Sets whether or not building have to be in LOS of friendly units to be built (when you select building spot on map) GameData["construction_ext"]["must_be_in_line_of_sight"] = true\false -- Sets whether or not building must be in a territory that's in supply when built GameData["construction_ext"]["must_be_in_supply"] = true\false -- I think this one sets that you recieve a squad upon completed construction GameData["construction_ext"]["on_construction_squad"] = "squad_name" -- Sets cost for the unit (note that the actual cost is this one multiplied by the number of starting squad members as you have to pay for each member) GameData["cost_ext"]["time_cost"]["name_of_cost_type"] = n -- Upkeep, I think this is how much is deducted from your income per squadmember GameData["cost_ext"]["upkeep"]["name_of_cost_type"] = n -- This allows units to build buildings GameData["engineer_ext"] = Reference([[ebpextensions/engineer_ext.lua]]) -- Sets construction speed (1 is default speed) GameData["engineer_ext"][construction_rate_multiplier"] = n -- This is used to show units even in fow (unknown whether unit has to be spotted by player first or not) GameData["entity_blueprint_ext"]["always_revealed_in_fow"] = true\false -- This decides which model to use for any given unit GameData["entity_blueprint_ext"]["animator"] = "races/allies/soldiers/paratrooper" -- Enables engineers to repair unit GameData["health_ext"]["can_repair"] = true\false -- Hitpoints, quite selfexplanatory GameData["health_ext"]["hitpoints"] = n -- Makes a unit invincible GameData["health_ext"]["is_invincible"] = true\false -- Sets regeneration speed and a disabling option (I think it is measured in hitpoints per second GameData["health_ext"]["regeneration"] = n GameData["health_ext"]["regeneration_disabled"] = true\false -- Sets how big the box blocking LOS for other units is GameData["line_of_sight_ext"]["blocking_box"]["x"] = n GameData["line_of_sight_ext"]["blocking_box"]["y"] = n GameData["line_of_sight_ext"]["blocking_box"]["z"] = n -- Sets a buildings blocking box to block shots as well GameData["line_of_sight_ext"]["is_shot_blocking"] = true\false -- Decides whether or not to use aforementioned LOS blocking box GameData["line_of_sight_ext"]["use_blocking_box"] = true\false -- Allows unit to paradrop GameData["paradrop_ext"] = Reference([[ebpextensions/paradrop_ext.lua]]) -- Sets paradrop speed GameData["paradrop_ext"]["drop_speed"] = n -- Sets time from landing to being ready for combat GameData["paradrop_ext"]["land_seconds"] = n -- Funny one, kills unit on drop GameData["paradrop_ext"]["make_dead_on_drop"] = true\false -- Sets what kind of and how much of the different pop types the unit uses GameData["population_ext"]["medic_pop"] = n GameData["population_ext"]["personell_pop"] = n GameData["population_ext"]["vehicle_pop"] = n -- Sets time until FOW comes after unit is killed (time in seconds) GameData["sight_ext"]["reveal_area_on_death_time"] = n -- Sets types of sight range GameData["sight_ext"]["sight_package"]["inner_height"] = n GameData["sight_ext"]["sight_package"]["inner_range"] = n GameData["sight_ext"]["sight_package"]["outer_height"] = n GameData["sight_ext"]["sight_package"]["outer_range"] = n -- Sets which units can be built from this building along with a few requirements and other stuff GameData["spawner_ext"]["fx_rally_point"] = "UI/rally_point_allies" GameData["spawner_ext"]["must_be_in_supply"] = true\false GameData["spawner_ext"]["reinforce_radius"] = n GameData["spawner_ext"]["spawn_at_map_entry_point"] = true\false GameData["spawner_ext"]["squad_table"]["squad_0x"] = "sbps\races\allies\soldiers\rifleman_squad.lua" -- Sets whether or not unit creates or secures a territory sector GameData["territory_ext"]["creates_territory_sector"] = true\false GameData["territory_ext"]["default_on"] = true\false -- unsure what exactly this one does GameData["territory_ext"]["secures_territory_sector"] = true\false ----------------------- Requirements ------------------------- -- Following commands should be put in after ["requirements"] -- Allows you to put in "either", "and" or "or" arguments into requirements by using several requirement tables (Example from tiger ace file) ["required_n"] = Reference([[requirements\required_binary_expr.lua]]) ["required_n"]["operation"] = [[and]] ["required_n"]["reason"] = [[usage_and_display]] ["required_n"]["requirement_table_1"]["required_1"] = Reference([[requirements\requirement_1.lua]]) ["required_n"]["requirement_table_1"]["required_1"]["upgrade_name"] = [[upgrade\axis_propaganda_02.lua]] ["required_n"]["requirement_table_2"]["required_1"] = Reference([[requirements\required_entity.lua]]) ["required_n"]["requirement_table_2"]["required_1"]["entity_type"] = [[grant_abilities]] ["required_n"] = Reference([[requirements\required_cap.lua]]) ["required_n"]["max_cap"] = n ["required_n"]["reason"] = text -- unknown whether or not this has any actual effect ["required_n"]["ui_name"] = "ucs" ["required_n"] = Reference([[requirements\required_entity.lua]]) ["required_n"]["entity_blueprint_name"] = [[ebps\races\...]] ["required_n"]["entity_type"] = ["required_n"]["reason"] = text -- unknown whether or not this has any actual effect ["required_n"]["ui_name"] = "ucs" -- Makes a certain squad required for allowing ability to be cast (example from tiger ace file) ["required_n"] = Reference([[requirements\required_squad.lua]]) ["required_n"]["squad_name"] = [[sbps\races\axis\vehicles\tiger_ace_squad.lua]] ["required_n"]["ui_name"] = "ucs" --------------------------- Sbps ----------------------------- -- Sets the abilities a squad may use GameData["squad_ability_bag"]["abilities"][ability_n"] = name_of_ability -- Sets if a unit may pick up items and how many may be picked up GameData["squad_item_slot_ext"]["can_pick_up"] = true\false GameData["squad_item_slot_ext"]["num_slots"] = n -- Sets what kind of units is deployed, total amount of each type and max amount of each type (this should open for medics and engineers to be fielded in the same squad as riflemen or rangers) GameData["squad_loadout_ext"]["unit_list"][unit_01"]["max"] = n GameData["squad_loadout_ext"]["unit_list"][unit_01"]["num"] = n GameData["squad_loadout_ext"]["unit_list"][unit_01"]["type"] = "ebps\races\allies\soldiers\airborne_infantry.lua" -- Sets time percentage and cost percentage of reinforcing (1 is 100%) GameData["squad_reinforce_ext"]["time_cost_percentage"]["cost_percentage"] = n GameData["squad_reinforce_ext"]["time_cost_percentage"]["time_percentage"] = n -- Sets name of upgrades for the squad GameData["squad_upgrade_ext"][upgrades"]["upgrade_01"] = "upgrade\allies\items\allies_paratrooper_anti_tank_ package.lua" --------------------------- Weapons --------------------------- -- Sets whether or not a weapon can use burst GameData["weapon_bag"]["burst"]["can_burst"] = true\false -- Sets the duration of the burst GameData["weapon_bag"]["burst"]["duration"] = n -- Sets max\min damage GameData["weapon_bag"]["damage"]["max"] = n GameData["weapon_bag"]["damage"]["min"] = n -- Sets the damage a bullet does if deflected and whether or not bullet does damage if deflected GameData["weapon_bag"]["deflection"]["deflection_damage_multiplier"] = n GameData["weapon_bag"]["deflection"]["has_deflection_damage"] = true\false -- Sets penalties while moving GameData["weapon_bag"]["moving"]["accuracy_multiplier"] = n GameData["weapon_bag"]["moving"]["burst_multiplier"] = n GameData["weapon_bag"]["moving"]["cooldown_multiplier"] = n GameData["weapon_bag"]["moving"]["disable_moving_firing"] = true\false -- Sets the name of the weapon GameData["weapon_bag"]["name"] = Name of gun -- sets max and min ranges, along with distant, long, medium and short range GameData["weapon_bag"]["range"]["max"] = n GameData["weapon_bag"]["range"]["mid"]["distant"] = n GameData["weapon_bag"]["range"]["mid"]["long"] = n GameData["weapon_bag"]["range"]["mid"]["medium"] = n GameData["weapon_bag"]["range"]["mid"]["short"] = n -- Sets duration and frequency of reload GameData["weapon_bag"]["reload"]["duration"]["max"] = n GameData["weapon_bag"]["reload"]["duration"]["min"] = n GameData["weapon_bag"]["reload"]["frequency"]["max"] = n GameData["weapon_bag"]["reload"]["frequency"]["min"] = n -- Sets whether or not to show a bar for progress on reload GameData["weapon_bag"]["reload_bar"] = true\false -- Sets different modifiers for targets if pinned by weapon GameData["weapon_bag"]["suppression"]["target_pinned_multipliers"]["accuracy_multiplier"] = n GameData["weapon_bag"]["suppression"]["target_pinned_multipliers"]["damage_multiplier"] = n GameData["weapon_bag"]["suppression"]["target_pinned_multipliers"]["suppression_multiplier"] = n Explanation of terms: n = number name_of_cost_type = insert the name of cost type here, for example munition or manpower name_of_ability = insert name of ability here in this form: abilities\name_of_ability.lua ucs = number from ucs file That is all for now.
EDIT2: Fixed the ability commands to reflect the new version of the modtools
If you need any help with things that are not listed above, please ask. Also feel free to pm me if the problem is with units that you'd rather not show to the general public.
And anyone is free to help as well if I should not reply in a timely manner.





