Page 1 of 1

help - how to generate leaders

Posted: Sun Feb 17, 2008 2:17 am
by Arnaud_Bouis
I am trying to generate the files necessary for the game to work with new leader data. I have a modified xls file containing the leaders, which I have saved to CSV format.

Does anyone know what files I must generate with CSVSplitter, in what order, and how ?

Thanks.

Posted: Sun Feb 17, 2008 11:00 am
by Primasprit
Hi!

Very important for the csv files is that the field delimiter is a semicolon and there is no text delimiter. Before you start it might be a good idea to create a backup of your game directory. So you can revert all changes if something goes wrong.

Creating the model files:
  1. Open the csv splitter.
  2. Select the first tab: Convert Data
  3. Select as Output ext. the file extension mdl. For the other fields the default values are good.
  4. Select as Input CSV file your csv file containing the model data
  5. Select Convert. This may take a few moments. The csv-splitter creates now from the models csv file the single model files.
  6. Delete all files in the game directory
    Napoleon's Campaigns\NCP\GameData\Models\
  7. Copy all files with the extension mdl to the game directory
    Napoleon's Campaigns\NCP\GameData\Models\
  8. Copy the file mdl_Alias.ini (which was also created by the csv splitter) to the game directory \Napoleon's Campaigns\NCP\Aliases\


The process to create the unit files is similar. Choose in the csv-splitter as file extension uni. Copy the unit files to
\Napoleon's Campaigns\NCP\GameData\Units\ and the alias file to
\Napoleon's Campaigns\NCP\Aliases\

Cheers
Norbert

Posted: Mon Feb 18, 2008 7:29 am
by Arnaud_Bouis
Primasprit wrote:Hi!

Very important for the csv files is that the field delimiter is a semicolon and there is no text delimiter. Before you start it might be a good idea to create a backup of your game directory. So you can revert all changes if something goes wrong.

Creating the model files:
  1. Open the csv splitter.
  2. Select the first tab: Convert Data
  3. Select as Output ext. the file extension mdl. For the other fields the default values are good.
  4. Select as Input CSV file your csv file containing the model data
  5. Select Convert. This may take a few moments. The csv-splitter creates now from the models csv file the single model files.
  6. Delete all files in the game directory
    Napoleon's Campaigns\NCP\GameData\Models\
  7. Copy all files with the extension mdl to the game directory
    Napoleon's Campaigns\NCP\GameData\Models\
  8. Copy the file mdl_Alias.ini (which was also created by the csv splitter) to the game directory \Napoleon's Campaigns\NCP\Aliases\

The process to create the unit files is similar. Choose in the csv-splitter as file extension uni. Copy the unit files to
\Napoleon's Campaigns\NCP\GameData\Units\ and the alias file to
\Napoleon's Campaigns\NCP\Aliases\

Cheers
Norbert


Thanks a lot Norbert.

I think that this is exactly what I did. But this produced .uni files which have values a bit different from those expected by the game (some $variable values being replaced by character strings), and this produces loads of errors when running the game.

I guess there must be some data transformation to do on the xls leader/unit file BEFORE saving it to CSV format. But I don't know what exactly.
I'll try again tonight.

Thanks for your kind help.

Posted: Mon Feb 18, 2008 9:45 am
by Primasprit
If you have still problems you can send me the files (xls and csv) to primasprit@gmx.de and I will check them for you.

Cheers
Norbert

Posted: Mon Feb 18, 2008 12:08 pm
by Pocus
Be sure to have all the cells filled, with a NULL at least.

Also it is better to remove all columns with a ยง before doing the CSV version, they are just for comments but will shift and screw your export if you don't do that.

Posted: Wed Feb 20, 2008 6:25 pm
by Arnaud_Bouis
I'm still struggling, but it seems that with all the above information I am making good progress.

Thanks Primasprit and Pocus !

I now seem mostly to have errors because of hundreds of missing values in the CbtSignature column.

Posted: Thu Feb 21, 2008 11:19 am
by Pocus
you should NEVER have an empty column. By default, put a NULL into it, otherwise all the data after are shifted.