Arnaud_Bouis
Sergeant
Posts: 96
Joined: Tue Jan 22, 2008 2:51 pm

help - how to generate leaders

Sun Feb 17, 2008 2:17 am

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.

User avatar
Primasprit
Posts: 1614
Joined: Mon Jun 19, 2006 7:44 pm
Location: Germany

Sun Feb 17, 2008 11:00 am

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

Arnaud_Bouis
Sergeant
Posts: 96
Joined: Tue Jan 22, 2008 2:51 pm

Mon Feb 18, 2008 7:29 am

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.

User avatar
Primasprit
Posts: 1614
Joined: Mon Jun 19, 2006 7:44 pm
Location: Germany

Mon Feb 18, 2008 9:45 am

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

User avatar
Pocus
Posts: 25669
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Mon Feb 18, 2008 12:08 pm

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.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

Arnaud_Bouis
Sergeant
Posts: 96
Joined: Tue Jan 22, 2008 2:51 pm

Wed Feb 20, 2008 6:25 pm

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.

User avatar
Pocus
Posts: 25669
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Thu Feb 21, 2008 11:19 am

you should NEVER have an empty column. By default, put a NULL into it, otherwise all the data after are shifted.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

Return to “NCP Mods”

Who is online

Users browsing this forum: No registered users and 5 guests