WoWs Model Exported
World of Warships 3D model Exporter
Loading...
Searching...
No Matches
wows-game-params.h File Reference
#include "wows-model-exporter.h"
#include <cstddef>
#include <cstdint>
#include <string>
#include <vector>

Go to the source code of this file.

Functions

bool wows_load_hull_info (const char *gameparams_path, const char *ship_name, const char *hull_sel, wows_hull_info &out)
 Load hull and mount information for a ship from GameParams.data.
 
bool wows_load_hull_info_from_memory (const uint8_t *gameparams_data, size_t gameparams_size, const char *ship_name, const char *hull_sel, wows_hull_info &out)
 Same as wows_load_hull_info but reads pickled GameParams.data from a memory buffer.
 
bool wows_list_ships (const char *gameparams_path, std::vector< wows_ship_entry > &out)
 Enumerate all ships in GameParams.data, grouped by nation and type.
 
bool wows_list_ships_from_memory (const uint8_t *gameparams_data, size_t gameparams_size, std::vector< wows_ship_entry > &out)
 Same as wows_list_ships but reads pickled GameParams.data from a memory buffer.
 

Data Structures

struct  wows_ship_entry
 One ship entry returned by wows_list_ships(). More...
 

Function Documentation

◆ wows_list_ships()

bool wows_list_ships ( const char *  gameparams_path,
std::vector< wows_ship_entry > &  out 
)

Enumerate all ships in GameParams.data, grouped by nation and type.

Each returned entry carries the GameParams key, short index code, nation, and ship type as extracted from the typeinfo block inside each ship record.

Parameters
gameparams_pathFilesystem path to GameParams.data.
outOutput vector filled with one wows_ship_entry per ship.
Returns
true on success; errors are printed to stderr.

◆ wows_list_ships_from_memory()

bool wows_list_ships_from_memory ( const uint8_t *  gameparams_data,
size_t  gameparams_size,
std::vector< wows_ship_entry > &  out 
)

Same as wows_list_ships but reads pickled GameParams.data from a memory buffer.

◆ wows_load_hull_info()

bool wows_load_hull_info ( const char *  gameparams_path,
const char *  ship_name,
const char *  hull_sel,
wows_hull_info out 
)

Load hull and mount information for a ship from GameParams.data.

The function unpickles gameparams_path via CPython and walks the ship configuration tree to find the best matching hull for ship_name.

hull_sel is matched as a substring against hull upgrade names (e.g. "HULL_A", "HULL_B"). Pass nullptr to select the latest (highest-tier) hull automatically.

Parameters
gameparams_pathFilesystem path to GameParams.data.
ship_nameShip identifier as stored in the params (e.g. "PJSB009").
hull_selHull upgrade name substring, or nullptr for the latest hull.
outOutput parameter filled with hull model path and mount entries.
Returns
true on success; errors are printed to stderr.

◆ wows_load_hull_info_from_memory()

bool wows_load_hull_info_from_memory ( const uint8_t *  gameparams_data,
size_t  gameparams_size,
const char *  ship_name,
const char *  hull_sel,
wows_hull_info out 
)

Same as wows_load_hull_info but reads pickled GameParams.data from a memory buffer.