Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Commands

This page documents all commands that can be sent to the RPFM server. Each command is wrapped in a Message with a unique id.

Commands with no parameters are serialized as plain strings. Commands with parameters use the { "CommandName": params } format. See the serialization convention for details.

Most commands that operate on a specific pack take a pack_key string as their first parameter. The pack key is returned by OpenPackFiles or NewPack when you open or create a pack.


Lifecycle

Exit

Close the background thread. Do not use directly — the server manages this internally.

Response: None (breaks the server loop).

type ExitRequest = "Exit";
// No response — the server loop terminates.
// Request: send the literal string "Exit". No response.

ClientDisconnecting

Signal that the client is intentionally disconnecting. Allows the server to clean up the session immediately.

Response: "Success"

{ "id": 1, "data": "ClientDisconnecting" }
type ClientDisconnectingRequest = "ClientDisconnecting";
type ClientDisconnectingResponse = "Success";
// Request: send the literal string "ClientDisconnecting".
// Response: the literal string "Success".

PackFile Operations

NewPack

Create a new empty Pack.

Response: { String: string } — the assigned pack key.

{ "id": 1, "data": "NewPack" }
type NewPackRequest = "NewPack";
type NewPackResponse = { String: string };
// Request: send the literal string "NewPack".
public class NewPackResponse
{
    public string String { get; set; }
}

OpenPackFiles

Open one or more Pack files and merge them into the current session.

ParameterTypeDescription
pathsstring[]Filesystem paths to open

Response: { StringContainerInfo: [string, ContainerInfo] } — pack key and metadata.

{ "id": 1, "data": { "OpenPackFiles": ["/path/to/my_mod.pack"] } }
type OpenPackFilesRequest = { OpenPackFiles: string[] };
type OpenPackFilesResponse = { StringContainerInfo: [string, ContainerInfo] };
public class OpenPackFilesRequest
{
    public List<string> OpenPackFiles { get; set; }
}
public class OpenPackFilesResponse
{
    public Tuple<string, ContainerInfo> StringContainerInfo { get; set; }
}

LoadAllCAPackFiles

Open all CA Pack files for the selected game as one merged Pack.

Response: { StringContainerInfo: [string, ContainerInfo] }

{ "id": 1, "data": "LoadAllCAPackFiles" }
type LoadAllCAPackFilesRequest = "LoadAllCAPackFiles";
type LoadAllCAPackFilesResponse = { StringContainerInfo: [string, ContainerInfo] };
// Request: send the literal string "LoadAllCAPackFiles".
public class LoadAllCAPackFilesResponse
{
    public Tuple<string, ContainerInfo> StringContainerInfo { get; set; }
}

ListOpenPacks

List all currently open packs with their keys and metadata.

Response: { VecStringContainerInfo: [string, ContainerInfo][] }

{ "id": 1, "data": "ListOpenPacks" }
type ListOpenPacksRequest = "ListOpenPacks";
type ListOpenPacksResponse = { VecStringContainerInfo: [string, ContainerInfo][] };
// Request: send the literal string "ListOpenPacks".
public class ListOpenPacksResponse
{
    public List<Tuple<string, ContainerInfo>> VecStringContainerInfo { get; set; }
}

ClosePack

Close a specific open Pack.

ParameterTypeDescription
pack_keystringPack to close

Response: "Success"

{ "id": 1, "data": { "ClosePack": "my_mod.pack" } }
type ClosePackRequest = { ClosePack: string };
type ClosePackResponse = "Success";
public class ClosePackRequest
{
    public string ClosePack { get; set; }
}
// Response: the literal string "Success".

CloseAllPacks

Close all currently open Packs.

Response: "Success"

{ "id": 1, "data": "CloseAllPacks" }
type CloseAllPacksRequest = "CloseAllPacks";
type CloseAllPacksResponse = "Success";
// Request: send the literal string "CloseAllPacks".
// Response: the literal string "Success".

SavePack

Save a specific open Pack to disk.

ParameterTypeDescription
pack_keystringPack to save

Response: { ContainerInfo: ContainerInfo }

{ "id": 1, "data": { "SavePack": "my_mod.pack" } }
type SavePackRequest = { SavePack: string };
type SavePackResponse = { ContainerInfo: ContainerInfo };
public class SavePackRequest
{
    public string SavePack { get; set; }
}
public class SavePackResponse
{
    public ContainerInfo ContainerInfo { get; set; }
}

SavePackAs

Save a specific open Pack to a new path.

ParameterTypeDescription
pack_keystringPack to save
pathstringDestination path

Response: { ContainerInfo: ContainerInfo }

{ "id": 1, "data": { "SavePackAs": ["my_mod.pack", "/path/to/new_mod.pack"] } }
type SavePackAsRequest = { SavePackAs: [string, string] };
type SavePackAsResponse = { ContainerInfo: ContainerInfo };
public class SavePackAsRequest
{
    public Tuple<string, string> SavePackAs { get; set; }
}
public class SavePackAsResponse
{
    public ContainerInfo ContainerInfo { get; set; }
}

CleanAndSavePackAs

Clean a Pack from corrupted/undecoded files and save to disk. Only use if the Pack is otherwise unsaveable.

ParameterTypeDescription
pack_keystringPack to clean
pathstringDestination path

Response: { ContainerInfo: ContainerInfo }

{ "id": 1, "data": { "CleanAndSavePackAs": ["my_mod.pack", "/path/to/cleaned.pack"] } }
type CleanAndSavePackAsRequest = { CleanAndSavePackAs: [string, string] };
type CleanAndSavePackAsResponse = { ContainerInfo: ContainerInfo };
public class CleanAndSavePackAsRequest
{
    public Tuple<string, string> CleanAndSavePackAs { get; set; }
}
public class CleanAndSavePackAsResponse
{
    public ContainerInfo ContainerInfo { get; set; }
}

GetPackFileDataForTreeView

Get tree view data (container info and file list) for a specific pack.

ParameterTypeDescription
pack_keystringPack to query

Response: { ContainerInfoVecRFileInfo: [ContainerInfo, RFileInfo[]] }

{ "id": 1, "data": { "GetPackFileDataForTreeView": "my_mod.pack" } }
type GetPackFileDataForTreeViewRequest = { GetPackFileDataForTreeView: string };
type GetPackFileDataForTreeViewResponse = { ContainerInfoVecRFileInfo: [ContainerInfo, RFileInfo[]] };
public class GetPackFileDataForTreeViewRequest
{
    public string GetPackFileDataForTreeView { get; set; }
}
public class GetPackFileDataForTreeViewResponse
{
    public Tuple<ContainerInfo, List<RFileInfo>> ContainerInfoVecRFileInfo { get; set; }
}

GetPackedFilesInfo

Get metadata for one or more packed files by path.

ParameterTypeDescription
pack_keystringPack to query
pathsstring[]Internal file paths

Response: { VecRFileInfo: RFileInfo[] }

{ "id": 1, "data": { "GetPackedFilesInfo": ["my_mod.pack", ["db/units_tables/data"]] } }
type GetPackedFilesInfoRequest = { GetPackedFilesInfo: [string, string[]] };
type GetPackedFilesInfoResponse = { VecRFileInfo: RFileInfo[] };
public class GetPackedFilesInfoRequest
{
    public Tuple<string, List<string>> GetPackedFilesInfo { get; set; }
}
public class GetPackedFilesInfoResponse
{
    public List<RFileInfo> VecRFileInfo { get; set; }
}

GetRFileInfo

Get the info of a single packed file.

ParameterTypeDescription
pack_keystringPack to query
pathstringInternal file path

Response: { OptionRFileInfo: RFileInfo | null }

{ "id": 1, "data": { "GetRFileInfo": ["my_mod.pack", "db/units_tables/data"] } }
type GetRFileInfoRequest = { GetRFileInfo: [string, string] };
type GetRFileInfoResponse = { OptionRFileInfo: RFileInfo | null };
public class GetRFileInfoRequest
{
    public Tuple<string, string> GetRFileInfo { get; set; }
}
public class GetRFileInfoResponse
{
    public RFileInfo? OptionRFileInfo { get; set; }
}

GetPackFilePath

Get the filesystem path of a specific open Pack.

ParameterTypeDescription
pack_keystringPack to query

Response: { PathBuf: string }

type GetPackFilePathRequest = { GetPackFilePath: string };
type GetPackFilePathResponse = { PathBuf: string };
public class GetPackFilePathRequest
{
    public string GetPackFilePath { get; set; }
}
public class GetPackFilePathResponse
{
    public string PathBuf { get; set; }
}

GetPackFileName

Get the file name of a specific open Pack.

ParameterTypeDescription
pack_keystringPack to query

Response: { String: string }

type GetPackFileNameRequest = { GetPackFileName: string };
type GetPackFileNameResponse = { String: string };
public class GetPackFileNameRequest
{
    public string GetPackFileName { get; set; }
}
public class GetPackFileNameResponse
{
    public string String { get; set; }
}

SetPackFileType

Change the PFH type of a specific open Pack (e.g., Mod, Movie, Boot).

ParameterTypeDescription
pack_keystringPack to modify
typePFHFileTypeNew file type

Response: "Success"

type SetPackFileTypeRequest = { SetPackFileType: [string, PFHFileType] };
type SetPackFileTypeResponse = "Success";
public class SetPackFileTypeRequest
{
    public Tuple<string, string> SetPackFileType { get; set; }  // second is PFHFileType enum serialized as string
}
// Response: the literal string "Success".

ChangeIndexIncludesTimestamp

Toggle the “Index Includes Timestamp” flag for a specific pack.

ParameterTypeDescription
pack_keystringPack to modify
enabledbooleanNew flag value

Response: "Success"

type ChangeIndexIncludesTimestampRequest = { ChangeIndexIncludesTimestamp: [string, boolean] };
type ChangeIndexIncludesTimestampResponse = "Success";
public class ChangeIndexIncludesTimestampRequest
{
    public Tuple<string, bool> ChangeIndexIncludesTimestamp { get; set; }
}
// Response: the literal string "Success".

ChangeCompressionFormat

Change the compression format of a specific open Pack.

ParameterTypeDescription
pack_keystringPack to modify
formatCompressionFormatNew format

Response: { CompressionFormat: CompressionFormat } — actual format set (may differ if unsupported).

