Warhammer 40,000: Dawn of War III

Warhammer 40,000: Dawn of War III

Make your mark in endless war!
Build new battlefields and watch as they're blown apart by colossal armies, powerful heroes and towering war machines. These maps are made by players and are not officially licensed by Games Workshop.
Learn More
Playgu 26 2 Dec, 2022 @ 3:59pm
How to enable campaign AI?
Default is too smart and overrides commands given by SCAR functions which renders them useless. Obviously, it doesn't work like that in campaign so there has to be a way to change it.

I dug up some campaign files and in most, if not all, missions there are two enemy players one is player 3, a note in the code says "scripted portion" and the other is player 4 described as "AI driven portion", but there are no functions in the mission code that change AI behaviour.

UPDATE:

Ok I think I'm onto something. If someone is interested in your SCAR file you need to use AI_Enable(player, false) function. Variable player has to be defined like so: player = World_GetPlayerAt(index) where index is, well, player index from 1 to 6.

Why all the hussle? This allows you to program attack waves that won't retreat, or enemy base defenders that don't pack up and leave to attack your base, or convoys that won't steer off their course etc. Without it making custom missions is impossible. I'll try to implement it in my Last Stand game mode along with other changes. Stay tuned.
Last edited by Playgu; 2 Dec, 2022 @ 5:14pm