CSV Import/Export - are you using it, and for what items?

Post new scenarios and mods here to share with other gamers.

Moderator: Joel Billings

Post Reply
User avatar
Joel Billings
Posts: 33568
Joined: Wed Sep 20, 2000 8:00 am
Location: Santa Rosa, CA
Contact:

CSV Import/Export - are you using it, and for what items?

Post by Joel Billings »

As Pavel works on the revisions to the editor, the issue of the CSV export/import functionality has come up. At this point we don't internally trust the import feature as it was not maintained with all the changes during the many years of WitE2 development. We're inclined to lock out the import capability in the revised editor, at least until Pavel is able to spend the time to make sure it is working for all the data. Is there anyone in the community that is using the export/import, and if so, what are you importing, and does it seem to be working for you? We don't want to lock out importing something if it's actually working for someone who's using it. So if you're a modder and don't want to see the import functionality locked out, let us know.

BTW, one of the nice features of the revised editor that is work in progress is that it is much clearer what items are generic data and what are scenario specific data. If you are working on a scenario file, generic items will clearly not be modifiable in the display, unless you have frozen the generic data.
All understanding comes after the fact.
-- Soren Kierkegaard
User avatar
Hardradi
Posts: 835
Joined: Wed Feb 09, 2011 8:16 am
Location: Swan River Colony

Re: CSV Import/Export - are you using it, and for what items?

Post by Hardradi »

Can you confirm the import functionality? Can it be used to bring in bulk changes from say a CSV file modified in Excel and converted back to CSV?

Also, I am a little confused by the Generic Files vs Semi-Generic vs Non-Generic. Is it as follows:

Generic files cant be modified or shouldn't be modified?
Semi-Generic can be partly modified and some parts shouldn't be modified?
Non-Generic can modified?
Teo41_ITA
Posts: 507
Joined: Thu Sep 02, 2021 12:45 pm

Re: CSV Import/Export - are you using it, and for what items?

Post by Teo41_ITA »

I use it to update my 1941-1945 OOB rework mod. Let's say that several AOG are getting updated in an official patch (either renamed, transferred or disbanded). It's much easier for me to export the new AOG cvs file, copy-paste the new modifications into my modded AOG file and then import the modified cvs file into my mod.

Furthermore, when I was playing around with the leader statistics, it was much easier to change one entire column at the time (admin, political...) rather than manually changing all the values one by one!
DarkHorse2
Posts: 1070
Joined: Fri Feb 04, 2022 12:08 pm

Re: CSV Import/Export - are you using it, and for what items?

Post by DarkHorse2 »

I use it when I want to track changes I've made.

I check the exported cvs files into a local repository.
goranw
Posts: 1739
Joined: Tue Oct 23, 2001 8:00 am
Location: Uppsala,Sweden
Contact:

Re: CSV Import/Export - are you using it, and for what items?

Post by goranw »

I use it to see Commanders report and map names as CSV. Easy to handle information and change ex names on the map.
I have made a map with german front maps names and I guess a map with russian naming is important.
Goran
jlbhung
Posts: 372
Joined: Wed Mar 10, 2021 1:05 am

Re: CSV Import/Export - are you using it, and for what items?

Post by jlbhung »

Please do not simply lock all the import csv function. I am using the csv import function for unit, ground element, aircraft, leader, and map hex after editing using spreadsheet -

(a) edit the name of ground element/aircraft using spreadsheet (more convenient when I have to change a lot of item, e.g. I add LtTank at the beginning of the name for all Light tank elements);
(b) search and replace certain ground elements in all units using spreadsheet;
(c) large scale changes of leader's attributes (e.g. find and replace all admin/morale value of 1, 2 and 3 to a min of 4);
(d) replace artwork for certain hex type e.g. change all hill hex to use a specific .tga artwork file)
DarenMoss
Posts: 84
Joined: Sat Jul 21, 2018 12:35 pm

Re: CSV Import/Export - are you using it, and for what items?

Post by DarenMoss »