type ChangeCompressionFormatRequest = { ChangeCompressionFormat: [string, CompressionFormat] };
type ChangeCompressionFormatResponse = { CompressionFormat: CompressionFormat };
public class ChangeCompressionFormatRequest
{
    public Tuple<string, string> ChangeCompressionFormat { get; set; }  // second is CompressionFormat enum as string
}
public class ChangeCompressionFormatResponse
{
    public string CompressionFormat { get; set; }
}

OptimizePackFile

Run the optimizer over a specific open Pack.

ParameterTypeDescription
pack_keystringPack to optimize
optionsOptimizerOptionsOptimization config

Response: { HashSetStringHashSetString: [string[], string[]] } — deleted and added paths.

type OptimizePackFileRequest = { OptimizePackFile: [string, OptimizerOptions] };
type OptimizePackFileResponse = { HashSetStringHashSetString: [string[], string[]] };
public class OptimizePackFileRequest
{
    public Tuple<string, OptimizerOptions> OptimizePackFile { get; set; }
}
public class OptimizePackFileResponse
{
    public Tuple<HashSet<string>, HashSet<string>> HashSetStringHashSetString { get; set; }
}

PatchSiegeAI

Patch Siege AI for Warhammer siege maps in a specific pack.

ParameterTypeDescription
pack_keystringPack to patch

Response: { StringVecContainerPath: [string, ContainerPath[]] }

type PatchSiegeAIRequest = { PatchSiegeAI: string };
type PatchSiegeAIResponse = { StringVecContainerPath: [string, ContainerPath[]] };
public class PatchSiegeAIRequest
{
    public string PatchSiegeAI { get; set; }
}
public class PatchSiegeAIResponse
{
    public Tuple<string, List<ContainerPath>> StringVecContainerPath { get; set; }
}

Game Selection

GetGameSelected

Get the currently selected game key.

Response: { String: string }

{ "id": 1, "data": "GetGameSelected" }
type GetGameSelectedRequest = "GetGameSelected";
type GetGameSelectedResponse = { String: string };
// Request: send the literal string "GetGameSelected".
public class GetGameSelectedResponse
{
    public string String { get; set; }
}

SetGameSelected

Change the selected game. Optionally rebuilds dependencies.

ParameterTypeDescription
game_keystringGame identifier (e.g., "warhammer_3")
rebuildbooleanWhether to rebuild dependencies

Response: { CompressionFormatDependenciesInfo: [CompressionFormat, DependenciesInfo | null] }

{ "id": 1, "data": { "SetGameSelected": ["warhammer_3", true] } }
type SetGameSelectedRequest = { SetGameSelected: [string, boolean] };
type SetGameSelectedResponse = {
  CompressionFormatDependenciesInfo: [CompressionFormat, DependenciesInfo | null]
};
public class SetGameSelectedRequest
{
    public Tuple<string, bool> SetGameSelected { get; set; }
}
public class SetGameSelectedResponse
{
    public Tuple<string, DependenciesInfo?> CompressionFormatDependenciesInfo { get; set; }
}

GenerateDependenciesCache

Generate the dependencies cache for the currently selected game.

Response: { DependenciesInfo: DependenciesInfo }

type GenerateDependenciesCacheRequest = "GenerateDependenciesCache";
type GenerateDependenciesCacheResponse = { DependenciesInfo: DependenciesInfo };
// Request: send the literal string "GenerateDependenciesCache".
public class GenerateDependenciesCacheResponse
{
    public DependenciesInfo DependenciesInfo { get; set; }
}

UpdateCurrentSchemaFromAssKit

Update the current schema with data from the game’s Assembly Kit.

Response: "Success"

type UpdateCurrentSchemaFromAssKitRequest = "UpdateCurrentSchemaFromAssKit";
type UpdateCurrentSchemaFromAssKitResponse = "Success";
// Request: send the literal string "UpdateCurrentSchemaFromAssKit".
// Response: the literal string "Success".

PackedFile Operations

NewPackedFile

Create a new packed file inside a specific open Pack.

ParameterTypeDescription
pack_keystringTarget pack
pathstringInternal path for the file
specNewFileFile type specification

Response: "Success"

{ "id": 1, "data": { "NewPackedFile": ["my_mod.pack", "db/units_tables/data", { "DB": ["data", "units_tables", 4] }] } }
type NewPackedFileRequest = { NewPackedFile: [string, string, NewFile] };
type NewPackedFileResponse = "Success";
public class NewPackedFileRequest
{
    public Tuple<string, string, NewFile> NewPackedFile { get; set; }
}
// Response: the literal string "Success".

AddPackedFiles

Add files from the filesystem to a specific open Pack.

ParameterTypeDescription
pack_keystringTarget pack
source_pathsstring[]Filesystem paths to add
dest_pathsContainerPath[]Destination paths inside the pack
ignore_pathsstring[] or nullPaths to exclude (optional)

Response: { VecContainerPathOptionString: [ContainerPath[], string | null] } — added paths and optional error.

type AddPackedFilesRequest = {
  AddPackedFiles: [string, string[], ContainerPath[], string[] | null]
};
type AddPackedFilesResponse = {
  VecContainerPathOptionString: [ContainerPath[], string | null]
};
public class AddPackedFilesRequest
{
    public Tuple<string, List<string>, List<ContainerPath>, List<string>?> AddPackedFiles { get; set; }
}
public class AddPackedFilesResponse
{
    public Tuple<List<ContainerPath>, string?> VecContainerPathOptionString { get; set; }
}

DecodePackedFile

Decode a packed file for display.

ParameterTypeDescription
pack_keystringPack containing the file
pathstringInternal path
sourceDataSourceData source to decode from

Response: Type-specific (e.g., { DBRFileInfo: [DB, RFileInfo] }, { TextRFileInfo: [Text, RFileInfo] }, "Unknown", etc.)

{ "id": 1, "data": { "DecodePackedFile": ["my_mod.pack", "db/units_tables/data", "PackFile"] } }
type DecodePackedFileRequest = { DecodePackedFile: [string, string, DataSource] };
// Response is one of many variants depending on the file type:
type DecodePackedFileResponse =
  | { AnimFragmentBattleRFileInfo: [AnimFragmentBattle, RFileInfo] }
  | { AnimPackRFileInfo: [RFileInfo[], RFileInfo] }
  | { AnimsTableRFileInfo: [AnimsTable, RFileInfo] }
  | { AtlasRFileInfo: [Atlas, RFileInfo] }
  | { AudioRFileInfo: [Audio, RFileInfo] }
  | { BmdRFileInfo: [Bmd, RFileInfo] }
  | { DBRFileInfo: [DB, RFileInfo] }
  | { ESFRFileInfo: [ESF, RFileInfo] }
  | { GroupFormationsRFileInfo: [GroupFormations, RFileInfo] }
  | { ImageRFileInfo: [Image, RFileInfo] }
  | { LocRFileInfo: [Loc, RFileInfo] }
  | { MatchedCombatRFileInfo: [MatchedCombat, RFileInfo] }
  | { PortraitSettingsRFileInfo: [PortraitSettings, RFileInfo] }
  | { RigidModelRFileInfo: [RigidModel, RFileInfo] }
  | { TextRFileInfo: [Text, RFileInfo] }
  | { UICRFileInfo: [UIC, RFileInfo] }
  | { UnitVariantRFileInfo: [UnitVariant, RFileInfo] }
  | { VideoInfoRFileInfo: [VideoInfo, RFileInfo] }
  | { VMDRFileInfo: [Text, RFileInfo] }
  | { WSModelRFileInfo: [Text, RFileInfo] }
  | { Text: Text }
  | "Unknown";
public class DecodePackedFileRequest
{
    public Tuple<string, string, string> DecodePackedFile { get; set; }  // third is DataSource enum
}
// Response: deserialize into a class with nullable properties for each variant,
// or branch on the first JSON key. Example:
public class DecodePackedFileResponse
{
    public Tuple<DB, RFileInfo>? DBRFileInfo { get; set; }
    public Tuple<Text, RFileInfo>? TextRFileInfo { get; set; }
    public Tuple<Loc, RFileInfo>? LocRFileInfo { get; set; }
    // ... one property per decoded variant above.
}

SavePackedFileFromView

Save an edited packed file back to the Pack.

ParameterTypeDescription
pack_keystringTarget pack
pathstringInternal path
dataRFileDecodedDecoded file content

Response: "Success"

type SavePackedFileFromViewRequest = { SavePackedFileFromView: [string, string, RFileDecoded] };
type SavePackedFileFromViewResponse = "Success";
public class SavePackedFileFromViewRequest
{
    public Tuple<string, string, RFileDecoded> SavePackedFileFromView { get; set; }
}
// Response: the literal string "Success".

DeletePackedFiles

Delete packed files from a specific open Pack.

ParameterTypeDescription
pack_keystringPack to modify
pathsContainerPath[]Paths to delete

Response: { VecContainerPath: ContainerPath[] } — deleted paths.

{ "id": 1, "data": { "DeletePackedFiles": ["my_mod.pack", [{ "File": "db/units_tables/data" }]] } }
type DeletePackedFilesRequest = { DeletePackedFiles: [string, ContainerPath[]] };
type DeletePackedFilesResponse = { VecContainerPath: ContainerPath[] };
public class DeletePackedFilesRequest
{
    public Tuple<string, List<ContainerPath>> DeletePackedFiles { get; set; }
}
public class DeletePackedFilesResponse
{
    public List<ContainerPath> VecContainerPath { get; set; }
}

CopyPackedFiles

Copy one or more packed files to the server-side clipboard, so they can later be pasted into the same or a different pack with PastePackedFiles. Path references only — nothing is duplicated until paste.

ParameterTypeDescription
sourcesRecord<string, ContainerPath[]>Map of pack key to paths to copy from it

Response: "Success"

{ "id": 1, "data": { "CopyPackedFiles": { "my_mod.pack": [{ "File": "db/units_tables/data" }] } } }
type CopyPackedFilesRequest = { CopyPackedFiles: Record<string, ContainerPath[]> };
type CopyPackedFilesResponse = "Success";
public class CopyPackedFilesRequest
{
    public Dictionary<string, List<ContainerPath>> CopyPackedFiles { get; set; }
}
// Response: the literal string "Success".

CutPackedFiles

Same as CopyPackedFiles, but the source files will be deleted from their originating pack once PastePackedFiles runs.

ParameterTypeDescription
sourcesRecord<string, ContainerPath[]>Map of pack key to paths to cut from it

