wzstats is a simple 'console' comandline program I wrote to convert the csv-like wz data to a more human-readable format,features:
1.convert wz txt to new format txt
2.convert new format txt to wz txt
3.supports the following txt's:
weapons.txt,templates.txt,structures.txt,bodypropimd.txt,
assignweapons.txt,structureweapons.txt,research.txt,pre_research.txt,researchfunctions.txt,researchstructures.txt,resultcomponent.txt,resultstructure.txt
sample:(old template for python medium cannon tracks)
PythonMedCnTrks,472,Body11ABT,ZNULLBRAIN,ZNULLCONSTRUCT,ZNULLECM,6,tracked01,ZNULLREPAIR,ZNULLREARM,DROID,DefaultSensor1Mk1,1
sample:(new template data for python medium cannon tracks)
[PythonMedCnTrks]
templateID = 472; compBody = "Body11ABT"; compBrain = "ZNULLBRAIN"; compConstruct = "ZNULLCONSTRUCT"; compECM = "ZNULLECM";
playerId = 6; compPropulsion = "tracked01"; compRepair = "ZNULLREPAIR"; compRearm = "ZNULLREARM"; type = "DROID";
compSensor = "DefaultSensor1Mk1"; numWeapons = 1;
note:it only works with the weapons.txt and templates.txt included,because I added new fields such as 'compRearm' to those 2 files recently.
source code is available on mailinglist,it's written in C with ANSI 'main()' so linux user shouldnt have any problems compiling it(my linux installation is still unfinished due to borked internet d/l speed...)
Feel free to post any suggestion or feedback
wzstats windows executable
- Watermelon
- Code contributor
- Posts: 551
- Joined: 08 Oct 2006, 09:37
wzstats windows executable
- Attachments
-
- wzstatsexe.zip
- (25.29 KiB) Downloaded 259 times
tasks postponed until the trunk is relatively stable again.
Re: wzstats windows executable
is whitespace important in the new format? as in, could we write ours to have one statement per line?
- Watermelon
- Code contributor
- Posts: 551
- Joined: 08 Oct 2006, 09:37
Re: wzstats windows executable
no all whitespace outside " " will be ignored and discarded,I just make the converter to put a whitespace after each variable name/variable value to make it easier to read.
Currently it's set to 5 variables/fields per line,you can change it to whatever via #define MAX_VALUES_PER_LINE,though it will become unreadable,esp with the 50+ fields per line weapons.txt...
Basically this tool is used to make editing wz .txt files/modding easier:
1.convert old txt to new format
2.makes changes to new format file so you dont suffer from comma count/field meaning guessing anymore...
3.convert the new format file back to old txt wz uses
Currently it's set to 5 variables/fields per line,you can change it to whatever via #define MAX_VALUES_PER_LINE,though it will become unreadable,esp with the 50+ fields per line weapons.txt...
Basically this tool is used to make editing wz .txt files/modding easier:
1.convert old txt to new format
2.makes changes to new format file so you dont suffer from comma count/field meaning guessing anymore...
3.convert the new format file back to old txt wz uses
tasks postponed until the trunk is relatively stable again.
Re: wzstats windows executable
i had meant the opposite: something like
#define MAX_VALUES_PER_LINE 1
cool. is the code portable enough to make linux and mac binaries?
#define MAX_VALUES_PER_LINE 1
cool. is the code portable enough to make linux and mac binaries?
- Watermelon
- Code contributor
- Posts: 551
- Joined: 08 Oct 2006, 09:37
Re: wzstats windows executable
not sure.I havent tried to compile it under linux yet,it just uses the stdlib,stdio,string,should work under linux since I dont think those standard C libs will have any portability issues.
tasks postponed until the trunk is relatively stable again.