need help with an Ai working for a fun mod
Moderators: hoijui, Moderators
- Optimus Prime
- Posts: 755
- Joined: 03 Oct 2005, 14:31
need help with an Ai working for a fun mod
Hi
i want to have an AI for an existing war evo modification. Actually i added the race arm with just very few units and buildings.
I want the ai to spam the factories and units and send them towards the players.
There is just energy for the AI to use cause the commander gets enough metal for everythingand i think thats the problem for at least the AAI.
It builds a solar panel and tries do get more metal but there is no metal extractor building, so it stops.
Anyone who can help me here? If you have experience with that, it would be nice if you can do the AI for me (or config it). Just send me an PM with you mail and i will send you the .sdz file for the mod.
thanks
i want to have an AI for an existing war evo modification. Actually i added the race arm with just very few units and buildings.
I want the ai to spam the factories and units and send them towards the players.
There is just energy for the AI to use cause the commander gets enough metal for everythingand i think thats the problem for at least the AAI.
It builds a solar panel and tries do get more metal but there is no metal extractor building, so it stops.
Anyone who can help me here? If you have experience with that, it would be nice if you can do the AI for me (or config it). Just send me an PM with you mail and i will send you the .sdz file for the mod.
thanks
- Optimus Prime
- Posts: 755
- Joined: 03 Oct 2005, 14:31
NTAI, KAI and RAI dont work. They crash at start saying wrong global AI version. Also AAI dont works if i add a mex building. Perhaps its cause of the new spring version?
Isnt there anyone who wants to make such an AI work for this mod? Its not just a win for the mod but also for your AI because this is perhaps the first mod which will be played against an AI even with enough human players. Think about it...
Isnt there anyone who wants to make such an AI work for this mod? Its not just a win for the mod but also for your AI because this is perhaps the first mod which will be played against an AI even with enough human players. Think about it...
- Optimus Prime
- Posts: 755
- Joined: 03 Oct 2005, 14:31
if they are included, there must be another problem i cant fix cause i tried them and it crashed right after start.Tobi wrote:AIs have to be recompiled for 0.73b3 yes (due to new safety measures to prevent problems like what happened between b1 and b2). However, KAI-0.12 and AAI are included with Spring.
- Optimus Prime
- Posts: 755
- Joined: 03 Oct 2005, 14:31
Ok it seems that the only AI which doesnt crash is KAI. It also builds factories and spams units, BUT only tech 1 factories. I gave the tech 1 factory a unit restriction limit of 4 and after that the commander tries and tries to build another factory instead of building a tech 2 factory. How can i force him to build tech 2 after 4 tech 1 factories.
Also the units the AI builds dont attack. They just guard the area next to the base...
Any way to fix that myself?
Also the units the AI builds dont attack. They just guard the area next to the base...
Any way to fix that myself?
- Optimus Prime
- Posts: 755
- Joined: 03 Oct 2005, 14:31
- Optimus Prime
- Posts: 755
- Joined: 03 Oct 2005, 14:31
- Optimus Prime
- Posts: 755
- Joined: 03 Oct 2005, 14:31
KAI doesn't take per-unit restrictions into consideration when deciding what to build, so it'll keep trying ad infinitum to start construction which the engine then aborts due to the limit having been reached. Directly forcing it to level 2 isn't really feasible though since that would counteract KAI's stalling safeguards, but I'll see if I can come up with an alternative solution.
- Optimus Prime
- Posts: 755
- Joined: 03 Oct 2005, 14:31
It can be read via TdfParser believe it or not. And it need only be read once then cached.
This suits an AI such as AAI very well, since AAI already precaches UnitDefinitions.
I suggest a second interface be added for these sorts of things so that there underlying implementation can change as the AI interface adds dedicated support.
Although I thought unit restrictions where a part of UnitDef class? Thus counting how many peewees you have then comparing it to the maximum number allowed gave you the desired result.
This suits an AI such as AAI very well, since AAI already precaches UnitDefinitions.
I suggest a second interface be added for these sorts of things so that there underlying implementation can change as the AI interface adds dedicated support.
Although I thought unit restrictions where a part of UnitDef class? Thus counting how many peewees you have then comparing it to the maximum number allowed gave you the desired result.