@Goth: Simple, let me go get a copy...
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>
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:
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
xml file:
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>
Result:
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