The batch processor is a tool that allows you to perform various operations on files.
It works on a simple scripting system, describing command blocks for each given file.
It can be accessed from menu->wizard->BatchProcessor
Known Issue: when saving a script you need to include the '.txt' extension manually to the name
Example of script:
Each block must starts with StartRule and ends with EndRule:
LangSource=english
Defines the source language. 'en', 'fr', etc. for fallout4 & starfield or 'english', 'french' for Skyrim. The language can be changed on the fly for each block
LangDest=french
Defines the destination language. The language can be changed on the fly for each block
UseDatadir=1
Indicates that the esp/esm files are loaded from the game's data\ folder. If UseDatadir=0, the files must be provided with their full path.
exportsubfolder=_TranslatedExport
Indicate that the file must be saved in a subfolder inside the base folder.
in this example, if the file has been loaded from game\data, it will be saved in game\data\_translatedExport. The name can be different for each block.
Commands:
command=loadfile:file
Loads the mod file to be processed
command=applysst:1:1:dictionary_sst
Imports a dictionary file from the default dictionary directory of xTranslator.
You can apply more than one dictionary in sequence, if you want to apply some fixes from different sources for example
When you call a dictionary with this command, you only need to set the base name (for example "the paarthurnax dilemma", instead of "the paarthurnax dilemma_english_french.sst', the language reference will be automatically set through the current language
the values 1:1 are the apply options:
the first value is 'apply on' [0:everything/1:nottranslated/2:notvalidated¬inprogress/3:in progress]
the second value is the mode [0:formID, 1:strictFormID+String, 2:relaxFormID+string, 3:Strings only]
command=importsst:1:1:dictionary_sst
Imports a sst dictionary file from a custom directory.
You can apply more than one dictionary in sequence, if you want to apply some fixes from different sources for example
When you call a dictionary with this command you need to set the path + full name of the file
The options are the same as above
Note: The directory can be defined at the top of the script with: Global_ImportFolder=full_path_of_the_directory.
command=importxml:1:1:dictionary_Xml
Imports a xml dictionary file from a custom directory.
You can apply more than one dictionary in sequence, if you want to apply some fixes from different sources for example
When you call a dictionary with this command you need to set the path + full name of the file
The options are the same as above
Note: The directory can be defined at the top of the script with: Global_ImportFolder=full_path_of_the_directory.
command=finalize
Finalizes the translation of the mod
command=CloseFile
Closes the file.
Note: the closing is silent, so if you want to save your dictionary, be sure to add the command before
command=CloseAll
Closes all files.
Note: the closing is silent, so if you want to save your dictionary, be sure to add the command before
Another example: generate Dictionaries for En->Languages:
command=generateDictionaries
(quite self explanatory)
In 1.4.19, 2 new commands have been added:
Command=ApiTranslation:0:1
Launch an API translation for the unstranslated strings contained in the loaded esp/esm
The first param is the API id (0:MStranslator, 5=Google, 6=DeepL).
Other values will not work, MSTranslator and DeepL require an account, and are way faster and more reliable than the (free) Google api.
The second param is the heuristic string exclusion: '1' (for true) is recommended so non relevant strings will be skipped in the process. (the heuristic exclusion rules can be adjusted in the options)
Command=SaveDictionary
Self explanatory: save the current dictionary
To be continued...
0 comments