MadMinute Games Message Board Forum Index MadMinute Games Message Board
This forum is for the people modding and playing TC2M games.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

New tool for editing CSV files
Goto page 1, 2  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    MadMinute Games Message Board Forum Index -> TC2M Modder's Corner
View previous topic :: View next topic  
Author Message
Garnier
Brigade Commander


Joined: 30 Apr 2009
Posts: 118
Location: New York State

PostPosted: Thu Jan 14, 2010 9:28 pm    Post subject: New tool for editing CSV files Reply with quote

DOWNLOAD LINK (for TC2M modding) <200 KB

DOWNLOAD LINK (for generic csv editing) <100 KB


For modding TC2M, use the first link. The second link contains the same program, but does not contain TC2M specific data files.

README.TXT

Basic Instructions:
Extract the zip wherever you want.

This is a tool I wrote for editing CSV files. I made it for TC2M modding, but it could be used with any CSV files, the program itself has nothing TC2M specific in it.

It looks like WarEdit, but the interface is easier to use, and it has a lot more features, specifically the drop-down lists.

This is the first release version, it's only been tested by myself and there could be bugs.
I want to hear about bugs (no matter how minor they are) so I can fix them!
I also want to hear any questions, suggestions or comments you have!


The program reads some files (these files come with it) telling it what sorts of data are going to be where in the file that you open, and creates drop-down lists. What sorts of data are in the lists is customizable. It can be used to simply edit the text manually, it can be expanded to have a complicated set of inter-dependencies between files.

The readme contains a little more information. If people ask questions I will start making an AQ. ("Asked Questions"). If they are asked frequently, it might become an FAQ.

GarnierEdit.ini (generated when you run the program) contains a lot of customizable settings.

I wrote this program in C++ using MFC.






_________________
My OOB Generator -


Last edited by Garnier on Fri Jan 22, 2010 8:24 pm; edited 2 times in total
Back to top
View user's profile Send private message MSN Messenger
122nd Ohio
Army Commander


Joined: 01 Mar 2007
Posts: 1313
Location: Ohio

PostPosted: Thu Jan 14, 2010 11:14 pm    Post subject: Reply with quote

Very nice! Very Happy

Just the features needed to make CSVs easier to mod, without all the bothersome bells and whistles like Excel.
Back to top
View user's profile Send private message
Garnier
Brigade Commander


Joined: 30 Apr 2009
Posts: 118
Location: New York State

PostPosted: Thu Jan 14, 2010 11:21 pm    Post subject: Reply with quote

That is the idea. Smile
_________________
My OOB Generator -
Back to top
View user's profile Send private message MSN Messenger
GrayGhost
Corp Commander


Joined: 06 Aug 2008
Posts: 728
Location: The South...obviously

PostPosted: Fri Jan 15, 2010 4:12 pm    Post subject: Reply with quote

Keep up the good work. Haven't tried this yet, but it appears a much needed .csv edit tool. I tried introducing a data base design, WarTool, it was a stand-alone run time app made with Filemaker Developer. It wasn't up to snuff competing with Excel, which I now use almost exclusively. I only use WarTool now for fast conversion of 'unitlocs' formation numbers to text and moving loc coordinates...setting up troop positions fast, without Excel.

Anyway, think you've got a winner here. Hope the folks here show their appreciation...and use it...

Maybe you'll get Norb's attention, I know he was inquiring about a csv editor for SOWGB. Looks like you have the ability to contribute here. I'll mention this during our testing sessions.

Are you willing to contribute your work to the new game, with a generic SOWGB type name?...your only reward coming in the credits?
_________________
Maj. Gen. 'Perky' PR Keen, Commander 2nd Division, I Corps, (MMG) ANV
Back to top
View user's profile Send private message Send e-mail
armchair general
Presidential Candidate


Joined: 18 Feb 2007
Posts: 2278
Location: Maine, USA

PostPosted: Sat Jan 16, 2010 7:42 pm    Post subject: Reply with quote

