#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 , 7 years ago
Keywords: | simple added |
---|
comment:2 by , 7 years ago
Priority: | Should Have → Must Have |
---|
comment:3 by , 7 years ago
Milestone: | Backlog → Alpha 23 |
---|
comment:4 by , 7 years ago
Patch: | → Phab:D639 |
---|
comment:5 by , 7 years ago
Keywords: | simple removed |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Thanks for this important patch guys!
There are multiple exciting plans using the special templates approch that is now AI compatible!
In r20162 committed by mimo:
Template loading from the AI
Patch by Sandarac
Reviewed By: mimo
Trac Tickets: #4611
Differential Revision: https://code.wildfiregames.com/D639
We can't add any new
special_filter
templates until the AI is patched.