A project designed to provide some basic tools to observe different War Selection game data. Live page: https://wsunitstats.com
Current main features:
- unit list
- unit stats (general and some of more technical)
- ability to apply researches to unit stats
- researches list
- modding facilities: ability to navigate through in-game engine data structure
Exporter is a Java Spring Application module com.wsunitstats.exporter that is used to collect the data from the game files. This data required to render site the pages. Exporter has a set of export tasks that produce different data depending on the final goal. Default task configuration is stored under exporter.properties List of current tasks available:
- writeFile - writes the unit/researches stats to file (.json file)
- writeExcelSpecial - writes the unit stats to Excel file (.xlsx file)
- writeBuildIdsSpecial - writes "build id -> unit name, id, nation" entries in the file (.txt file)
- exportUnits - writes unit stats for website assets in the output folder (.json files)
- exportResearches - writes research stats for website assets in the output folder (.json files)
- exportUnitSelector - writes data required to render research selectors for website assets in the output folder (.json files)
- exportImages - writes images data for website assets in the output folder (.png files)
- exportEngineData - writes engine data (taken from the json files dumped by the mod) for website assets in the output folder (.json files)
- exportContext - writes context data (localization, unit list, research list) for website assets in the output folder (.json files)
Exporter automatically locates the game files searching for them in the Steam's Windows Registry data. This can be disabled in the configs, however.
For exportEngineData task two files inside input folder are used. These files are taken from game logs after execution of special mod that dumps the entire engine data tree to json and logs it (log(toJson(toTable(root)))).
To build exporter Java 17 and Maven required
Build:
- Download sources
- Got to root project folder
- Run
mvn clean install - The result will be a jar file located at com.wsunitstats.exporter/target/com.wsunitstats.exporter.jar
Run:
- Copy the com.wsunitstats.exporter.jar and config directory to any folder
- Go to that folder and run
java -jar com.wsunitstats.exporter.jar - Wait until execution completed (in case of errors in any tasks there will be error counter more than 0 at the end)
- To run specific tasks instead of default use
--tasksCLI argument:java -jar com.wsunitstats.exporter.jar --tasks=writeFile,exportImages - Result can be found either in root or output folder depending on a task
UI is React module that is used to provide web experience for the project. Located under com.wsunitstats.ui directory.
Application uses Google Material UI components in a mix with custom ones. React Router is used as navigation provider.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.
The page will reload when you make changes.
You may also see any lint errors in the console.
Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!