Modding Dawn Of War: Dark Crusade and Soulstorm (Modding Pt 2)

This is part of a series – use the arrows below to scroll back to find out how we got to this stage!

So we have taken the overall population caps off each race. Now, its time to deal with the units and buildings. Let’s use the same methodology as before: find out what the Unlimited Mod changed:


Aha! Under GameData/squad_cap_ext we can see that the squad_cap_usage has been set to zero in the Unlimited Mod. So all we would need to do is set the value to zero for all the units! So go through each individual unit for each and every race in the Titanium Wars mod and set those values to zero! Don’t forget to press save!

Hahaha! As if I would make you go through each individual file. That would be silly. You know what they say: “Sanity- is for the weak!”

Fortunately for us, there is a handy function in Corsix Mod Studio: macro batch scripting! We can tell the software to go through and change the values for us. Right click on the “races” folder in Data/sbps/ and select Run Macro over all the RGD’s in this folder:


You’ll get a window:


The top function runs on each file it goes through, and the bottom one runs at the end when all the files have been processed. Delete everything in the window, and copy and paste the following code into the window:

function each_file(rgd)
print("Current file: " .. rgd.path)
rgd.GameData.squad_cap_ext.squad_cap_usage = 0
rgd.GameData.squad_cap_ext.support_cap_usage = 0

function at_end()

That will go through and change squad_cap_usage and support_cap_usage to zero, and then save the file. At the end it says “Done.” Run the macro and wait for “Done.” to appear. All the values should be updated to say zero. Much easier than manually editing each file!

So we can now have lots of units! Almost. Some units (like the Land Raider) only let you have one of them at a time. Pffft. Tomorrow, I will demonstrate how to take those limits off!

Modding Dawn Of War: Dark Crusade and Soulstorm (Modding Pt 1)
Modding Dawn Of War: Dark Crusade and Soulstorm (Modding Pt 3)

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.