Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#4611 closed defect (fixed)

Template loading from the AI

Reported by: mimo Owned by:
Priority: Must Have Milestone: Alpha 23
Component: AI Keywords:
Cc: Patch: Phab:D639

Description

Currently, the AI loads all available templates when starting or deserializing a game although it won't need most of them. But, more importantly, special templates like corpses or foundations are thus not loaded and have to be hardcoded by the AI, and this necessary hardcoding seriously limits the use of #2951 (the function with this hardcoding is the GetTemplate function in simulation/ai/common-api-shared.js). We should add in simulation2/components/CCmpAIManager.cpp a GetTemplate(name) function which would allow to load a specific template from the AI (in the same way ComputePath for example is made available in the AI). That would allow in a first step to load the special templates when needed and remove the current hardcodings. And in a second step, if that improves performances, to replace the initial loading of all templates by a loading of templates on demand.

Change History (5)

comment:1 by leper, 4 years ago

Keywords: simple added

comment:2 by elexis, 3 years ago

Priority: Should HaveMust Have

We can't add any new special_filter templates until the AI is patched.

comment:3 by elexis, 3 years ago

Milestone: BacklogAlpha 23

comment:4 by Sandarac, 3 years ago

Patch: Phab:D639

comment:5 by elexis, 3 years ago

Keywords: simple removed
Resolution: fixed
Status: newclosed

Thanks for this important patch guys!

There are multiple exciting plans using the special templates approch that is now AI compatible!

Version 0, edited 3 years ago by elexis (next)
Note: See TracTickets for help on using tickets.