Help |
Plugins can be added to CF Toolbox in order to extend its functionalities.
A plugin is defined with a .ini
file in the plugins
sub-folder of CF Toolbox.
This .ini
file is adding a single new functionality which will be available in the Plugins
list of the GCF/NCF files
and the Games/Media/Tools
tabs contextual menu.
It defines specific Command lines to be executed for GCF files, NCF files, Games, Media, and Tools.
A plugin .ini
file has the following structure:
[cftoolbox/plugin] name=The plugin name description=The plugin description version=The plugin version menuCategory=The contextual menu plugin category (can be empty) menuItem=The contextual menu plugin item. asynchronous=true/false updatesFiles=true/false closeCFToolbox=true/false runOnlyOnceForMultipleSelection=true/false [gcf] commandLine= [ncf] commandLine= [game] commandLine= [media] commandLine= [tool] commandLine=
The plugin menuItem
must be unique for the specified menuCategory
.
If the asynchronous
value is true
, CF Toolbox will not wait for the plugin execution to complete. If the value is false
, the CF Toolbox will wait for the plugin execution to complete in order to ensure that the processed GCF/NCF file is locked during the process execution.
If the plugin modifies GCF/NCF files, it is required to set the updatesFiles
value to true
. Otherwise, CF Toolbox will not be aware of the processed GCF/NCF files modifications.
If the closeCFToolbox
value is true
, CF Toolbox will be closed on plugin execution.
If the runOnlyOnceForMultipleSelection
value is true
, the plugin will be executed only once for multi-selection, on the first selected item.
A command line can be defined for each kind of content the plugin is able to process. The command lines are relative to the location of the .ini
file, and the current working folder for the plugin will be the location of the configured executable.
The command line can be absolute or relative and must follow the Windows platforms command lines and shortcuts rules. For instance:
pluginFolder\myPlugin.exe "my first parameter" "my second parameter"
It is possible to create dynamic command lines using the dynamic values as listed below. For instance:
pluginFolder\myPlugin.exe {file_id} "{storage_folder}"
The available dynamic values are different for GCF/NCF files command lines and Games/Media/Tools command lines.
{cdr_version}
: the latest GCF/NCF file version as described in the CDR.{cftoolbox_version}
: CF Toolbox version as majorVersion.minorVersion.patchLevel
.{choose_file}
: prompt the user for choosing a file (open mode). A file query can be specified using the {choose_file:*}
syntax. For instance: {choose_file:Choose a file for {file_name}}
{choose_folder}
: prompt the user for choosing a folder. A folder query can be specified using the {choose_folder:*}
syntax. For instance: {choose_folder:Choose a folder for {file_name}}
{choose_outputfile}
: prompt the user for choosing a file (save as mode). A file query can be specified using the {choose_outputfile:*}
syntax. For instance: {choose_outputfile:Choose a file for {file_name}}
{common_folder}
: the NCF file common
folder name.{completion}
: the GCF/NCF file completion as an integer percent.{configserver_host}
: the configured Steam config server host name.{configserver_port}
: the configured Steam config server port.{decryption_key}
: the GCF/NCF file decryption key, if available.{downloaded_blocks}
: the count of downloaded data blocks for GCF Files.{file_id}
: the GCF/NCF file internal ID.{file_name}
: the GCF/NCF file name.{file_path}
: the GCF/NCF file path.{file_size}
: the GCF/NCF file size.{file_type}
: the GCF/NCF file type (gcf
/ncf
).{file_version}
: the GCF/NCF file version.{nb_blocks}
: the count of allocated data blocks for GCF files.{output_folder}
: the output storage folder path.{prompt}
: prompt the user for a value. A prompt query can be specified using the {prompt:*}
syntax. For instance: {prompt:Enter a value for {file_name}}
{steamapps_language}
: the selected steam apps language.{storage_folder}
: the GCF/NCF storage folder path.
{app_id}
: the Game/Media/Tool internal ID.{app_name}
: the Game/Media/Tool name.{cftoolbox_version}
: CF Toolbox version as majorVersion.minorVersion.patchLevel
.{choose_file}
: prompt the user for choosing a file (open mode). A file query can be specified using the {choose_file:*}
syntax. For instance: {choose_file:Choose a file for {app_name}}
{choose_folder}
: prompt the user for choosing a folder. A folder query can be specified using the {choose_folder:*}
syntax. For instance: {choose_folder:Choose a folder for {app_name}}
{choose_outputfile}
: prompt the user for choosing a file (save as mode). A file query can be specified using the {choose_outputfile:*}
syntax. For instance: {choose_outputfile:Choose a file for {app_name}}
{configserver_host}
: the configured Steam config server host name.{configserver_port}
: the configured Steam config server port.{common_folder}
: the NCF files based Game/Media/Tool common
folder name.{completion}
: the Game/Media/Tool completion as an integer percent.{developer}
: the Game/Media/Tool developer name.{files_count}
: the number of required GCF/NCF files for this Game/Media/Tool.{files_ids}
: the internal IDs of required GCF/NCF files for this Game/Media/Tool separated with spaces.{files_names}
: the quoted required GCF/NCF files names for this Game/Media/Tool separated with spaces.{files_paths}
: the quoted required GCF/NCF files paths for this Game/Media/Tool separated with spaces.{manual}
: the Game/Media/Tool manual URL, if available.{output_folder}
: the output storage folder path.{prompt}
: prompt the user for a value. A prompt query can be specified using the {prompt:*}
syntax. For instance: {prompt:Enter a value for {app_name}}
{property:*}
: Value of the specified Game/Media/Tool property as available in the Properties
popup. For instance: {property:homepage}
{steamapps_language}
: the selected steam apps language.{storage_folder}
: the GCF/NCF storage folder path.