You are on page 1of 4

Howto script the game wizard for autosetup games with a one click Document fits to X-Sim version:

X-Sim 3.0.0.8 and up Date: 1.12.2012 X-Sim offers a automated game wizard which will search nearly the complete hardd isk for games that are installed in common or not common directories. Only the t rash folder and some system folders are ignored. If you open the game wizard wit h the left bottom "Add game / Wizard" Button all the script files in the plugin folder will be read. If you execute the scan this script files will be used to f ind game executable and change configuration files or do the needed things to en able the telemetry output of the game. The general documents of X-Sim explains t hat most of the games are using the same telemetry interface. If you like to add another game that is not autodetected then you can have a look to a game that i s similar to your game and modify this script file. This scripts will automate the steps that are documented inside the X-Sim manual . YOu will find there a list of the game plugins and the needed steps that must be configured to enable the telemetry interfaces. Importand: If you have finished a script file and it is working, please send thi s to the author of X-Sim. We have to verify if this setup will not bother other scan scripts. Now I start to explain what you have to insert in the script files. The script files can: - change a part of a configuration / ini file - copy a plugin into the game folders (the plugin file must be inside the script directory) - add parameter for steam games - detect differences between demo games and full versions - setup and insert the game into the extractor game listbox - add We start with a example of Race07 as steam version which configarion steps are d ocumented in the X-Sim manual: ////////////////////////////////////////////////////////// // X-Sim 3 game configuration script ////////////////////////////////////////////////////////// title: Race 07 (steam) script games: Race 07 (steam) search_executable: Race_Steam.exe game_parameter: steam://rungameid/8600 mustdir1: steam mustdir2: race 07 notdir1: demo unicode: no plugin: Race07Plugin.dll Explanations: The title will give the script a name. The games tag will give the extractor game name in the game listbox. The search_executable tag will carry the executable name of the game which will be searched in all directories. Game_parameter are normally not used but if you have a steam game you have to ri ghtclick the game in steam and make a shortcut to the desktop. Then rightclick t his new icon on the desktop and go to the properties. There you find the steam I D which you have to insert like above in the script.

The mustdir will make your search script stable against other scripts. This mean s all the mustdirx have to be a part of the game path. If this mustdir ist not i ncluded in the game path the script will be not used. In the same manner the not dir will exclude names in the path of the game. If you do more exclusions you ge t closer to a good detection but more away from a find all over the harddisk. I assume you play around only with the highest directory near the game exectuable because this is normally a part that is not changed by the game installer. Unicode is always no and a future part. The plugin will carry the plugin file name in the plugin directory. This is not a plugin file that must be copied into the game folder, it is the compatible plu gin for the extractor that will be automatically chosen of you select the game o ut of the game list with the fitting games tag name of the script file. You can see this script will only add the found game to the game listbox. It wil l not change the configuration of the game itself because the configuration is n ot inside the Race_Steam.exe executable. We need now a fitting script to change the game configuration files: ////////////////////////////////////////////////////////// // X-Sim 3 game configuration script ////////////////////////////////////////////////////////// title: simbin config games: race, race07, gtr, gtr2, gtr evolution filename: *.plr max_file_size: 100000 search1: Write Shared Memory="0" replace with1: Write Shared Memory="1" unicode: no We are lucky because all simbin games are using the same activation, so we have only to make one script for all this games. It must search for all .plr files an d replace some stuff. Explanations: The title will carry a name for the script. The games tag will carry some game names but is ignored in the software for now. (future use) The filename tag will now carry a shorten version for all .plr configuration fil es. Max_file_size will exclude configuration files that are unrealistic. Searchx will carry a phrase of the original game config file that is searched in side the file if a .plr file is found. Please note, it is not possible to change former changed search tags. It must be the search phrase of a fresh installed g ame that is not modified. Modified configuration files get not touched because w e assume the person who has changed this file knows what he was doing. If you li ke to copy a predefined configuration file, you have to use the next described s cript option. The "replace withx" is the exchange value for the search phrase. Unicode is again no. We have now sucessfully described two possibl script files, the game detection a nd the configuration file modification. But there are much more possible setups.You have to open all the game wizard scr ipts to get more informations what is possible. The following script will copy a plugin file to the game folders of the game rFa ctor 1: ////////////////////////////////////////////////////////// // X-Sim 3 game configuration script

////////////////////////////////////////////////////////// title: rfactor config games: rfactor, rfactor2 pluginfile_to_copy: xsimplugin.dll game_executable: rfactor.exe relative_path_to_copy: \Plugins\ hint: If install a new X-Sim version you must copy the new xsimplugin.dll or del ete this game out of the game database and redo this search for a update. unicode: no Explanations: Title, games and unicode tags are as described above. Pluginfile_to_copy is as the name says a file in the script folder that will be copied to the game folder. The relative_path_to_copy tag will add the folder structure to the found game fo lder and copy there the plugin file. The hint can be placed if you want a short notice for the user. This hint will n ot be displayed in the fast scan of X-Sim. In the above case there is no directory searching parameter like a configuration file or a game executable. Instead all found game executables with the name "rf actor.exe" get a copy of this plugin. If you have a game that will simple activate the telemetry interface with a exec utable parameter, you can do it with a very simple script: ////////////////////////////////////////////////////////// // X-Sim 3 game configuration script ////////////////////////////////////////////////////////// title: Seed Game config games: Nitro Stund Racing Stage 1 game_executable: NSR_S1.exe game_parameter: -config -FD_TYPE 1 -FD_ID 0xfebabece -FD_Host 127.0.0.1 -FD_Port 4123 -FD_Filter 0.95 0.95 0.95 unicode: no If your game is using a launcher of the game executable you will notice, that the launcher is closed, the extractor will detect this closed game and stops rking. If this is the case you can use the following script parameter and the tractor waits for the start of the second executable before it will start any tion extraction. ////////////////////////////////////////////////////////// // X-Sim 3 game configuration script ////////////////////////////////////////////////////////// title: Richard Burns Rally config games: Richard Burns Rally SSE game_executable: RichardBurnsRally.exe game_parameter: launcher:RichardBurnsRally.exe scanexe:RichardBurnsRally_SSE.exe unicode: no As you can see the game parameter is set to "launcher:" followed by the game lau ncher executable (no space). As second parameter you tell with "scanexe:" the re al game executable name. The extractor will wait until the executable behind sca nexe is launched. If this does not work for some reason you can stop the wait di alog with the cancel button and try again. if wo ex mo

General hints: Try to give the scripts as much informations as possible. They are in concurency to each other. The demo versions of the games should be downloaded and tested a gainst your new script, else the game listbox may carry i.e. dirt but it is the demo version which should be displayed as "dirt demo". It is possible to combine the script tags but you cannot use two search filenames. If a tag has a number behind it you can insert up to five of them. Copyright 2012 Martin Wiedenbauer, X-Sim

You might also like