Does anyone here have any experience editing the AI scripts?
I'm trying to make the AI work for a custom race I've built. It will need melee scripts but I'm getting out of my depth and need some guidance.
So far I've got my head around the basic stuff - build orders and so on - but I'm struggling to work out how the game actually works out the race of the AI player and picks which race's scripts to use.
I've found that AI.galaxy lists the races and mentions the native function "AIGetSelfRaceVal" but there's two problems:
1) I can't find the Galaxy.cpp file mentioned in AI.galaxy which seems to be key in creating the list of playable races.
2) I'm not even sure if "AIGetSelfRaceVal" is how the game chooses which race's scripts to use. I may be missing something but if it's using some other method to choose then the whole thing is irrelevant anyway.
I think this is pretty advanced stuff and I'm not sure if anyone has gone this far BUT if anyone has and can offer some guidance that would be super awesome!
It is possible the files would be automatically selected based on the race's abbreviation, this seems to be true for a few things, but maybe not in this case. I've tried to alter melee AI scripts a long long time ago but got to a dead end where the game would either ignore the imported files or show an error and AI wouldn't work at all.
Melee AI is one of the areas there isn't much work from the community. Blizzard has supported campaign waves and all that but altering melee AI directly is as hard as it was when the game was released. Some map makers even take the easy route and change units used by the AI into the units they want the AI to use instead, this is the case of BW remakes.
Thanks for the replies, I figured this was pretty much how things were. The only AI scripts I could find (GTAI) used a custom launcher to get the game to accept them. Even if I could replicate that method there isn't an obvious way to add new races. Getting the game to recognise my edited files is just going nowhere.
At least we have triggers. It's a huge shame but I'll accept defeat and script it that way.
No no. There is a way to make ais make custom units, build custom buildings, and even research custom upgrades. I am not the expert, but I know a guy who can help you. His name is Alien. And he created the alien worlds mod. You can look up the mod on this site and contact him.