AI not using side bonuses (and other questions)
Posted: Wed Jan 02, 2013 5:53 am
Hello everyone. I've been working on a Polish 1939 campaign for quite some time now. My coding skills are far from perfect, but usually I can cope with many things by myself. Recently I created two maps of the campaign (Tczew bridge and Westerplatte), created Polish units (all right, renamed the British ones), balanced the maps a little, played them a couple of times and... now the weird parts.
1. The AI side never uses the side bonuses. It's particularly troubling in the case of Westerplatte: in the editor I gave the Krauts Stuka attacks, arty attacks and naval artillery (historically they were pounding the peninsula with everything they had for 7 days straight). Yet, the AI never-ever uses them. Which makes the Poles way too powerful, the German assault stalls before reaching the first objective and the entire battle turns into 20 turns of boring bloodbath. Any ideas what did I do wrong?
2. Is there a way to script an artillery attack at the very first turn of the battle?
3. How exactly do I add reinforcements to one of the sides? I see something like the following in a couple of scenarios, but I'm not sure where should I define the PlaceUnit thingy.
4. How do I set which side moves first?
Cheers and thanks for any help you can provide. BTW, the attachment is a early beta of the two scenarios I'm working on right now. Without the German arty and dive bombers there is little balance, but the basic idea is there.
1. The AI side never uses the side bonuses. It's particularly troubling in the case of Westerplatte: in the editor I gave the Krauts Stuka attacks, arty attacks and naval artillery (historically they were pounding the peninsula with everything they had for 7 days straight). Yet, the AI never-ever uses them. Which makes the Poles way too powerful, the German assault stalls before reaching the first objective and the entire battle turns into 20 turns of boring bloodbath. Any ideas what did I do wrong?
2. Is there a way to script an artillery attack at the very first turn of the battle?
3. How exactly do I add reinforcements to one of the sides? I see something like the following in a couple of scenarios, but I'm not sure where should I define the PlaceUnit thingy.
Code: Select all
// German reinforcements
if ( GetTurn() == 3 )
{
x = 77;
y = 34;
PlaceUnit(x, y, 4, 0, 0, "German_Infantry");
y = 35;
PlaceUnit(x, y, 4, 0, 0, "German_Infantry");
y = 36
PlaceUnit(x, y, 4, 0, 0, "German_Infantry");
}Cheers and thanks for any help you can provide. BTW, the attachment is a early beta of the two scenarios I'm working on right now. Without the German arty and dive bombers there is little balance, but the basic idea is there.