All notable changes to this project will be documented here. Please note, this project adheres to Semantic Versioning.
Another small patch to get out some more important fixes:
- Launcher fixed for OSX
- Fixed 'stuck' workers being exclusively selected for building (oops.. RIP)
- Major map resource / expansion decomposition overhaul
- Initial support for exposing render and feature layer data
Various other fixes:
- Freeing of squares on the placement grid when a unit is destroyed now actually works
- Associating a new townhall to its base / expansion location also now actually works
- Initial geyser, mineral field, and ramp plate cells now marked as unplaceable and/or unpathable as appropriate
- Fix expansion order and pathing on maps with islands or otherwise full blocked expos
- Fixed calculation of mineral line and behind behind line areas (still not perfect, but a ton better)
Also:
- default stepIncrement for engine systems bumped to 2
- sc2:DebugOnScreen now shows active earmarks
- Added utils/geometry/point getNeighbors()
- Added utils/map/cluster clusterByNeighbor()
- Expansion cluster now takes geyser placement into consideration
Small patch to get out some important fixes
- Fixed path separator issue (thanks MrRacoon!)
- Fixed height calculation just being wrong :)
- added
chatReceieved
event (yay!) - fixed broken footprint checks (still need to document footprints...)
- builder systems can now build pylons if you really want them to
- added a plate types group (for unbuildable plates at the base of the main ramp)
- Initial support for in-engine unit footprinting and placements (footprints look like: { w: number, h: number }, for instance, a mineral field would be { w: 2, h: 1 })
- Initial support for custom maps (or at least the engine shouldn't explode if it doesn't understand map topography or player configuration)
-
Initial support for unit type systems (good luck figuring it out how it works before i write docs :p)- Added some more proto api enums to the built-ins
-
MORE DEBUG COLORS! yay debugging
-
Added
unitHasDisengaged
event -
Constants
- Added a bunch of group constants for convenience: structuresTypes, flyingStructureTypes, addonTypes, constructionAbilities
- Added WarpUnitAbility which maps a warp unit to its training ability id.
-
Unit Resource enhancements
- Added support for ALLY type units
getGasMines(filter: UnitFilter) => Unit[]
getConstructingWorkers() => Unit[]
(workers with active building orders)
-
Unit Entity enhancements
canMove() => bool
isHolding() => bool
- hold position checkcanShootUp() => bool
isStructure() => bool
- this is very literalisFinished() => bool
- same as filtering u.buildProgress >= 1isCombatUnit() => bool
- also pretty literalisConstructing() => bool
- same as filtering u.buildProgress < 1is(type: UnitTypeId) => bool
- same as filtering unit.unitType === UnitType.FOOdata() => UnitTypeData
- retrieves the static UnitTypeData for the unit typeabilityAvailable(ability: AbilityId) => bool
- checks if an ability is available this frame synchronousavailableAbilities() => Array<AbilityId>
- returns all available abilities this frame, synchronousgetLabel(label) => any
- alias of u.label.get(l)removeLabel(label) => bool
- alias of u.label.delete(l)hasLabel(label) => bool
- alias of u.label.has(l)addLabel(label, component: any) => Map<string: UnitTag, any>
- alias of u.label.add(l, component)toggle => Promise<SC2APIProtocol.ResponseAction>
- toggles some unit transformation, currently works for warp prism and liberatorburrow => Promise<SC2APIProtocol.ResponseAction>
- currently only works on widow mines (and don't ask how to unburrow them :p)
-
Map Resource enhancements
isCustom() => bool
isPathable(point) => bool
isPlaceable(point) => bool
isVisible(point) => bool
hasCreep(point) => bool
freeGasGeysers() => Unit[]
getEffects() => Effect[]
getHeight() => number
getSize() => { w: number, h: number }
(the 2DI map size)getCenter(pathable?: boolean) => Point2D
(optionally require the closest pathable point vs absolute center)isPlaceableAt(unitType, position) => bool
(this.. surprisingly works pretty well)- Added some functions for internal graph cloning and manipulation
-
Map System enhancements
- Initial support for calculating wall-offs
onGameStart
. Currently only attempts the natural wall. Check it out withset DEBUG=sc2:debug:*,sc2:DrawDebugWalls
and retrieve it with map.getNatural().getWall() - Added effect events and effect data propegation
onNewEffect
onExpiredEffect
- Initial support for calculating wall-offs
-
Actions Resource enhancements
warpIn(unitType, opts?: { nearPosition?: Point2D, maxQty?: number, highground?: boolean })
patrol(u: Unit | Unit[], p: Point2D | Point2D[], queue?: boolean )
-
Frame Resource Enhancements
frame.timeInSeconds()
frame.getEffects()
(for internal use)
-
DataStorage enhancements
getEffectData()
- Added additional debugging output for new earmarks
-
Debug System added!
- Handles the state of the Debug Resource
- try setting
DEBUG=sc2:debug:*,sc2:DebugOnScreen
:)
-
System Entity enhancements
pause()
unpause()
-
Agent Entity enhancements
canAffordN(unitType, maxN) => number
(return the max you can afford)
-
Builder System enhancements
- Added earmarks (so your build system can still work if other systems are being greedy)
pauseBuild()
resumeBuild()
earmarkDelay()
- adjusts how long the builder waits before earmarking the current task- Added on screen build debugging! try it with
set DEBUG=sc2:debug:*,sc2:debug:build
-
utils/geometry/point
enhancementscreatePoint(point)
(floors a Point to an integer for cell use)createPoint2D(point)
(floors a Point2D to an integer for cell use)normalize(point)
(for vector normalization)
-
utils/geometry/angle
enhancementsgridsInCircle(centerPoint, radius) => Point2D[]
, returns all map cells in a given radius
-
utils/geometry/plane
enhancementscellsInFootprint(centerPoint, footprint) => Point2D[]
, returns all Point2Ds in the footprint of a unit
-
utils/map/region
enhancementsfrontOfGrid
useful for basically any list of points
-
Other enhancements
- workers can now be labeled as 'stuck' if given a command over 250 frames old with no confirmation that the command could be attempted or errored
-
Updated pathfinding dep to a fork with weight support
-
Fixed the way tile height is calculated to not be terrible (it's still broken, but less broken)
-
Fixed a long standing bug with the event-channel
- events will no longer be swallowed sometimes when still having readers
-
Constants Changes are mainly for improving consistency and behavior
- Added
UnitTypeId
,AbilityId
, andUpgradeId
to the main export (these are the reverses, to get the string representation of the ids from the ids - for stuff like labels / debugging)
- Added
-
Unit Resource enhancements
getById
,getBases
, andgetStructures
now take consistent filter argumentsgetProductionUnits
now takes into account weirdo aliased mapped units to find producers
-
Agent Entity changes
canAffordUpgrade
now properly respects earmarks- Allows adding systems to an agent while a game is running
- No longer breaks in custom maps with no well defined "player" or "enemy"
-
Builder System changes
build
tasks now take an extra step to verify the thing they are building has started, to stop derps, before moving on- will now warp in units with a normal
train
task - robustified
ability
to support more scenarios (like terran addons)
-
Map Resource changes
- Updated
map.path
to allow to inject your own graph weights - Updated the silly
combatRally
function to adjust as you expand (still silly tho)
- Updated
-
Map System changes
- Fixed exploding on 4 player maps (but still doesn't really support it quite right yet)
- Updates pathing and placement grids on building changes
-
Actions Resource changes
- Updated
gather
balancing heuristics - Updated
build
to try to reuse a nearby builder - Updated
build
to actually work properly with weird targets - Finally refactored the geyser/mine functions that weren't documented anyway
- Training a unit properly reduces locally available resources
- Updated
-
Engine Entity changes
- Added back battlenetmap cache support as a fallback again (by map name if no local version found)
-
Debug Resource changes
- Completely smashed the debug resource and put it back together (a third time now...)
- Supports creating of arbitrary spheres, lines, and cells, custom labels, heigh, position, etc
-
System Entitiy changes
- Systems now default to type 'agent' if not specified
- Fixed
stepIncrement
not actually affecting anything, should work now - Allow for 'late setup' of systems after game is running
- Expose system from wrapper via escape hatch
- Removed phase shifting adept unit type from combat unit types group
- Initial support added for LADDER MANAGER COMPATIBILITY! Yay, stay tuned for docs
- Terrain height added to map grids
randomCirclePoints
added to geometry angle utils (random points within a radius)- added missing
toDegrees
to geometry angle utilities (to complementtoRadians
) - Map resouce related features:
- isPlaceable(point)
- getHeight(point)
- added missing constant necessary to use chrono boosts
- Broke and fixed the debug resource (that isn't documented and no one actually uses yet anyway)... it's almost actually useful now. Soon.
- Fixed builder to not accidentally build things where the nat townhall should go
- The
frontOfNatural
map utility actually does what it's supposed to now (undocumented currently) actions.attack()
andactions.attackMove()
now can accept a unit or array of units to add consistencyunitEntity#isWorker()
now actually returns true for workers of any race, including mules
- additional type groups added:
techLabtypes
,reactorTypes
,returningAbilities
,constructionAbilities
units.getUnfinished()
- likeinProgress()
but for all unfinished unitsdistanceX
,distanceY
, andsubtract
point utilitiesunitHasEngaged
andunitHasSwitchedTargets
eventshasReactor
andhasTechLab
unit methodsnear
unit type requests for terran builder system- ability to load a non-standard map without the map system exploding
actions.swapBuildings
added (for terran addon fun)actions.smart
bluebird
- BREAKING
actions
resource changes:do
accepts array or a single tag, opts with target of a unit or pointmove
now accepts a point2d or a unit as a target
actions.buildGasMine
now works on snapshot (but current) geysersactions.gather
now works with muleshasTechFor
now properly includes tech aliases- launcher correctly ignores port being held by defunct or idle processes
- clarified some tutorial language
- robustifiered terran builder system placement decisions
delay