davidlallen
Deity
It's the Dune Wars team, back with another request to twist BBAI into doing things it did not expect. As you may recall in Dune Wars we have an archipelago type map, and a number of units which are DOMAIN_SEA and have bCanMoveAllTerrain. This allows the transport units to be built in landlocked cities and carry settlers to other islands to settle. This is working fine, although we have made a number of minor tweaks for loading and unloading all terrain transports. Maniac wrote the original all terrain transport code.
But, one of the civs (the desert natives, Fremen) has basic units which can move on all terrain, including the settler, warrior, scout and worker. The Fremen civ does not have transports; it does not need them, since its basic units can move on all terrain.
This seems to confuse the AI. The Fremen civ usually never expands past its initial island at all, or if it does, it is because its warriors conquer a barbarian city on another island. I have reproduced this problem in vanilla: the AI does not use all terrain settlers. I have created a vanilla mod, attached, which shows the problem. It is a customized unitinfos file only. I did the experiment in three stages:
1. Use the mod directory but a normal unmodified unitinfos file. Create a high water archipelago game and save it on turn 0. Autoplay 255 turns and see the results. As you expect the civs expand out to other islands. The civs had expanded to 2-3 islands each, probably 6-8 cities total.
2. Modify all the DOMAIN_SEA units to DOMAIN_LAND and modify their UNITAI's to some legal value for DOMAIN_LAND. The point is to remove all sea units without invalidating the save game. Load the save game and autoplay 255 turns. Each civ expands on its island but does not go any further. This is also as we expect.
3. Use the attached unitinfos file, which has bCanMoveAllTerrain set for settler, warrior, worker and scout. Load the save game, play 55 turns as the human player and ensure that the human player can create colonies on other islands. The units all cross ocean as needed and it is easy to set up a colony on another island. Then autoplay another 200 turns. In this case the AI never expands, just like run #2, although it could. The AI scouts walk on water fine, but no AI settler ever sets off across water.
This exactly matches what we see happening for the Fremen civ in Dune Wars. The human player can expand (rapidly, in fact) but the AI doesn't know what to do with it.
My question is, can you help me understand how I can locally modify BBAI to use all terrain settlers? The Fremen people thank you in advance.
But, one of the civs (the desert natives, Fremen) has basic units which can move on all terrain, including the settler, warrior, scout and worker. The Fremen civ does not have transports; it does not need them, since its basic units can move on all terrain.
This seems to confuse the AI. The Fremen civ usually never expands past its initial island at all, or if it does, it is because its warriors conquer a barbarian city on another island. I have reproduced this problem in vanilla: the AI does not use all terrain settlers. I have created a vanilla mod, attached, which shows the problem. It is a customized unitinfos file only. I did the experiment in three stages:
1. Use the mod directory but a normal unmodified unitinfos file. Create a high water archipelago game and save it on turn 0. Autoplay 255 turns and see the results. As you expect the civs expand out to other islands. The civs had expanded to 2-3 islands each, probably 6-8 cities total.
2. Modify all the DOMAIN_SEA units to DOMAIN_LAND and modify their UNITAI's to some legal value for DOMAIN_LAND. The point is to remove all sea units without invalidating the save game. Load the save game and autoplay 255 turns. Each civ expands on its island but does not go any further. This is also as we expect.
3. Use the attached unitinfos file, which has bCanMoveAllTerrain set for settler, warrior, worker and scout. Load the save game, play 55 turns as the human player and ensure that the human player can create colonies on other islands. The units all cross ocean as needed and it is easy to set up a colony on another island. Then autoplay another 200 turns. In this case the AI never expands, just like run #2, although it could. The AI scouts walk on water fine, but no AI settler ever sets off across water.
This exactly matches what we see happening for the Fremen civ in Dune Wars. The human player can expand (rapidly, in fact) but the AI doesn't know what to do with it.
My question is, can you help me understand how I can locally modify BBAI to use all terrain settlers? The Fremen people thank you in advance.