In this tutorial I shall explain how to change the number of units in your squad and customize it. This time I will be working with a scout marine squad, but the given examples can be used on any army squad which might take your fancy.
First thing you need is an "sbps" file you can edit for your chosen squad, so if you haven't got one yet, extract the "sm_scout_marine.rbf" file from "C:\Program Files\Steam\steamapps\common\dawn of war 2\GameAssets\Archives" with your SGA reader. Now convert to "txt" with your "rbfconv.exe" tool, click on it to access it and scroll down until you bottom out. This section is for the units upgrades:
squad_upgrade_ext
| squad_upgrade_ext: {
| | $REF: "squad_extensions\squad_upgrade_ext";
| | defaults: {
| | };
| | upgrades: {
| | | upgrade: "upgrade\pvp\race_marine\troops\sm_shotgun1";
| | | upgrade: "upgrade\pvp\race_marine\troops\sm_plasma_gun1";
| | | upgrade: "upgrade\pvp\race_marine\troops\sm_sniper_rifle1";
| | | upgrade: "upgrade\pvp\race_marine\troops\sm_scout_squad_sergeant";
If you compare your original document with my edited one, you will probably realize I have added new wargear to the thread (sm_plasma_gun1) and changed the extension for each weapon. The scout marine squad comes with two default weapon upgrades (shotgun and sniper_rifle), but you can actually add weapons of your choice if you know how to do it. The idea now is you copy my spoiler and paste it onto your original document. At this point you need to make sure the thread isn't broken and that you don't add any character of your own to it.
Now you have a new weapon allocated to your squad, but the job isn't over yet. After doing this, you need to tell the engine where to place in-game icons or else your plasma gun will be placed in the sniper rifle's slot, therefore depriving you from taking benefit from this upgrade as well. To be able to do this you will need a copy of the "sm_plasma_gun" file you have already allocated to your scout marine squad + a copy of the other two default ones. Now convert to "txt".
button_index
-- Made by Corsix's Crude RBF Convertor
{
| upgrade_bag: {
| | actions: {
| | | equip_wargear_action: {
| | | | $REF: "actions\upgrade\equip_wargear_action";
| | | | wargear: "wargear\wargear\pvp\race_marine\sm_wp1_plasma_gun";
| | | };
| | };
| | global_max_limit: 0;
| | local_max_limit: 1;
| | multiplayer_usage: {
| | | $REF: "upgrade_mp_squad";
| | | button_index: 12;
The only difference in between your document and mine is the "12" allocated to the "button_index" line. Yours has a "9" in it whereas mine has a "12", so change its value and make your document look the same as mine. Just to learn how the index system works, it would be advisable you try with different indexes and see how the engine reacts to it. If you , for example, give a value of "4" to the index line, your allocated weapon of choice will still appear in-game, but it is going to display out of the upgrade's box.
As for "5", it would appear right next to your Cyrus icon and so on (Cyrus is "6").
At this point you need to edit the squad's upgrades for your weapon of choice if you are to relate them with the other two default weapons your scout marine has been rigged up with by Relic Entertainment. Scroll down from where you are now.
plasma_gun
| | owner_type: "self";
| | requirements: {
| | | required_player_upgrade: {
| | | | $REF: "requirements\required_player_upgrade";
| | | | is_present: true;
| | | | max_completed: 2147483647;
| | | | min_completed: 1;
| | | | only_check_in_progress: false;
| | | | reason: "usage";
| | | | ui_name: 9108085;
| | | | upgrade_name: "upgrade\pvp\race_marine\research\tier_2";
| | | };
| | | required_squad_upgrade: {
| | | | $REF: "requirements\required_squad_upgrade";
| | | | is_present: false;
| | | | max_completed: 1;
| | | | min_completed: 1;
| | | | only_check_in_progress: false;
| | | | reason: "display_and_usage_and_produce";
| | | | ui_name: 9104276;
| | | | upgrade_name: "upgrade\pvp\race_marine\troops\sm_sniper_rifle1";
| | | };
| | | required_squad_upgrade: {
| | | | $REF: "requirements\required_squad_upgrade";
| | | | is_present: false;
| | | | max_completed: 1;
| | | | min_completed: 1;
| | | | only_check_in_progress: false;
| | | | reason: "display_and_usage_and_produce";
| | | | ui_name: 9089078;
| | | | upgrade_name: "upgrade\pvp\race_marine\troops\sm_shotgun1";
and make this section of your document look the same as mine. Now do the same with both your "shotgun" and "sniper_rifle" files, so that all files do relate with each other.
sniper_rifle
| | owner_type: "self";
| | requirements: {
| | | required_player_upgrade: {
| | | | $REF: "requirements\required_player_upgrade";
| | | | is_present: true;
| | | | max_completed: 2147483647;
| | | | min_completed: 1;
| | | | only_check_in_progress: false;
| | | | reason: "usage";
| | | | ui_name: 9108083;
| | | | upgrade_name: "upgrade\pvp\race_marine\research\tier_2";
| | | };
| | | required_squad_upgrade: {
| | | | $REF: "requirements\required_squad_upgrade";
| | | | is_present: false;
| | | | max_completed: 1;
| | | | min_completed: 1;
| | | | only_check_in_progress: false;
| | | | reason: "display_and_usage_and_produce";
| | | | ui_name: 9089078;
| | | | upgrade_name: "upgrade\pvp\race_marine\troops\sm_shotgun1";
| | | };
| | | required_squad_upgrade: {
| | | | $REF: "requirements\required_squad_upgrade";
| | | | is_present: false;
| | | | max_completed: 1;
| | | | min_completed: 1;
| | | | only_check_in_progress: false;
| | | | reason: "display_and_usage_and_produce";
| | | | ui_name: 0;
| | | | upgrade_name: "upgrade\pvp\race_marine\troops\sm_plasma_gun1";
shotgun
| | owner_type: "self";
| | requirements: {
| | | required_squad_upgrade: {
| | | | $REF: "requirements\required_squad_upgrade";
| | | | is_present: false;
| | | | max_completed: 1;
| | | | min_completed: 1;
| | | | only_check_in_progress: false;
| | | | reason: "display_and_usage_and_produce";
| | | | ui_name: 9104276;
| | | | upgrade_name: "upgrade\pvp\race_marine\troops\sm_sniper_rifle1";
| | | };
| | | required_squad_upgrade: {
| | | | $REF: "requirements\required_squad_upgrade";
| | | | is_present: false;
| | | | max_completed: 1;
| | | | min_completed: 1;
| | | | only_check_in_progress: false;
| | | | reason: "display_and_usage_and_produce";
| | | | ui_name: 0;
| | | | upgrade_name: "upgrade\pvp\race_marine\troops\sm_plasma_gun1";
You are very likely to wonder yourself why is it the shotgun file hasn't got the same player_upgrade section as the other two (sniper_rifle and plasma_gun). The reason for this is quite simple. As the shotgun is your unit's default upgrade weapon it does not require any upgrading whatsoever, so it is pointless to add this line. Leave this command empty if you want your weapon of choice to be available at hand as you start a new skirmish game. "Tier_1" stands for "building_upgrade1" whereas "tier_2" stands for "building_upgrade2", so be clear as to what you want in this sense and edit accordingly.
If you want to change the number of units in your squad click on your "sm_scout_marine" txt file and change the unit's loadout from "3" to whatever you like. As the scout marine squad comes with a marine sergeant upgrade as default, you don't need to do anything in this respect. As for other units, look for "upgrade\pvp\race_marine\troops" to find a suitable sergeant upgrade for your squad.
scout_marine_loadout_ext
| | | squad_loadout_unit_entry: {
| | | | $REF: "squad_loadout_unit_entry";
| | | | max: 3;
| | | | num: 3;
| | | | type: "ebps\pvp\race_marine\troops\sm_scout_marine";
scout_marine_sergeant
| squad_upgrade_ext: {
| | $REF: "squad_extensions\squad_upgrade_ext";
| | defaults: {
| | };
| | upgrades: {
| | | upgrade: "upgrade\pvp\race_marine\troops\sm_shotgun1";
| | | upgrade: "upgrade\pvp\race_marine\troops\sm_plasma_gun1";
| | | upgrade: "upgrade\pvp\race_marine\troops\sm_sniper_rifle1";
| | | upgrade: "upgrade\pvp\race_marine\troops\sm_scout_squad_sergeant";
plasma_cannon_sergeant
| squad_upgrade_ext: {
| | $REF: "squad_extensions\squad_upgrade_ext";
| | defaults: {
| | };
| | upgrades: {
| | | upgrade: "upgrade\pvp\race_marine\troops\sm_tactical_squad_sergeant";
| | };
| };
| squad_wargear_ext: {
| | $REF: "squad_extensions\squad_wargear_ext";
| | default_wargear: {
| | | wargear: "wargear\wargear\pvp\race_marine\sm_wp1_plasma_cannon";
Now it is time to add "1" to every file's name for your weapon of choice (sm_plasma_gun1, etc.) so that your DoW2 engine will be able to locate and upload them correctly into the game. Cut and paste in the right place (C:\Program Files\Steam\steamapps\common\dawn of war 2\your_mod\Attrib\simulation\attrib\upgrade\pvp\race_marine\troops) and create those folders if they don't exist. If you have followed my instructions correctly, you'll get this in-game:
As you can see in this pick I have further customized my scout marine squad with a few stealth cloaks. You can achieve this by adding new units to your "sm_scout_marine" file or whatever the "sbps" file you might be editing. You won't find these models in the "ebps" folder, but you can still borrow stuff from other modders insofar you don't mean to upload or you ask for permission to do it (it would be most unfair not to credit the modder for his creation).
squad_loadout_ext
| squad_loadout_ext: {
| | $REF: "squad_extensions\squad_loadout_ext";
| | max_leaders: 0;
| | squad_type: "scout_marine";
| | terminator_mode_sbp: "";
| | unit_list: {
| | | squad_loadout_unit_entry: {
| | | | $REF: "squad_loadout_unit_entry";
| | | | max: 3;
| | | | num: 3;
| | | | type: "ebps\pvp\race_marine\troops\sm_scout_marine";
| | | };
| | | squad_loadout_unit_entry: {
| | | | $REF: "squad_loadout_unit_entry";
| | | | max: 1;
| | | | num: 1;
| | | | type: "ebps\pvp\race_marine\troops\sm_scout_marine2";
| | | };
| | | squad_loadout_unit_entry: {
| | | | $REF: "squad_loadout_unit_entry";
| | | | max: 1;
| | | | num: 1;
| | | | type: "ebps\pvp\race_marine\troops\sm_scout_marine3";
What I have done here is to assign different indexes to the "type" command line, so that the engine will be able to tell them appart from the default "sm_scout_marine" file. These files I did borrow from the "Epic_wargear_mod" "ebps" folder, but, like I'm saying, you can borrow anything you like if you know where to look for. Just don't be weary of asking for permission or crediting in the read_me file: It's just for the records, really, and it is always desirable to play clean. To achieve this, just find some suitable "sbps" file, convert to "rbs" and edit it to suit best your personal taste. Plese do note that you will need to back up your "sbps" file with some "ebps" counterparts for the mod to work properly. And don't forget to rename your file so that it matches with the edited file's command line.