CSV To INI
- milo christiansen
- Regular
- Posts: 749
- Joined: 02 Jun 2009, 21:23
- Location: Perrinton Michigan
CSV To INI
A simple csv to ini converter
For every different type of csv file you need to convert to ini you will need to write a xml conversion specification, examples are included in the package.
Included are binarys for Windows in both 32 and 64 bit. Everybody else can just go compile it themselves
More info in the readme.
To generate an ini file from the contents of more than one csv file you will need more than one pass. Details in the readme.
If more flexability is needed just ask.
For every different type of csv file you need to convert to ini you will need to write a xml conversion specification, examples are included in the package.
Included are binarys for Windows in both 32 and 64 bit. Everybody else can just go compile it themselves
More info in the readme.
To generate an ini file from the contents of more than one csv file you will need more than one pass. Details in the readme.
If more flexability is needed just ask.
- Attachments
-
- CSV To INI.7z
- version 2
- (868.92 KiB) Downloaded 621 times
Last edited by milo christiansen on 08 Mar 2013, 23:07, edited 1 time in total.
In general, if you see glowing, pulsating things in the game, you should click on them.
- Demigod Game Ganual
- Demigod Game Ganual
- Goth Zagog-Thou
- Regular
- Posts: 1582
- Joined: 06 Jan 2007, 08:08
- Location: Delta Base
- Contact:
Re: CSV To INI
Will try this out immediately. Thanks Milo.
- milo christiansen
- Regular
- Posts: 749
- Joined: 02 Jun 2009, 21:23
- Location: Perrinton Michigan
Re: CSV To INI
Have fun
In general, if you see glowing, pulsating things in the game, you should click on them.
- Demigod Game Ganual
- Demigod Game Ganual
Re: CSV To INI
windows users also can try this: https://github.com/crabster/Warzone-Sta ... sConverter
(source code included)
supports conversion for research.ini and structure.ini
(source code included)
supports conversion for research.ini and structure.ini
- Goth Zagog-Thou
- Regular
- Posts: 1582
- Joined: 06 Jan 2007, 08:08
- Location: Delta Base
- Contact:
Re: CSV To INI
Milo, I have no idea what to do with those .xml files, buddy. Sorry.
- Goth Zagog-Thou
- Regular
- Posts: 1582
- Joined: 06 Jan 2007, 08:08
- Location: Delta Base
- Contact:
Re: CSV To INI
It seems that the crabster github no longer exists. Shame.
Re: CSV To INI
Eh? Crabster...
This is why some features aren't implemented: http://forums.wz2100.net/viewtopic.php?f=30&t=7490&view=unread#p87241
Re: CSV To INI
rage quit?effigy wrote:Eh? Crabster...
- milo christiansen
- Regular
- Posts: 749
- Joined: 02 Jun 2009, 21:23
- Location: Perrinton Michigan
Re: CSV To INI
@Goth: Simple, let me go get a copy...
Note that this is for version 2
The namecode tag has some simple code to generate the section name, for most cases you just need to put "(getfield 0)" here. That will get the first field in the record and make it the section name. (a record is a line in csv)
Then for each key in the section you need a key tag. index is the record number to use for that key's value and name is the string to use as the name for that key.
Run the example and look at the output, it's very simple.
A simple example:
csv file:
xml file:
Result:
Note that this is for version 2
Code: Select all
<section>
<!-- NCA code to generate section name. Runs once per record. -->
<namecode>(fmtstr "Record Number:%d Field 0:%s" (getrecord) (getfield 0)</namecode>
<key>
<index>1</index> <!-- csv field number to use for this key's value -->
<name>test1</name> <!-- this keys name -->
</key>
</section>
Then for each key in the section you need a key tag. index is the record number to use for that key's value and name is the string to use as the name for that key.
Run the example and look at the output, it's very simple.
A simple example:
csv file:
Code: Select all
test #1,1,2,3,4,5
test #2,1,2,3,4,5
test #3,1,2,3,4,5
test #4,1,2,3,4,5
test #5,1,2,3,4,5
Code: Select all
<section>
<!-- NCA code to generate section name. Runs once per record. -->
<namecode>(getfield 0)</namecode>
<key>
<index>1</index> <!-- csv field number to use for this key's value -->
<name>test1</name> <!-- this keys name -->
</key>
<key>
<index>2</index>
<name>test2</name>
</key>
<key>
<index>3</index>
<name>test3</name>
</key>
<key>
<index>4</index>
<name>test4</name>
</key>
<key>
<index>5</index>
<name>test5</name>
</key>
</section>
Code: Select all
[test #1]
test1=1
test2=2
test3=3
test4=4
test5=5
[test #2]
test1=1
test2=2
test3=3
test4=4
test5=5
[test #3]
test1=1
test2=2
test3=3
test4=4
test5=5
[test #4]
test1=1
test2=2
test3=3
test4=4
test5=5
[test #5]
test1=1
test2=2
test3=3
test4=4
test5=5
In general, if you see glowing, pulsating things in the game, you should click on them.
- Demigod Game Ganual
- Demigod Game Ganual
Re: CSV To INI
he still holding a grudge?Originway wrote:rage quit?effigy wrote:Eh? Crabster...
- milo christiansen
- Regular
- Posts: 749
- Joined: 02 Jun 2009, 21:23
- Location: Perrinton Michigan
Re: CSV To INI
If anyone makes a conversion descriptor file, post it here, that way I know which ones I can skip when I get around to making them
In general, if you see glowing, pulsating things in the game, you should click on them.
- Demigod Game Ganual
- Demigod Game Ganual