Response: "Success"

{ "id": 1, "data": { "CutPackedFiles": { "my_mod.pack": [{ "File": "db/units_tables/data" }] } } }
type CutPackedFilesRequest = { CutPackedFiles: Record<string, ContainerPath[]> };
type CutPackedFilesResponse = "Success";
public class CutPackedFilesRequest
{
    public Dictionary<string, List<ContainerPath>> CutPackedFiles { get; set; }
}
// Response: the literal string "Success".

PastePackedFiles

Paste packed files from the internal clipboard into a pack. Works for both copied and cut files — on a cut paste, the source files are removed as part of this call.

ParameterTypeDescription
pack_keystringTarget pack
dest_pathstringDestination folder path inside the target

Response: { VecContainerPathVecContainerPathString: [ContainerPath[], ContainerPath[], string] } — added paths, cut-deleted paths, source pack key.

{ "id": 1, "data": { "PastePackedFiles": ["my_mod.pack", "db/units_tables/"] } }
type PastePackedFilesRequest = { PastePackedFiles: [string, string] };
type PastePackedFilesResponse = {
  VecContainerPathVecContainerPathString: [ContainerPath[], ContainerPath[], string]
};
public class PastePackedFilesRequest
{
    public Tuple<string, string> PastePackedFiles { get; set; }
}
public class PastePackedFilesResponse
{
    public Tuple<List<ContainerPath>, List<ContainerPath>, string> VecContainerPathVecContainerPathString { get; set; }
}

DuplicatePackedFiles

Duplicate one or more packed files in place within the same pack. Each file is cloned with a numeric suffix appended to avoid name collisions.

ParameterTypeDescription
pack_keystringPack to modify
pathsContainerPath[]Paths to duplicate

Response: { VecContainerPath: ContainerPath[] } — new duplicated paths.

{ "id": 1, "data": { "DuplicatePackedFiles": ["my_mod.pack", [{ "File": "db/units_tables/data" }]] } }
type DuplicatePackedFilesRequest = { DuplicatePackedFiles: [string, ContainerPath[]] };
type DuplicatePackedFilesResponse = { VecContainerPath: ContainerPath[] };
public class DuplicatePackedFilesRequest
{
    public Tuple<string, List<ContainerPath>> DuplicatePackedFiles { get; set; }
}
public class DuplicatePackedFilesResponse
{
    public List<ContainerPath> VecContainerPath { get; set; }
}

ExtractPackedFiles

Extract packed files to the filesystem.

ParameterTypeDescription
pack_keystringPack to extract from
paths_by_sourceRecord<DataSource, ContainerPath[]>Files grouped by data source
dest_pathstringFilesystem destination
as_tsvbooleanExport tables as TSV

Response: { StringVecPathBuf: [string, string[]] }

{ "id": 1, "data": { "ExtractPackedFiles": ["my_mod.pack", { "PackFile": [{ "File": "db/units_tables/data" }] }, "/tmp/extract", false] } }
type ExtractPackedFilesRequest = {
  ExtractPackedFiles: [string, Record<DataSource, ContainerPath[]>, string, boolean]
};
type ExtractPackedFilesResponse = { StringVecPathBuf: [string, string[]] };
public class ExtractPackedFilesRequest
{
    public Tuple<string, Dictionary<string, List<ContainerPath>>, string, bool> ExtractPackedFiles { get; set; }
}
public class ExtractPackedFilesResponse
{
    public Tuple<string, List<string>> StringVecPathBuf { get; set; }
}

RenamePackedFiles

Rename packed files in a specific Pack.

ParameterTypeDescription
pack_keystringPack to modify
renames[ContainerPath, ContainerPath][]Array of [old_path, new_path] pairs

Response: { VecContainerPathContainerPath: [ContainerPath, ContainerPath][] }

type RenamePackedFilesRequest = {
  RenamePackedFiles: [string, [ContainerPath, ContainerPath][]]
};
type RenamePackedFilesResponse = {
  VecContainerPathContainerPath: [ContainerPath, ContainerPath][]
};
public class RenamePackedFilesRequest
{
    public Tuple<string, List<Tuple<ContainerPath, ContainerPath>>> RenamePackedFiles { get; set; }
}
public class RenamePackedFilesResponse
{
    public List<Tuple<ContainerPath, ContainerPath>> VecContainerPathContainerPath { get; set; }
}

FolderExists

Check if a folder exists in a specific open Pack.

ParameterTypeDescription
pack_keystringPack to check
pathstringFolder path

Response: { Bool: boolean }

type FolderExistsRequest = { FolderExists: [string, string] };
type FolderExistsResponse = { Bool: boolean };
public class FolderExistsRequest
{
    public Tuple<string, string> FolderExists { get; set; }
}
public class FolderExistsResponse
{
    public bool Bool { get; set; }
}

PackedFileExists

Check if a packed file exists in a specific open Pack.

ParameterTypeDescription
pack_keystringPack to check
pathstringFile path

Response: { Bool: boolean }

type PackedFileExistsRequest = { PackedFileExists: [string, string] };
type PackedFileExistsResponse = { Bool: boolean };
public class PackedFileExistsRequest
{
    public Tuple<string, string> PackedFileExists { get; set; }
}
public class PackedFileExistsResponse
{
    public bool Bool { get; set; }
}

GetPackedFileRawData

Get the raw binary data of a packed file.

ParameterTypeDescription
pack_keystringPack to query
pathstringInternal file path

Response: { VecU8: number[] }

type GetPackedFileRawDataRequest = { GetPackedFileRawData: [string, string] };
type GetPackedFileRawDataResponse = { VecU8: number[] };
public class GetPackedFileRawDataRequest
{
    public Tuple<string, string> GetPackedFileRawData { get; set; }
}
public class GetPackedFileRawDataResponse
{
    public byte[] VecU8 { get; set; }
}

AddPackedFilesFromPackFile

Copy packed files from one Pack into another.

ParameterTypeDescription
target_keystringDestination pack key
source_keystringSource pack key
pathsContainerPath[]Paths to copy

Response: { VecContainerPath: ContainerPath[] }

type AddPackedFilesFromPackFileRequest = {
  AddPackedFilesFromPackFile: [string, string, ContainerPath[]]
};
type AddPackedFilesFromPackFileResponse = { VecContainerPath: ContainerPath[] };
public class AddPackedFilesFromPackFileRequest
{
    public Tuple<string, string, List<ContainerPath>> AddPackedFilesFromPackFile { get; set; }
}
public class AddPackedFilesFromPackFileResponse
{
    public List<ContainerPath> VecContainerPath { get; set; }
}

AddPackedFilesFromPackFileToAnimpack

Copy packed files from the main Pack into an AnimPack.

ParameterTypeDescription
pack_keystringPack containing animpack
animpack_pathstringPath to the AnimPack
pathsContainerPath[]Paths to copy

Response: { VecContainerPath: ContainerPath[] }

type AddPackedFilesFromPackFileToAnimpackRequest = {
  AddPackedFilesFromPackFileToAnimpack: [string, string, ContainerPath[]]
};
type AddPackedFilesFromPackFileToAnimpackResponse = { VecContainerPath: ContainerPath[] };
public class AddPackedFilesFromPackFileToAnimpackRequest
{
    public Tuple<string, string, List<ContainerPath>> AddPackedFilesFromPackFileToAnimpack { get; set; }
}
public class AddPackedFilesFromPackFileToAnimpackResponse
{
    public List<ContainerPath> VecContainerPath { get; set; }
}

AddPackedFilesFromAnimpack

Copy packed files from an AnimPack into the main Pack.

ParameterTypeDescription
pack_keystringTarget pack
sourceDataSourceData source
animpack_pathstringPath to the AnimPack
pathsContainerPath[]Paths to copy

Response: { VecContainerPath: ContainerPath[] }

type AddPackedFilesFromAnimpackRequest = {
  AddPackedFilesFromAnimpack: [string, DataSource, string, ContainerPath[]]
};
type AddPackedFilesFromAnimpackResponse = { VecContainerPath: ContainerPath[] };
public class AddPackedFilesFromAnimpackRequest
{
    public Tuple<string, string, string, List<ContainerPath>> AddPackedFilesFromAnimpack { get; set; }  // second is DataSource enum
}
public class AddPackedFilesFromAnimpackResponse
{
    public List<ContainerPath> VecContainerPath { get; set; }
}

DeleteFromAnimpack

Delete packed files from an AnimPack.

ParameterTypeDescription
pack_keystringPack containing animpack
animpack_pathstringPath to the AnimPack
pathsContainerPath[]Paths to delete

Response: "Success"

type DeleteFromAnimpackRequest = {
  DeleteFromAnimpack: [string, string, ContainerPath[]]
};
type DeleteFromAnimpackResponse = "Success";
public class DeleteFromAnimpackRequest
{
    public Tuple<string, string, List<ContainerPath>> DeleteFromAnimpack { get; set; }
}
// Response: the literal string "Success".

ImportDependenciesToOpenPackFile

Import files from dependencies into a specific open Pack.

ParameterTypeDescription
pack_keystringTarget pack
sourcesRecord<DataSource, ContainerPath[]>Files to import by source

Response: { VecContainerPathVecString: [ContainerPath[], string[]] } — added paths, failed paths.

type ImportDependenciesToOpenPackFileRequest = {
  ImportDependenciesToOpenPackFile: [string, Record<DataSource, ContainerPath[]>]
};
type ImportDependenciesToOpenPackFileResponse = {
  VecContainerPathVecString: [ContainerPath[], string[]]
};
public class ImportDependenciesToOpenPackFileRequest
{
    public Tuple<string, Dictionary<string, List<ContainerPath>>> ImportDependenciesToOpenPackFile { get; set; }
}
public class ImportDependenciesToOpenPackFileResponse
{
    public Tuple<List<ContainerPath>, List<string>> VecContainerPathVecString { get; set; }
}

SavePackedFilesToPackFileAndClean

Save packed files to a specific Pack and optionally run optimizer.

ParameterTypeDescription
pack_keystringTarget pack
filesRFile[]Files to save
optimizebooleanRun optimizer

Response: { VecContainerPathVecContainerPath: [ContainerPath[], ContainerPath[]] } — added and deleted paths.

