CSV tutorial

By Rob

 

The way in which CSV's work are to direct the game to read the names of a selected unit or action from within.. All CSV's are made with Microsoft excel and are very simple to use. You can look at an example csv file here

 

As you can see this CSV file was made with the bmp2 addon. Inside the config.cpp file of the addon, it sets out to look for the name needed by the game. If the game needs to know the name of the unit and is told to look elsewhere, eg the csv file then it should read something like this in the addon:-

display name="$STR_DN_BMP2"

This forces the game to search for the name in the csv file... Take another look and you shall see that the files first name is "bmp2"

The action is under a sub heading called "language". This is because the people that make missions or addons for the game can also give the names of the new actions or units by specifying the language. Take another look and you shall see that there are other countries. This is because depending on which language the game is currently configured to will choose the appropriate names... For us though it would be english, so look under the english heading and you shall see that the name that is returning is BMP2.

CSV files are used for many uses, such as addons, missions, sounds, new islands and editors etc. So as you can see these files can be very important.

 

For an example before the end of this tutorial I shall show you a quick example of a quick CSV file....

 

example!

ok pretend that you are making a addon. You have just specified all of the information and you know its working.

But you want to use a csv file instead. Ok pretend we were making an mp5. You find where the display name of the weapon is and you add $STR_DN_mp5 instead of "mp5". The game would automatically be directed to the csv file you would make. Here is what the csv file would look like.

That about wraps it up... as you can see CSV files must be simple otherwise this tut wouldn't be so small.

I personally dont use csv files. i tend to have more control just adding the appropriate names in straight away.