| Anonymous | Login | 2025-11-06 11:56 UTC | ![]() |
| My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
| 0002696 | VCMI | AI - Adventure Map | public | 2017-06-17 08:14 | 2017-06-17 08:26 | ||||||||
| Reporter | Dydzio | ||||||||||||
| Assigned To | Warmonger | ||||||||||||
| Priority | normal | Severity | minor | Reproducibility | always | ||||||||
| Status | assigned | Resolution | open | ||||||||||
| Platform | Microsoft Windows | OS | Windows 7 | OS Version | Home Premium x64 | ||||||||
| Product Version | 1.next | ||||||||||||
| Target Version | Fixed in Version | ||||||||||||
| Summary | 0002696: VCAI::tryBuildNextStructure bug - does not build prerequirements correctly | ||||||||||||
| Description | VCAI::tryBuildNextStructure - this function checks for prerequisites when building structures and is trying to build them too. But if prerequisite has another prerequisite (for example capitol requires castle that requires citadel) - it will try to perform invalid building operation if castle is first prerequisite in prerequisites vector and citadel is not built. Sample message in vcmi console when this occurs: "Request to build building 9 in 0 days!" | ||||||||||||
| Steps To Reproduce | Make sure AI has lots of resources and try to execute this code in VCAI::buildStructure every day: if (tryBuildNextStructure(t, std::vector<BuildingID>(goldSource, goldSource + ARRAY_COUNT(goldSource)))) return; AI will be stuck trying to build castle every turn after building city hall. | ||||||||||||
| Additional Information | With current code (as of 17.06.2017) without these lines: if (cb->getDate(Date::DAY_OF_WEEK) > 6) // last 2 days of week - try to focus on growth { if (tryBuildNextStructure(t, std::vector<BuildingID>(unitGrowth, unitGrowth + ARRAY_COUNT(unitGrowth)), 2)) return; } AI would not build fort/citadel/castle at all... | ||||||||||||
| Tags | No tags attached. | ||||||||||||
| Attached Files | |||||||||||||
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2017-06-17 08:14 | Dydzio | New Issue | |
| 2017-06-17 08:14 | Dydzio | Status | new => assigned |
| 2017-06-17 08:14 | Dydzio | Assigned To | => Warmonger |
| 2017-06-17 08:26 | Dydzio | Additional Information Updated | View Revisions |
| Copyright © 2000 - 2025 MantisBT Team |