Ini File

From The Official Visionaire Studio: Adventure Game Engine Wiki

Visionaire offers a comfortable way to predefine the settings of the started game via a config.ini file. The .ini file and the player have to be in the same directory. When building (compiling) your game, a basic config.ini file is automatically added to your export folder.

The parameter names and values are case in-sensitive – except for the file name (FILE parameter). The order of the parameters is unimportant and does not have any effect.

For a more dynamic method that utilizes Lua script to read & write custom settings from & to the config.ini file, please see this custom script.


Parameters of the config.ini file

Basic parameters

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. Note that the file name is case sensitive.


FULLSCREEN = {yes|no}
  • yes: Start the game in fullscreen.
  • no: Start the game in a window.


RESOLUTION = {Auto|Desktop|Game|Custom}

This option allows activation of support for wide-screen displays.

  • Game: 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.
  • Desktop: 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.
  • Auto: Wide-screen support (i. e. as with Desktop option) is activated if a wide-screen display is detected.
  • Custom: Should only be defined if FULLSCREEN = no. i. e: RESOLUTION = 640x480.


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.


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.


LOGLEVEL = {Info|Warning|Error}

Sets the log level for log messages written to the messages.log file.

  • Error: Only error messages are written to the log file.
  • Warning: Error and warning messages are written to the log file.
  • Info: Everything is written to the log file.


Advanced parameters

MUSICVOLUME = {0 to 100}

Sets the music volume to the given value.


SOUNDVOLUME = {0 to 100}

Sets the sound volume to the given value.


SPEECHVOLUME = {0 to 100}

Sets the speech volume to the given value.


MOVIEVOLUME = {0 to 100}

Sets the movie volume to the given value.


GLOBALVOLUME = {0 to 100}

Sets the global volume to the given value.


USETEXTUREFORWIDESCREEN = {yes|no}
  • yes: Use framebuffer with texture. (default)
  • no: Use framebuffer without texture.


RESIZEABLE = {yes|no}
  • no: Window is not resizable. (default)
  • yes: Window is resizeable.


config.ini examples

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.


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 messages.log log file.


FILE = data.vis
FULLSCREEN = no
RESIZEABLE = yes
RESOLUTION = 640x480
LOGLEVEL = Info

Window mode. Window can be resized manually. Initial screen size / resolution will be set as 640x480px. All log messages will be written to the messages.log log file.


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.
  • -r|--resolution=auto|desktop|game: See the RESOLUTION parameter for an explanation.
  • -ll|--loglevel=info|warning|error: See the LOGLEVEL parameter for an explanation.
  • <ved/vis file>: The last parameter can determine the filename of the game.


Examples:

visplayer.exe -f -ll=warning demogame.ved
demogame.exe -w --resolution=auto