Basic warzone .txt editor (not released yet)

Get some help with creating maps or modding.
Need a map editor or other tools, look here!
ratarf
Trained
Trained
Posts: 154
Joined: 29 Nov 2006, 09:45

Basic warzone .txt editor (not released yet)

Post 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.
User avatar
Buginator
Professional
Professional
Posts: 3285
Joined: 04 Nov 2007, 02:20

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

Post 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.
User avatar
Phoenix666
Trained
Trained
Posts: 106
Joined: 21 Sep 2008, 20:38
Location: Russia
Contact:

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

Post by Phoenix666 »

What do you want to say?
You want to find txtEditor?
or create one(or somebody create it)?
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

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

Post 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.
User avatar
Phoenix666
Trained
Trained
Posts: 106
Joined: 21 Sep 2008, 20:38
Location: Russia
Contact:

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

Post by Phoenix666 »

i talk about txtEditot!
now i create my own program for editing(creating) mods!
EvilGuru
Regular
Regular
Posts: 615
Joined: 23 Jun 2007, 22:41

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

Post 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.
ratarf
Trained
Trained
Posts: 154
Joined: 29 Nov 2006, 09:45

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

Post 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!
User avatar
Phoenix666
Trained
Trained
Posts: 106
Joined: 21 Sep 2008, 20:38
Location: Russia
Contact:

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

Post by Phoenix666 »

i will write my TXTEditor
and after i post link there!

(and i will upgrade my prog)
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

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

Post 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
ouch
Trained
Trained
Posts: 122
Joined: 13 Nov 2007, 02:01

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

Post 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. ;)
User avatar
Phoenix666
Trained
Trained
Posts: 106
Joined: 21 Sep 2008, 20:38
Location: Russia
Contact:

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

Post by Phoenix666 »

i dont like SQL!!!
stiv
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 876
Joined: 18 Jul 2008, 04:41
Location: 45N 86W

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

Post by stiv »

Phoenix666 wrote:i dont like SQL!!!
The whole point of using a database editor is so you don't see the SQL.
User avatar
Phoenix666
Trained
Trained
Posts: 106
Joined: 21 Sep 2008, 20:38
Location: Russia
Contact:

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

Post by Phoenix666 »

its will be better for me if i will use my own prog!
ratarf
Trained
Trained
Posts: 154
Joined: 29 Nov 2006, 09:45

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

Post 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...
User avatar
kage
Regular
Regular
Posts: 751
Joined: 05 Dec 2006, 21:45

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

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