Ini File

From VisionaireWiki
Revision as of 15:25, 24 October 2009 by Alex (talk | contribs) (→‎1st Example)
Jump to navigation Jump to search

Description

Visionaire 3.x offers a very comfortable way to predefine the settings of the started game via an .ini-file.

The .ini-file and the player have to be in the same directory. The filename of the .ini-file has to be 'config.ini'. The parameter names and values are case in-sensitive. Except the file name which is case sensitive. The order of the parameters is unimportant and does not have any effect.

Parameters of the config.ini-file:

FULLSCREEN = {yes|no}
  • yes - starts the game in fullscreen
  • no - starts the game in a window
INTRO = {yes|no}
  • yes - Show the intro movie on start-up.
  • no - Don't show the intro movie.

If the game file does not have an intro movie, this parameter can be ignored.

FILE = {game.ved}

This parameter allows you to pass over the file, which is to be loaded automatically when starting the player. The file name has to be either specified here in the ini file or via command line parameter (this is done automatically when the game is started from the editor). The file ending is of no importance, as long as it is valid visionaire game/project file.

LANGUAGE = {German|English...}

Choose in which language the game is to be started. Type in the exact name of the language as configured in the editor.

TEMPPATH = {path}

Sometimes during playing a game some files (e.g. videos) need to be extracted. By default a temp directory in the directory of the executable player is used. We could not use the standard windows temp directory, because we got in trouble with some files. For special situations, e.g. games running from CD, you can specify your own path here.

New options with Visionaire 3.3:

RESOLUTION = Auto|Desktop|Game

This option allows activation of support for wide-screen displays. If Game option is used then the game is initialized with the resolution specified in the game. This could lead to problems in full screen mode if e.g. the game has a resolution of 1024x768 and is shown on a wide-screen monitor. Then the whole scene is shown in a different aspect ratio and everything is stretched. In case the option Desktop is used the current desktop resolution is used when the game is started in full screen mode. The scene is only stretched as much as possible so that the correct aspect ratio of the game is kept. The remaining space is filled with black bars. In case the option Auto is used (default) wide-screen support (i.e. as with Desktop option) is activated if a wide-screen display is detected.

LOGLEVEL = Info|Warning|Error

Sets the log level for log messages. With Error option only error messages are written to the log file. With Warning option error and warning messages are written to the log file. With Info everything is written to the log file.

1st Example

FULLSCREEN = no
INTRO = no
TEMPPATH = c:/zak2tmp
LOGLEVEL = Error

Since no file name was entered, the filename must be specified as a command line parameter. The settings are set to windowed mode and "no intro". Temporary files are saved in directory c:\zak2tmp; the directory will be created, if it does not exist already. Only errors are written to the log file messages.log.

2nd Example

FULLSCREEN = yes
INTRO = yes
FILE = demo/demo.vis
LANGUAGE = english
LOGLEVEL = Info

When starting the player, the game demo.vis in the sub directory demo is started. The game is shown in full screen mode, game language is English and the intro will be shown. All log messages are written to the log file messages.log.

Command line parameters

Furthermore, there is the option of adding parameters to the visplayer.exe or the created <game>.exe. This can be done either when the game is started directly on the command line, but also from within a Windows shortcut. Parameters from the config.ini file are overwritten with command line parameters.

The parameters are (order is not important):

  • -w|--window The game is started in windowed mode (if not specified the game is started in full screen mode)
  • -t|--temppath=<path> The given path will be used to create temporary files and savegames. This is necessary if a compiled game that contains videos is started from a read-only medium (e.g. CD-ROM). The temporary directory is also home to the savegame directory, where the savegames are stored. At the moment, no spaces are permitted in the name of this path.
  • <ved/vis file> The last parameter can determine the filename of the game

New with Visionaire 3.3:

  • -r|--resolution=auto|desktop|game This option allows activation of support for wide-screen displays. If game option is used then the game is initialized with the resolution specified in the game. This could lead to problems in full screen mode if e.g. the game has a resolution of 1024x768 and is shown on a wide-screen monitor. Then the whole scene is shown in a different aspect ratio and everything is stretched. In case the option desktop is used the current desktop resolution is used when the game is started in full screen mode. The scene is only stretched as much as possible so that the correct aspect ratio of the game is kept. The remaining space is filled with black bars. In case the option auto is used (default) wide-screen support (i.e. as with desktop option) is activated if a wides-creen display is detected.
  • -ll|--loglevel=info|warning|error Sets the log level for log messages. With error option only error messages are written to the log file. With warning option error and warning messages are written to the log file. With info everything is written to the log file.

Examples:

visplayer.exe -f -ll=warning demogame.ved
demogame.exe -w --resolution=auto -t=c:\Temp