type SavePackedFilesToPackFileAndCleanRequest = {
  SavePackedFilesToPackFileAndClean: [string, RFile[], boolean]
};
type SavePackedFilesToPackFileAndCleanResponse = {
  VecContainerPathVecContainerPath: [ContainerPath[], ContainerPath[]]
};
public class SavePackedFilesToPackFileAndCleanRequest
{
    public Tuple<string, List<RFile>, bool> SavePackedFilesToPackFileAndClean { get; set; }
}
public class SavePackedFilesToPackFileAndCleanResponse
{
    public Tuple<List<ContainerPath>, List<ContainerPath>> VecContainerPathVecContainerPath { get; set; }
}

GetPackedFilesNamesStartingWitPathFromAllSources

Get all file names under a path from all dependency sources.

ParameterTypeDescription
pathContainerPathPath prefix

Response: { HashMapDataSourceHashSetContainerPath: Record<DataSource, ContainerPath[]> }

type GetPackedFilesNamesStartingWitPathFromAllSourcesRequest = {
  GetPackedFilesNamesStartingWitPathFromAllSources: ContainerPath
};
type GetPackedFilesNamesStartingWitPathFromAllSourcesResponse = {
  HashMapDataSourceHashSetContainerPath: Record<DataSource, ContainerPath[]>
};
public class GetPackedFilesNamesStartingWitPathFromAllSourcesRequest
{
    public ContainerPath GetPackedFilesNamesStartingWitPathFromAllSources { get; set; }
}
public class GetPackedFilesNamesStartingWitPathFromAllSourcesResponse
{
    public Dictionary<string, List<ContainerPath>> HashMapDataSourceHashSetContainerPath { get; set; }
}

Dependency Commands

RebuildDependencies

Rebuild the dependencies by combining deps from all open packs.

ParameterTypeDescription
rebuild_allbooleantrue = all dependencies, false = mod-specific

Response: { DependenciesInfo: DependenciesInfo }

{ "id": 1, "data": { "RebuildDependencies": true } }
type RebuildDependenciesRequest = { RebuildDependencies: boolean };
type RebuildDependenciesResponse = { DependenciesInfo: DependenciesInfo };
public class RebuildDependenciesRequest
{
    public bool RebuildDependencies { get; set; }
}
public class RebuildDependenciesResponse
{
    public DependenciesInfo DependenciesInfo { get; set; }
}

IsThereADependencyDatabase

Check if a dependency database is loaded.

ParameterTypeDescription
require_asskitbooleanCheck that AssKit data is included

Response: { Bool: boolean }

type IsThereADependencyDatabaseRequest = { IsThereADependencyDatabase: boolean };
type IsThereADependencyDatabaseResponse = { Bool: boolean };
public class IsThereADependencyDatabaseRequest
{
    public bool IsThereADependencyDatabase { get; set; }
}
public class IsThereADependencyDatabaseResponse
{
    public bool Bool { get; set; }
}

GetTableListFromDependencyPackFile

Get all DB table names from dependency Pack files.

Response: { VecString: string[] }

type GetTableListFromDependencyPackFileRequest = "GetTableListFromDependencyPackFile";
type GetTableListFromDependencyPackFileResponse = { VecString: string[] };
// Request: send the literal string "GetTableListFromDependencyPackFile".
public class GetTableListFromDependencyPackFileResponse
{
    public List<string> VecString { get; set; }
}

GetCustomTableList

Get custom table names (start_pos_, twad_ prefixes) from the schema.

Response: { VecString: string[] }

type GetCustomTableListRequest = "GetCustomTableList";
type GetCustomTableListResponse = { VecString: string[] };
// Request: send the literal string "GetCustomTableList".
public class GetCustomTableListResponse
{
    public List<string> VecString { get; set; }
}

LocalArtSetIds

Get local art set IDs from campaign_character_arts_tables in a specific pack.

ParameterTypeDescription
pack_keystringPack to query

Response: { HashSetString: string[] }

type LocalArtSetIdsRequest = { LocalArtSetIds: string };
type LocalArtSetIdsResponse = { HashSetString: string[] };
public class LocalArtSetIdsRequest
{
    public string LocalArtSetIds { get; set; }
}
public class LocalArtSetIdsResponse
{
    public HashSet<string> HashSetString { get; set; }
}

DependenciesArtSetIds

Get art set IDs from dependencies’ campaign_character_arts_tables.

Response: { HashSetString: string[] }

type DependenciesArtSetIdsRequest = "DependenciesArtSetIds";
type DependenciesArtSetIdsResponse = { HashSetString: string[] };
// Request: send the literal string "DependenciesArtSetIds".
public class DependenciesArtSetIdsResponse
{
    public HashSet<string> HashSetString { get; set; }
}

GetTableVersionFromDependencyPackFile

Get the version of a table from the dependency database.

ParameterTypeDescription
table_namestringTable to query

Response: { I32: number }

type GetTableVersionFromDependencyPackFileRequest = { GetTableVersionFromDependencyPackFile: string };
type GetTableVersionFromDependencyPackFileResponse = { I32: number };
public class GetTableVersionFromDependencyPackFileRequest
{
    public string GetTableVersionFromDependencyPackFile { get; set; }
}
public class GetTableVersionFromDependencyPackFileResponse
{
    public int I32 { get; set; }
}

GetTableDefinitionFromDependencyPackFile

Get the definition of a table from the dependency database.

ParameterTypeDescription
table_namestringTable to query

Response: { Definition: Definition }

type GetTableDefinitionFromDependencyPackFileRequest = { GetTableDefinitionFromDependencyPackFile: string };
type GetTableDefinitionFromDependencyPackFileResponse = { Definition: Definition };
public class GetTableDefinitionFromDependencyPackFileRequest
{
    public string GetTableDefinitionFromDependencyPackFile { get; set; }
}
public class GetTableDefinitionFromDependencyPackFileResponse
{
    public Definition Definition { get; set; }
}

MergeFiles

Merge multiple compatible tables into one.

ParameterTypeDescription
pack_keystringPack containing the files
pathsContainerPath[]Files to merge
merged_pathstringDestination path for result
delete_sourcesbooleanDelete source files after

Response: { String: string } — merged path.

type MergeFilesRequest = { MergeFiles: [string, ContainerPath[], string, boolean] };
type MergeFilesResponse = { String: string };
public class MergeFilesRequest
{
    public Tuple<string, List<ContainerPath>, string, bool> MergeFiles { get; set; }
}
public class MergeFilesResponse
{
    public string String { get; set; }
}

UpdateTable

Update a table to a newer schema version.

ParameterTypeDescription
pack_keystringPack containing table
pathContainerPathTable path

Response: { I32I32VecStringVecString: [old_ver, new_ver, deleted_fields, added_fields] }

type UpdateTableRequest = { UpdateTable: [string, ContainerPath] };
type UpdateTableResponse = {
  I32I32VecStringVecString: [number, number, string[], string[]]
};
public class UpdateTableRequest
{
    public Tuple<string, ContainerPath> UpdateTable { get; set; }
}
public class UpdateTableResponse
{
    public Tuple<int, int, List<string>, List<string>> I32I32VecStringVecString { get; set; }
}

GetDependencyPackFilesList

Get the list of Pack files marked as dependencies of a specific Pack.

ParameterTypeDescription
pack_keystringPack to query

Response: { VecBoolString: [boolean, string][] }[enabled, pack_name] pairs.

type GetDependencyPackFilesListRequest = { GetDependencyPackFilesList: string };
type GetDependencyPackFilesListResponse = { VecBoolString: [boolean, string][] };
public class GetDependencyPackFilesListRequest
{
    public string GetDependencyPackFilesList { get; set; }
}
public class GetDependencyPackFilesListResponse
{
    public List<Tuple<bool, string>> VecBoolString { get; set; }
}

SetDependencyPackFilesList

Set the list of Pack files marked as dependencies.

ParameterTypeDescription
pack_keystringPack to modify
deps[boolean, string][][enabled, pack_name] pairs

Response: "Success"

type SetDependencyPackFilesListRequest = {
  SetDependencyPackFilesList: [string, [boolean, string][]]
};
type SetDependencyPackFilesListResponse = "Success";
public class SetDependencyPackFilesListRequest
{
    public Tuple<string, List<Tuple<bool, string>>> SetDependencyPackFilesList { get; set; }
}
// Response: the literal string "Success".

GetRFilesFromAllSources

Get packed files from all known sources.

ParameterTypeDescription
pathsContainerPath[]Paths to retrieve
lowercasebooleanNormalize paths to lowercase

Response: { HashMapDataSourceHashMapStringRFile: Record<DataSource, Record<string, RFile>> }

type GetRFilesFromAllSourcesRequest = { GetRFilesFromAllSources: [ContainerPath[], boolean] };
type GetRFilesFromAllSourcesResponse = {
  HashMapDataSourceHashMapStringRFile: Record<DataSource, Record<string, RFile>>
};
public class GetRFilesFromAllSourcesRequest
{
    public Tuple<List<ContainerPath>, bool> GetRFilesFromAllSources { get; set; }
}
public class GetRFilesFromAllSourcesResponse
{
    public Dictionary<string, Dictionary<string, RFile>> HashMapDataSourceHashMapStringRFile { get; set; }
}

Search Commands

GlobalSearch

Perform a global search across a specific pack.

ParameterTypeDescription
pack_keystringPack to search
configGlobalSearchSearch configuration

Response: { GlobalSearchVecRFileInfo: [GlobalSearch, RFileInfo[]] }

{
  "id": 1,
  "data": {
    "GlobalSearch": ["my_mod.pack", {
      "pattern": "cavalry",
      "replace_text": "",
      "case_sensitive": false,
      "use_regex": false,
      "sources": [{ "Pack": "my_mod.pack" }],
      "search_on": { "db": true, "loc": true, "text": true },
      "matches": {},
      "game_key": "warhammer_3"
    }]
  }
}
type GlobalSearchRequest = { GlobalSearch: [string, GlobalSearch] };
type GlobalSearchResponse = { GlobalSearchVecRFileInfo: [GlobalSearch, RFileInfo[]] };
public class GlobalSearchRequest
{
    public Tuple<string, GlobalSearch> GlobalSearch { get; set; }
}
public class GlobalSearchResponse
{
    public Tuple<GlobalSearch, List<RFileInfo>> GlobalSearchVecRFileInfo { get; set; }
}

GlobalSearchReplaceMatches

Replace specific matches in a global search.

