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 )
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
toEntityAI
, add it to structures and removeBuildingAI
.
Change History (3)
comment:1 by , 3 years ago
comment:2 by , 3 years ago
Description: | modified (diff) |
---|---|
Priority: | If Time Permits → Should Have |
Summary: | BuildingAI extension to accept orders. → Merge BuildingAI and UnitAI. |
Version 0, edited 3 years ago by (next)
comment:3 by , 3 years ago
Some interesting discussions: http://irclogs.wildfiregames.com/%230ad-dev/2021-10-14-QuakeNet-%230ad-dev.log.
Note:
See TracTickets
for help on using tickets.
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.