Page 1 of 1
file ground.csv has fields with the same name
Posted: Wed Nov 29, 2023 4:36 pm
by zorroot
Hello,
While trying to get used to the built-in editor of WITE2 and its csv files, I came across a small bug. The file ground.csv has two fields with the same name 'ID'. The field names are (in order):
- id (field 1)
- name (field 2)
- id (field 3)
- type (field 4)
....
Please change the name of field 3. Thx in advance.
Kind Regards,
Zorroot
Re: file ground.csv has fields with the same name
Posted: Wed Nov 29, 2023 5:36 pm
by Joel Billings
Thanks for the report. Looking at the data, I can't tell what that column 3 is supposed to be. Do you have any idea?
Re: file ground.csv has fields with the same name
Posted: Wed Nov 29, 2023 6:14 pm
by Denniss
some kind of legacy data field as it is neither shown nor can be changed in editor. Same in WitE1.
Re: file ground.csv has fields with the same name
Posted: Wed Nov 29, 2023 6:50 pm
by zorroot
Joel Billings wrote: Wed Nov 29, 2023 5:36 pm
Thanks for the report. Looking at the data, I can't tell what that column 3 is supposed to be. Do you have any idea?
I dont have any knowledge about the internal data structure of WITE2. But if you threathen me at gun point range

, I would state this:
- If I had to design a database with a table 'groundElements' for ground elements, I would create at least two tables. One main table 'groundElements' with all the data and a second table 'unitTypes' for the type of every unit, e.g. 72=recon tank, 13=medium tank, 14= heavy tank, 1=rifle squad.
- I would then add the id field of the table 'unitTypes' to the table 'groundElements' as a foreign key.
- Due to some reason, the merging of the two tables went wrong and field 3 (the second id field) in file ground.csv contains mixed up data. Sometimes just the ID of the table 'unitTypes', sometimes just a double ID of the table 'groundElements' and sometimes some other random data.
I also had a close look at the data of the file ground.csv itself. Field 3, the double ID, does not fit to any other data in this file.
My main concern about fixing this small bug is that you need to make the editor aware of the change. The import and the export routine may need to be changed. And you need to check if the data from field 3 is used in the game in any way.
Kind Regards,
Zorroot
Re: file ground.csv has fields with the same name
Posted: Thu Nov 30, 2023 1:05 am
by DarkHorse2
The extra 'id' column is definitely getting exported into the _ground.csv file.
That could be an export logic error where the created CSV file adds 'id' twice.....
I checked an older export of the _ground.csv file, dated - Apr 2021.
The issue occurred back then too. So it is not new, it appears.
Re: file ground.csv has fields with the same name
Posted: Thu Nov 30, 2023 12:39 pm
by Denniss
as said above this field is also present in WitE1, it is not always in sync with the first ID section. You'll notice elements moved or copied, retaining their original ID there