In what follows, I will be using Captain Nemo's Red Front 1.4 and Werd100's WWII Europa as examples because they best illustrate the point that I'm trying to make.
BACKGROUND
In WWII Europa, the Axis start with ~1360 units and all of their 166 cities are building units. However, by turn 8, no more units are under construction. All production has switched to city improvements. Subsequently, when there are no more improvements left to build, the AI switches to Capitalization, rather than resuming unit production. That continues until the Axis have been worn down to ~200 units. Only at that point does the AI resume building units.
This behaviour is typical of scens that involve 2 major civs, human and AI, plus possibly some minor ones that exist only for historical accuracy. I first saw this type of AI behaviour when playtesting Colwyn's Red Front 1.5. In the discussion that ensued at the time, it was concluded that this is hard wired in the .exe but no one was sure at what point unit production resumes except that it is not a very high number.
The problem with this is that the AI does not respond, until it is much too late, to the situation where the human civ slowly gains the upper hand and begins to capture AI cities. AI cities do not get reinforced and are still garrisoned by the same units that were in them at the start of the scen.
For players, once they have gained the upper hand, scens like Red Front and WWII Europa become mere campaigns to capture enemy cities against predictably weak opposition. I think that there may be a way to liven things up and better depict the desperate opposition that a losing civ will put up. However, for the AI to display an IQ > 0, we need to consider how best to model both its initial offensive phase and the subsequent switch to defense.
Unfortunately, what follows will only work in TOT because of its much richer EVENTS language and larger EVENTS files.
THE AI OFFENSIVE PHASE
The best example of how to fuel an AI attack can be found in Red Front. Here, Nemo fuels the irresistible German advance in 1941 by spawning replacements for destroyed German units. Depending on the type of unit destroyed, 1 to 5 replacements are spawned, in many cases not of the same type as the destroyed unit.
IMHO, his approach runs into difficulties because:
1. Germany starts with more than 1000 units, which often leads to "Too many units". Many of the units are superfluous because they are so slow that they never get involved in the fighting but their existence prevents Germany from building new units.
2. The Civ 2 events language lacks 3 key commands
. . . . @IF A @AND @IF B @THEN C
. . . . COUNT =
. . . . RANDOMIZE
I would suggest that the AI start with perhaps 700 units and, initially, have events replace any offensive units that are killed with 2 new ones (Phase 1). Subsequently, the replacement rate would drop to 1 for 1 (Phase 2), followed by no replacements. The scen designer would have to decide on the duration of each phase.
If the AI has the non-researchable Phase 1 and Phase 2 techs at the start, each phase can be ended by taking away the relevant tech. If the scen requires that the AI fight on 2 fronts, the spawning locations for replacement units can be keyed to who killed the AI unit.
It is critical that scen be balanced so that there are maximal empty unit slots when the human civ goes on the offensive and begins to capture or recapture cities.
THE AI ON THE DEFENSIVE
This is continued in the next post. Evidently it is not possible to insert an image into the middle of a post. Meanwhile, enjoy the pretty map, derived from the world map in Werd100's WWII Europa.
BACKGROUND
In WWII Europa, the Axis start with ~1360 units and all of their 166 cities are building units. However, by turn 8, no more units are under construction. All production has switched to city improvements. Subsequently, when there are no more improvements left to build, the AI switches to Capitalization, rather than resuming unit production. That continues until the Axis have been worn down to ~200 units. Only at that point does the AI resume building units.
This behaviour is typical of scens that involve 2 major civs, human and AI, plus possibly some minor ones that exist only for historical accuracy. I first saw this type of AI behaviour when playtesting Colwyn's Red Front 1.5. In the discussion that ensued at the time, it was concluded that this is hard wired in the .exe but no one was sure at what point unit production resumes except that it is not a very high number.
The problem with this is that the AI does not respond, until it is much too late, to the situation where the human civ slowly gains the upper hand and begins to capture AI cities. AI cities do not get reinforced and are still garrisoned by the same units that were in them at the start of the scen.
For players, once they have gained the upper hand, scens like Red Front and WWII Europa become mere campaigns to capture enemy cities against predictably weak opposition. I think that there may be a way to liven things up and better depict the desperate opposition that a losing civ will put up. However, for the AI to display an IQ > 0, we need to consider how best to model both its initial offensive phase and the subsequent switch to defense.
Unfortunately, what follows will only work in TOT because of its much richer EVENTS language and larger EVENTS files.
THE AI OFFENSIVE PHASE
The best example of how to fuel an AI attack can be found in Red Front. Here, Nemo fuels the irresistible German advance in 1941 by spawning replacements for destroyed German units. Depending on the type of unit destroyed, 1 to 5 replacements are spawned, in many cases not of the same type as the destroyed unit.
IMHO, his approach runs into difficulties because:
1. Germany starts with more than 1000 units, which often leads to "Too many units". Many of the units are superfluous because they are so slow that they never get involved in the fighting but their existence prevents Germany from building new units.
2. The Civ 2 events language lacks 3 key commands
. . . . @IF A @AND @IF B @THEN C
. . . . COUNT =
. . . . RANDOMIZE
I would suggest that the AI start with perhaps 700 units and, initially, have events replace any offensive units that are killed with 2 new ones (Phase 1). Subsequently, the replacement rate would drop to 1 for 1 (Phase 2), followed by no replacements. The scen designer would have to decide on the duration of each phase.
If the AI has the non-researchable Phase 1 and Phase 2 techs at the start, each phase can be ended by taking away the relevant tech. If the scen requires that the AI fight on 2 fronts, the spawning locations for replacement units can be keyed to who killed the AI unit.
It is critical that scen be balanced so that there are maximal empty unit slots when the human civ goes on the offensive and begins to capture or recapture cities.
THE AI ON THE DEFENSIVE
This is continued in the next post. Evidently it is not possible to insert an image into the middle of a post. Meanwhile, enjoy the pretty map, derived from the world map in Werd100's WWII Europa.
Comment