russian armor

25 Pounder Emplacement Modding Guide

Steps Introduction
Many people loved the original CoH 1 25 pounder, but it doesn't exist in CoH 2. Do not worry! It is possible to create it with the current modding tools.

Since this is an advanced guide, you should take a look at the basic tutorials before trying to follow along. You can also have a look at the example created by PlanetSmasher if you are stuck on one of the steps.
Step 1: The Files
The emplacement consists of two entities, a pit and a gun. We will start with the 17 pdr. as the base. Clone the following files and give them a new name.

  • ebps\races\british\buildings\emplacements\brit_17_pounder_gun_mp (referred to as 'gun')
  • ebps\races\british\buildings\emplacements\brit_17_pounder_pit_mp (referred to as 'pit')

These two entities are merged into one squad, therefore clone the next file as well:

  • sbps\races\british\team_weapons\at_gun_17_pounder\brit_17_pounder_at_gun_squad_mp (referred to as 'squad')

The object files are ready, but they need to be referenced to each other.

  • In the pit, point the ebps\construction_ext\on_construction_squad to the new squad.
  • In the squad, point the sbps\loadout_ext to both the pit and the gun.
  • Add the pit to the sbps\squad_engineer_ext of your engineer.

Build the mod and try to construct this emplacement. The unit might die on construction if one of the references is missing. Verify the references above in that case.
Step 2: Remove the 17 pdr. Functionality
The 17 pounder has several actions that we do not need, so these have to be removed.

In the gun:

  • Clear the list in ability_ext\abilities
  • Clear the list in combat_ext\hardpoints
  • Remove moving_ext

In the pit:

  • Clear the requirement_table in requirement_ext

In the squad:

  • Clear the list in sbps\squad_team_weapon_ext\in_setup_action
Step 3: The Models and Crew
Models are set in ebps\entity_blueprint_ext.

  • You may choose a model for the pit, but I recommend the CoH 1 variant since it looks awesome: "armies\common\structures\artillerypit\artillerypit".
  • Set the model of the gun to: "armies\british\weapons\25_pounder\25_pounder".

The gun needs a fixed crew in ebps\crew_ext and there should be 3 roles.

  • role 1: role_name; "Gunner", sync_action_name; "attach_25pounder_gunner"
  • role 2: role_name; "Loader", sync_action_name; "attach_25pounder_loader"
  • role 3: role_name; "Gunner_seated", sync_action_name; "attach_25pounder_gunner_seated"
  • "animator_bp" per role can be everything as long as it is an existing soldier's model.

These roles are now configured, but still need to be activated. Add an "apply_crew_action" for each role (Gunner/Loader/Gunner_Seated) in ebps\action_apply_ext. Then build the mod again and construct this emplacement. The unit should now look like a 25 Pounder.
Step 4: Firing
In the gun:

  • Add combat_ext\hardpoints\1. hardpoint\weapon_table\weapon:

    • "weapon\british\explosive_weapons\heavy_artillery\qf_25lb_disabled_base_mp"

  • And add combat_ext\hardpoints\2. hardpoint\weapon_table\weapon

    • "weapon\british\explosive_weapons\heavy_artillery\qf_25lb_howitzer_he_shell_base_mp"

Also, set ebps\combat_ext\reject_attack_command to true.

Then clone the ability: "abilities\british\modal_ability\artillery\artillery_barrage_ability\qf_25lb_barrage_ability_mp".

Set in abilities\action_list\start_target_actions\artillery_attack\face_to_target to true.

Add this ability in the gun ebps\ability_ext.

Now the gun should be able to fire with all animations!
Step 5: UI
You may customize the look and feel of the unit at two locations:

  • The build texts and icon are located in the pit ebps\ui_ext
  • The text and icons when it is constructed are in the squad sbps\ui_ext

Now your 25 Pounder should be ready to join the battlefield!

1 user is browsing this thread: 1 guest