Command-line application, providing a variety of modding-related tools for "Workers & Resources: Soviet Republic".
- Parsing and reporting syntax errors in individual configuration files (renderconfig.ini, building.ini, *.mtl). Catches most typos in token names, literals (construction phases, resources, ...), wrong amount or type of parameters.
- Complete modded buildings. Given a path to a building directory it does the following:
- Parses renderconfig.ini and extracts paths to all *.nmf and *.mtl files.
- Parses *.mtl files from step 1 and extracts paths to all textures (*.dds).
- Checks that all the above references are correct (all those files exist).
- Parses the building.ini.
- Checks if any tokens in building.ini are referring to unexisting node names (using the main model's nmf as a reference).
This includes
- $STORAGE_LIVING_AUTO
- $COST_WORK_BUILDING_NODE
- $COST_WORK_BUILDING_KEYWORD
- $COST_WORK_VEHICLE_STATION_ACCORDING_NODE
- Checks if any active submaterial in the main model's nmf does not have a corresponding entry in the *.mtl files.
- Prints out all found issues.
Applicable to whole mod buildings (*.nmf and *.ini files together). These transformations requires all needed files to be in the building directory - otherwise you can use the individual file manipulation operations.
- Scaling by a given factor.
- Mirroring.
-
building.ini and renderconfig.ini
- Scaling coordinates by a given factor.
- Mirroring coordinates.
-
*.nmf files
- Displaying model structure (submaterials, objects, geometry).
- Geometry scaling (by a given factor).
- Geometry mirroring.
- Optimizing faces' indices (reducing vertex data duplication)
- Exporting into Wavefront's *.obj format (example).
- Generating customized mods inworkshop_wip directory, using assets from workshop mods and stock buildings.
Most subcommands support --help parameter:
$ wrsr-mt --help
$ wrsr-mt nmf --help
$ wrsr-mt nmf mirror --help
The following tokens in building.ini are not implemented (they will be reported as 'unknown token'). They might be added if I get a good working example of their usage.
- $STORAGE_DEMAND_MEDIUM
- $ROADVEHICLE_FORKLIFT_PASS
- $CONNECTIONS_PEDESTRIAN_DEAD_SQUARE
- $CONNECTION_AIRPLANE
- $CONNECTION_RAIL_DEAD
- $CONNECTION_ROAD_HEIGHT
- $MONUMENT_ELETRIC_CONSUMPTION_ADD
- $WORKING_SFX_DISTANCE
- $ANIMATION_MESH_WORKSHOP
Validation:
# Check building.ini for syntax errors
$ wrsr-mt ini parse building CityMagazynA/building.ini
# Validate whole building in directory 'HOUSE3'
$ wrsr-mt mod-building validate HOUSE3
Scaling/mirroring:
# Scale the whole building in directory 'HOUSE3' (models and ini files) by x1.2
# Store the result in directory 'HOUSE3_bigger'
$ wrsr-mt mod-building scale HOUSE3 1.2 HOUSE3_bigger
# Scale 'building.ini' by x1.3. Store the result in 'bigger_building.ini'
$ wrsr-mt ini scale building building.ini 1.3 bigger_building.ini
# Mirror 'model.nmf' and save it into new file 'model_mirrored.nmf'
$ wrsr-mt nmf mirror model.nmf model_mirrored.nmf
Nmf-specific features:
# Show details of 'model.nmf':
$ wrsr-mt nmf show model.nmf
# Export model geometry from 'model.nmf' into 'model.obj'
$ wrsr-mt nmf to-obj model.nmf model.obj
This project was reuploaded by me (Urufusan) because the original repo doesn't exist anymore. I'm guessing that this is the new "official" repo for this project.