I would be grateful if someone could tell me exactly how to import a csv file into a mod as I'm obviously doing something wrong. I used Excel compare / accept to update the hexart so the .csv files are correctly updated. But when I import back into my mod/scenario the map does not update. There is probably something simple I'm missing so any help gratefully received. :)
User avatar
Joel Billings
Posts: 33568
Joined: Wed Sep 20, 2000 8:00 am
Location: Santa Rosa, CA
Contact:

Re: CSV Import/Export - are you using it, and for what items?

Post by Joel Billings »

Hardradi wrote: Tue May 24, 2022 11:06 pm Can you confirm the import functionality? Can it be used to bring in bulk changes from say a CSV file modified in Excel and converted back to CSV?

Also, I am a little confused by the Generic Files vs Semi-Generic vs Non-Generic. Is it as follows:

Generic files cant be modified or shouldn't be modified?
Semi-Generic can be partly modified and some parts shouldn't be modified?
Non-Generic can modified?
In theory you could, and I think that was working in WitW. However, several new data elements were added but Pavel never had time to make sure all of them were synced up and included in the CSV export. It's because of this that you use the import function at your own risk.

As for generic, semi-generic and non-generic.

Non-generic are things like the unit file. Anything you do with units is going to be saved in your scenario file. While there is a generic unit file, it's not used for anything. All unit data is stored in the scenario.

Generic files are things like the OB file - Anything in the OB file is loaded in whenever a scenario is first started (or loaded into the editor). If you change OBs in your scenario file, you have to lock generic files in order for those changes not to be lost the next time you load in your file into the editor or game.

Semi-generic is something where some data elements stored inside it are generic (and thus must be locked to have your changes retained in your scenario), hexes being an example. In this case the nationality of a hex is generic, but the owner of the hex at the start of the scenario is non-generic, and thus can be safely modified and stored in the scenario without having to lock generic data. Exactly what is generic and what is not generic is not clearly spelled out anywhere, and Pavel hopes to make it more clear in the future in the revised editor. Location (city) data like population and x,y location are generic, but depot data is non-generic.
All understanding comes after the fact.
-- Soren Kierkegaard
User avatar
Hardradi
Posts: 835
Joined: Wed Feb 09, 2011 8:16 am
Location: Swan River Colony

Re: CSV Import/Export - are you using it, and for what items?

Post by Hardradi »

Thank you, that helps a lot.
jlbhung
Posts: 372
Joined: Wed Mar 10, 2021 1:05 am

Re: CSV Import/Export - are you using it, and for what items?

Post by jlbhung »

DarenMoss wrote: Sun May 29, 2022 12:15 pm I would be grateful if someone could tell me exactly how to import a csv file into a mod as I'm obviously doing something wrong. I used Excel compare / accept to update the hexart so the .csv files are correctly updated. But when I import back into my mod/scenario the map does not update. There is probably something simple I'm missing so any help gratefully received. :)
I would suggest you try the following after the modified .csv file is imported via editor -
a) select the hexart generic file and save (at the main tab)
b) exit the editor/game
c) open the editor/game again
DarenMoss
Posts: 84
Joined: Sat Jul 21, 2018 12:35 pm

Re: CSV Import/Export - are you using it, and for what items?

Post by DarenMoss »

Sadly that didn’t work. Just doing a simple change to test (changing Danzig from a city to Urban). Excel spreadsheet is correct but nothing I do seems to load this so the map is changed. It’s driving me crazy!
Denniss
Posts: 9227
Joined: Thu Jan 10, 2002 10:00 am
Location: Germany, Hannover (region)

Re: CSV Import/Export - are you using it, and for what items?

Post by Denniss »

map/terrain data is in generic data, overriding any data in scenarios
Danzig should be light-urban unless that change is not live in .29
WitE dev team - (aircraft data)
WitE 1.08+ dev team (data/scenario maintainer)
WitW dev team (aircraft data, partial data/scenario maintainer)
WitE2 dev team (aircraft data)
jlbhung
Posts: 372
Joined: Wed Mar 10, 2021 1:05 am

