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

Responses

This page documents all possible responses from the RPFM server. Each response is wrapped in a Message with the same id as the originating command.

Responses follow the same serialization convention as commands:

  • Unit responses are plain strings: "Success"
  • Responses with data use a named wrapper: { "Bool": true }, { "Error": "File not found" }
{ "id": 1, "data": "Success" }
{ "id": 2, "data": { "Error": "File not found" } }
{ "id": 3, "data": { "ContainerInfoVecRFileInfo": [{ ... }, [{ ... }]] } }

Generic Responses

ResponsePayloadDescription
Success(none)Operation completed successfully
ErrorstringHuman-readable error message
SessionConnectednumberSession ID (unsolicited, sent on connect with id=0)
Unknown(none)Returned for unsupported/unrecognized file types

File-Type Decoded Responses

These are returned by DecodePackedFile. Each carries a tuple of [DecodedData, RFileInfo]:

ResponsePayload Type
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]

Example:

{
  "id": 5,
  "data": {
    "DBRFileInfo": [
      { "mysterious_byte": true, "guid": "", "table": { ... } },
      { "path": "db/units_tables/data", "container_name": "my_mod.pack", "timestamp": null, "file_type": "DB" }
    ]
  }
}

Scalar Responses

ResponsePayload TypeDescription
BoolbooleanBoolean value
F32number32-bit float
I32number32-bit integer
I32I32[number, number]Pair of integers
StringstringString value
PathBufstringFilesystem path

Collection Responses

ResponsePayload TypeDescription
VecBoolString[boolean, string][]Boolean-string pairs
VecContainerPathContainerPath[]List of container paths
VecContainerPathContainerPath[ContainerPath, ContainerPath][]Pairs of container paths (renames)
VecContainerPathOptionString[ContainerPath[], string or null]Paths with optional error message
VecContainerPathVecContainerPath[ContainerPath[], ContainerPath[]]Two lists of paths (added, deleted)
VecContainerPathVecRFileInfo[ContainerPath[], RFileInfo[]]Paths and file info
VecContainerPathVecString[ContainerPath[], string[]]Paths and string list
VecDataSourceStringStringUsizeUsize[DataSource, string, string, number, number][]Reference search results
VecDefinitionDefinition[]List of definitions
VecFieldField[]List of fields
VecNoteNote[]List of notes
VecRFileRFile[]List of raw files
VecRFileInfoRFileInfo[]List of file metadata
VecStringstring[]List of strings
VecStringContainerInfo[string, ContainerInfo][]Pack key + metadata pairs
VecU8number[]Raw byte data
HashSetStringstring[]Set of strings
HashSetStringHashSetString[string[], string[]]Two sets of strings

Compound Responses

ResponsePayload TypeDescription
APIResponseAPIResponseProgram update check result
APIResponseGitGitResponseGit update check result
CompressionFormatCompressionFormatPack compression format
CompressionFormatDependenciesInfo[CompressionFormat, DependenciesInfo or null]Format + optional dependencies info
ContainerInfoContainerInfoPack metadata
ContainerInfoVecRFileInfo[ContainerInfo, RFileInfo[]]Pack metadata + file list
StringContainerInfo[string, ContainerInfo]Pack key + metadata
DataSourceStringUsizeUsize[DataSource, string, number, number]Navigation result
DefinitionDefinitionTable definition
DependenciesInfoDependenciesInfoDependencies information
DiagnosticsDiagnosticsDiagnostics report
GlobalSearchVecRFileInfo[GlobalSearch, RFileInfo[]]Search results + modified files
HashMapDataSourceHashMapStringRFileRecord<DataSource, Record<string, RFile>>Files by source and path
HashMapDataSourceHashSetContainerPathRecord<DataSource, ContainerPath[]>Paths by data source
HashMapI32TableReferencesRecord<number, TableReferences>Column references by index
HashMapStringHashMapStringVecStringRecord<string, Record<string, string[]>>Nested string maps
I32I32VecStringVecString[number, number, string[], string[]]Version change result
NoteNoteSingle note
OptimizerOptionsOptimizerOptionsOptimizer configuration
OptionContainerPathContainerPath or nullOptional container path
OptionRFileInfoRFileInfo or nullOptional file info
OptionStringStringVecString[string, string, string[]] or nullOptional loc source data
PackSettingsPackSettingsPack settings
PackTranslationPackTranslationTranslation data
RFileDecodedRFileDecodedDecoded file content
SchemaSchemaFull schema
StringVecContainerPath[string, ContainerPath[]]String + path list
StringVecPathBuf[string, string[]]String + filesystem paths
TextTextText file content

Batch Settings Response

SettingsAll

Returned by SettingsGetAll. Contains all settings in one payload:

{
  "SettingsAll": [
    { "setting_bool_key": true },
    { "setting_i32_key": 42 },
    { "setting_f32_key": 1.5 },
    { "setting_string_key": "value" }
  ]
}

The array contains [bool_settings, i32_settings, f32_settings, string_settings].