ParameterTypeDescription
pack_keystringPack to modify
configGlobalSearchSearch config
matchesMatchHolder[]Matches to replace

Response: { GlobalSearchVecRFileInfo: [GlobalSearch, RFileInfo[]] }

type GlobalSearchReplaceMatchesRequest = {
  GlobalSearchReplaceMatches: [string, GlobalSearch, MatchHolder[]]
};
type GlobalSearchReplaceMatchesResponse = {
  GlobalSearchVecRFileInfo: [GlobalSearch, RFileInfo[]]
};
public class GlobalSearchReplaceMatchesRequest
{
    public Tuple<string, GlobalSearch, List<MatchHolder>> GlobalSearchReplaceMatches { get; set; }
}
public class GlobalSearchReplaceMatchesResponse
{
    public Tuple<GlobalSearch, List<RFileInfo>> GlobalSearchVecRFileInfo { get; set; }
}

GlobalSearchReplaceAll

Replace all matches in a global search.

ParameterTypeDescription
pack_keystringPack to modify
configGlobalSearchSearch config

Response: { GlobalSearchVecRFileInfo: [GlobalSearch, RFileInfo[]] }

type GlobalSearchReplaceAllRequest = { GlobalSearchReplaceAll: [string, GlobalSearch] };
type GlobalSearchReplaceAllResponse = {
  GlobalSearchVecRFileInfo: [GlobalSearch, RFileInfo[]]
};
public class GlobalSearchReplaceAllRequest
{
    public Tuple<string, GlobalSearch> GlobalSearchReplaceAll { get; set; }
}
public class GlobalSearchReplaceAllResponse
{
    public Tuple<GlobalSearch, List<RFileInfo>> GlobalSearchVecRFileInfo { get; set; }
}

GetReferenceDataFromDefinition

Get reference data for columns in a table definition.

ParameterTypeDescription
pack_keystringPack to query
table_namestringName of the table
definitionDefinitionTable definition
force_localbooleanForce regeneration from local

Response: { HashMapI32TableReferences: Record<number, TableReferences> }

type GetReferenceDataFromDefinitionRequest = {
  GetReferenceDataFromDefinition: [string, string, Definition, boolean]
};
type GetReferenceDataFromDefinitionResponse = {
  HashMapI32TableReferences: Record<number, TableReferences>
};
public class GetReferenceDataFromDefinitionRequest
{
    public Tuple<string, string, Definition, bool> GetReferenceDataFromDefinition { get; set; }
}
public class GetReferenceDataFromDefinitionResponse
{
    public Dictionary<int, TableReferences> HashMapI32TableReferences { get; set; }
}

SearchReferences

Find all references to a value across tables in a specific pack.

ParameterTypeDescription
pack_keystringPack to search
table_columnsRecord<string, string[]>Map of table name to column names
search_valuestringValue to search for

Response: { VecDataSourceStringStringStringUsizeUsize: [DataSource, string, string, string, number, number][] }

Each tuple is (data_source, pack_key, path, column_name, column_number, row_number). pack_key identifies which open Pack the hit came from for PackFile results, so a client looking at multiple open Packs can route the navigation back to the right one. For ParentFiles and GameFiles hits, pack_key is an empty string — those are read from the dependency cache and aren’t tied to a specific open Pack.

type SearchReferencesRequest = {
  SearchReferences: [string, Record<string, string[]>, string]
};
type SearchReferencesResponse = {
  VecDataSourceStringStringStringUsizeUsize: [DataSource, string, string, string, number, number][]
};
public class SearchReferencesRequest
{
    public Tuple<string, Dictionary<string, List<string>>, string> SearchReferences { get; set; }
}
public class SearchReferencesResponse
{
    public List<Tuple<string, string, string, string, long, long>> VecDataSourceStringStringStringUsizeUsize { get; set; }
}

GoToDefinition

Go to the definition of a table reference.

ParameterTypeDescription
pack_keystringPack to search
table_namestringTable name
column_namestringColumn name
valuesstring[]Values to search for

Response: { DataSourceStringUsizeUsize: [DataSource, string, number, number] }

type GoToDefinitionRequest = { GoToDefinition: [string, string, string, string[]] };
type GoToDefinitionResponse = {
  DataSourceStringUsizeUsize: [DataSource, string, number, number]
};
public class GoToDefinitionRequest
{
    public Tuple<string, string, string, List<string>> GoToDefinition { get; set; }
}
public class GoToDefinitionResponse
{
    public Tuple<string, string, long, long> DataSourceStringUsizeUsize { get; set; }
}

GoToLoc

Navigate to a loc key’s location.

ParameterTypeDescription
pack_keystringPack to search
loc_keystringLoc key to find

Response: { DataSourceStringUsizeUsize: [DataSource, string, number, number] }

type GoToLocRequest = { GoToLoc: [string, string] };
type GoToLocResponse = {
  DataSourceStringUsizeUsize: [DataSource, string, number, number]
};
public class GoToLocRequest
{
    public Tuple<string, string> GoToLoc { get; set; }
}
public class GoToLocResponse
{
    public Tuple<string, string, long, long> DataSourceStringUsizeUsize { get; set; }
}

GetSourceDataFromLocKey

Get the source data (table, column, values) of a loc key.

ParameterTypeDescription
pack_keystringPack to search
loc_keystringLoc key to look up

Response: { OptionStringStringVecString: [string, string, string[]] | null }

type GetSourceDataFromLocKeyRequest = { GetSourceDataFromLocKey: [string, string] };
type GetSourceDataFromLocKeyResponse = {
  OptionStringStringVecString: [string, string, string[]] | null
};
public class GetSourceDataFromLocKeyRequest
{
    public Tuple<string, string> GetSourceDataFromLocKey { get; set; }
}
public class GetSourceDataFromLocKeyResponse
{
    public Tuple<string, string, List<string>>? OptionStringStringVecString { get; set; }
}

Cascade Edition

CascadeEdition

Trigger a cascade edition on all referenced data in a specific pack.

ParameterTypeDescription
pack_keystringPack to modify
tablestringTable name
definitionDefinitionTable definition
changes[Field, string, string][][field, old_value, new_value] tuples

Response: { VecContainerPathVecRFileInfo: [ContainerPath[], RFileInfo[]] }

type CascadeEditionRequest = {
  CascadeEdition: [string, string, Definition, [Field, string, string][]]
};
type CascadeEditionResponse = {
  VecContainerPathVecRFileInfo: [ContainerPath[], RFileInfo[]]
};
public class CascadeEditionRequest
{
    public Tuple<string, string, Definition, List<Tuple<Field, string, string>>> CascadeEdition { get; set; }
}
public class CascadeEditionResponse
{
    public Tuple<List<ContainerPath>, List<RFileInfo>> VecContainerPathVecRFileInfo { get; set; }
}

Video Commands

SetVideoFormat

Change the format of a ca_vp8 video packed file.

ParameterTypeDescription
pack_keystringPack containing file
pathstringInternal file path
formatSupportedFormatsTarget video format

Response: "Success"

type SetVideoFormatRequest = { SetVideoFormat: [string, string, SupportedFormats] };
type SetVideoFormatResponse = "Success";
public class SetVideoFormatRequest
{
    public Tuple<string, string, string> SetVideoFormat { get; set; }  // third is SupportedFormats enum
}
// Response: the literal string "Success".

Schema Commands

SaveSchema

Save a schema to disk.

ParameterTypeDescription
schemaSchemaComplete schema to save

Response: "Success"

type SaveSchemaRequest = { SaveSchema: Schema };
type SaveSchemaResponse = "Success";
public class SaveSchemaRequest
{
    public Schema SaveSchema { get; set; }
}
// Response: the literal string "Success".

CleanCache

Encode and clean the internal cache for specified paths.

ParameterTypeDescription
pack_keystringPack to clean
pathsContainerPath[]Paths to process

Response: "Success"

type CleanCacheRequest = { CleanCache: [string, ContainerPath[]] };
type CleanCacheResponse = "Success";
public class CleanCacheRequest
{
    public Tuple<string, List<ContainerPath>> CleanCache { get; set; }
}
// Response: the literal string "Success".

IsSchemaLoaded

Check if a schema is loaded in memory.

Response: { Bool: boolean }

type IsSchemaLoadedRequest = "IsSchemaLoaded";
type IsSchemaLoadedResponse = { Bool: boolean };
// Request: send the literal string "IsSchemaLoaded".
public class IsSchemaLoadedResponse
{
    public bool Bool { get; set; }
}

Schema

Get the currently loaded schema.

Response: { Schema: Schema }

type SchemaRequest = "Schema";
type SchemaResponse = { Schema: Schema };
// Request: send the literal string "Schema".
public class SchemaResponse
{
    public Schema Schema { get; set; }
}

DefinitionsByTableName

Get all definitions (all versions) for a table name.

ParameterTypeDescription
table_namestringTable to query

Response: { VecDefinition: Definition[] }

type DefinitionsByTableNameRequest = { DefinitionsByTableName: string };
type DefinitionsByTableNameResponse = { VecDefinition: Definition[] };
public class DefinitionsByTableNameRequest
{
    public string DefinitionsByTableName { get; set; }
}
public class DefinitionsByTableNameResponse
{
    public List<Definition> VecDefinition { get; set; }
}

DefinitionByTableNameAndVersion

Get a specific definition by table name and version.

ParameterTypeDescription
table_namestringTable name
versionnumberVersion number

Response: { Definition: Definition }

type DefinitionByTableNameAndVersionRequest = {
  DefinitionByTableNameAndVersion: [string, number]
};
type DefinitionByTableNameAndVersionResponse = { Definition: Definition };
public class DefinitionByTableNameAndVersionRequest
{
    public Tuple<string, int> DefinitionByTableNameAndVersion { get; set; }
}
public class DefinitionByTableNameAndVersionResponse
{
    public Definition Definition { get; set; }
}

DeleteDefinition

Delete a definition by table name and version.

ParameterTypeDescription
table_namestringTable name
versionnumberVersion number

Response: "Success"

type DeleteDefinitionRequest = { DeleteDefinition: [string, number] };
type DeleteDefinitionResponse = "Success";
public class DeleteDefinitionRequest
{
    public Tuple<string, int> DeleteDefinition { get; set; }
}
// Response: the literal string "Success".

ReferencingColumnsForDefinition

Get columns from other tables that reference a given table/definition.

ParameterTypeDescription
table_namestringReferenced table
definitionDefinitionTable definition

