file ground.csv has fields with the same name

Please post any bugs or technical issues found here for official support.

Moderator: Joel Billings

Post Reply
zorroot
Posts: 9
Joined: Fri Sep 29, 2023 10:18 pm

file ground.csv has fields with the same name

Post 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
User avatar
Joel Billings
Posts: 33491
Joined: Wed Sep 20, 2000 8:00 am
Location: Santa Rosa, CA
Contact:

Re: file ground.csv has fields with the same name

Post 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?
All understanding comes after the fact.
-- Soren Kierkegaard
Denniss
Posts: 9133
Joined: Thu Jan 10, 2002 10:00 am
Location: Germany, Hannover (region)

Re: file ground.csv has fields with the same name

Post by Denniss »

some kind of legacy data field as it is neither shown nor can be changed in editor. Same in WitE1.
zorroot
Posts: 9
Joined: Fri Sep 29, 2023 10:18 pm

Re: file ground.csv has fields with the same name

Post 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
DarkHorse2
Posts: 1070
Joined: Fri Feb 04, 2022 12:08 pm

Re: file ground.csv has fields with the same name

Post 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.
Attachments
April 2021
April 2021
WiTE2_ground_Apr2021.JPG (79.49 KiB) Viewed 211 times
Nov 2023
Nov 2023
WiTE2_ground.JPG (86.41 KiB) Viewed 214 times
Denniss
Posts: 9133
Joined: Thu Jan 10, 2002 10:00 am
Location: Germany, Hannover (region)

Re: file ground.csv has fields with the same name

Post 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
Post Reply

Return to “Tech Support”