Here are the behaviors I plan to develop. Behaviors work together for an Agent which coordinate them.
All behaviors have
The units allocated to this behaviour.
All behaviors can
Add a unit to the behavior's units.
Remove a unit from the behavior's units.
Decision take the form of these indicators
The number of houses which are needed if possible.
Build houses if population capability < 5% of the population OR if the population capability < 100 people
Decision take the form of these indicators
The desired number of units - builders only, at least one soldier to be able to start any building (women can take it from the foundations).
Build the buildings of the given types when asked to. It comapares the priorities of the requests before starting to build. And adjusts the desiredNumberOfUnits depending on the requests.
A request is made at least of
And can include
If false, build at the exact position, which may be impossible, then do not build anything. If true, then build near the position if the exact position is not buildable.
When the position is not provided, it builds in circles around the cityCenterPoint, with circles of a reafius equal to N x DISTANCE_BETWEEN_CIRCLES (0 < N < ...)
The cityCenterPoint is computed at start and is in the line of the Civic Center and the center of the map, at a distance of CITY_CENTER_DISTANCE_FROM_CIVIC_CENTER.
Decision take the form of these indicators
Array of buildings which are needed to defend the city Each element has the details of the needed building, i.e. position, rotation, priority, type...
Build defenses, i.e. walls and towers around the city when
The pattern follows circles around the Civic Center and is made of 1 empty space and NUM_TOWERS_BETWEEN_GATES times this pattern:
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: alexandr...@gmail.com
if (pop limit reached) -> build houses
if (need workers) -> create more workers
if (need resources) -> if (need food) -> if (domestic animal near) -> hunt
if (idle workers) -> give orders
else -> balance economy for higher level plans