Quick Stat Tweaks
Revision as of 22:19, 12 November 2019 by GoogleFrog (talk | contribs)
The Tweak Units modoption can be used to modify many unit and weapon parameters. It can be used for rapidly testing balance changes or just for making a quick game mode. It has limitations and should not be used for large mod projects, see Mod Creation to get started on full modding.
Workflow
The Tweak Units modoption overwrites unit paramers (called unitDefs) as they are loaded. The modoption requires a base64 encoded lua array of differences. Here is how to use it.
- Make a lua table in an empty file.
- For each unit you wish to modify, add an empty table indexed by the internal name of the unit to your table.
- Search for the units you wish to modify in the Zero-K repository.
- Copy the parameters you wish to modify into the table, maintaining the structure of the unitDef table.
- Base 64 encode your table.
- Put the base 64 encoding of your table into the Tweak Units modoption.
- Start the game.
- Check infolog.txt in your install directory and fix your syntax errors.
Check out the unit def and weapon def pages on the SpringRTS wiki for definitions of many of the parameters.
Example
Debug data:
[SQLBagOStuff] MainObjectStash using store ReplicatedBagOStuff
[objectcache] MainWANObjectCache using store EmptyBagOStuff
IP: 18.188.103.74
Start request GET /mediawiki/index.php?direction=next&oldid=5732&title=Quick_Stat_Tweaks
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
ACCEPT-ENCODING: gzip, br, zstd, deflate
ACCEPT: */*
CONNECTION: close[localisation] LocalisationCache: using store LCStoreDB
[session] SessionManager using store SqlBagOStuff
[DBReplication] Cannot use ChronologyProtector with EmptyBagOStuff
[DBReplication] Wikimedia\Rdbms\LBFactory::getChronologyProtector: request info {
"IPAddress": "18.188.103.74",
"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 #127 (handle id #121) will be used for SqlBagOStuff
[session] SessionBackend "bvjpitp0o3k2usvvs7vau9fmhvp9hp5r" is unsaved, marking dirty in constructor
[session] SessionBackend "bvjpitp0o3k2usvvs7vau9fmhvp9hp5r" save: dataDirty=1 metaDirty=1 forcePersist=0
[cookie] already deleted setcookie: "wikidb229_mw__session", "", "1715680511", "/", "", "", "1"
[cookie] already deleted setcookie: "wikidb229_mw_UserID", "", "1715680511", "/", "", "", "1"
[cookie] already deleted setcookie: "wikidb229_mw_Token", "", "1715680511", "/", "", "", "1"
[cookie] already deleted setcookie: "forceHTTPS", "", "1715680511", "/", "", "", "1"
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: connected to database 0 at 'localhost'.
Title::getRestrictionTypes: applicable restrictions to [[Quick Stat Tweaks]] are {edit,move}
[ContentHandler] Created handler for wikitext: WikitextContentHandler
[MessageCache] MessageCache using store SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] SqlBagOStuff::lock failed due to timeout for wikidb229-mw_:messages:en.
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) 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 #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
Parser cache options found.
[Preprocessor] Cached preprocessor output (key: wikidb229-mw_:preprocess-hash:6d2d44306694b5a77a65754827495452: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/d/dc/Tweakunitswindow.jpg/934px-Tweakunitswindow.jpg
[FileOperation] FileBackendStore::ingestFreshFileStats: File mwstore://local-backend/local-thumb/d/dc/Tweakunitswindow.jpg/934px-Tweakunitswindow.jpg does not exist
TransformationalImageHandler::doTransform: creating 934x511 thumbnail at C:\Windows\TEMP\mwtmp-IUSR/transform_5985db7fe21a.jpg using scaler im
TransformationalImageHandler::doTransform: returning unscaled image
File::transform: Doing stat for mwstore://local-backend/local-thumb/d/dc/Tweakunitswindow.jpg/934px-Tweakunitswindow.jpg
TransformationalImageHandler::doTransform: creating 934x511 thumbnail at C:\Windows\TEMP\mwtmp-IUSR/transform_9cc611bd950c.jpg using scaler im
TransformationalImageHandler::doTransform: returning unscaled image
File::transform: Doing stat for mwstore://local-backend/local-thumb/d/dc/Tweakunitswindow.jpg/934px-Tweakunitswindow.jpg
TransformationalImageHandler::doTransform: creating 934x511 thumbnail at C:\Windows\TEMP\mwtmp-IUSR/transform_2661b1c3bbf3.jpg using scaler im
TransformationalImageHandler::doTransform: returning unscaled image
[Preprocessor] Cached preprocessor output (key: wikidb229-mw_:preprocess-hash:6d2d44306694b5a77a65754827495452:0)
MediaWiki::preOutputCommit: primary transaction round committed
MediaWiki::preOutputCommit: pre-send deferred updates completed
MediaWiki::preOutputCommit: session changes committed
MediaWiki::preOutputCommit: LBFactory shutdown completed
File::transform: Doing stat for mwstore://local-backend/local-thumb/9/96/Tweakunitsdefs.png/934px-Tweakunitsdefs.png
[FileOperation] FileBackendStore::ingestFreshFileStats: File mwstore://local-backend/local-thumb/9/96/Tweakunitsdefs.png/934px-Tweakunitsdefs.png does not exist
TransformationalImageHandler::doTransform: creating 934x511 thumbnail at C:\Windows\TEMP\mwtmp-IUSR/transform_0277052bade2.png using scaler im
TransformationalImageHandler::doTransform: returning unscaled image
Title::getRestrictionTypes: applicable restrictions to [[Quick Stat Tweaks]] are {edit,move}