This is, hopefully, the final version. This program can convert many of CTP2's Database file to CSV format and back.
Readme:
Download here: http://apolyton.net/directory/jump/c-utilities-54/5360
Readme:
DB<->CSV is a tool used to convert many of Call to Power II's database files into comma-deliminated
format(CSV) and back again. Viewing a database file in CSV format with a spreadsheet program allows you to
easily compare the entries and make changes. When converting a database file to CSV format, the program
loads an associated configuration file that contains all the flags associated with that database file.
Only database files with the format outlined below will work with this program:
where flags are a 1 or 2 word entry.
This version of the program comes with three configuration files:
Units.txt
Advance.txt
buildings.txt
Supported Database Files without a Configuration file:
govern.txt
goods.txt
feat.txt
order.txt
pop.txt
risks.txt
terrain.txt
tileimp.txt
wonders.txt
Use:
You first must specify the .txt, .csv, and .cfg file you want to use in the csv.cfg file. If one of the
files does not exist, this is the name it will be given when it is created.
Run the DBCSV.exe file in the same folder as the file you want to convert, and the necessary cfg files.
Option 1 will convert a database file into csv format, and option 2 will convert a csv file back into a
database file.
The CSV file
You should be able to open the CSV file with any spreadsheet program. Entries appear in the order they are
listed in the configuration file. Flags appear along the top row and associated entries appear below it. A
"Yes" means its a flag with no associated value. A "No" means this flag does not appear in this entry. The
conversion from csv to the txt file is dependent on the flags listed in the first row of the csv file.
Therefore, You can add or remove flags all together from the csv file. When adding a flag, each entry
needs a value. Do not leave any cell blank.
Configuration file format
You can edit existing Configuration files or create a new one. Add flags at the beginning of a new line.
If a flag can appear multiple times, you'll need to add the flag to the file multiple times as well. The
program only grabs entrees that are listed in the config file: ALL OTHER ENTRIES ARE LOST IN THE
CONVERSION. If a flag appears 3 times in a particular entry, but its only listed two times in the config
file, the third entry WILL BE LOST.
All entries in the config file must have an associated tag listed next to it.
s - An s means this flag has a second word listed after it in the DB file
t - A t means this flag appears alone (no second word)
a - An a means this is the name of of an inner entry (an ability in the Units.txt file)
as - These are flags that appear in an inner entry, and have a second word listed after it.
at - These are flags that appear in an inner entry that do not have a second word listed after it.
format(CSV) and back again. Viewing a database file in CSV format with a spreadsheet program allows you to
easily compare the entries and make changes. When converting a database file to CSV format, the program
loads an associated configuration file that contains all the flags associated with that database file.
Only database files with the format outlined below will work with this program:
Code:
ENTRY_NAME_1 { flag_1 . . . flag_n INNER_ENTRY_1 { flag_1 . . . flag_n } . . . INNER_ENTRY_N { flag_1 . . . flag_n } }
This version of the program comes with three configuration files:
Units.txt
Advance.txt
buildings.txt
Supported Database Files without a Configuration file:
govern.txt
goods.txt
feat.txt
order.txt
pop.txt
risks.txt
terrain.txt
tileimp.txt
wonders.txt
Use:
You first must specify the .txt, .csv, and .cfg file you want to use in the csv.cfg file. If one of the
files does not exist, this is the name it will be given when it is created.
Run the DBCSV.exe file in the same folder as the file you want to convert, and the necessary cfg files.
Option 1 will convert a database file into csv format, and option 2 will convert a csv file back into a
database file.
The CSV file
You should be able to open the CSV file with any spreadsheet program. Entries appear in the order they are
listed in the configuration file. Flags appear along the top row and associated entries appear below it. A
"Yes" means its a flag with no associated value. A "No" means this flag does not appear in this entry. The
conversion from csv to the txt file is dependent on the flags listed in the first row of the csv file.
Therefore, You can add or remove flags all together from the csv file. When adding a flag, each entry
needs a value. Do not leave any cell blank.
Configuration file format
You can edit existing Configuration files or create a new one. Add flags at the beginning of a new line.
If a flag can appear multiple times, you'll need to add the flag to the file multiple times as well. The
program only grabs entrees that are listed in the config file: ALL OTHER ENTRIES ARE LOST IN THE
CONVERSION. If a flag appears 3 times in a particular entry, but its only listed two times in the config
file, the third entry WILL BE LOST.
All entries in the config file must have an associated tag listed next to it.
s - An s means this flag has a second word listed after it in the DB file
t - A t means this flag appears alone (no second word)
a - An a means this is the name of of an inner entry (an ability in the Units.txt file)
as - These are flags that appear in an inner entry, and have a second word listed after it.
at - These are flags that appear in an inner entry that do not have a second word listed after it.
Comment