Re: CSV Import/Export - are you using it, and for what items?

Post by jlbhung »

DarenMoss wrote: Thu Jun 02, 2022 10:19 am Sadly that didn’t work. Just doing a simple change to test (changing Danzig from a city to Urban). Excel spreadsheet is correct but nothing I do seems to load this so the map is changed. It’s driving me crazy!
I use the Mountain hex x=6 y=5 as an example. The first pic below shows the both the data in Editor and the corresponding data in the _hexArt.csv file. Column F of the .csv determines the hexArt file to be used. Before change the data in the cell is 2, so the file [game dir]/Dat/Art/Tiles/MOUNTAIN/MOUNTAIN_002.tga is used.

.
Editor1.jpg
Editor1.jpg (254.96 KiB) Viewed 1665 times
.
I changed the data in that cell to 5 and saved. After I imported the _hexArt.csv file, I saved the changes to the hexArt.dat file using the main tab of the Editor. See the pic below
.
Editor2.jpg
Editor2.jpg (191.11 KiB) Viewed 1665 times
.
Afterwards, I exited the Editor and reloaded it, the pic below shows the data in Editor and the corresponding data in the _hexArt.csv file for hex x=6 y=5. The artwork used in that hex changed to [game dir]/Dat/Art/Tiles/MOUNTAIN/MOUNTAIN_005.tga.
.
Editor3.jpg
Editor3.jpg (335.7 KiB) Viewed 1665 times
.
It shows that the amendment to the hexArt used in that hex was successfully saved.
.
However, if what you want is not a different mountain art for the hex, but rather the change in terrain type for the hex (e.g. from mountain to sea hex), then you have to change the hex data and not just the art. I am not sure whether and how this is editable, but it appears to me that hex data cannot be import from/export to .csv file
.
From my experience, it appears to me that Column C of the hexArt.csv file is for info only. Changing data in this column will not affect the terrain type. It seems that _hexArt.csv is really only about what artwork to display, and it will not change other hex properties.
DarenMoss
Posts: 84
Joined: Sat Jul 21, 2018 12:35 pm

Re: CSV Import/Export - are you using it, and for what items?

Post by DarenMoss »

Thank you - It was driving me crazy.

It was the data from Column C (the base art) that was I was looking to change to reflect the map changes in the latest update. Lots of changes to the terrain and road network in Finland that I was looking to update for my Finland MOD but it doesn't look like that is currently doable.
oldMarinePanzer
Posts: 128
Joined: Mon Feb 09, 2015 7:27 pm

Re: CSV Import/Export - are you using it, and for what items?

Post by oldMarinePanzer »

I have bee requesting that the editor get enabled for over a year now, so here is my comment. I typically use this feature for exporting/importing ".csv" files, but at one time or another I have used EVERY single available one (some aren't available), the import/export function is consistently dependable for me:

_aircraft.csv
_airgroup.csv
_city.csv
_device.csv
_ground.csv
_leader.csv
_ob.csv
_unit.csv
antwniago
Posts: 65
Joined: Sat Mar 16, 2002 7:04 pm
Location: United Kingdom
Contact:

Re: CSV Import/Export - are you using it, and for what items?

Post by antwniago »

I have used a lot of the fields for importing often, I have created Bulgarian Army/Air force for 1941, also put the northern and Transcaucasia fronts onto the map (Finns and Soviets)- Also dabbled in a created of Greek and Yugoslav forces for 1941. I have found no issues with importing any of the generic data into the games I am experimenting with.

Whenever there is an update for the game I tend to have to import data in the follow sections.

_devices
_aircraft
_ground
_toe
_leaders

_locations the number of amendments are small so done without import
_airgroups occasionally used
_units occasionally used

Another use of import for me is when putting a theatre box units on map and therefore removing unit transfer in and out of that theatre some units remain in the theatre box as reinforcements despite cancelling the transfer - I have had to go into excel and change the theatre box code column and then import that in to clear the unit from the theatre box.
Post Reply

Return to “Scenario Design and Modding”