-
-
Notifications
You must be signed in to change notification settings - Fork 27
Mint Game Settings
mint-game.settings (formerly gameconfig.txt and PAKSUMS) is a new file loaded by Spearmint's server/client. It allows configuring settings that were previously hard coded in the engine and/or are needed before Game/CGame VM are loaded.
For full examples of mint-game.settings see spearmint-patch-data.
mint-game.settings should be put in a pk3 by itself and distributed with a game or game-port compatibility patch. If it's used in an addon (which I would advise against), it doesn't need to be in a pk3 by itself.
The reason to put in a pk3 is so it's available for clients when connected to a pure server and allow it to be downloaded.
The reason to put it in a pk3 by itself is because it won't be sorted before addons (whereas pk3s listed in the paksums
section will be). If it was sorted before other pk3s and a another pk3 had a mint-game.settings file, pure server and clients might load different mint-game.settings files.
ioquake3 uses com_basegame, fs_basegame, and fs_game to add 1 to 3 game directories to the search path. Spearmint has only fs_game and loads up to 16 additional game directories from mint-game.settings in game directory set by fs_game (either in a pk3, .pk3dir, or unzipped).
addGameDir
adds a game directory to the search path, in paths set by each of following console variables; fs_basepath, fs_homepath, and on Mac OSX fs_apppath.
Game directories are searched in order added. fs_game will be searched before all other game directories.
Paksums are loaded from all mint-game.settings in game directories specified by addGameDir, everything else in their mint-game.settings is ignored.
Example for mod using content from Quake III and Team Arena:
// Mod for Quake III: Team Arena
addGameDir missionpack
addGameDir baseq3
Adds a loading screen for the client to display at startup and vid_restart. The image will always be drawn aspect correct and entirely on the screen. You set the background color that is seen when image is different aspect than window.
You can add 200 different ones. Each time loading screen is shown the next one is used. You can control the next displayed loading screen by setting the cl_loadingScreenIndex cvar (starts at 0). CGame could cause it to reset when it gets to a certain value, allowing more screen to be available over time. CGame could set it to a random value opposed to letting client loop though them in order (though you'll need to hardcode the maximum).
Usage:
addLoadingScreen <shader name> ( R G B ) <aspect>
R, G, B are in the range of 0.0 to 1.0. Aspect is width divided by height so for a 4:3 image use 1.333333.
Example:
addLoadingScreen menuback ( 0 0 0 ) 1.333333
Change cvar default value.
Usage:
cvarDefault <cvar name> <value>
Example:
cvarDefault r_flares 0
Pk3 checksums are used to check for missing or modified pk3s, in which case enabling sv_pure is disabled and a warning is shown. Disabling sv_pure is mainly to prevent people from hosting servers that no one can join.
The pk3s listed are loaded in the order they're listed in and all other pk3s are loaded after them. This allows RTCW-MP to load pak0 before mp_pak#. It also causes addons to take priority over default pk3s regardless of pk3 names.
The format of each line is;
- pk3 filename without game directory or extension
- The pk3's checksum
- Optional keywords
-
nodownload
Used to prevent downloading of commercial pk3s. -
optional
Don't warn when PK3 is missing.
-
baseq3/mint-game.settings
paksums {
// nodownload keyword tells server not to allow pk3 to be downloaded
pak0 4204185745 nodownload
pak1 4193093146 nodownload
pak2 2353701282 nodownload
pak3 3321918099 nodownload
pak4 2809125413 nodownload
pak5 1185311901 nodownload
pak6 750524939 nodownload
pak7 2842227859 nodownload
pak8 3662040954 nodownload
}
Note: Not downloading Quake 3 and Team Arena pk3s is hard coded in the engine, but the nodownload option allows other games to specify this behavior.
To find out what a pk3 file's checksum is, add the pk3 with a checksum 0 to paksums section in mint-game.settings in its game directory and run the game. The real checksum will be shown in the console. You can either manually write them down from in-game console, use the condump
command to dump text into a file in homepath, or on Linux/OS X copy from terminal. You can then replace the 0 in mint-game.settings with the real checksum.
Example contents for mint-game.settings
in the game's fs_game directory.
paksums {
pak0 0
pak1 0
pak2 0
pak3 0
pak4 0
pak5 0
pak6 0
pak7 0
pak8 0
}
For Q3 with the above mint-game.settings
in baseq3
;
Spearmint Alpha_GIT_70ce0a8-2014-06-16 linux-x86_64-debug Jun 16 2014
Have SSE support
----- FS_Startup -----
**********************************************************************
WARNING: baseq3/pak0.pk3 is present but its checksum (4204185745) is not correct.
**********************************************************************
**********************************************************************
WARNING: baseq3/pak1.pk3 is present but its checksum (4193093146) is not correct.
**********************************************************************
**********************************************************************
WARNING: baseq3/pak2.pk3 is present but its checksum (2353701282) is not correct.
**********************************************************************
**********************************************************************
WARNING: baseq3/pak3.pk3 is present but its checksum (3321918099) is not correct.
**********************************************************************
**********************************************************************
WARNING: baseq3/pak4.pk3 is present but its checksum (2809125413) is not correct.
**********************************************************************
**********************************************************************
WARNING: baseq3/pak5.pk3 is present but its checksum (1185311901) is not correct.
**********************************************************************
**********************************************************************
WARNING: baseq3/pak6.pk3 is present but its checksum (750524939) is not correct.
**********************************************************************
**********************************************************************
WARNING: baseq3/pak7.pk3 is present but its checksum (2842227859) is not correct.
**********************************************************************
**********************************************************************
WARNING: baseq3/pak8.pk3 is present but its checksum (3662040954) is not correct.
**********************************************************************
^3WARNING: Default Pk3 files are corrupt or modified.
You need to reinstall Quake III Arena in order to play on pure servers.
Current search path:
/home/user/.spearmint/baseq3
/home/user/.spearmint/baseq3/pro-q3tourney7.pk3 (10 files)
/home/user/.spearmint/baseq3/pak8.pk3 (9 files)
/home/user/.spearmint/baseq3/pak7.pk3 (4 files)
/home/user/.spearmint/baseq3/pak6.pk3 (64 files)
/home/user/.spearmint/baseq3/pak5.pk3 (7 files)
/home/user/.spearmint/baseq3/pak4.pk3 (272 files)
/home/user/.spearmint/baseq3/pak3.pk3 (4 files)
/home/user/.spearmint/baseq3/pak2.pk3 (148 files)
/home/user/.spearmint/baseq3/pak1.pk3 (26 files)
/home/user/.spearmint/baseq3/pak0.pk3 (3539 files)
...
...
...
...
For each pk3 take the number in the warning and replace the 0 for the pk3 in mint-game.settings.