Page 1 of 2

Basic warzone .txt editor (not released yet)

Posted: 24 Sep 2008, 22:25
by ratarf
For fun, I was playing around with a VERY basic editor for the warzone .txt-files (after reading some topics on this board). It is in no way like WZCK - Not nearly as good I mean. But it's a lot better than editing the text files by hand. The tool was made using VB .NET 2005. I know there are a lot of linux folks on this forums, so if development continues I'd rather use Java. .NET is still my primary choice for RAPID application development.

Here's what the program does and how it works (technical):

- It contains no hard-coded warzone-specifics, so in theory it would be an editor for any kind of file that stores properties the warzone-way.

- Workflow:
1) You load a file, for example body.txt
2) The program scans the file quickly. Determines automatically which values are strings, integers, filenames, enums. Determines all possible values for enums, a minimum and maximum value for integers, etc. It just analyses the existing values in the file to do this.
3) Program displays all the entries (e.g. the bodies) in a list, with a column that shows if the entry has unsaved changes.
4) The program 'connects' the names of the parameters from http://wiki.wz2100.net/Txt_Editing BodyName, techLevel, size, buildPower,... to the values in the file.
5) If you select one of the entries, you can just edit the properties, e.g. like in the visual studio property editor. The program uses lists for enum values, a browse function for 'file' values (the .pie files), trackbar/textbox for integers, and textboxes for text. So you can select T1/T2/T3 from a listbox, adjust BodyPoints with a slider, etc.
6) That's it. For saving/opening/etc, it's just operated like any other application.

One major advantage of this approach is that it requires none to very little changes when a newer warzone version comes out, except from importing the propertynames from the wiki. The downside is off course that it's not that user friendly, especially for file that refer to each other. I'm rather busy these days with school etc, so I'm not really developing it (yet), and the program is not in a usable/releasable state right now. And this is an understatement. But I'm curious what you guys think. I think it has the potential to be a handy tool for editing warzone textfiles until a real WZCK-like tool becomes available. I will provide some more info and maybe a screenshot or two if anyone is interested.

Re: Basic warzone .txt editor (not released yet)

Posted: 25 Sep 2008, 05:39
by Buginator
There is/was a stats editor that was made by watermelon someplace in the forums, I just don't recall what thread it was.

Also, just a FYI, but the CSV stuff is slowly migrating to SQL. So you can use any sql editor, to play with the stats database.

Re: Basic warzone .txt editor (not released yet)

Posted: 25 Sep 2008, 06:06
by Phoenix666
What do you want to say?
You want to find txtEditor?
or create one(or somebody create it)?

Re: Basic warzone .txt editor (not released yet)

Posted: 25 Sep 2008, 10:49
by Zarel
Do we have to migrate it? CSV is a lot easier of a format to edit, both by hand and by writing programs to edit them.

Re: Basic warzone .txt editor (not released yet)

Posted: 25 Sep 2008, 11:25
by Phoenix666
i talk about txtEditot!
now i create my own program for editing(creating) mods!

Re: Basic warzone .txt editor (not released yet)

Posted: 25 Sep 2008, 11:45
by EvilGuru
Zarel wrote:Do we have to migrate it? CSV is a lot easier of a format to edit, both by hand and by writing programs to edit them.
Any SQLite database editor will suffice.

Regards, Freddie.

Re: Basic warzone .txt editor (not released yet)

Posted: 25 Sep 2008, 12:27
by ratarf
Oh ok. I saw two threads where people were asking for WZCK, and they were told to edit the text files by hand... I didn't read anything about a txt editor or sql database. Anyway, it's nice to see warzone being made more mod-friendly!

Re: Basic warzone .txt editor (not released yet)

Posted: 25 Sep 2008, 12:31
by Phoenix666
i will write my TXTEditor
and after i post link there!

(and i will upgrade my prog)

Re: Basic warzone .txt editor (not released yet)

Posted: 25 Sep 2008, 18:59
by Zarel
EvilGuru wrote:
Zarel wrote:Do we have to migrate it? CSV is a lot easier of a format to edit, both by hand and by writing programs to edit them.
Any SQLite database editor will suffice.

Regards, Freddie.
SQLite database editing libraries are harder to come by than file I/O and string manipulation libraries.

Edit: I would, however, suggest renaming the files from .txt to .csv

Re: Basic warzone .txt editor (not released yet)

Posted: 25 Sep 2008, 22:04
by ouch
SQLite is really easy to use. I've been useing it for writeing applications for my job for awhile now. It's also easy for a third party to edit it too as long as it's not encrypted.

just use this:

http://sqlitebrowser.sourceforge.net/

if you have "Open Office" the database app in that called "Base" can freely edit them too with out any plugins or anything, it's just built in. ;)

Re: Basic warzone .txt editor (not released yet)

Posted: 25 Sep 2008, 22:15
by Phoenix666
i dont like SQL!!!

Re: Basic warzone .txt editor (not released yet)

Posted: 26 Sep 2008, 02:21
by stiv
Phoenix666 wrote:i dont like SQL!!!
The whole point of using a database editor is so you don't see the SQL.

Re: Basic warzone .txt editor (not released yet)

Posted: 26 Sep 2008, 05:56
by Phoenix666
its will be better for me if i will use my own prog!

Re: Basic warzone .txt editor (not released yet)

Posted: 28 Sep 2008, 18:24
by ratarf
So after all stats have been moved to an SQL database, is a WZCK-like tool still needed? Or is an SQL-editor user-friendly enough for warzone modders? I'm not really a mod-maker myself, but if I remember correctly WZCK had a way to preview .PIE files, and other warzone-specific things...

Re: Basic warzone .txt editor (not released yet)

Posted: 29 Sep 2008, 00:14
by kage
ratarf wrote:So after all stats have been moved to an SQL database, is a WZCK-like tool still needed? Or is an SQL-editor user-friendly enough for warzone modders? I'm not really a mod-maker myself, but if I remember correctly WZCK had a way to preview .PIE files, and other warzone-specific things...
cool... i never got wzck to preview pies, but that'd definitely be a good feature.

putting all the stats in a database doesn't mean that a wz-specific tool won't be incredibly useful (and generally necessary for most modders), it just means that we are taking the file format and API out of our hands, and giving that responsibility to someone else (SQLite).