Sun and Water Overrides
Sun and water settings can be tweaked on the fly ingame and saved to a config file. This is useful for mappers to quickly tweak settings, or to fix maps with poor settings. The config files can be distributed in the game to fix the settings for everyone. Mappers should stick to mapinfo.lua for the final implementation of their sun and water settings, as the dynamic solution has a few foibles (eg minimap rendering).
Contents
Finding the Overrides
The tweak settings are found in the ingame menu. Untick 'Simple Settings' on the bottom right of the menu and navigate to Graphics/Sun, Fog & Water.
- The Sun, Fog and Water buttons lead to menus for tweaking their parameters.
- Save and Load Settings reads or writes the current settings to Zero-K\LuaUI\Configs\MapSettingsOverride.
- Apply Water Fix applies a set of water parameters that tend to improve water visuals as many map uses poor engine defaults.
- Save Water Fix saves the water prefix to a file with one click.
Note that water the water settings are designed for bump mapped water, which may not be available to people with ATI graphics. That said, if an ATI graphics user wants to make good water settings under this restriction they can do so. Such settings could be applied based on detecting whether someone has ATI graphics.
Also note that settings modification, saving, and loading only applies to changed settings. For example is possible to only change the lighting on units.
After creating some settings consider sending them to the ZK devs to improve map visuals for everyone.
Sun
Most lighting settings can be figured out by messing around. Perhaps don't touch Specular Exponent without saving, as it behaves weirdly. Lighting should accentuate units without making them glarey.
Fog
The engine implementation of fog is terrible and nobody should use it. If you find a map with fog, set Fog Start to 0.98 and Fog End to 1. This will remove it. I'm not even sure why this is a setting that this point.
Water
The Apply Water Fix can often be a good starting point as it solves two issues with the default water.
- It is too bright in the fog of war, so it stands out too much when zoomed out and it can be hard to see what is in line of sight.
- Underwater units are too hard to see.
Here is some correctly configured water.
Note that the land and water outside line of sight (A and B) are more similar to each other than the areas in line of sight (C and D). Also, the amphibious units are visible.
Debug data:
[SQLBagOStuff] MainObjectStash using store ReplicatedBagOStuff
[objectcache] MainWANObjectCache using store EmptyBagOStuff
IP: 3.148.182.254
Start request GET /mediawiki/index.php?printable=yes&title=Sun_and_Water_Overrides
HTTP HEADERS:
CONTENT-TYPE:
CONTENT-LENGTH: 0
USER-AGENT: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HOST: zero-k.info
COOKIE: wikidb229_mw__session=9u12vhombgth3skfqdvq2chra97dhepl
ACCEPT-ENCODING: gzip, br, zstd, deflate
ACCEPT: */*
CONNECTION: close[localisation] LocalisationCache: using store LCStoreDB
[session] SessionManager using store SqlBagOStuff
[session] Session "9u12vhombgth3skfqdvq2chra97dhepl" requested without UserID cookie
[DBReplication] Cannot use ChronologyProtector with EmptyBagOStuff
[DBReplication] Wikimedia\Rdbms\LBFactory::getChronologyProtector: request info {
"IPAddress": "3.148.182.254",
"UserAgent": "Mozilla\/5.0 AppleWebKit\/537.36 (KHTML, like Gecko; compatible; ClaudeBot\/1.0; +claudebot@anthropic.com)",
"ChronologyProtection": false,
"ChronologyPositionIndex": 0,
"ChronologyClientId": false
}[DBConnection] Wikimedia\Rdbms\LoadBalancer::lazyLoadReplicationPositions: executed chronology callback.
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: connected to database 0 at 'localhost'.
[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: connected to database 0 at 'localhost'.
Title::getRestrictionTypes: applicable restrictions to [[Sun and Water Overrides]] are {edit,move}
[ContentHandler] Created handler for wikitext: WikitextContentHandler
[MessageCache] MessageCache using store SqlBagOStuff
[localisation] LocalisationCache::isExpired(en): cache for en expired due to GlobalDependency
[localisation] LocalisationCache::recache: got localisation for en from source
[DBQuery] startAtomic: entering level 0 (LCStoreDB::finishWrite)
[DBQuery] endAtomic: leaving level 0 (LCStoreDB::finishWrite)
[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff
[SQLBagOStuff] SqlBagOStuff::lock failed due to timeout for wikidb229-mw_:messages:en.
[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff
[MessageCache] MessageCache::load: Loading en... local cache is empty, global cache is expired/volatile, loading from database
ParserFactory: using preprocessor: Preprocessor_Hash
Unstubbing $wgLang on call of $wgLang::_unstub from ParserOptions->__construct
[caches] parser: SqlBagOStuff
Article::view using parser cache: yes
[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff
Parser cache options found.
[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff
ParserOutput cache found.
Article::view: showing parser cache contents
MediaWiki::preOutputCommit: primary transaction round committed
MediaWiki::preOutputCommit: pre-send deferred updates completed
MediaWiki::preOutputCommit: session changes committed
MediaWiki::preOutputCommit: LBFactory shutdown completed
Title::getRestrictionTypes: applicable restrictions to [[Sun and Water Overrides]] are {edit,move}