Help needed - statseditor
Help needed - statseditor
Hello all who can code,
Things are busy for me at the moment, but I am trying to squeeze in some time to make stats a bit more flexible and make more things editable by mods. I have started yet another stats editor, this time in Qt, and it is holed up in tools/statsedit. It is very bare-bones at the moment (just displaying .ini file stats), and I would love for someone to take up this project and take it further. It is a very easy place to start for a new coder wanting to get into Warzone coding.
Let me know if you want to get started, or just start creating patches
Things are busy for me at the moment, but I am trying to squeeze in some time to make stats a bit more flexible and make more things editable by mods. I have started yet another stats editor, this time in Qt, and it is holed up in tools/statsedit. It is very bare-bones at the moment (just displaying .ini file stats), and I would love for someone to take up this project and take it further. It is a very easy place to start for a new coder wanting to get into Warzone coding.
Let me know if you want to get started, or just start creating patches
Re: Help needed - statseditor
Hello, i like stat editors, but i dont like C++ stuff so much
searching nice free controls and other stuff is a bit boring for me
and i dont like when stat files stored in different format
May be i missed something and now all stats stored in ini?
better if plans about stat-files and other stuff will be published in open forum
searching nice free controls and other stuff is a bit boring for me
and i dont like when stat files stored in different format
May be i missed something and now all stats stored in ini?
better if plans about stat-files and other stuff will be published in open forum
Re: Help needed - statseditor
It has been discussed in public. See
viewtopic.php?f=32&t=9295
and (much older) viewtopic.php?f=6&t=214
viewtopic.php?f=32&t=9295
and (much older) viewtopic.php?f=6&t=214
Re: Help needed - statseditor
reviewed these threads..Per wrote:It has been discussed in public. See
viewtopic.php?f=32&t=9295
and (much older) viewtopic.php?f=6&t=214
seem i had bad english to get answers on my questions:
1) is it right statement "all stats will be turned into ini-format"?
2) IF 1 above is true, when stats will be turned to ini?
3) what rules for ini format will be followed in stat files
- mostly interesting how unfilled fields will be processed in stats loader in warzone
i'm just thinking warzone stats loader/parser also should be improved
Re: Help needed - statseditor
Yes, I am working on turning all csv type stats into ini format. You should know better than to ask 'when' this is finished... Unfilled fields that are not required will be given default values.
Re: Help needed - statseditor
I could help with that if I would have more free time...
For sure I can at least help with Qt related questions, if someone will be able to find me on IRC.
For sure I can at least help with Qt related questions, if someone will be able to find me on IRC.
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.
Beware! Mad Qt Evangelist.
The time has come, the high time, to destroy hatred in oneself.
Beware! Mad Qt Evangelist.
- Shadow Wolf TJC
- Regular
- Posts: 1047
- Joined: 16 Apr 2011, 05:12
- Location: Raleigh, NC
Re: Help needed - statseditor
Personally, whenever I want to edit some stats (including .pie models) or scripts (like I did while developing the Contingency mod), I just use Wordpad. It seemed to display everything nice and clear, though care must be taken to preserve the files' structure while editing.
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100
Re: Help needed - statseditor
If we code a stat editor, why would we care about the .ini format anyway ? It's just multiplying the size of the files and therfore forbid the hosting of mods.
We need a file format that is the smallest possible.
We need a file format that is the smallest possible.
Heretic 2.3 improver and proud of it.
Re: Help needed - statseditor
I do not see the connection between having a stats editor and caring about the format. In case you missed the reasons for changing, go read the discussion threads on the issue.Iluvalar wrote:If we code a stat editor, why would we care about the .ini format anyway ?
Dude, it is zipped. Duplicate data like ini keys are easily compressed. And even if it weren't, these files are still tiny compared to, say, tilesets and mapsIluvalar wrote: It's just multiplying the size of the files and therfore forbid the hosting of mods.
We need a file format that is the smallest possible.
Re: Help needed - statseditor
Once apon a time I have started develop my editor. (wz 2.9)Per wrote:Hello all who can code,
Things are busy for me at the moment, but I am trying to squeeze in some time to make stats a bit more flexible and make more things editable by mods. I have started yet another stats editor, this time in Qt, and it is holed up in tools/statsedit. It is very bare-bones at the moment (just displaying .ini file stats), and I would love for someone to take up this project and take it further. It is a very easy place to start for a new coder wanting to get into Warzone coding.
Let me know if you want to get started, or just start creating patches
It was local server (python-django).
It loads files to database (sqlite)
Allow edit it in you browser
And dump back it to game format.
I will check it how it lives and send you demo if you wish.
PS. WTF?
Code: Select all
model.setData(model.index(i, 1, QModelIndex()), ini.value("buildPower").toString(), Qt::DisplayRole);
model.setData(model.index(i, 2, QModelIndex()), ini.value("buildPoints").toString(), Qt::DisplayRole);
model.setData(model.index(i, 3, QModelIndex()), ini.value("weight").toString(), Qt::DisplayRole);
model.setData(model.index(i, 4, QModelIndex()), ini.value("hitpoints").toString(), Qt::DisplayRole);
model.setData(model.index(i, 5, QModelIndex()), ini.value("model").toString(), Qt::DisplayRole);
model.setData(model.index(i, 6, QModelIndex()), ini.value("type").toString(), Qt::DisplayRole);
model.setData(model.index(i, 7, QModelIndex()), ini.value("speed").toString(), Qt::DisplayRole);
model.setData(model.index(i, 8, QModelIndex()), ini.value("designable", false).toString(), Qt::DisplayRole);
model.setData(model.index(i, 9, QModelIndex()), ini.value("skidDeceleration", 600).toString(), Qt::DisplayRole);
model.setData(model.index(i, 10, QModelIndex()), ini.value("spinSpeed", 8192/45*3/4).toString(), Qt::DisplayRole);
model.setData(model.index(i, 11, QModelIndex()), ini.value("turnSpeed", 8192/45/3).toString(), Qt::DisplayRole);
model.setData(model.index(i, 12, QModelIndex()), ini.value("Acceleration", 250).toString(), Qt::DisplayRole);
model.setData(model.index(i, 13, QModelIndex()), ini.value("Deceleration", 800).toString(), Qt::DisplayRole);
model.setData(model.index(i, 14, QModelIndex()), ini.value("spinAngle", 180).toString(), Qt::DisplayRole);
Why you call almost same function so many times?
IMHO
creating "structure" fields = [(name, default), (name, default), ]
And using cycle over it will add more readability. (+2 lines of code, - 80 chars from 15 lines)
IMHO2 If you create ini scheme to game (just file what describes which fields are used, has it default value or reqired, what max, min or choose values it has) You will generate this views by it. And can use it in game code to load data.
Same for stats.cpp:
most stats function do same thing:
get ini file, make some checks, return filled structure.
My view on it: it must be function that get 2 args:
file with template (field_name, default, required, max, min, [choices])
file with data
At current time you make double work.
You describe in game code each field you use and its default value.
You describe in editor code each field you use and its default value.
You editor does not check if body size is in body_list. But stats check it.
http://addons.wz2100.net/ developer
Re: Help needed - statseditor
Yep. It was a quick hack. I look forward to your cleanup work!
Re: Help needed - statseditor
Maps are smaller 100ko vs 250ko for the mod (NRS). And dont be silly, there is no map-mods with tileset files. It is too big to be hosted !Per wrote:I do not see the connection between having a stats editor and caring about the format. In case you missed the reasons for changing, go read the discussion threads on the issue.Iluvalar wrote:If we code a stat editor, why would we care about the .ini format anyway ?
Dude, it is zipped. Duplicate data like ini keys are easily compressed. And even if it weren't, these files are still tiny compared to, say, tilesets and mapsIluvalar wrote: It's just multiplying the size of the files and therfore forbid the hosting of mods.
We need a file format that is the smallest possible.
Heretic 2.3 improver and proud of it.
Re: Help needed - statseditor
weapons data in CSV zipped 6k, weapons data in INI format zipped 7.3k. There are maps with their own tilesets. Even if data were to be increased by a much bigger factor, nobody could care less anyway since we've stopped using 9600 baud modems a long time ago. So stop wasting thread space on this off topic non-issue already.Iluvalar wrote:Maps are smaller 100ko vs 250ko for the mod (NRS). And dont be silly, there is no map-mods with tileset files. It is too big to be hosted !
Re: Help needed - statseditor
Nope. I don`t like c++ (and don`t know it).Per wrote:Yep. It was a quick hack. I look forward to your cleanup work!
It is too strong tool for making editors
I can do it in my way.
You can test it (observation and editing (save and other stuff is ruined))
https://bitbucket.org/Cjkjvfnby/wze
It works with current master branch of Warzone2100 on github
just follow instruction in readme. and when open /load/
Models you can inspect:
Feature,
Construction,
ECM,
Sensor,
Repair,
Weapon,
StructureDefence,
Body,
PropulsionType,
Function,
BodyDefence,
Research_Cam1,
Research_Cam2,
Research_Cam3,
Scrinshoots:
http://imageshack.us/g/703/selection009b.png
http://imageshack.us/f/89/selection010f.png
http://addons.wz2100.net/ developer
Re: Help needed - statseditor
Per wrote:Hello all who can code,
Things are busy for me at the moment, but I am trying to squeeze in some time to make stats a bit more flexible and make more things editable by mods. I have started yet another stats editor, this time in Qt, and it is holed up in tools/statsedit. It is very bare-bones at the moment (just displaying .ini file stats), and I would love for someone to take up this project and take it further. It is a very easy place to start for a new coder wanting to get into Warzone coding.
Let me know if you want to get started, or just start creating patches
just for fun:
Desctop app that shows body.ini written on html+css+javascript
It needs node-webkit to launch (https://github.com/rogerwang/node-webkit)
http://narod.ru/disk/62265724001.53fa63 ... er.nw.html
http://addons.wz2100.net/ developer