Response: { HashMapStringHashMapStringVecString: Record<string, Record<string, string[]>> }

type ReferencingColumnsForDefinitionRequest = {
  ReferencingColumnsForDefinition: [string, Definition]
};
type ReferencingColumnsForDefinitionResponse = {
  HashMapStringHashMapStringVecString: Record<string, Record<string, string[]>>
};
public class ReferencingColumnsForDefinitionRequest
{
    public Tuple<string, Definition> ReferencingColumnsForDefinition { get; set; }
}
public class ReferencingColumnsForDefinitionResponse
{
    public Dictionary<string, Dictionary<string, List<string>>> HashMapStringHashMapStringVecString { get; set; }
}

FieldsProcessed

Get the processed fields from a definition (bitwise expansion, enum conversion, colour merging applied).

ParameterTypeDescription
definitionDefinitionDefinition to process

Response: { VecField: Field[] }

type FieldsProcessedRequest = { FieldsProcessed: Definition };
type FieldsProcessedResponse = { VecField: Field[] };
public class FieldsProcessedRequest
{
    public Definition FieldsProcessed { get; set; }
}
public class FieldsProcessedResponse
{
    public List<Field> VecField { get; set; }
}

TSV Commands

ExportTSV

Export a table as a TSV file.

ParameterTypeDescription
pack_keystringPack containing table
pathstringInternal table path
deststringFilesystem output path
sourceDataSourceData source

Response: "Success"

type ExportTSVRequest = { ExportTSV: [string, string, string, DataSource] };
type ExportTSVResponse = "Success";
public class ExportTSVRequest
{
    public Tuple<string, string, string, string> ExportTSV { get; set; }  // fourth is DataSource enum
}
// Response: the literal string "Success".

ImportTSV

Import a TSV file as a table.

ParameterTypeDescription
pack_keystringTarget pack
pathstringInternal destination path
tsv_pathstringFilesystem TSV path

Response: { RFileDecoded: RFileDecoded }

type ImportTSVRequest = { ImportTSV: [string, string, string] };
type ImportTSVResponse = { RFileDecoded: RFileDecoded };
public class ImportTSVRequest
{
    public Tuple<string, string, string> ImportTSV { get; set; }
}
public class ImportTSVResponse
{
    public RFileDecoded RFileDecoded { get; set; }
}

External Program Commands

OpenContainingFolder

Open the folder containing a specific open Pack in the file manager.

ParameterTypeDescription
pack_keystringPack whose folder to open

Response: "Success"

type OpenContainingFolderRequest = { OpenContainingFolder: string };
type OpenContainingFolderResponse = "Success";
public class OpenContainingFolderRequest
{
    public string OpenContainingFolder { get; set; }
}
// Response: the literal string "Success".

OpenPackedFileInExternalProgram

Open a packed file in an external program.

ParameterTypeDescription
pack_keystringPack containing file
sourceDataSourceData source
pathContainerPathFile path

Response: { PathBuf: string } — extracted temporary path.

type OpenPackedFileInExternalProgramRequest = {
  OpenPackedFileInExternalProgram: [string, DataSource, ContainerPath]
};
type OpenPackedFileInExternalProgramResponse = { PathBuf: string };
public class OpenPackedFileInExternalProgramRequest
{
    public Tuple<string, string, ContainerPath> OpenPackedFileInExternalProgram { get; set; }  // second is DataSource enum
}
public class OpenPackedFileInExternalProgramResponse
{
    public string PathBuf { get; set; }
}

SavePackedFileFromExternalView

Save a packed file that was edited in an external program.

ParameterTypeDescription
pack_keystringTarget pack
pathstringInternal path
ext_pathstringExternal file path

Response: "Success"

type SavePackedFileFromExternalViewRequest = {
  SavePackedFileFromExternalView: [string, string, string]
};
type SavePackedFileFromExternalViewResponse = "Success";
public class SavePackedFileFromExternalViewRequest
{
    public Tuple<string, string, string> SavePackedFileFromExternalView { get; set; }
}
// Response: the literal string "Success".

Diagnostics Commands

DiagnosticsCheck

Run a full diagnostics check over every open pack.

ParameterTypeDescription
diagnostics_ignoredstring[]Diagnostic type identifiers to skip during the check
check_akbooleanAlso check Assembly Kit-only references

Response: { Diagnostics: Diagnostics }

type DiagnosticsCheckRequest = { DiagnosticsCheck: [string[], boolean] };
type DiagnosticsCheckResponse = { Diagnostics: Diagnostics };
public class DiagnosticsCheckRequest
{
    public Tuple<List<string>, bool> DiagnosticsCheck { get; set; }
}
public class DiagnosticsCheckResponse
{
    public Diagnostics Diagnostics { get; set; }
}

DiagnosticsUpdate

Run a partial diagnostics update on specific paths.

ParameterTypeDescription
diagnosticsDiagnosticsExisting diagnostics state
pathsContainerPath[]Paths to re-check
check_akbooleanCheck AssKit-only references

Response: { Diagnostics: Diagnostics }

type DiagnosticsUpdateRequest = {
  DiagnosticsUpdate: [Diagnostics, ContainerPath[], boolean]
};
type DiagnosticsUpdateResponse = { Diagnostics: Diagnostics };
public class DiagnosticsUpdateRequest
{
    public Tuple<Diagnostics, List<ContainerPath>, bool> DiagnosticsUpdate { get; set; }
}
public class DiagnosticsUpdateResponse
{
    public Diagnostics Diagnostics { get; set; }
}

AddLineToPackIgnoredDiagnostics

Add a line to a specific pack’s ignored diagnostics list.

ParameterTypeDescription
pack_keystringPack to modify
linestringDiagnostic key to ignore

Response: "Success"

type AddLineToPackIgnoredDiagnosticsRequest = {
  AddLineToPackIgnoredDiagnostics: [string, string]
};
type AddLineToPackIgnoredDiagnosticsResponse = "Success";
public class AddLineToPackIgnoredDiagnosticsRequest
{
    public Tuple<string, string> AddLineToPackIgnoredDiagnostics { get; set; }
}
// Response: the literal string "Success".

Pack Settings Commands

GetPackSettings

Get the settings of a specific open Pack.

ParameterTypeDescription
pack_keystringPack to query

Response: { PackSettings: PackSettings }

type GetPackSettingsRequest = { GetPackSettings: string };
type GetPackSettingsResponse = { PackSettings: PackSettings };
public class GetPackSettingsRequest
{
    public string GetPackSettings { get; set; }
}
public class GetPackSettingsResponse
{
    public PackSettings PackSettings { get; set; }
}

SetPackSettings

Set the settings of a specific open Pack.

ParameterTypeDescription
pack_keystringPack to modify
settingsPackSettingsNew settings

Response: "Success"

type SetPackSettingsRequest = { SetPackSettings: [string, PackSettings] };
type SetPackSettingsResponse = "Success";
public class SetPackSettingsRequest
{
    public Tuple<string, PackSettings> SetPackSettings { get; set; }
}
// Response: the literal string "Success".

Notes Commands

NotesForPath

Get all notes under a given path in a specific pack.

ParameterTypeDescription
pack_keystringPack to query
pathstringPath prefix

Response: { VecNote: Note[] }

type NotesForPathRequest = { NotesForPath: [string, string] };
type NotesForPathResponse = { VecNote: Note[] };
public class NotesForPathRequest
{
    public Tuple<string, string> NotesForPath { get; set; }
}
public class NotesForPathResponse
{
    public List<Note> VecNote { get; set; }
}

AddNote

Add a note to a specific pack.

ParameterTypeDescription
pack_keystringTarget pack
noteNoteNote to add

Response: { Note: Note }

type AddNoteRequest = { AddNote: [string, Note] };
type AddNoteResponse = { Note: Note };
public class AddNoteRequest
{
    public Tuple<string, Note> AddNote { get; set; }
}
public class AddNoteResponse
{
    public Note Note { get; set; }
}

DeleteNote

Delete a note from a specific pack.

ParameterTypeDescription
pack_keystringPack to modify
pathstringNote path
note_idnumberNote ID

Response: "Success"

type DeleteNoteRequest = { DeleteNote: [string, string, number] };
type DeleteNoteResponse = "Success";
public class DeleteNoteRequest
{
    public Tuple<string, string, ulong> DeleteNote { get; set; }
}
// Response: the literal string "Success".

Schema Patch Commands

SaveLocalSchemaPatch

Save local schema patches to disk.

ParameterTypeDescription
patchesRecord<string, DefinitionPatch>Table name to patches

Response: "Success"

type SaveLocalSchemaPatchRequest = { SaveLocalSchemaPatch: Record<string, DefinitionPatch> };
type SaveLocalSchemaPatchResponse = "Success";
public class SaveLocalSchemaPatchRequest
{
    public Dictionary<string, DefinitionPatch> SaveLocalSchemaPatch { get; set; }
}
// Response: the literal string "Success".

RemoveLocalSchemaPatchesForTable

Remove all local schema patches for a table.

ParameterTypeDescription
table_namestringTable name

Response: "Success"

type RemoveLocalSchemaPatchesForTableRequest = { RemoveLocalSchemaPatchesForTable: string };
type RemoveLocalSchemaPatchesForTableResponse = "Success";
public class RemoveLocalSchemaPatchesForTableRequest
{
    public string RemoveLocalSchemaPatchesForTable { get; set; }
}
// Response: the literal string "Success".

RemoveLocalSchemaPatchesForTableAndField

Remove local schema patches for a specific field in a table.

ParameterTypeDescription
table_namestringTable name
field_namestringField name

Response: "Success"

type RemoveLocalSchemaPatchesForTableAndFieldRequest = {
  RemoveLocalSchemaPatchesForTableAndField: [string, string]
};
type RemoveLocalSchemaPatchesForTableAndFieldResponse = "Success";
public class RemoveLocalSchemaPatchesForTableAndFieldRequest
{
    public Tuple<string, string> RemoveLocalSchemaPatchesForTableAndField { get; set; }
}
// Response: the literal string "Success".

ImportSchemaPatch

Import schema patches into local patches.

ParameterTypeDescription
patchesRecord<string, DefinitionPatch>Table name to patches

Response: "Success"

