Stat editor program idea

Ideas and suggestions for how to improve the Warzone 2100 base game only. Ideas for mods go in Mapping/Modding instead. Read sticky posts first!
Post Reply
User avatar
Berserk Cyborg
Code contributor
Code contributor
Posts: 816
Joined: 26 Sep 2016, 19:56

Stat editor program idea

Post by Berserk Cyborg » 20 Sep 2019, 00:40

I was think about how we have WMIT for models, and flame for map editing, and then realized we are missing a big tool. I would think it would be highly beneficial to have a multi-platform GUI-based stats editor program someday.

At the moment, one has to edit the .json files in a text editor which leaves no way to easily visualize and compare stats of all weapons and such to eachother. Such an application would seriously increase balancing efficiency, too. It may also help catch subtle stats related errors, like using the wrong sounds and whatnot. Being someone who has tried balancing and working with the stats before, the current approach is nearly impossible and a drain on time and energy, in my experience.

MIH-XTC
Trained
Trained
Posts: 349
Joined: 31 Jan 2014, 07:06

Re: Stat editor program idea

Post by MIH-XTC » 20 Sep 2019, 03:04

I've already thought long and hard about this previously.

IMO the best route is to use Python Pandas.

The logic is this:

The stats have to be manipulated in tabular form (a table). So then it's just a matter of which library/tool is best for manipulating tables.

Excel is the best tool but it's Windows only.

I was going to make a web-based stats editor but decided it's too much work because of the overhead associated with making web APIs.

The best multi-platform tool for manipulating tables is Pandas but it's command line only. So then it would be a matter of making a GUI for Pandas which has many applications way beyond just Warzone2100.

But yea... Pandas is definitely the way to go IMO. It supports importing/exporting .json to tables and many other formats.

https://pandas.pydata.org/pandas-docs/s ... de/io.html

Pandas is currently king of the data science world. It's high performance and can handle any mathematical operations and advanced SQL-like operations e.g. slicing, dicing, filtering etc...

The challenge is making a GUI around what users want to do with the stats. Anything is possible with Pandas but it's a question of what does the user want to view/do.

If you're not familiar with data frames, they're basically object versions of tables. Instead of writing SQL, data frames just use method calls like any other object. Any operation that can be performed on a table, including database tables and spreadsheets, Pandas can do very easily in just 1 or 2 lines of code. Databases are necessary for ACID operations (concurrency) but if only one person is manipulating the database table at a time, a data frame is far superior to a database.

EDIT: I'll put it like this, if we want to check if any stat attribute for all of the objects are of a certain data type, fall within a certain range, follow a certain string format, contain filenames that need to be verified... each of those operations is only 1 line of code in Pandas. All the stat files and every object/attribute in the stats can be checked/verified with a single Python script. Again, the hard part is figuring out what we want to do with the stats. Anything can be done but it's identifying what to do.

Post Reply