Template loading from the AI
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)
Priority: |
Should Have → Must Have
|
Milestone: |
Backlog → Alpha 23
|
Keywords: |
simple removed
|
Resolution: |
→ fixed
|
Status: |
new → closed
|
We can't add any new
special_filter
templates until the AI is patched.