Opened 3 years ago

Last modified 3 years ago

#5889 new enhancement

Merge BuildingAI and UnitAI.

Reported by: Freagarach Owned by:
Priority: Should Have Milestone: Backlog
Component: Simulation Keywords:
Cc: Patch:

Description (last modified by Freagarach)

Currently BuildingAI's only job is to target entities. It could be expanded to a UnitAI-like structure to be also able to accept orders, like targetting specific entities (or gathering resources; see Hyrule Conquest).

Hence, merge the two 'AI's. That could be done in steps.

  • Make the current UnitAI non-moving safe.
  • Add structure abilities such as recruitment and upgrade to the current UnitAI states.
  • Device a way to have the 'Autofire' ability either in the current UnitAI or in Attack.js (probably).
  • Rename UnitAI to EntityAI, add it to structures and remove BuildingAI.

Change History (3)

comment:1 by wraitii, 3 years ago

As I said on IRC, I disagree with this vehemently. IMO, BuildingAI should instead be folded back into UnitAI, and the "auto fire" behaviour should probably just become a component. It's, after all, not unreasonable to treat that as an FSM state. Since we can't currently have an FSM in multiple state (e.g. producing, upgrading, and firing), we probably would even want to turret the arrow-fire.

Could a building gather and fire arrows at the same time, after all? The gathering logic is no different for a building or a unit.

comment:2 by Freagarach, 3 years ago

Description: modified (diff)
Priority: If Time PermitsShould Have
Summary: BuildingAI extension to accept orders.Merge BuildingAI and UnitAI.
Version 0, edited 3 years ago by Freagarach (next)
Note: See TracTickets for help on using tickets.