type ImportSchemaPatchRequest = { ImportSchemaPatch: Record<string, DefinitionPatch> };
type ImportSchemaPatchResponse = "Success";
public class ImportSchemaPatchRequest
{
    public Dictionary<string, DefinitionPatch> ImportSchemaPatch { get; set; }
}
// Response: the literal string "Success".

Loc Generation Commands

GenerateMissingLocData

Generate all missing loc entries for a specific open Pack.

ParameterTypeDescription
pack_keystringPack to generate for

Response: { VecContainerPath: ContainerPath[] }

type GenerateMissingLocDataRequest = { GenerateMissingLocData: string };
type GenerateMissingLocDataResponse = { VecContainerPath: ContainerPath[] };
public class GenerateMissingLocDataRequest
{
    public string GenerateMissingLocData { get; set; }
}
public class GenerateMissingLocDataResponse
{
    public List<ContainerPath> VecContainerPath { get; set; }
}

Update Commands

All update commands take no parameters (send the literal command name). The Check* variants return an APIResponse (the main program) or a GitResponse (git-backed repos: schemas, autogen, AK, translations). The Update* variants apply the update and return "Success".

// Shared shapes for every command in this section:
type CheckAPIRequest = "CheckUpdates";
type CheckAPIResponse = { APIResponse: APIResponse };

type CheckGitRequest =
  | "CheckSchemaUpdates"
  | "CheckLuaAutogenUpdates"
  | "CheckEmpireAndNapoleonAKUpdates"
  | "CheckTranslationsUpdates";
type CheckGitResponse = { APIResponseGit: GitResponse };

type UpdateApplyRequest =
  | "UpdateSchemas"
  | "UpdateMainProgram"
  | "UpdateLuaAutogen"
  | "UpdateEmpireAndNapoleonAK"
  | "UpdateTranslations";
type UpdateApplyResponse = "Success";
// Shared shapes for every command in this section:
public class CheckAPIResponse
{
    public APIResponse APIResponse { get; set; }
}
public class CheckGitResponse
{
    public GitResponse APIResponseGit { get; set; }
}
// Update apply requests take no parameters; the response is the literal string "Success".

CheckUpdates

Check if there is an RPFM update available.

Response: { APIResponse: APIResponse }

CheckSchemaUpdates

Check if there is a schema update available.

Response: { APIResponseGit: GitResponse }

UpdateSchemas

Download and apply schema updates.

Response: "Success"

UpdateMainProgram

Update RPFM to the latest version.

Response: "Success"

CheckLuaAutogenUpdates

Check for updates on the tw_autogen repository.

Response: { APIResponseGit: GitResponse }

UpdateLuaAutogen

Update the tw_autogen repository.

Response: "Success"

CheckEmpireAndNapoleonAKUpdates

Check for updates on the old Assembly Kit files repository.

Response: { APIResponseGit: GitResponse }

UpdateEmpireAndNapoleonAK

Update the old Assembly Kit files repository.

Response: "Success"

CheckTranslationsUpdates

Check for translation updates.

Response: { APIResponseGit: GitResponse }

UpdateTranslations

Update the translations repository.

Response: "Success"


MyMod Commands

InitializeMyModFolder

Initialize a MyMod folder structure.

ParameterTypeDescription
mod_namestringName of the mod
game_keystringTarget game
sublimebooleanCreate Sublime Text project
vscodebooleanCreate VS Code project
gitignorestring or nullGitignore content (null = no git)

Response: { PathBuf: string } — path to the new pack.

type InitializeMyModFolderRequest = {
  InitializeMyModFolder: [string, string, boolean, boolean, string | null]
};
type InitializeMyModFolderResponse = { PathBuf: string };
public class InitializeMyModFolderRequest
{
    public Tuple<string, string, bool, bool, string?> InitializeMyModFolder { get; set; }
}
public class InitializeMyModFolderResponse
{
    public string PathBuf { get; set; }
}

LiveExport

Live-export a specific Pack to the game’s data folder.

ParameterTypeDescription
pack_keystringPack to export

Response: "Success"

type LiveExportRequest = { LiveExport: string };
type LiveExportResponse = "Success";
public class LiveExportRequest
{
    public string LiveExport { get; set; }
}
// Response: the literal string "Success".

GetPackOperationalMode

Get the operational mode for a specific pack. This controls whether the pack is treated as a MyMod (with its game/pack association) or as a plain pack.

ParameterTypeDescription
pack_keystringPack to query

Response: { OperationalMode: OperationalMode } — see OperationalMode.

{ "id": 1, "data": { "GetPackOperationalMode": "my_mod.pack" } }
type GetPackOperationalModeRequest = { GetPackOperationalMode: string };
type GetPackOperationalModeResponse = { OperationalMode: OperationalMode };
public class GetPackOperationalModeRequest
{
    public string GetPackOperationalMode { get; set; }
}
public class GetPackOperationalModeResponse
{
    public OperationalMode OperationalMode { get; set; }
}

SetPackOperationalMode

Set the operational mode for a specific pack.

ParameterTypeDescription
pack_keystringPack to modify
modeOperationalModeNew operational mode

Response: "Success"

{ "id": 1, "data": { "SetPackOperationalMode": ["my_mod.pack", { "MyMod": ["warhammer_2", "my_mod.pack"] }] } }
type SetPackOperationalModeRequest = {
  SetPackOperationalMode: [string, OperationalMode]
};
type SetPackOperationalModeResponse = "Success";
public class SetPackOperationalModeRequest
{
    public Tuple<string, OperationalMode> SetPackOperationalMode { get; set; }
}
// Response: the literal string "Success".

Translation Commands

GetPackTranslation

Get pack translation data for a language from a specific pack.

ParameterTypeDescription
pack_keystringPack to query
languagestringLanguage code

Response: { PackTranslation: PackTranslation }

type GetPackTranslationRequest = { GetPackTranslation: [string, string] };
type GetPackTranslationResponse = { PackTranslation: PackTranslation };
public class GetPackTranslationRequest
{
    public Tuple<string, string> GetPackTranslation { get; set; }
}
public class GetPackTranslationResponse
{
    public PackTranslation PackTranslation { get; set; }
}

Starpos Commands

BuildStarpos

Build starpos (pre-processing step) for a specific pack.

ParameterTypeDescription
pack_keystringTarget pack
campaign_idstringCampaign identifier
process_hlp_spdbooleanProcess HLP/SPD data

Response: "Success"

type BuildStarposRequest = { BuildStarpos: [string, string, boolean] };
type BuildStarposResponse = "Success";
public class BuildStarposRequest
{
    public Tuple<string, string, bool> BuildStarpos { get; set; }
}
// Response: the literal string "Success".

BuildStarposPost

Build starpos (post-processing step) for a specific pack.

ParameterTypeDescription
pack_keystringTarget pack
campaign_idstringCampaign identifier
process_hlp_spdbooleanProcess HLP/SPD data

Response: { VecContainerPath: ContainerPath[] }

type BuildStarposPostRequest = { BuildStarposPost: [string, string, boolean] };
type BuildStarposPostResponse = { VecContainerPath: ContainerPath[] };
public class BuildStarposPostRequest
{
    public Tuple<string, string, bool> BuildStarposPost { get; set; }
}
public class BuildStarposPostResponse
{
    public List<ContainerPath> VecContainerPath { get; set; }
}

BuildStarposCleanup

Clean up starpos temporary files for a specific pack.

ParameterTypeDescription
pack_keystringTarget pack
campaign_idstringCampaign identifier
process_hlp_spdbooleanProcess HLP/SPD data

Response: "Success"

type BuildStarposCleanupRequest = { BuildStarposCleanup: [string, string, boolean] };
type BuildStarposCleanupResponse = "Success";
public class BuildStarposCleanupRequest
{
    public Tuple<string, string, bool> BuildStarposCleanup { get; set; }
}
// Response: the literal string "Success".

BuildStarposGetCampaingIds

Get campaign IDs available for starpos building from a specific pack.

ParameterTypeDescription
pack_keystringPack to query

Response: { HashSetString: string[] }

type BuildStarposGetCampaingIdsRequest = { BuildStarposGetCampaingIds: string };
type BuildStarposGetCampaingIdsResponse = { HashSetString: string[] };
public class BuildStarposGetCampaingIdsRequest
{
    public string BuildStarposGetCampaingIds { get; set; }
}
public class BuildStarposGetCampaingIdsResponse
{
    public HashSet<string> HashSetString { get; set; }
}

BuildStarposCheckVictoryConditions

Check if victory conditions file exists in a specific pack.

ParameterTypeDescription
pack_keystringPack to check

Response: "Success"

type BuildStarposCheckVictoryConditionsRequest = { BuildStarposCheckVictoryConditions: string };
type BuildStarposCheckVictoryConditionsResponse = "Success";
public class BuildStarposCheckVictoryConditionsRequest
{
    public string BuildStarposCheckVictoryConditions { get; set; }
}
// Response: the literal string "Success".

Animation Commands

UpdateAnimIds

Update animation IDs with an offset in a specific pack.

ParameterTypeDescription
pack_keystringPack to modify
starting_idnumberStarting ID
offsetnumberID offset

Response: { VecContainerPath: ContainerPath[] }

type UpdateAnimIdsRequest = { UpdateAnimIds: [string, number, number] };
type UpdateAnimIdsResponse = { VecContainerPath: ContainerPath[] };
public class UpdateAnimIdsRequest
{
    public Tuple<string, int, int> UpdateAnimIds { get; set; }
}
public class UpdateAnimIdsResponse
{
    public List<ContainerPath> VecContainerPath { get; set; }
}

GetAnimPathsBySkeletonName

Get animation paths by skeleton name.

ParameterTypeDescription
skeleton_namestringSkeleton name

Response: { HashSetString: string[] }

type GetAnimPathsBySkeletonNameRequest = { GetAnimPathsBySkeletonName: string };
type GetAnimPathsBySkeletonNameResponse = { HashSetString: string[] };
public class GetAnimPathsBySkeletonNameRequest
{
    public string GetAnimPathsBySkeletonName { get; set; }
}
public class GetAnimPathsBySkeletonNameResponse
{
    public HashSet<string> HashSetString { get; set; }
}

Table Commands

GetTablesFromDependencies

Get tables from dependencies by table name.

ParameterTypeDescription
table_namestringTable to query

Response: { VecRFile: RFile[] }

