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

Methods

Every method of the API, grouped by domain. Each domain’s page lists the params and the result of its methods, generated from the request and response structs of rpfm_ipc::api. Methods marked as jobs answer right away with a job ID, and send their result when the job ends (see Jobs).

Methods meant for clients with their own views of the files, like the UI, return RPFM’s own types (decoded files, typed search matches, full diagnostics), shown as any in their pages. Simpler clients should prefer the paginated methods next to them, like table.rows, search.matches or diagnostics.list.

Session and dependencies

MethodDescription
session.statusReturns the selected game, what’s loaded for it, and the open packs.
session.configureReplaces the settings the session runs with.
session.disconnectTells the server the client is closing, so its WebSocket session is removed right away instead of waiting for the timeout. Only for WebSocket clients.
session.set_gameSelects a game, loading its schema and, optionally, its dependencies. Runs as a job.
dependencies.generate_cacheGenerates the dependencies cache of the selected game from its files and Assembly Kit, and loads it. Runs as a job.
dependencies.rebuildReloads the dependencies of the selected game, like after changing the packs the open packs depend on. Runs as a job.
dependencies.tablesReturns the tables of the game files, and the startpos, twad and CEO tables of the schema, with their version.
dependencies.infoReturns the files of the dependencies of the selected game.
dependencies.table_dataReturns every decoded table of a type in the game files and the parent packs.

Packs

MethodDescription
pack.infoReturns the details of an open pack.
pack.newCreates a new empty pack. It has no path on disk until it’s saved with a path.
pack.openOpens one or more packs from disk, merged into a single one.
pack.open_vanillaOpens all the vanilla packs of the selected game, merged into a single one.
pack.closeCloses an open pack, discarding unsaved changes.
pack.close_allCloses all open packs, discarding unsaved changes.
pack.saveSaves an open pack to disk.
pack.updateChanges properties of an open pack. Only the fields set are changed.
pack.settingsReturns the settings of an open pack.
pack.update_settingsChanges settings of an open pack. Only the keys set are changed.

Files

MethodDescription
files.listLists the files of a source, sorted by path.
files.createCreates a new empty file in an open pack.
files.add_from_diskAdds files and folders from disk to an open pack.
files.copyCopies files and folders from any source into an open pack, keeping their paths.
files.deleteDeletes files and folders from an open pack.
files.renameRenames or moves files and folders of an open pack.
files.duplicateCopies files of an open pack in the same pack, adding a number to their names.
files.extractExtracts files and folders of an open pack, the game files or the parent packs to disk.
file.readReturns the contents of a file of any source.
file.writeReplaces the contents of a file of an open pack.
animpack.listLists the files inside an AnimPack of any source.
animpack.addCopies files of an open pack into an AnimPack of an open pack.
animpack.extractCopies files of an AnimPack of any source into an open pack.
animpack.deleteDeletes files from an AnimPack of an open pack.
file.view_dataReturns a file decoded as a client opening it in a view needs it.
files.infoReturns the info of files of an open pack, like their original pack and last modification time.
files.pasteCopies or moves files and folders of open packs into a folder of an open pack.
files.from_all_sourcesReturns files and folders found in the open packs, the parent packs and the game files.
files.save_filesAdds files to an open pack, replacing the ones with the same path, optionally optimizing the pack after it.
file.open_externalExtracts a file of an open pack to a temporary folder, and opens it in the system’s default program for its type.
file.save_externalReplaces a file of an open pack with the file on disk an external program edited.

Tables

MethodDescription
table.infoReturns the definition and row count of a table.
table.rowsReturns rows of a table, optionally filtered and with only some columns.
schema.definitionReturns the columns of a table as defined in the schema.
table.editEdits rows of a DB or Loc table in an open pack.
table.column_valuesReturns the distinct values of a column of a table, sorted.
table.unused_numbersReturns numbers no row uses yet in an integer column of a table, for new rows needing unique ones, like ids.
table.mergeMerges tables of the same type of an open pack into a new one.
table.upgradeUpdates a table of an open pack to the version it has in the game files.
table.rename_keyChanges a value of a key column of a table in every table of an open pack, including the columns referencing it and the loc keys generated from it.
table.add_key_deletesAdds rows to a key deletes table of an open pack, to delete keys of a table in the game.
table.export_tsvWrites a table to a TSV file.
table.import_tsvReplaces a table of an open pack with the contents of a TSV file, keeping its GUID.

Schema

MethodDescription
schema.tablesLists the tables of the schema, with the versions it has definitions for.
schema.patch_columnChanges how the schema describes a column, with a local patch.
schema.remove_patchesRemoves the local patches of a table, or of one of its columns, and reloads the schema.
schema.updateDownloads the latest schemas, reloads the selected game’s one, and rebuilds the dependencies. Runs as a job.
schema.update_from_assembly_kitUpdates the schema of the selected game with the tables of its Assembly Kit, and saves it. Runs as a job.
schema.raw_definitionsReturns definitions of a table as the schema stores them, to edit them.
schema.set_definitionAdds a definition to the schema of the selected game, or replaces the one with its version, then saves and reloads the schema.
schema.delete_definitionRemoves a definition from the schema of the selected game, then saves and reloads the schema.
schema.referencing_columnsReturns the columns of other tables referencing each column of a table.
schema.patchesReturns the patches applied to the columns of a table.
schema.import_patchesAdds patches to the schema of the selected game itself, and saves it.
schema.missing_definitionsReturns the tables of an open pack with rows that can’t be decoded with the schema.

References

