Howto Game Wizard Scripts

download Howto Game Wizard Scripts

of 4

Transcript of Howto Game Wizard Scripts

  • 7/29/2019 Howto Game Wizard Scripts

    1/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 upDate: 1.12.2012

    X-Sim offers a automated game wizard which will search nearly the complete harddisk for games that are installed in common or not common directories. Only the trash folder and some system folders are ignored. If you open the game wizard with the left bottom "Add game / Wizard" Button all the script files in the pluginfolder will be read. If you execute the scan this script files will be used to find game executable and change configuration files or do the needed things to enable the telemetry output of the game. The general documents of X-Sim explains that most of the games are using the same telemetry interface. If you like to addanother game that is not autodetected then you can have a look to a game that is 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 mustbe configured to enable the telemetry interfaces.

    Importand: If you have finished a script file and it is working, please send this to the author of X-Sim. We have to verify if this setup will not bother otherscan 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 scriptdirectory)- 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 documented in the X-Sim manual:

    //////////////////////////////////////////////////////////// X-Sim 3 game configuration script//////////////////////////////////////////////////////////

    title: Race 07 (steam) scriptgames: Race 07 (steam)search_executable: Race_Steam.exegame_parameter: steam://rungameid/8600mustdir1: steammustdir2: race 07notdir1: demounicode: noplugin: 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 willbe searched in all directories.Game_parameter are normally not used but if you have a steam game you have to rightclick the game in steam and make a shortcut to the desktop. Then rightclick this new icon on the desktop and go to the properties. There you find the steam ID which you have to insert like above in the script.

  • 7/29/2019 Howto Game Wizard Scripts

    2/4

    The mustdir will make your search script stable against other scripts. This means all the mustdirx have to be a part of the game path. If this mustdir ist not included in the game path the script will be not used. In the same manner the notdir will exclude names in the path of the game. If you do more exclusions you get closer to a good detection but more away from a find all over the harddisk. Iassume you play around only with the highest directory near the game exectuablebecause 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 nota plugin file that must be copied into the game folder, it is the compatible plugin for the extractor that will be automatically chosen of you select the game out 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 will not change the configuration of the game itself because the configuration is not 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 configgames: race, race07, gtr, gtr2, gtr evolution

    filename: *.plrmax_file_size: 100000search1: 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 haveonly to make one script for all this games. It must search for all .plr files and 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 files.Max_file_size will exclude configuration files that are unrealistic.Searchx will carry a phrase of the original game config file that is searched inside the file if a .plr file is found. Please note, it is not possible to changeformer changed search tags. It must be the search phrase of a fresh installed game that is not modified. Modified configuration files get not touched because we assume the person who has changed this file knows what he was doing. If you like to copy a predefined configuration file, you have to use the next described script 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 and the configuration file modification.But there are much more possible setups.You have to open all the game wizard scripts to get more informations what is possible.The following script will copy a plugin file to the game folders of the game rFactor 1:

    //////////////////////////////////////////////////////////// X-Sim 3 game configuration script

  • 7/29/2019 Howto Game Wizard Scripts

    3/4

    //////////////////////////////////////////////////////////

    title: rfactor configgames: rfactor, rfactor2pluginfile_to_copy: xsimplugin.dllgame_executable: rfactor.exerelative_path_to_copy: \Plugins\hint: If install a new X-Sim version you must copy the new xsimplugin.dll or delete 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 becopied to the game folder.The relative_path_to_copy tag will add the folder structure to the found game folder and copy there the plugin file.The hint can be placed if you want a short notice for the user. This hint will not be displayed in the fast scan of X-Sim.In the above case there is no directory searching parameter like a configurationfile or a game executable. Instead all found game executables with the name "rfactor.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 configgames: Nitro Stund Racing Stage 1game_executable: NSR_S1.exegame_parameter: -config -FD_TYPE 1 -FD_ID 0xfebabece -FD_Host 127.0.0.1 -FD_Port4123 -FD_Filter 0.95 0.95 0.95unicode: no

    If your game is using a launcher of the game executable you will notice, that ifthe launcher is closed, the extractor will detect this closed game and stops working. If this is the case you can use the following script parameter and the extractor waits for the start of the second executable before it will start any motion extraction.

    //////////////////////////////////////////////////////////// X-Sim 3 game configuration script//////////////////////////////////////////////////////////

    title: Richard Burns Rally configgames: Richard Burns Rally SSEgame_executable: RichardBurnsRally.exe

    game_parameter: launcher:RichardBurnsRally.exe scanexe:RichardBurnsRally_SSE.exeunicode: no

    As you can see the game parameter is set to "launcher:" followed by the game launcher executable (no space). As second parameter you tell with "scanexe:" the real game executable name. The extractor will wait until the executable behind scanexe is launched. If this does not work for some reason you can stop the wait dialog with the cancel button and try again.

  • 7/29/2019 Howto Game Wizard Scripts

    4/4

    General hints:Try to give the scripts as much informations as possible. They are in concurencyto each other. The demo versions of the games should be downloaded and tested against your new script, else the game listbox may carry i.e. dirt but it is thedemo version which should be displayed as "dirt demo". It is possible to combinethe script tags but you cannot use two search filenames. If a tag has a numberbehind it you can insert up to five of them.

    Copyright 2012 Martin Wiedenbauer, X-Sim