type GetTablesFromDependenciesRequest = { GetTablesFromDependencies: string };
type GetTablesFromDependenciesResponse = { VecRFile: RFile[] };
public class GetTablesFromDependenciesRequest
{
    public string GetTablesFromDependencies { get; set; }
}
public class GetTablesFromDependenciesResponse
{
    public List<RFile> VecRFile { get; set; }
}

GetTablesByTableName

Get table paths by table name from a specific Pack.

ParameterTypeDescription
pack_keystringPack to query
table_namestringTable name

Response: { VecString: string[] }

type GetTablesByTableNameRequest = { GetTablesByTableName: [string, string] };
type GetTablesByTableNameResponse = { VecString: string[] };
public class GetTablesByTableNameRequest
{
    public Tuple<string, string> GetTablesByTableName { get; set; }
}
public class GetTablesByTableNameResponse
{
    public List<string> VecString { get; set; }
}

AddKeysToKeyDeletes

Add keys to the key_deletes table in a specific pack.

ParameterTypeDescription
pack_keystringTarget pack
table_file_namestringTable file name
key_table_namestringKey table name
keysstring[]Keys to add

Response: { OptionContainerPath: ContainerPath | null }

type AddKeysToKeyDeletesRequest = {
  AddKeysToKeyDeletes: [string, string, string, string[]]
};
type AddKeysToKeyDeletesResponse = { OptionContainerPath: ContainerPath | null };
public class AddKeysToKeyDeletesRequest
{
    public Tuple<string, string, string, HashSet<string>> AddKeysToKeyDeletes { get; set; }
}
public class AddKeysToKeyDeletesResponse
{
    public ContainerPath? OptionContainerPath { get; set; }
}

Map Packing Commands

PackMap

Pack map tiles into a specific Pack.

ParameterTypeDescription
pack_keystringTarget pack
tile_mapsstring[]Tile map paths
tiles[string, string][][tile_path, tile_name] pairs

Response: { VecContainerPathVecContainerPath: [ContainerPath[], ContainerPath[]] } — added and deleted paths.

type PackMapRequest = {
  PackMap: [string, string[], [string, string][]]
};
type PackMapResponse = {
  VecContainerPathVecContainerPath: [ContainerPath[], ContainerPath[]]
};
public class PackMapRequest
{
    public Tuple<string, List<string>, List<Tuple<string, string>>> PackMap { get; set; }
}
public class PackMapResponse
{
    public Tuple<List<ContainerPath>, List<ContainerPath>> VecContainerPathVecContainerPath { get; set; }
}

3D Export Commands

ExportRigidToGltf

Export a RigidModel to glTF format.

ParameterTypeDescription
modelRigidModelModel to export
output_pathstringOutput file path

Response: "Success"

type ExportRigidToGltfRequest = { ExportRigidToGltf: [RigidModel, string] };
type ExportRigidToGltfResponse = "Success";
public class ExportRigidToGltfRequest
{
    public Tuple<RigidModel, string> ExportRigidToGltf { get; set; }
}
// Response: the literal string "Success".

Settings Commands

Settings Getters

All settings getters take a single key string parameter and return the value in a typed wrapper:

CommandResponse Type
SettingsGetBool{ Bool: boolean }
SettingsGetI32{ I32: number }
SettingsGetF32{ F32: number }
SettingsGetString{ String: string }
SettingsGetPathBuf{ PathBuf: string }
SettingsGetVecString{ VecString: string[] }
SettingsGetVecRaw{ VecU8: number[] }
{ "id": 1, "data": { "SettingsGetString": "game_selected" } }
// Shared shapes for every getter in this subsection:
type SettingsGetRequest =
  | { SettingsGetBool: string }
  | { SettingsGetI32: string }
  | { SettingsGetF32: string }
  | { SettingsGetString: string }
  | { SettingsGetPathBuf: string }
  | { SettingsGetVecString: string }
  | { SettingsGetVecRaw: string };

type SettingsGetResponse =
  | { Bool: boolean }
  | { I32: number }
  | { F32: number }
  | { String: string }
  | { PathBuf: string }
  | { VecString: string[] }
  | { VecU8: number[] };
// Request: { "SettingsGetBool": "some_key" } (or any of the other getter names).
// Response wrappers — one per getter:
public class SettingsGetBoolResponse    { public bool Bool { get; set; } }
public class SettingsGetI32Response     { public int I32 { get; set; } }
public class SettingsGetF32Response     { public float F32 { get; set; } }
public class SettingsGetStringResponse  { public string String { get; set; } }
public class SettingsGetPathBufResponse { public string PathBuf { get; set; } }
public class SettingsGetVecStringResponse { public List<string> VecString { get; set; } }
public class SettingsGetVecRawResponse  { public byte[] VecU8 { get; set; } }

SettingsGetAll

Get all settings at once (batch loading). Much more efficient than individual calls when you need several settings — one IPC round-trip instead of one per key.

Response: { SettingsAll: SettingsSnapshot } — see SettingsSnapshot for the field layout (bool / i32 / f32 / string / raw_data / vec_string maps).

{ "id": 1, "data": "SettingsGetAll" }
type SettingsGetAllRequest = "SettingsGetAll";
type SettingsGetAllResponse = { SettingsAll: SettingsSnapshot };
// Request: send the literal string "SettingsGetAll".
public class SettingsGetAllResponse
{
    public SettingsSnapshot SettingsAll { get; set; }
}

Settings Setters

All settings setters take a [key, value] tuple and return "Success":

CommandValue Type
SettingsSetBoolboolean
SettingsSetI32number
SettingsSetF32number
SettingsSetStringstring
SettingsSetPathBufstring
SettingsSetVecStringstring[]
SettingsSetVecRawnumber[]
{ "id": 1, "data": { "SettingsSetString": ["game_selected", "warhammer_3"] } }
// Shared shapes for every setter in this subsection:
type SettingsSetRequest =
  | { SettingsSetBool: [string, boolean] }
  | { SettingsSetI32: [string, number] }
  | { SettingsSetF32: [string, number] }
  | { SettingsSetString: [string, string] }
  | { SettingsSetPathBuf: [string, string] }
  | { SettingsSetVecString: [string, string[]] }
  | { SettingsSetVecRaw: [string, number[]] };

type SettingsSetResponse = "Success";
// Request wrappers — one per setter. Every response is the literal string "Success".
public class SettingsSetBoolRequest    { public Tuple<string, bool> SettingsSetBool { get; set; } }
public class SettingsSetI32Request     { public Tuple<string, int> SettingsSetI32 { get; set; } }
public class SettingsSetF32Request     { public Tuple<string, float> SettingsSetF32 { get; set; } }
public class SettingsSetStringRequest  { public Tuple<string, string> SettingsSetString { get; set; } }
public class SettingsSetPathBufRequest { public Tuple<string, string> SettingsSetPathBuf { get; set; } }
public class SettingsSetVecStringRequest { public Tuple<string, List<string>> SettingsSetVecString { get; set; } }
public class SettingsSetVecRawRequest  { public Tuple<string, byte[]> SettingsSetVecRaw { get; set; } }

SettingsClearPath

Clear a specific config path entry.

ParameterTypeDescription
pathstringPath to clear

Response: "Success"

type SettingsClearPathRequest = { SettingsClearPath: string };
type SettingsClearPathResponse = "Success";
public class SettingsClearPathRequest
{
    public string SettingsClearPath { get; set; }
}
// Response: the literal string "Success".

Path Commands

These commands return filesystem paths used by RPFM. All respond with { PathBuf: string }:

CommandDescription
ConfigPathConfig directory path
AssemblyKitPathAssembly Kit path for current game
BackupAutosavePathBackup autosave directory
OldAkDataPathOld AK data directory
SchemasPathSchemas directory
TableProfilesPathTable profiles directory
TranslationsLocalPathTranslations local directory
DependenciesCachePathDependencies cache directory
{ "id": 1, "data": "SchemasPath" }
// Shared shapes for every command in this section:
type PathCommandRequest =
  | "ConfigPath"
  | "AssemblyKitPath"
  | "BackupAutosavePath"
  | "OldAkDataPath"
  | "SchemasPath"
  | "TableProfilesPath"
  | "TranslationsLocalPath"
  | "DependenciesCachePath";
type PathCommandResponse = { PathBuf: string };
// Request: send the literal command name as a string.
public class PathCommandResponse
{
    public string PathBuf { get; set; }
}

Settings Backup Commands

BackupSettings

Backup current settings to memory (for restore on cancel).

Response: "Success"

type BackupSettingsRequest = "BackupSettings";
type BackupSettingsResponse = "Success";
// Request: send the literal string "BackupSettings".
// Response: the literal string "Success".

ClearSettings

Clear all settings and reset to defaults.

Response: "Success"

type ClearSettingsRequest = "ClearSettings";
type ClearSettingsResponse = "Success";
// Request: send the literal string "ClearSettings".
// Response: the literal string "Success".

RestoreBackupSettings

Restore settings from the in-memory backup.

Response: "Success"

type RestoreBackupSettingsRequest = "RestoreBackupSettings";
type RestoreBackupSettingsResponse = "Success";
// Request: send the literal string "RestoreBackupSettings".
// Response: the literal string "Success".

OptimizerOptions

Get the optimizer options configuration.

Response: { OptimizerOptions: OptimizerOptions }

type OptimizerOptionsRequest = "OptimizerOptions";
type OptimizerOptionsResponse = { OptimizerOptions: OptimizerOptions };
// Request: send the literal string "OptimizerOptions".
public class OptimizerOptionsResponse
{
    public OptimizerOptions OptimizerOptions { get; set; }
}

Debug Commands

GetMissingDefinitions

Export missing table definitions from a specific pack to a file (for debugging/development).

ParameterTypeDescription
pack_keystringPack to export from

Response: "Success"

type GetMissingDefinitionsRequest = { GetMissingDefinitions: string };
type GetMissingDefinitionsResponse = "Success";
public class GetMissingDefinitionsRequest
{
    public string GetMissingDefinitions { get; set; }
}
// Response: the literal string "Success".

Autosave Commands

TriggerBackupAutosave

Trigger an autosave backup of a specific Pack.

ParameterTypeDescription
pack_keystringPack to back up

Response: "Success"

type TriggerBackupAutosaveRequest = { TriggerBackupAutosave: string };
type TriggerBackupAutosaveResponse = "Success";
public class TriggerBackupAutosaveRequest
{
    public string TriggerBackupAutosave { get; set; }
}
// Response: the literal string "Success".