Class: BaseManager

BaseManager()

new BaseManager()

Source:

Classes

BaseManager

Members

Config

Source:

ID

Source:

STATE_ANCHORLESS

Anchorless base, currently with dock.
Source:

STATE_CAPTURED

Captured base with an anchor.
Source:

STATE_UNCONSTRUCTED

New base with a foundation anchor.
Source:

STATE_WITH_ANCHOR

Source:

[undefined]

Source:

accessIndex

Source:

accessIndex

Source:

accessIndex

Source:

anchor

Source:

anchor

Source:

anchor

Source:

anchor

Source:

anchorId

Source:

anchorId

Source:

anchorId

Source:

basesManager

Source:

buildings

Source:

constructing

Source:

constructing

Source:

constructing

Source:

constructing

Source:

dropsiteSupplies

Source:

dropsiteSupplies[undefined]

Source:

dropsites

Source:

dropsites[undefined]

Source:

dropsites[undefined]

Source:

gatherers

Source:

gatherers[undefined]

Source:

maxDistResourceSquare

Source:

mobileDropsites

Source:

neededDefenders

Source:

neededDefenders

Source:

neededDefenders

Source:

neededDefenders

Source:

neededDefenders

Source:

territoryIndices

Source:

timeNextIdleCheck

Source:

timeNextIdleCheck

Source:

units

Source:

workerObject

Source:

workers

Source:

Methods

AddTCGatherer()

Source:

Deserialize()

Source:

GetTCGatherer()

Source:

RemoveTCGatherer()

Source:

Serialize()

Source:

addGatherRates()

Adds the estimated gather rates from this base to the currentRates
Source:

anchorLost()

Source:

assignEntity()

Source:

assignResourceToDropsite()

Assign the resources around the dropsites of this basis in three areas according to distance, and sort them in each area. Moving resources (animals) and buildable resources (fields) are treated elsewhere.
Source:

assignRolelessUnits()

Source:

assignToFoundations()

If we have some foundations, and we don't have enough builder-workers, try reassigning some other workers who are nearby AI tries to use builders sensibly, not completely stopping its econ.
Source:

checkResourceLevels()

check our resource levels and react accordingly
Source:

findBestDropsiteAndLocation() → {Object}

Source:
Returns:
- The position of the best place to build a new dropsite for the specified resource, its quality and its template name.
Type
Object

findBestDropsiteLocation()

Returns the position of the best place to build a new dropsite for the specified resource and dropsite template.
Source:

gatherersByType()

Source:

getResourceLevel()

Source:

init()

Source:

pickBuilders()

returns an entity collection of workers. They are idled immediatly and their subrole set to idle.
Source:

reassignIdleWorkers()

Source:

removeDropsite()

Source:

removeFromAssignedDropsite()

Source:

reset()

Source:

setAnchor()

Source:

setAnchorlessEntity()

Set a building of an anchorless base
Source:

setWorkersIdleByPriority()

If the numbers of workers on the resources is unbalanced then set some of workers to idle so they can be reassigned by reassignIdleWorkers. TODO: actually this probably should be in the HQ.
Source:

switchGatherer()

Switch some gatherers (limited to number) from resource "from" to resource "to" and return remaining number of possible switches. Prefer Civilian for food and CitizenSoldier for other resources.
Source:

update()

Return false when the base is not active (no workers on it)
Source:

workersBySubrole()

Source:

BaseManager()

Base Manager Handles lower level economic stuffs. Some tasks: -tasking workers: gathering/hunting/building/repairing?/scouting/plans. -giving feedback/estimates on GR -achieving building stuff plans (scouting/getting ressource/building) or other long-staying plans. -getting good spots for dropsites -managing dropsite use in the base -updating whatever needs updating, keeping track of stuffs (rebuilding needs…)

Constructor

new BaseManager()

Source:

Classes

BaseManager

Members

Config

Source:

ID

Source:

STATE_ANCHORLESS

Anchorless base, currently with dock.
Source:

STATE_CAPTURED

Captured base with an anchor.
Source:

STATE_UNCONSTRUCTED

New base with a foundation anchor.
Source:

STATE_WITH_ANCHOR

Source:

[undefined]

Source:

accessIndex

Source:

accessIndex

Source:

accessIndex

Source:

anchor

Source:

anchor

Source:

anchor

Source:

anchor

Source:

anchorId

Source:

anchorId

Source:

anchorId

Source:

basesManager

Source:

buildings

Source:

constructing

Source:

constructing

Source:

constructing

Source:

constructing

Source:

dropsiteSupplies

Source:

dropsiteSupplies[undefined]

Source:

dropsites

Source:

dropsites[undefined]

Source:

dropsites[undefined]

Source:

gatherers

Source:

gatherers[undefined]

Source:

maxDistResourceSquare

Source:

mobileDropsites

Source:

neededDefenders

Source:

neededDefenders

Source:

neededDefenders

Source:

neededDefenders

Source:

neededDefenders

Source:

territoryIndices

Source:

timeNextIdleCheck

Source:

timeNextIdleCheck

Source:

units

Source:

workerObject

Source:

workers

Source:

Methods

AddTCGatherer()

Source:

Deserialize()

Source:

GetTCGatherer()

Source:

RemoveTCGatherer()

Source:

Serialize()

Source:

addGatherRates()

Adds the estimated gather rates from this base to the currentRates
Source:

anchorLost()

Source:

assignEntity()

Source:

assignResourceToDropsite()

Assign the resources around the dropsites of this basis in three areas according to distance, and sort them in each area. Moving resources (animals) and buildable resources (fields) are treated elsewhere.
Source:

assignRolelessUnits()

Source:

assignToFoundations()

If we have some foundations, and we don't have enough builder-workers, try reassigning some other workers who are nearby AI tries to use builders sensibly, not completely stopping its econ.
Source:

checkResourceLevels()

check our resource levels and react accordingly
Source:

findBestDropsiteAndLocation() → {Object}

Source:
Returns:
- The position of the best place to build a new dropsite for the specified resource, its quality and its template name.
Type
Object

findBestDropsiteLocation()

Returns the position of the best place to build a new dropsite for the specified resource and dropsite template.
Source:

gatherersByType()

Source:

getResourceLevel()

Source:

init()

Source:

pickBuilders()

returns an entity collection of workers. They are idled immediatly and their subrole set to idle.
Source:

reassignIdleWorkers()

Source:

removeDropsite()

Source:

removeFromAssignedDropsite()

Source:

reset()

Source:

setAnchor()

Source:

setAnchorlessEntity()

Set a building of an anchorless base
Source:

setWorkersIdleByPriority()

If the numbers of workers on the resources is unbalanced then set some of workers to idle so they can be reassigned by reassignIdleWorkers. TODO: actually this probably should be in the HQ.
Source:

switchGatherer()

Switch some gatherers (limited to number) from resource "from" to resource "to" and return remaining number of possible switches. Prefer Civilian for food and CitizenSoldier for other resources.
Source:

update()

Return false when the base is not active (no workers on it)
Source:

workersBySubrole()

Source: