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: 18.191.181.161
Start request GET /mediawiki/index.php?direction=next&oldid=8751&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=798mvcc5r10of2bgb6luvotmc1g7csgo
ACCEPT-ENCODING: gzip, br, zstd, deflate
ACCEPT: */*
CONNECTION: close[localisation] LocalisationCache: using store LCStoreDB
[session] SessionManager using store SqlBagOStuff
[session] Session "798mvcc5r10of2bgb6luvotmc1g7csgo" requested without UserID cookie
[DBReplication] Cannot use ChronologyProtector with EmptyBagOStuff
[DBReplication] Wikimedia\Rdbms\LBFactory::getChronologyProtector: request info {
"IPAddress": "18.191.181.161",
"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
[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: no
Article::view: doing uncached parse
[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff
[Preprocessor] Cached preprocessor output (key: wikidb229-mw_:preprocess-hash:6d7ba8b65504104c7a223c1f505c097e:0)
[Mime] MimeAnalyzer::loadFiles: loading mime types from C:\Projekty\zero-k.info\www\mediawiki\includes/libs/mime/mime.types
[Mime] MimeAnalyzer::loadFiles: loading mime info from C:\Projekty\zero-k.info\www\mediawiki\includes/libs/mime/mime.info
File::transform: Doing stat for mwstore://local-backend/local-thumb/1/1c/SimpleSettings.png/200px-SimpleSettings.png
TransformationalImageHandler::doTransform: creating 200x97 thumbnail at mwstore://local-backend/local-thumb/1/1c/SimpleSettings.png/200px-SimpleSettings.png using scaler im
TransformationalImageHandler::doTransform: Transforming later per flags.
File::transform: Doing stat for mwstore://local-backend/local-thumb/1/1c/SimpleSettings.png/203px-SimpleSettings.png
[FileOperation] FileBackendStore::ingestFreshFileStats: File mwstore://local-backend/local-thumb/1/1c/SimpleSettings.png/203px-SimpleSettings.png does not exist
TransformationalImageHandler::doTransform: creating 203x98 thumbnail at C:\Windows\TEMP\mwtmp-IUSR/transform_4ed113b69206.png using scaler im
TransformationalImageHandler::doTransform: returning unscaled image
File::transform: Doing stat for mwstore://local-backend/local-thumb/1/1c/SimpleSettings.png/203px-SimpleSettings.png
TransformationalImageHandler::doTransform: creating 203x98 thumbnail at C:\Windows\TEMP\mwtmp-IUSR/transform_287cb17f87af.png using scaler im
TransformationalImageHandler::doTransform: returning unscaled image
File::transform: Doing stat for mwstore://local-backend/local-thumb/a/a5/MainSunFogWater.png/200px-MainSunFogWater.png
TransformationalImageHandler::doTransform: creating 200x423 thumbnail at mwstore://local-backend/local-thumb/a/a5/MainSunFogWater.png/200px-MainSunFogWater.png using scaler im
TransformationalImageHandler::doTransform: Transforming later per flags.
File::transform: Doing stat for mwstore://local-backend/local-thumb/a/a5/MainSunFogWater.png/300px-MainSunFogWater.png
TransformationalImageHandler::doTransform: creating 300x635 thumbnail at mwstore://local-backend/local-thumb/a/a5/MainSunFogWater.png/300px-MainSunFogWater.png using scaler im
TransformationalImageHandler::doTransform: Transforming later per flags.
File::transform: Doing stat for mwstore://local-backend/local-thumb/a/a5/MainSunFogWater.png/312px-MainSunFogWater.png
[FileOperation] FileBackendStore::ingestFreshFileStats: File mwstore://local-backend/local-thumb/a/a5/MainSunFogWater.png/312px-MainSunFogWater.png does not exist
TransformationalImageHandler::doTransform: creating 312x660 thumbnail at C:\Windows\TEMP\mwtmp-IUSR/transform_15515d6d5013.png using scaler im
TransformationalImageHandler::doTransform: returning unscaled image
File::transform: Doing stat for mwstore://local-backend/local-thumb/2/2a/OverrideDir.png/350px-OverrideDir.png
TransformationalImageHandler::doTransform: creating 350x99 thumbnail at mwstore://local-backend/local-thumb/2/2a/OverrideDir.png/350px-OverrideDir.png using scaler im
TransformationalImageHandler::doTransform: Transforming later per flags.
File::transform: Doing stat for mwstore://local-backend/local-thumb/2/2a/OverrideDir.png/525px-OverrideDir.png
TransformationalImageHandler::doTransform: creating 525x149 thumbnail at mwstore://local-backend/local-thumb/2/2a/OverrideDir.png/525px-OverrideDir.png using scaler im
TransformationalImageHandler::doTransform: Transforming later per flags.
File::transform: Doing stat for mwstore://local-backend/local-thumb/2/2a/OverrideDir.png/528px-OverrideDir.png
[FileOperation] FileBackendStore::ingestFreshFileStats: File mwstore://local-backend/local-thumb/2/2a/OverrideDir.png/528px-OverrideDir.png does not exist
TransformationalImageHandler::doTransform: creating 528x150 thumbnail at C:\Windows\TEMP\mwtmp-IUSR/transform_73cb0186242c.png using scaler im
TransformationalImageHandler::doTransform: returning unscaled image
File::transform: Doing stat for mwstore://local-backend/local-thumb/c/cc/WaterAsthetic.png/500px-WaterAsthetic.png
TransformationalImageHandler::doTransform: creating 500x417 thumbnail at mwstore://local-backend/local-thumb/c/cc/WaterAsthetic.png/500px-WaterAsthetic.png using scaler im
TransformationalImageHandler::doTransform: Transforming later per flags.
File::transform: Doing stat for mwstore://local-backend/local-thumb/c/cc/WaterAsthetic.png/750px-WaterAsthetic.png
TransformationalImageHandler::doTransform: creating 750x626 thumbnail at mwstore://local-backend/local-thumb/c/cc/WaterAsthetic.png/750px-WaterAsthetic.png using scaler im
TransformationalImageHandler::doTransform: Transforming later per flags.
File::transform: Doing stat for mwstore://local-backend/local-thumb/c/cc/WaterAsthetic.png/846px-WaterAsthetic.png
[FileOperation] FileBackendStore::ingestFreshFileStats: File mwstore://local-backend/local-thumb/c/cc/WaterAsthetic.png/846px-WaterAsthetic.png does not exist
TransformationalImageHandler::doTransform: creating 846x706 thumbnail at C:\Windows\TEMP\mwtmp-IUSR/transform_953202ed54cf.png using scaler im
TransformationalImageHandler::doTransform: returning unscaled image
[Preprocessor] Cached preprocessor output (key: wikidb229-mw_:preprocess-hash:6d7ba8b65504104c7a223c1f505c097e:0)
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}