MethodDescription
references.definitionFinds the row where a value of a referenced table is defined.
references.usagesFinds the rows of other tables referencing a value of a table.
references.locFinds the row of a Loc file with a key.
references.loc_sourceReturns the table, column and row a loc key belongs to.
references.row_locsReturns the loc entries of a row of a DB table: the loc key of each of its localised columns, with its text.
references.table_dataReturns the values each column of a table can reference, with their lookups.
references.valuesReturns the values a reference column of a table can have, with their display text.

Diagnostics

MethodDescription
diagnostics.runChecks the open packs for problems, keeping the results for diagnostics.list. Runs as a job.
diagnostics.listReturns results of the last check, optionally filtered.
diagnostics.reportReturns the results of the last diagnostics check, as the check returns them.
diagnostics.ignoreMakes the next checks of a pack skip some results. Saved in the pack’s settings.
MethodDescription
search.reportReturns the last search with all its matches, as the search returns them.
search.runSearches text, keeping the matches for search.matches. Runs as a job.
search.matchesReturns matches of the last search, optionally filtered.
search.replaceReplaces matches of the last search, and searches the edited files again.

Notes

MethodDescription
notes.listReturns the notes of an open pack for a path.
notes.addAttaches a note to a file or folder of an open pack.
notes.deleteDeletes a note of an open pack.

Tools

MethodDescription
tools.optimizer_optionsReturns the optimizer options, as the server’s settings have them.
tools.optimizeRemoves data of an open pack that’s identical to the vanilla one, or unneeded. Runs as a job.
tools.patch_siege_aiPatches the siege maps of an open pack, so the AI can use them. Warhammer games only.
tools.pack_mapAdds the tiles and tile maps of a map exported by Terry to an open pack.
tools.generate_missing_locsAdds empty loc entries for the localised columns of the tables of the open packs that have none.
tools.update_anim_idsOffsets the animation ids of an open pack, like after a game update moves them.
tools.anims_by_skeletonReturns the paths of the animations using a skeleton, in the open packs and the dependencies.
tools.export_gltfExports a RigidModel to a glTF file, with its textures.
tools.set_video_formatChanges the format of a ca_vp8 video of an open pack.
tools.live_exportExports the scripts and UI files of an open pack to the game’s data folder, to test them without saving the pack.
tools.init_mymodCreates the folder of a new MyMod, with editor configs for Lua scripting.
lua.run_testsRuns Lua tests against the scripts of the game and the open packs, outside of the game. Runs as a job.
startpos.campaignsReturns the campaigns a startpos can be built for.
startpos.startPrepares the Assembly Kit to build a startpos with the tables of an open pack, and launches the game to build it.
startpos.finishImports the startpos built by the game into the pack, or cancels the build, and cleans up the build files.
startpos.validateChecks the tables a campaign’s startpos is built from, and reports what would make the build fail, hang, or drop data. Works for both ways of building startposes. Runs as a job.
startpos.generateGenerates the startpos of a campaign from the tables of an open pack and the game’s files, and adds it to the pack as campaigns/<campaign>/startpos.esf. Unlike startpos.start, it doesn’t launch the game. Runs as a job.
startpos.extract_tablesExtracts the start_pos_* tables of a campaign from its startpos, the pack’s or the game’s if the pack has none, and adds them to the pack as db/<table>/<campaign>_startpos, with the victory objectives the startpos has as db/victory_objectives.txt (replacing the pack’s). The inverse of startpos.generate. Runs as a job.
startpos.compare_tablesExtracts the start_pos_* tables of a campaign from its startpos, like startpos.extract_tables, and compares them with the tables of the pack (and the game) the startpos is built from, to find what the build loses or changes. Rows are matched by what they describe, not by their ids. Runs as a job.
startpos.keep_campaignRemoves the rows of the pack’s start_pos_* tables that don’t belong to a campaign, as the Assembly Kit does before building a startpos, so tables holding several campaigns don’t break the build. Tables left without rows are deleted.
tools.plugin_scriptsReturns the plugin scripts in the scripts folder of the config.
tools.run_plugin_scriptRuns a plugin script over files of an open pack, reading back the files it changes.
lua.hoversReturns the docs of the game’s Lua API for the symbols of a Lua script, to show on hover.
ceo.traitsReturns the trait CEOs of the Assembly Kit tables.
ceo.add_entriesAdds CEO entries (armour, career, traits and their locs) to an open pack.
ceo.buildBuilds ceo_data.ccd in the Assembly Kit from the CEO tables of an open pack, running BOB.
ceo.importImports the ceo_data.ccd built by ceo.build into an open pack.

Translations

MethodDescription
translations.packReturns the whole translation of an open pack to a language, as the translator works with it.
translations.submitSubmits the saved translation of a pack to the Translation Hub, opening or updating a pull request.
translations.listReturns the translation of the texts of an open pack to a language.
translations.generate_vanillaGenerates the vanilla texts of a language from the game’s locale packs, so translations to and from it can reuse them.

GitHub

MethodDescription
github.sign_in_startStarts a GitHub sign-in, returning the code the user has to enter on GitHub.
github.sign_in_pollChecks if the user approved a sign-in. Once approved, the server keeps the sign-in.
github.accountReturns the GitHub account the user is signed in as.
github.sign_outSigns out of GitHub, deleting the stored sign-in.

Updates

MethodDescription
updates.checkChecks if there is an update.
updates.applyDownloads an update. Schemas can’t be updated with this, as they need reloading: use schema.update.

Jobs

MethodDescription
job.statusReturns the state of a job.
job.waitWaits for a job to end, and returns its state.
job.cancelCancels a job that hasn’t started yet. Running jobs can’t be cancelled.