I downloaded this program, but when I open it, it looks like the standard WarEdit design. Where are all the drop-down menus in the screen shot?
_________________
The Minstrel boy, to the war has gone, in the ranks of death you will find him.
Back to top
View user's profile Send private message
Garnier
Brigade Commander


Joined: 30 Apr 2009
Posts: 118
Location: New York State

PostPosted: Sat Jan 16, 2010 8:50 pm    Post subject: Reply with quote

You have to open one of the TC2M data files that is in a directory with the rest of them (or at least the one which its drop-down lists depend on). The drop-down lists read other files in the same directory, they aren't built into the program.

There is "basic" mode which does no type checking and has no dropdown lists if you want. ALSO, you can write your own file-type in the filetypes.txt and create your own drop-down lists.

Note that this is neither a sequel to WarEdit nor based on WarEdit, it is an entirely different program. It imitates the basic interface so it is familiar.
_________________
My OOB Generator -
Back to top
View user's profile Send private message MSN Messenger
parmenio
Regimental Commander


Joined: 01 Mar 2010
Posts: 62

PostPosted: Wed Mar 24, 2010 9:15 am    Post subject: Reply with quote

Garnier wrote:
You have to open one of the TC2M data files that is in a directory with the rest of them (or at least the one which its drop-down lists depend on). The drop-down lists read other files in the same directory, they aren't built into the program.

As a replacement for WarEdit (i.e. a CSV editor) I like it muchly. However, I'm finding it less than intuitive to get drop-down lists working. For example, "units.csv" depends on "levels.csv" for the permitted values of things like Quality, Morale etc. How do I get the link between the two?

I've opened "levels.csv" as an element type and "units,csv" as a file type which is as far as I've got - I have drop-downs but there's nothing in them. Do I have to edit "elementtypes.csv" and "filetypes.csv" files manually?

One other suggestion, if I may... can you add an option to "re-open" a file as a different type? If you choose the wrong type first time round, you're stuck with it unless you edit the INI file.
Back to top
View user's profile Send private message
Garnier
Brigade Commander


Joined: 30 Apr 2009
Posts: 118
Location: New York State

PostPosted: Wed Mar 24, 2010 12:46 pm    Post subject: Reply with quote

Oh I see the problem. You're editing the scenario files which are not in the same folder as the rest of the data files. To get drop-down lists to work the file you are editing needs to be in the same directory as the files it gets data from. It would be too complicated for most people to use otherwise, since everyone's folder structure is different.

The re-open suggestion is good.

Thanks for posting this, it appeared that no one was using this tool apart from myself. Smile
_________________
My OOB Generator -
Back to top
View user's profile Send private message MSN Messenger
parmenio
Regimental Commander


Joined: 01 Mar 2010
Posts: 62

PostPosted: Wed Mar 24, 2010 1:00 pm    Post subject: Reply with quote

Garnier wrote:
Oh I see the problem. You're editing the scenario files which are not in the same folder as the rest of the data files. To get drop-down lists to work the file you are editing needs to be in the same directory as the files it gets data from. It would be too complicated for most people to use otherwise, since everyone's folder structure is different.

Actually in this instance, both the "levels.csv" and the "units.csv" are in the same folder. This is an unpacked version of the stock "SM01 - 28 Aug - Gibbon (U_Bde)" scenario rather than the SDK equivalent.

Quote:
Thanks for posting this, it appeared that no one was using this tool apart from myself.

Perhaps the others are just shy Smile
Back to top
View user's profile Send private message
Garnier
Brigade Commander


Joined: 30 Apr 2009
Posts: 118
Location: New York State

PostPosted: Thu Mar 25, 2010 6:12 pm    Post subject: Reply with quote

Quote:
Actually in this instance, both the "levels.csv" and the "units.csv" are in the same folder. This is an unpacked version of the stock "SM01 - 28 Aug - Gibbon (U_Bde)" scenario rather than the SDK equivalent.


