Ini File: Difference between revisions

From VisionaireWiki
Jump to navigation Jump to search
Line 1: Line 1:
== Description ==
== Description ==
Visionaire 2.x offers a very comfortable way to predefine the settings of the SmartSetup via an .ini-file. It can be very annoying if you have to change the settings everytime. You can also pass over some values, which disables the SmartSetup at all and starts a game immediately:
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 .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''':
'''Parameters of the config.ini-file''':
Line 22: Line 23:
This parameter allows you to pass over the file, which is to be loaded automatically when starting the projector using the parameters configured above.
This parameter allows you to pass over the file, which is to be loaded automatically when starting the projector using the parameters configured above.


If empty, the projector will call the SmartSetup, using the parameters of the ini-file as default settings.
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.
The file ending is of no importance, as long as it is valid visionaire game/project file.


  LANGUAGE = {deutsch|englisch...}
  LANGUAGE = {German|English...}


Choose in which language the game is to be started.
Choose in which language the game is to be started.


Type in the exact name of the language as configured in the editor.
Type in the exact name of the language as configured in the editor.
If you start a .ved file, you might ignore this parameter.


  TEMPPATH = {path}
  TEMPPATH = {path}


During playing a game from a VED/EXE file sometimes some files (e.g. Videofiles) need to be extracted; Normally the directory is used, where the EXE file or the game projector are situated. A subdirectory tmp will be created there and used. We could not use the standard windows temp directory, because we got in trouble with some files.  
During playing a game some files (e.g. videos) could 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 give here your own path.  
For special situations, e.g. games running from CD, you can specify your own path here.


The parameters and their values are case sensitive, except the file name (if exits)!! The order of the parameters is unimportant and does not have any effect.
New options with Visionaire 3.3:
RESOLUTION = Auto|Desktop|Game
 
This option allows activation of support for widescreen displays. By default the resolution of the game ('''Game''' option) is used. E.g. if the game has a resolution of 1024x768 and is shown on a widescreen monitor in full screen 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 (recommended) widescreen support (i.e. as with '''Desktop''' option) is activated if a widescreen 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==
==1st Example==

Revision as of 13:01, 24 October 2009

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 projector using the parameters configured above.

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}

During playing a game some files (e.g. videos) could 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 widescreen displays. By default the resolution of the game (Game option) is used. E.g. if the game has a resolution of 1024x768 and is shown on a widescreen monitor in full screen 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 (recommended) widescreen support (i.e. as with Desktop option) is activated if a widescreen 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
FILE = 
LANGUAGE = 
TEMPPATH = c:/zak2tmp

Since no file name was entered, the SmartSetup will be called. The settings are set to windowed mode and "no intro". The player has to select a game file as well as a language manually. Temporary files are saved in directory c:\zak2tmp; the directory will be created, if it is not existing already.

2nd Example

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

When starting the player, the game called "demo/demo.vis" is started automatically in full screen mode. The game language is English and the intro will be shown.

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.

The parameters are (the order is important!!!):

  • -w The game is started in windowed mode
  • -f The game is started in fullscreen mode
  • -t <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 readonly 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. (This functionality is still quite experimental; if anyone needs it for delivering his game on a CD/DVD, please give us a shout on [1].)
  • <ved/vis file> The last parameter can determine the filename of the game

examples:

visplayer.exe -f demogame.ved
demogame.exe -t c:\MyGame