pub enum Command {
Show 153 variants
Exit,
ClientDisconnecting,
ClosePack(String),
CloseAllPacks,
CleanAndSavePackAs(String, PathBuf),
ListOpenPacks,
NewPack,
SavePack(String),
SavePackAs(String, PathBuf),
GetPackFileDataForTreeView(String),
OpenPackFiles(Vec<PathBuf>),
LoadAllCAPackFiles,
GetPackedFilesInfo(String, Vec<String>),
GlobalSearch(String, GlobalSearch),
SetGameSelected(String, bool),
GetGameSelected,
SetPackFileType(String, PFHFileType),
GenerateDependenciesCache,
UpdateCurrentSchemaFromAssKit,
OptimizePackFile(String, OptimizerOptions),
PatchSiegeAI(String),
ChangeIndexIncludesTimestamp(String, bool),
ChangeCompressionFormat(String, CompressionFormat),
GetPackFilePath(String),
GetRFileInfo(String, String),
CheckUpdates,
CheckSchemaUpdates,
UpdateSchemas,
IsThereADependencyDatabase(bool),
NewPackedFile(String, String, NewFile),
AddPackedFiles(String, Vec<PathBuf>, Vec<ContainerPath>, Option<Vec<PathBuf>>),
DecodePackedFile(String, String, DataSource),
SavePackedFileFromView(String, String, RFileDecoded),
AddPackedFilesFromPackFile(String, String, Vec<ContainerPath>),
AddPackedFilesFromPackFileToAnimpack(String, String, Vec<ContainerPath>),
AddPackedFilesFromAnimpack(String, DataSource, String, Vec<ContainerPath>),
DeleteFromAnimpack(String, String, Vec<ContainerPath>),
DeletePackedFiles(String, Vec<ContainerPath>),
CopyPackedFiles(BTreeMap<String, Vec<ContainerPath>>),
CutPackedFiles(BTreeMap<String, Vec<ContainerPath>>),
PastePackedFiles(String, String),
DuplicatePackedFiles(String, Vec<ContainerPath>),
ExtractPackedFiles(String, BTreeMap<DataSource, Vec<ContainerPath>>, PathBuf, bool),
RenamePackedFiles(String, Vec<(ContainerPath, ContainerPath)>),
FolderExists(String, String),
PackedFileExists(String, String),
GetTableListFromDependencyPackFile,
GetCustomTableList,
LocalArtSetIds(String),
DependenciesArtSetIds,
GetTableVersionFromDependencyPackFile(String),
GetTableDefinitionFromDependencyPackFile(String),
MergeFiles(String, Vec<ContainerPath>, String, bool),
UpdateTable(String, ContainerPath),
GlobalSearchReplaceMatches(String, GlobalSearch, Vec<MatchHolder>),
GlobalSearchReplaceAll(String, GlobalSearch),
GetReferenceDataFromDefinition(String, String, Definition, bool),
GetDependencyPackFilesList(String),
SetDependencyPackFilesList(String, Vec<(bool, String)>),
GetRFilesFromAllSources(Vec<ContainerPath>, bool),
SetVideoFormat(String, String, SupportedFormats),
SaveSchema(Schema),
CleanCache(String, Vec<ContainerPath>),
ExportTSV(String, String, PathBuf, DataSource),
ImportTSV(String, String, PathBuf),
OpenContainingFolder(String),
OpenPackedFileInExternalProgram(String, DataSource, ContainerPath),
SavePackedFileFromExternalView(String, String, PathBuf),
UpdateMainProgram,
TriggerBackupAutosave(String),
DiagnosticsCheck(Vec<String>, bool),
DiagnosticsUpdate(Diagnostics, Vec<ContainerPath>, bool),
GetPackSettings(String),
SetPackSettings(String, PackSettings),
GetMissingDefinitions(String),
RebuildDependencies(bool),
CascadeEdition(String, String, Definition, Vec<(Field, String, String)>),
GoToDefinition(String, String, String, Vec<String>),
GetSourceDataFromLocKey(String, String),
GoToLoc(String, String),
SearchReferences(String, HashMap<String, Vec<String>>, String),
GetPackFileName(String),
GetPackedFileRawData(String, String),
ImportDependenciesToOpenPackFile(String, BTreeMap<DataSource, Vec<ContainerPath>>),
SavePackedFilesToPackFileAndClean(String, Vec<RFile>, bool),
GetPackedFilesNamesStartingWitPathFromAllSources(ContainerPath),
NotesForPath(String, String),
AddNote(String, Note),
DeleteNote(String, String, u64),
SaveLocalSchemaPatch(HashMap<String, DefinitionPatch>),
RemoveLocalSchemaPatchesForTable(String),
RemoveLocalSchemaPatchesForTableAndField(String, String),
ImportSchemaPatch(HashMap<String, DefinitionPatch>),
GenerateMissingLocData(String),
CheckLuaAutogenUpdates,
UpdateLuaAutogen,
InitializeMyModFolder(String, String, bool, bool, Option<String>),
LiveExport(String),
SetPackOperationalMode(String, OperationalMode),
GetPackOperationalMode(String),
PackMap(String, Vec<PathBuf>, Vec<(PathBuf, String)>),
AddLineToPackIgnoredDiagnostics(String, String),
CheckEmpireAndNapoleonAKUpdates,
UpdateEmpireAndNapoleonAK,
GetPackTranslation(String, String),
CheckTranslationsUpdates,
UpdateTranslations,
BuildStarpos(String, String, bool),
BuildStarposPost(String, String, bool),
BuildStarposCleanup(String, String, bool),
BuildStarposGetCampaingIds(String),
BuildStarposCheckVictoryConditions(String),
UpdateAnimIds(String, i32, i32),
GetAnimPathsBySkeletonName(String),
GetTablesFromDependencies(String),
GetTablesByTableName(String, String),
AddKeysToKeyDeletes(String, String, String, HashSet<String>),
ExportRigidToGltf(RigidModel, String),
SettingsGetBool(String),
SettingsGetI32(String),
SettingsGetF32(String),
SettingsGetString(String),
SettingsGetPathBuf(String),
SettingsGetVecString(String),
SettingsGetVecRaw(String),
SettingsGetAll,
SettingsSetBool(String, bool),
SettingsSetI32(String, i32),
SettingsSetF32(String, f32),
SettingsSetString(String, String),
SettingsSetPathBuf(String, PathBuf),
SettingsSetVecString(String, Vec<String>),
SettingsSetVecRaw(String, Vec<u8>),
ConfigPath,
AssemblyKitPath,
BackupAutosavePath,
OldAkDataPath,
SchemasPath,
TableProfilesPath,
TranslationsLocalPath,
DependenciesCachePath,
SettingsClearPath(PathBuf),
BackupSettings,
ClearSettings,
RestoreBackupSettings,
OptimizerOptions,
IsSchemaLoaded,
DefinitionsByTableName(String),
ReferencingColumnsForDefinition(String, Definition),
Schema,
DefinitionByTableNameAndVersion(String, i32),
DeleteDefinition(String, i32),
FieldsProcessed(Definition),
}Expand description
This enum defines the commands (messages) you can send to the background thread in order to execute actions.
Each command should include the data needed for his own execution. For a more detailed explanation, check the docs of each command.
Variants§
Exit
Close the background thread. Do not use this command directly.
Response: None (breaks the loop).
ClientDisconnecting
Signal that the client is intentionally disconnecting.
This allows the server to immediately clean up the session’s resources instead of waiting for the timeout. If this was the last active session, the server will also shut down.
Response: Response::Success (sent before cleanup begins).
ClosePack(String)
Closes a specific open Pack identified by its pack key.
Response: Response::Success.
CloseAllPacks
Closes all currently open Packs.
Response: Response::Success.
CleanAndSavePackAs(String, PathBuf)
Clean a specific open Pack from corrupted/undecoded files and try to save it to disk. First field is the pack key, second is the destination path.
Only use this command if your Pack is not save-able otherwise.
Response:
Response::ContainerInfoon success.Response::Erroron failure.
ListOpenPacks
List all currently open packs with their keys and metadata.
Response: Response::VecStringContainerInfo.
NewPack
Creates a new empty Pack.
Response: Response::String with the assigned pack key.
SavePack(String)
Save a specific open Pack to disk. The field is the pack key.
Response:
Response::ContainerInfoon success.Response::Erroron failure.
SavePackAs(String, PathBuf)
Save a specific open Pack to a new path. First field is the pack key, second is the destination path.
Response:
Response::ContainerInfoon success.Response::Erroron failure.
GetPackFileDataForTreeView(String)
Get the data used to build the TreeView for a specific pack.
The field is the pack key.
Response:
OpenPackFiles(Vec<PathBuf>)
Open one or more PackFiles and merge them. Requires the paths of the PackFiles].
Response:
Response::StringContainerInfo(pack_key, info) on success.Response::Erroron failure.
LoadAllCAPackFiles
Open all the CA PackFiles for the selected game as one merged PackFile.
Response:
Response::StringContainerInfo(pack_key, info) on success.Response::Erroron failure.
GetPackedFilesInfo(String, Vec<String>)
Get the RFileInfo of one or more PackedFiles from a specific pack.
First field is the pack key, second is the list of file paths.
Response: Response::VecRFileInfo.
GlobalSearch(String, GlobalSearch)
Perform a Global Search on a specific pack. Requires the pack key and search configuration.
Response:
Response::GlobalSearchVecRFileInfoon success.Response::Errorif no schema.
SetGameSelected(String, bool)
Change the Game Selected]. Contains the game key and whether to rebuild dependencies.
Response:
Response::CompressionFormatDependenciesInfoon success.Response::Errorif game not supported.
GetGameSelected
Get the currently selected game key.
Response: Response::String.
SetPackFileType(String, PFHFileType)
Change the Type of a specific open Pack.
First field is the pack key, second is the new type.
Response: Response::Success.
GenerateDependenciesCache
Generate the dependencies cache for the selected game.
Response:
Response::DependenciesInfoon success.Response::Erroron failure.
UpdateCurrentSchemaFromAssKit
Update the currently loaded Schema with data from the game’s Assembly Kit.
Response:
Response::Successon success.Response::Erroron failure.
OptimizePackFile(String, OptimizerOptions)
Trigger an optimization pass over a specific open Pack. First field is the pack key, second is the optimizer options.
Response:
Response::HashSetStringHashSetString(deleted paths, added paths) on success.Response::Erroron failure.
PatchSiegeAI(String)
Patch the SiegeAI of a Siege Map for Warhammer games in a specific pack. The field is the pack key.
Response:
Response::StringVecContainerPathon success.Response::Erroron failure.
ChangeIndexIncludesTimestamp(String, bool)
Change the Index Includes Timestamp flag in a specific open Pack.
First field is the pack key, second is the flag value.
Response: Response::Success.
ChangeCompressionFormat(String, CompressionFormat)
Change the compression format of a specific open Pack. First field is the pack key, second is the compression format.
Response:
Response::CompressionFormat(the actual format set, may differ if unsupported).
GetPackFilePath(String)
Get the current path of a specific open Pack. The field is the pack key.
Response: Response::PathBuf.
GetRFileInfo(String, String)
Get the info of a single PackedFile from a specific pack.
First field is the pack key, second is the file path.
Response: Response::OptionRFileInfo.
CheckUpdates
Check if there is an RPFM update available.
Response:
Response::APIResponseon success.Response::Erroron failure.
CheckSchemaUpdates
Check if there is a Schema update available.
Response:
Response::APIResponseGiton success.Response::Erroron failure.
UpdateSchemas
Update the schemas from the remote repository.
Response:
Response::Successon success.Response::Erroron failure.
IsThereADependencyDatabase(bool)
Check if there is a Dependency Database loaded in memory. Pass true to ensure dependencies were built with the AssKit.
Response: Response::Bool.
NewPackedFile(String, String, NewFile)
Create a new PackedFile inside a specific open Pack.
First field is the pack key, then path and NewFile info.
Response:
Response::Successon success.Response::Erroron failure.
AddPackedFiles(String, Vec<PathBuf>, Vec<ContainerPath>, Option<Vec<PathBuf>>)
Add one or more Files to a specific open Pack. First field is the pack key, then source filesystem paths, destination container paths, optional paths to ignore.
Response:
Response::VecContainerPathOptionString(added paths, optional error message).
DecodePackedFile(String, String, DataSource)
Decode a PackedFile to be shown on the UI. First field is the pack key, then the path of the file and its data source.
Response:
Response::AnimFragmentBattleRFileInfofor AnimFragmentBattle files.Response::AnimPackRFileInfofor AnimPack files.Response::AnimsTableRFileInfofor AnimsTable files.Response::AtlasRFileInfofor Atlas files.Response::AudioRFileInfofor Audio files.Response::BmdRFileInfofor BMD files.Response::DBRFileInfofor DB table files.Response::ESFRFileInfofor ESF files.Response::GroupFormationsRFileInfofor GroupFormations files.Response::ImageRFileInfofor Image files.Response::LocRFileInfofor Loc files.Response::MatchedCombatRFileInfofor MatchedCombat files.Response::PortraitSettingsRFileInfofor PortraitSettings files.Response::RigidModelRFileInfofor RigidModel files.Response::TextRFileInfofor Text files.Response::UICRFileInfofor UIC files.Response::UnitVariantRFileInfofor UnitVariant files.Response::VideoInfoRFileInfofor Video files.Response::VMDRFileInfofor VMD files.Response::WSModelRFileInfofor WSModel files.Response::Textfor pack notes.Response::Unknownfor unsupported types.Response::Erroron failure.
SavePackedFileFromView(String, String, RFileDecoded)
Save an edited PackedFile back to a specific Pack.
First field is the pack key, then path and decoded file data.
Response: Response::Success.
AddPackedFilesFromPackFile(String, String, Vec<ContainerPath>)
Add PackedFiles from one open pack into another. First field is the target pack key, second is the source pack key, third is the paths to copy.
Response:
Response::VecContainerPathon success.Response::Errorif source pack not found.
AddPackedFilesFromPackFileToAnimpack(String, String, Vec<ContainerPath>)
Add PackedFiles from a specific pack to an AnimPack. First field is the pack key, then animpack path and container paths.
Response:
Response::VecContainerPathon success.Response::Erroron failure.
AddPackedFilesFromAnimpack(String, DataSource, String, Vec<ContainerPath>)
Add PackedFiles from an AnimPack to a specific pack. First field is the pack key, then data source, animpack path, and container paths.
Response:
Response::VecContainerPathon success.Response::Erroron failure.
DeleteFromAnimpack(String, String, Vec<ContainerPath>)
Delete PackedFiles from an AnimPack in a specific pack. First field is the pack key, then animpack path and container paths.
Response:
Response::Successon success.Response::Erroron failure.
DeletePackedFiles(String, Vec<ContainerPath>)
Delete one or more PackedFiles from a specific pack. First field is the pack key, second is the paths to delete.
Response:
Response::VecContainerPath(deleted paths).
CopyPackedFiles(BTreeMap<String, Vec<ContainerPath>>)
Copy one or more PackedFiles to the internal clipboard. The field is a map of pack key to the paths to copy from that pack. This stores path references in a server-side clipboard for later pasting.
Response:
Response::Successon success.Response::Erroron failure.
CutPackedFiles(BTreeMap<String, Vec<ContainerPath>>)
Cut one or more PackedFiles to the internal clipboard. Same as copy, but the files will be removed from the source pack on paste. The field is a map of pack key to the paths to cut from that pack.
Response:
Response::Successon success.Response::Erroron failure.
PastePackedFiles(String, String)
Paste PackedFiles from the internal clipboard into a pack. First field is the target pack key, second is the destination folder path.
Response:
Response::VecContainerPathVecContainerPathString(added paths, cut-deleted paths, source pack key) on success.Response::Erroron failure.
DuplicatePackedFiles(String, Vec<ContainerPath>)
Duplicate one or more PackedFiles in-place within the same pack. First field is the pack key, second is the paths to duplicate. Files are cloned with a numeric suffix added to avoid name collisions.
Response:
Response::VecContainerPath(new duplicated paths) on success.Response::Erroron failure.
ExtractPackedFiles(String, BTreeMap<DataSource, Vec<ContainerPath>>, PathBuf, bool)
Extract one or more PackedFiles from a pack. First field is the pack key, then paths by data source, extraction path, whether to export tables as TSV.
Response:
Response::StringVecPathBufon success.Response::Erroron failure.
RenamePackedFiles(String, Vec<(ContainerPath, ContainerPath)>)
Rename one or more PackedFiles in a specific pack. First field is the pack key, second is a Vec with original and new ContainerPaths.
Response:
Response::VecContainerPathContainerPathon success.Response::Erroron failure.
FolderExists(String, String)
Check if a folder exists in a specific open PackFile. First field is the pack key, second is the folder path.
Response: Response::Bool.
PackedFileExists(String, String)
Check if a PackedFile exists in a specific open PackFile. First field is the pack key, second is the file path.
Response: Response::Bool.
GetTableListFromDependencyPackFile
Get the table names of all DB files in dependency PackFiles.
Response: Response::VecString.
GetCustomTableList
Get custom table names (start_pos_, twad_ prefixes) from the schema.
Response:
Response::VecStringon success.Response::Errorif no schema.
LocalArtSetIds(String)
Get local art set IDs from campaign_character_arts_tables in a specific pack. The field is the pack key.
Response: Response::HashSetString.
DependenciesArtSetIds
Get art set IDs from dependencies’ campaign_character_arts_tables.
Response: Response::HashSetString.
GetTableVersionFromDependencyPackFile(String)
Get the version of a table from the dependency database.
Response:
Response::I32on success.Response::Errorif not found or dependencies not loaded.
GetTableDefinitionFromDependencyPackFile(String)
Get the definition of a table from the dependency database.
Response:
Response::Definitionon success.Response::Errorif not found.
MergeFiles(String, Vec<ContainerPath>, String, bool)
Merge multiple compatible tables into one in a specific pack. First field is the pack key, then paths to merge, merged file path, delete source flag.
Response:
Response::String(merged path) on success.Response::Erroron failure.
UpdateTable(String, ContainerPath)
Update a table to a newer version in a specific pack. First field is the pack key, second is the container path.
Response:
Response::I32I32VecStringVecString(old_version, new_version, deleted_fields, added_fields) on success.Response::Erroron failure.
GlobalSearchReplaceMatches(String, GlobalSearch, Vec<MatchHolder>)
Replace specific matches in a Global Search on a specific pack. First field is the pack key, then search config and match holders.
Response:
Response::GlobalSearchVecRFileInfoon success.Response::Errorif no schema.
GlobalSearchReplaceAll(String, GlobalSearch)
Replace all matches in a Global Search on a specific pack. First field is the pack key, second is the search config.
Response:
Response::GlobalSearchVecRFileInfoon success.Response::Errorif no schema.
GetReferenceDataFromDefinition(String, String, Definition, bool)
Get reference data for columns in a definition from a specific pack. First field is the pack key, then table name, definition, force flag.
Response: Response::HashMapI32TableReferences.
GetDependencyPackFilesList(String)
Get the list of PackFiles marked as dependencies of a specific pack. The field is the pack key.
Response: Response::VecBoolString.
SetDependencyPackFilesList(String, Vec<(bool, String)>)
Set the list of PackFiles marked as dependencies of a specific pack. First field is the pack key, second is the dependency list.
Response: Response::Success.
GetRFilesFromAllSources(Vec<ContainerPath>, bool)
Get PackedFiles from all known sources (PackFile, GameFiles, ParentFiles). Requires: paths to get, whether to lowercase paths.
SetVideoFormat(String, String, SupportedFormats)
Change the format of a ca_vp8 video PackedFile in a specific pack. First field is the pack key, then file path and format.
Response:
Response::Successon success.Response::Erroron failure.
SaveSchema(Schema)
Save the provided schema to disk.
Response:
Response::Successon success.Response::Erroron failure.
CleanCache(String, Vec<ContainerPath>)
Encode and clean the cache for the provided paths in a specific pack. First field is the pack key, second is the paths to clean.
Response: Response::Success.
ExportTSV(String, String, PathBuf, DataSource)
Export a table as TSV from a specific pack. First field is the pack key, then internal path, destination path, data source.
Response:
Response::Successon success.Response::Erroron failure.
ImportTSV(String, String, PathBuf)
Import a TSV as a table into a specific pack. First field is the pack key, then internal path, source TSV path.
Response:
Response::RFileDecodedon success.Response::Erroron failure.
OpenContainingFolder(String)
Open the folder containing a specific open PackFile in the file manager. The field is the pack key.
Response:
Response::Successon success.Response::Errorif pack doesn’t exist on disk.
OpenPackedFileInExternalProgram(String, DataSource, ContainerPath)
Open a PackedFile in an external program. First field is the pack key, then data source and container path.
Response:
Response::PathBuf(extracted path) on success.Response::Erroron failure.
SavePackedFileFromExternalView(String, String, PathBuf)
Save a PackedFile from an external program to a specific pack. First field is the pack key, then internal path, external file path.
Response:
Response::Successon success.Response::Erroron failure.
UpdateMainProgram
Update the program to the latest version available.
Response:
Response::Successon success.Response::Erroron failure.
TriggerBackupAutosave(String)
Trigger an autosave to a backup for a specific pack. The field is the pack key.
Response: Response::Success.
DiagnosticsCheck(Vec<String>, bool)
Trigger a full diagnostics check over all open Packs. First field is ignored diagnostics, then check AK-only references.
Response: Response::Diagnostics.
DiagnosticsUpdate(Diagnostics, Vec<ContainerPath>, bool)
Trigger a partial diagnostics update over all open packs. First field is existing diagnostics, then paths to check, check AK-only references.
Response: Response::Diagnostics.
GetPackSettings(String)
Get the settings of a specific open PackFile. The field is the pack key.
Response: Response::PackSettings.
SetPackSettings(String, PackSettings)
Set the settings of a specific open PackFile. First field is the pack key, second is the settings.
Response: Response::Success.
GetMissingDefinitions(String)
Export missing table definitions from a specific pack to a file (for debugging). The field is the pack key.
Response: Response::Success.
RebuildDependencies(bool)
Rebuild the dependencies. Pass true to rebuild all dependencies, false for mod-specific only.
Response:
Response::DependenciesInfoon success.Response::Errorif no schema.
CascadeEdition(String, String, Definition, Vec<(Field, String, String)>)
Trigger a cascade edition on all referenced data in a specific pack. First field is the pack key, then table name, definition, list of (field, old_value, new_value).
Response: Response::VecContainerPathVecRFileInfo.
GoToDefinition(String, String, String, Vec<String>)
Go to the definition of a reference in a specific pack. First field is the pack key, then table, column, values to search.
Response:
Response::DataSourceStringUsizeUsizeon success.Response::Errorif not found.
GetSourceDataFromLocKey(String, String)
Get the source data of a loc key from a specific pack. First field is the pack key, second is the loc key.
Response: Response::OptionStringStringVecString.
GoToLoc(String, String)
Go to a loc key’s location in a specific pack. First field is the pack key, second is the loc key to search.
Response:
Response::DataSourceStringUsizeUsizeon success.Response::Errorif not found.
SearchReferences(String, HashMap<String, Vec<String>>, String)
Find all references to a value in a specific pack. First field is the pack key, then map of table -> columns to search, value to search.
Response: Response::VecDataSourceStringStringStringUsizeUsize.
GetPackFileName(String)
Get the name of a specific open PackFile. The field is the pack key.
Response: Response::String.
GetPackedFileRawData(String, String)
Get the raw binary data of a PackedFile from a specific pack. First field is the pack key, second is the file path.
Response:
Response::VecU8on success.Response::Erroron failure.
ImportDependenciesToOpenPackFile(String, BTreeMap<DataSource, Vec<ContainerPath>>)
Import files from dependencies into a specific open PackFile. First field is the pack key, second is the paths by data source.
Response:
Response::VecContainerPathVecString(added paths, failed paths).Response::Erroron failure.
SavePackedFilesToPackFileAndClean(String, Vec<RFile>, bool)
Save PackedFiles to a specific PackFile and optionally optimize. First field is the pack key, then files to save, whether to optimize.
Response:
Response::VecContainerPathVecContainerPath(added paths, deleted paths) on success.Response::Erroron failure.
GetPackedFilesNamesStartingWitPathFromAllSources(ContainerPath)
Get all file names under a path in all dependencies.
NotesForPath(String, String)
Get all notes under a path in a specific pack. First field is the pack key, second is the path.
Response: Response::VecNote.
AddNote(String, Note)
Add a note to a specific pack. First field is the pack key, second is the note.
Response: Response::Note.
DeleteNote(String, String, u64)
Delete a note from a specific pack. First field is the pack key, then path and note ID.
Response: Response::Success.
SaveLocalSchemaPatch(HashMap<String, DefinitionPatch>)
RemoveLocalSchemaPatchesForTable(String)
Remove local schema patches for a table.
Response:
Response::Successon success.Response::Erroron failure.
RemoveLocalSchemaPatchesForTableAndField(String, String)
Remove local schema patches for a specific field in a table.
Response:
Response::Successon success.Response::Erroron failure.
ImportSchemaPatch(HashMap<String, DefinitionPatch>)
Import a schema patch into the local schema patches.
Response:
Response::Successon success.Response::Erroron failure.
GenerateMissingLocData(String)
Generate all missing loc entries for a specific open PackFile. The field is the pack key.
Response:
Response::VecContainerPathon success.Response::Erroron failure.
CheckLuaAutogenUpdates
Check for updates on the tw_autogen repository.
Response:
Response::APIResponseGiton success.Response::Erroron failure.
UpdateLuaAutogen
Update the tw_autogen repository.
Response:
Response::Successon success.Response::Erroron failure.
InitializeMyModFolder(String, String, bool, bool, Option<String>)
Initialize a MyMod folder. Requires: mod name, game key, sublime support, vscode support, git support (gitignore content).
Response:
Response::PathBuf(path to the new pack) on success.Response::Erroron failure.
LiveExport(String)
Live export a specific PackFile to the game folder. The field is the pack key.
Response:
Response::Successon success.Response::Erroron failure.
SetPackOperationalMode(String, OperationalMode)
Set the operational mode for a specific pack. First field is the pack key, second is the new operational mode.
Response: Response::Success.
GetPackOperationalMode(String)
Get the operational mode for a specific pack. The field is the pack key.
Response: Response::OperationalMode.
PackMap(String, Vec<PathBuf>, Vec<(PathBuf, String)>)
Pack map tiles into a specific PackFile. First field is the pack key, then tile map paths, list of (tile path, name).
Response:
Response::VecContainerPathVecContainerPath(added paths, deleted paths) on success.Response::Erroron failure.
AddLineToPackIgnoredDiagnostics(String, String)
Add a line to a specific pack’s ignored diagnostics. First field is the pack key, second is the diagnostic line.
Response: Response::Success.
CheckEmpireAndNapoleonAKUpdates
Check for updates on the old AK files repository.
Response:
Response::APIResponseGiton success.Response::Erroron failure.
UpdateEmpireAndNapoleonAK
Update the old AK files repository.
Response:
Response::Successon success.Response::Erroron failure.
GetPackTranslation(String, String)
Get pack translation data for a language from a specific pack. First field is the pack key, second is the language.
Response:
Response::PackTranslationon success.Response::Erroron failure.
CheckTranslationsUpdates
Check for translation updates.
Response:
Response::APIResponseGiton success.Response::Erroron failure.
UpdateTranslations
Update the translations repository.
Response:
Response::Successon success.Response::Erroron failure.
BuildStarpos(String, String, bool)
Build starpos (pre-processing step) for a specific pack. First field is the pack key, then campaign ID, process HLP/SPD data.
Response:
Response::Successon success.Response::Erroron failure.
BuildStarposPost(String, String, bool)
Build starpos (post-processing step) for a specific pack. First field is the pack key, then campaign ID, process HLP/SPD data.
Response:
Response::VecContainerPathon success.Response::Erroron failure.
BuildStarposCleanup(String, String, bool)
Clean up starpos temporary files for a specific pack. First field is the pack key, then campaign ID, process HLP/SPD data.
Response:
Response::Successon success.Response::Erroron failure.
BuildStarposGetCampaingIds(String)
Get campaign IDs for starpos building from a specific pack. The field is the pack key.
Response: Response::HashSetString.
BuildStarposCheckVictoryConditions(String)
Check if victory conditions file exists in a specific pack (required for some games). The field is the pack key.
Response:
Response::Successif exists or not needed.Response::Errorif missing.
UpdateAnimIds(String, i32, i32)
Update animation IDs with offset in a specific pack. First field is the pack key, then starting ID, offset.
Response:
Response::VecContainerPathon success.Response::Erroron failure.
GetAnimPathsBySkeletonName(String)
Get animation paths by skeleton name.
Response: Response::HashSetString.
GetTablesFromDependencies(String)
Get tables from dependencies by table name.
Response:
Response::VecRFileon success.Response::Erroron failure.
GetTablesByTableName(String, String)
Get table paths by table name from a specific PackFile. First field is the pack key, second is the table name.
Response: Response::VecString.
AddKeysToKeyDeletes(String, String, String, HashSet<String>)
Add keys to the key_deletes table in a specific pack. First field is the pack key, then table file name, key table name, keys to add.
Response: Response::OptionContainerPath.
ExportRigidToGltf(RigidModel, String)
Export a RigidModel to glTF format. Requires: RigidModel, output path.
Response:
Response::Successon success.Response::Erroron failure.
SettingsGetBool(String)
Get a boolean setting value.
Response: Response::Bool.
SettingsGetI32(String)
Get an i32 setting value.
Response: Response::I32.
SettingsGetF32(String)
Get an f32 setting value.
Response: Response::F32.
SettingsGetString(String)
Get a string setting value.
Response: Response::String.
SettingsGetPathBuf(String)
Get a PathBuf setting value.
Response: Response::PathBuf.
SettingsGetVecString(String)
Get a Vec<String> setting value.
Response: Response::VecString.
SettingsGetVecRaw(String)
Get raw data setting value.
Response: Response::VecU8.
SettingsGetAll
Get all settings at once (for batch loading).
This is much more efficient than calling individual SettingsGet* commands when you need multiple settings, as it requires only one IPC round-trip.
Response: Response::SettingsAll.
SettingsSetBool(String, bool)
SettingsSetI32(String, i32)
SettingsSetF32(String, f32)
SettingsSetString(String, String)
SettingsSetPathBuf(String, PathBuf)
SettingsSetVecString(String, Vec<String>)
Set a Vec<String> setting value.
Response:
Response::Successon success.Response::Erroron failure.
SettingsSetVecRaw(String, Vec<u8>)
ConfigPath
AssemblyKitPath
Get the Assembly Kit path for the current game.
Response:
Response::PathBufon success.Response::Erroron failure.
BackupAutosavePath
OldAkDataPath
SchemasPath
TableProfilesPath
TranslationsLocalPath
Get the translations local path.
Response:
Response::PathBufon success.Response::Erroron failure.
DependenciesCachePath
Get the dependencies cache path.
Response:
Response::PathBufon success.Response::Erroron failure.
SettingsClearPath(PathBuf)
BackupSettings
Backup the current settings to memory.
Response: Response::Success.
ClearSettings
Clear settings and reset to defaults.
Response:
Response::Successon success.Response::Erroron failure.
RestoreBackupSettings
Restore settings from the backup.
Response: Response::Success.
OptimizerOptions
Get the optimizer options.
Response: Response::OptimizerOptions.
IsSchemaLoaded
Check if a schema is loaded.
Response: Response::Bool.
DefinitionsByTableName(String)
Get all definitions for a table name.
Response:
Response::VecDefinitionon success.Response::Errorif no schema.
ReferencingColumnsForDefinition(String, Definition)
Get columns that reference a table’s definition.
Response:
Response::HashMapStringHashMapStringVecStringon success.Response::Errorif no schema.
Schema
DefinitionByTableNameAndVersion(String, i32)
Get a specific definition by table name and version.
Response:
Response::Definitionon success.Response::Errorif not found or no schema.
DeleteDefinition(String, i32)
Delete a definition by table name and version.
Response: Response::Success.
FieldsProcessed(Definition)
Get the processed fields from a definition (bitwise expansion, enum conversion, colour merging applied).
Response: Response::VecField.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Command
impl<'de> Deserialize<'de> for Command
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.