Unit AI
Unit AI automatically micromanages your units to kite enemies and dodge their fire as appropriate.
To use, simply give your units an Attack Move order. Upon encountering an enemy, they will take the appropriate action(s). Idle units on Maneuver or Roam will also be controlled by the Unit AI.
You can toggle the Unit AI for selected units with the lightbulb button.
How it works
When a unit encounters an enemy whose fire it can jink (a swarmiee), it will automatically move in a zigzag pattern to close in, then (depending on its range) circle strafe the target to continue avoiding its fire.
When a unit encounters an enemy that could hurt it if they get too close (a skirmiee), it will automatically kite the target, moving away while remaining in weapons range.
In both cases, the enemies a unit will skirm or swarm depends on the weapons range of both parties. Additionally, units will not bother attempting to evade the fire of enemies with guided or instant-hit weapons.
Some cowardly units will also automatically flee from all armed enemies they see.
Debug data:
[SQLBagOStuff] MainObjectStash using store ReplicatedBagOStuff
[objectcache] MainWANObjectCache using store EmptyBagOStuff
IP: 18.119.133.148
Start request GET /mediawiki/Unit_AI
HTTP HEADERS:
CONTENT-TYPE:
CONTENT-LENGTH: 0
X-ORIGINAL-URL: /mediawiki/Unit_AI
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.119.133.148",
"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 "l26lkaie4v4j7hn1u2k62t39coppfvaj" is unsaved, marking dirty in constructor
[session] SessionBackend "l26lkaie4v4j7hn1u2k62t39coppfvaj" save: dataDirty=1 metaDirty=1 forcePersist=0
[cookie] already deleted setcookie: "wikidb229_mw__session", "", "1711647943", "/", "", "", "1"
[cookie] already deleted setcookie: "wikidb229_mw_UserID", "", "1711647943", "/", "", "", "1"
[cookie] already deleted setcookie: "wikidb229_mw_Token", "", "1711647943", "/", "", "", "1"
[cookie] already deleted setcookie: "forceHTTPS", "", "1711647943", "/", "", "", "1"
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: connected to database 0 at 'localhost'.
Title::getRestrictionTypes: applicable restrictions to [[Unit AI]] 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 #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: yes
[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.
[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
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
[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/c/c0/Unit_AI_GUI.jpg/1024px-Unit_AI_GUI.jpg
[FileOperation] FileBackendStore::ingestFreshFileStats: File mwstore://local-backend/local-thumb/c/c0/Unit_AI_GUI.jpg/1024px-Unit_AI_GUI.jpg does not exist
TransformationalImageHandler::doTransform: creating 1024x800 thumbnail at C:\Windows\TEMP\mwtmp-IUSR/transform_6b332fcf50ac.jpg using scaler im
TransformationalImageHandler::doTransform: returning unscaled image
Title::getRestrictionTypes: applicable restrictions to [[Unit AI]] are {edit,move}