Your First Mod

Let’s start by changing something small: we will do some changes to Algeria. As it is a weak nation, it can use some tweaking.
 
Locate the algir.nds file in the extracted folder ( GSC Utility ).
If you havent extracted the ALL.GSC file, then first read the subpage on the use of the GSC UTILITY
For information about the NDS file, read the subpage NDS File Information
 
In short:
The [MEMBERS] list shows which units are enabled at the start of the game for that nation ( or which can be build later on in game)
The left column you can name any way you like, as long as you keep the ( AL) (for Algeria) in its place. The right column is where it will gets its information from. It calls for the unit in the specific .md file. For example Turbed (Turkish Bedouin) gets its name from the TURBED.md file
 

The [Fixed Produce] shows which unit can build what. For example the Krestian_Turki(AL) (peasant) can build 17 things and then the list of those things follows. For example it can build a Center_Algier(AL). Obviously the Algerian townhall. The numbers refer to the position of the icon where it will show up in the peasants build menu. So row 2 column 2. The H Refers to the category the building belongs to.

Then a bit lower you find the Center_Algier back  and it shows it can build one unit: the Krestian_Turki ( peasant), again the numbers refer to the location of the icon, only this time in the townhall. So the list continues…
 

The [ENABLED] section shows which units are enable at the beginning of the game without further requirements.

 

So with these three entries you can do a lot of things already. For example lets add some units. For example the pandur_Avstria(AL)

 
Let’s say you want to add this one, you first need to look up this name or which .md file it is in to find its name to call for: look in mdlist.txt to see which unit has which md file.
Then go to that md file. Copy it’s NAME and go the .nds file.
Add it there under [MEMBERS] like this:
 

pandur_Avstria(AL) pandur_Avstria

 

Then go to [FIXED_PRODUCE].
Add the pandur_Avstria(AL) here as well to specify in which building it can be produced. In this case you can use the Barack_Turki. Make sure you change the 5 into 6 
Then add the line Pandur_Avstria(AL) and in the line of Pandur_Avstria(AL) add the numbers 3 0 R to get it in the empty spot of the Algerian barracks, between the archer and the drummer.
 
Then go to [ENABLED]. Add the unit there as well.
 

Time to see if it works. Save changes and add the file to your newly modded folder on your desktop.

Now select the GSC UTILITY. Click on File Generation. Filename: patch01.gs1
Drag and drop the Algir.NDS in the gsc utility.
Press Generate.
When completed find your patch (mod) in the “generated folder” of your gsc utility folder.
Copy it and paste it in your copy ( test) main directory of cossacks back to war. Copy and Paste - Replace if asked with newest(latest) version.
Run dmcr.exe.
Random map, take Algeria and build a barrack, it should have the pandur in it. If you make an error, the game will tell you so in which file, line you made the error and what it is.
 
 
Gratz, your first mod has been made.
 

Lets try a few more things out.
 
For example if you want the COM_CEN ( the originals command center ) to be able to be build by the Algerian peasant , you have to add it to [MEMBERS] section, then to under [FIXED_PRODUCE] under the krestian_Turki ( peasant)
 
I placed it in position 7 2 of the peasants building Menu. Since it will act as a barrack I added the category B.
Other things like if you want the COM_CEN to have a rally point, put it under [CANSETDEST]
If you want to limit the command center to only one per nation go to [UNITLOCK].
 
 
Other buildings you could try to add which are already present in the game are the Dom_Mega, the BGAUZ( blockhouse) and the SUNDUK1o ( chest) ( From the Originals).
Again with specs on where to appear in the peasants building menu.
Then go to enabled section. This means that they will be allowed to be build from the start of the game without any further requirements.
Pretty self-explaining.
 
This picture shows the Dom-Mega ( large house) from the originals being able to be build by Algerian peasants. I made it so that its expensive 10 000 wood and stone, but has larger housing space. This to enable turkey to have a larger army then +-3000 compared to other 18th nations who have easily up to 4000 or 5000 living spaces.
 
 
This picture shows the blockhouses being built but the build stages are not there cause it lacks the gp frames for it.
 
 
 

I'm sure you already get the hang of it, but lets see what else can be done.
 
Lets have a look at the upgrades:
 
I have relocated some of the academy upgrades to take place in the mill and storehouse for example. So let’s take a look at the wood upgrade.
Under [UPGRADE] section it shows AKA08AL, this is the name for inside the nds file. The A8 means the icon, position again refers to the position in the build menu. Then further costs and time are self explanatory and the effect_wood 300. Let’s say we want to put this upgrade in the storehouse. Go to [UPGRADE PLACE] and take it away from academy and place it under storehouse: sklad4(AL) ( add it if needed). And make sure that the position in [UPGRADE] section is correct to correspond with the storehouse .
 
A new upgrade based on an old one:
 
I copied the AKA08AL and made a new line with it, AKA40AL, but with same specs as AKA08AL, so  it will use same icon, but I gave it level 2 upgrade, so II will appear on the icon ingame.
Then place the upgrade in the storehouse aswell on position 0 1
Then you need to enable that upgrade under [UPGRADEENABLE]
Or If you want this upgrade only to be available after blacksmith has been build then put it under ACCESSCONTROL referring to the blacksmith (kuznia_turki)
 
This picture shows the upgrades in the storehouse:
 

 
So what else can we try out? 
 
Some market price changes perhaps (higher value gold stone, trickle rate goes faster for stone ( restore level of price), , for those interested:
As you can see in the economy.txt file you can change market prices. But aswell how fast the restoring of the price goes. I changed the one for stone to 0.0005, slightly faster than other resources and it already has a huge impact ( this was just to show you how to, but i suggest you dont mess around with the market to much unless you got a clear idea what you want to achieve with the changes. The market can completely ruin the game if messed up.)
 
 

 
Perhaps you like map editing and you always wanted to make some nice fields instead of the original small fields, perhaps even allowing a peasant to build a farm without the mill.

So what do you do?

You locate the nds. File for the nation you want to enable this feature for, we will take algir.nds
Next you need to know what name the field has ( .md ) file so you use the proper name and icon in the game for the field.
So go to extracted files and locate the FIELD.MD
Now that you have located the files and the correct names ( FIELD1) and its icon ( POLE)
Time to change the .nds file
Make sure the field is enabled ( which it should be by default) under [MEMBERS]
Then next allow it to be build by peasants:
Add one item to the 17 already possible( so 18)
Next add it under peasant and I gave it position 8 0 in the peasant build menu
Next is to allow this one in the editor menu
Scroll down to [COUNTRY]
Add +1 item ( so 44 items to be able to be build)
And add the field itself, just at the bottom
Then save the file and copy it to your modfolder 
Next run the gsc utility to create the patch/mod
Select file generator, and drag and drop the file in the utility, run the generation process, and find your patch in your generated folder
Copy it and paste it in your cossacks back to war back up folder to test
Run dmcr. Test in  map editor to see if it’s there and if you can place it.
 
 

If you wanna see more examples and test have a look at the subpage Tests & Tryouts