Ini File: Difference between revisions

From VisionaireWiki
Jump to navigation Jump to search
No edit summary
 
(30 intermediate revisions by the same user not shown)
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 20: Line 21:
  FILE = {game.ved}
  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.
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.


If empty, the projector will call the SmartSetup, using the parameters of the ini-file as default settings.
LANGUAGE = {German|English...}


The file ending is of no importance, as long as it is valid visionaire game/project file.
Choose in which language the game is to be started. Type in the exact name of the language as configured in the editor.


  LANGUAGE = {deutsch|englisch...}
New options with Visionaire 3.3:
  RESOLUTION = Auto|Desktop|Game


Choose in which language the game is to be started.
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 (it depends on the display or graphics card driver how the image is stretched and if the aspect ratio is kept). 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.


Type in the exact name of the language as configured in the editor.
LOGLEVEL = Info|Warning|Error
If you start a .ved file, you might ignore this parameter.


TEMPPATH = {path}
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.
 
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.  
 
For special situations, e.g. games running from CD, you can give here your own path.
 
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.


==1st Example==
==1st Example==
  FULLSCREEN = no
  FULLSCREEN = no
RENDERER = d3d
  INTRO = no
  INTRO = no
  FILE =  
  LOGLEVEL = Error
LANGUAGE =
TEMPPATH = c:/zak2tmp


Since no file name was entered, the SmartSetup will be called. The settings are set to windowed mode, Direct3D rendering 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.
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". Only errors are written to the log file messages.log.


==2nd Example==
==2nd Example==
  FULLSCREEN = yes
  FULLSCREEN = yes
RENDERER = ogl
  INTRO = yes
  INTRO = yes
  FILE = demo/demo.vis
  FILE = demo/demo.vis
  LANGUAGE = english
  LANGUAGE = english
LOGLEVEL = Info


When starting the projector, the game called "demo/demo.vis" is started automatically. The game language is English; the intro will be shown, OpenGL is used in full screen mode.
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 ==
== Command line parameters ==


Furthermore, there is the option of adding parameters to the gameproj.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.
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 (the order is important!!!):
The parameters are (order is not important):


* '''-gl''' The game is started in OpenGL mode
* '''-w|--window''' The game is started in windowed mode (if not specified the game is started in full screen mode).
* '''-d3d''' The game is started in Direct3D mode
* '''-ns|--nosounds''' Deactivates sound output.
* '''-w''' The game is started in windowed mode
* '''-nv|--novideos''' Deactivates all videos.
* '''-f''' The game is started in fullscreen mode
* '''<ved/vis file>''' The last parameter can determine the filename of the game.
* '''-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 [mailto:support@visionaire2d.net].)
New with Visionaire 3.3:
* '''<ved/vis file>''' The last parameter can determine the filename of the game
* '''-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 (it depends on the display or graphics card driver how the image is stretched and if the aspect ratio is kept). 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.
* '''-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:
Examples:
  gameproj.exe -gl -f demogame.ved
  visplayer.exe -f -ll=warning demogame.ved
  demogame.exe -d3d -t c:\MyGame
  demogame.exe -w --resolution=auto

Latest revision as of 23:09, 16 February 2012

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.

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 (it depends on the display or graphics card driver how the image is stretched and if the aspect ratio is kept). 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
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". 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).
  • -ns|--nosounds Deactivates sound output.
  • -nv|--novideos Deactivates all videos.
  • <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 (it depends on the display or graphics card driver how the image is stretched and if the aspect ratio is kept). 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.
  • -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