Hmm. I have to decide how to handle this situation. Any way I do it will make certain tasks more complicated and others less complicated. The folder with all the SDK generic data files has its own levels.csv.

I could do it this way:
You have one folder which is chosen manually which is the base directory, that contains data files.
Then when you open a file, while loading the drop-down lists it first checks if the necessary file is in the same location as the file you are opening, otherwise it looks for it in the base directory.

Anyone have opinions on how this ought to work?

If anyone has other features they'd like or problems to report, now's the time to say so, since I've got the code fresh in my mind. Wink

I did add a menu option to change the file type of the file you're editing.
_________________
My OOB Generator -
Back to top
View user's profile Send private message MSN Messenger
parmenio
Regimental Commander


Joined: 01 Mar 2010
Posts: 62

PostPosted: Thu Mar 25, 2010 6:27 pm    Post subject: Reply with quote

Garnier wrote:
Then when you open a file, while loading the drop-down lists it first checks if the necessary file is in the same location as the file you are opening, otherwise it looks for it in the base directory.


The above sound good but how does it currently decide?

Quote:
I did add a menu option to change the file type of the file you're editing.


I only have an option to "Always open as basic" - am I running an out-of-date version?
Back to top
View user's profile Send private message
Garnier
Brigade Commander


Joined: 30 Apr 2009
Posts: 118
Location: New York State

PostPosted: Thu Mar 25, 2010 6:30 pm    Post subject: Reply with quote

Quote:
I only have an option to "Always open as basic" - am I running an out-of-date version?

I just added this and haven't released the new build. Wink

Quote:
The above sound good but how does it currently decide?

It has a directory that it loads the data files from, but this directory is always set to the directory of the file that you have opened, I think.
_________________
My OOB Generator -
Back to top
View user's profile Send private message MSN Messenger
parmenio
Regimental Commander


Joined: 01 Mar 2010
Posts: 62

PostPosted: Thu Mar 25, 2010 6:34 pm    Post subject: Reply with quote

Garnier wrote:
It has a directory that it loads the data files from, but this directory is always set to the directory of the file that you have opened, I think.


Ok - so how does it "know" the name of the file to open for the drop-downs?

...I'll await the release of the new build for the extra option Smile
Back to top
View user's profile Send private message
Garnier
Brigade Commander


Joined: 30 Apr 2009
Posts: 118
Location: New York State

PostPosted: Thu Mar 25, 2010 6:38 pm    Post subject: Reply with quote

Quote:
Ok - so how does it "know" the name of the file to open for the drop-downs?

The elementtypes.csv and filetypes.csv describe the different dropdown lists and where they get their data from.

For instance this line from elementtypes.csv says:
unitcommon,list,identifier,unitcommon.csv,

Which means the unitcommon element type is a dropdownlist of the identifiers (first word on each line) in the unitcommon.csv data file.
_________________
My OOB Generator -
Back to top
View user's profile Send private message MSN Messenger
Garnier
Brigade Commander


Joined: 30 Apr 2009
Posts: 118
Location: New York State

PostPosted: Thu Mar 25, 2010 8:05 pm    Post subject: Reply with quote

I see why it's confusing now, and have solved it I think.

There needs to be two different dependency folders, one (files) for game files like textures and sounds, and another (base) for the data files like unitcommon.csv.

With the new system, you set these paths manually with a folder browser.
By default, when loading a file it will first look for data file dependencies in the directory that the file is in, if they aren't there it will look in the base directory.

Once I test it I'll send you the exe and you can let me know if this solves the issues.
_________________
My OOB Generator -
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    MadMinute Games Message Board Forum Index -> TC2M Modder's Corner All times are GMT
Goto page 1, 2  Next
Page 1 of 2

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001 phpBB Group

Chronicles phpBB2 theme by Jakob Persson (http://www.eddingschronicles.com). Stone textures by Patty Herford.