1.11.2: Experimental AI does not like my faction

Having trouble with the game? Report issues and get help here. Read this first!

Moderator: Forum Moderators

Forum rules
Before reporting issues in this section, you must read the following topic:
Post Reply
Varkarrus
Posts: 26
Joined: March 16th, 2013, 6:40 pm

1.11.2: Experimental AI does not like my faction

Post by Varkarrus »

So I've been working on a custom faction. It's p. much complete and balanced, just needs flavor text and a bit more balance testing. Problem is, the Default AI, with its dumb recruitment scheme, does not recruit any fighters. So I wanted to try the experimental AI with it, to even worse results; every computer player that uses the experimental AI cannot recruit as long as a single side is using my custom faction. Instead, I get an output of lua error messages. The closest thing I could find on this forum to this bug is this. I did download the AI demo addon and it did not help at all.
mattsc
Inactive Developer
Posts: 1217
Joined: October 13th, 2010, 6:14 pm

Re: 1.11.2: Experimental AI does not like my faction

Post by mattsc »

Could you post the lua error messages that you are getting? Without that (and possibly the faction files, depending on the error), it's pretty much impossible to say what might be the cause of this. Also, there have been quite a few changes from 1.11.2 to 1.11.4, so could you test if this problem remains in 1.11.4? Thanks for reporting this.
Varkarrus
Posts: 26
Joined: March 16th, 2013, 6:40 pm

Re: 1.11.2: Experimental AI does not like my faction

Post by Varkarrus »

Image

This also happens in 1.11.4.
mattsc
Inactive Developer
Posts: 1217
Joined: October 13th, 2010, 6:14 pm

Re: 1.11.2: Experimental AI does not like my faction

Post by mattsc »

The error originates in a line where the (hypothetical) defender terrain defense is compared to the chance to hit of a weapon special, and one or the other isn't accessed correctly by the AI code for at least one of the unit types of your faction. So there's some incompatibility between at least one of the units in your faction and the AI, but I cannot say what it is without testing it with your faction. Is it available online somewhere or, if not, could you attach it here, or PM it to me if you do not (yet) want to post it publicly?

EDIT: Actually, here' s a guess: Does one of the recruitable units in your faction have a weapon special with a [chance_to_hit] tag, but without a value= key (with an add= or something instead)? That's likely the unit causing the problem (and it's a problem with the AI, not your unit). If so, you could simply send me the cfg file for that unit so that I can test the fixes to the AI.
mattsc
Inactive Developer
Posts: 1217
Joined: October 13th, 2010, 6:14 pm

Re: 1.11.2: Experimental AI does not like my faction

Post by mattsc »

mattsc wrote:Does one of the recruitable units in your faction have a weapon special with a [chance_to_hit] tag, but without a value= key (with an add= or something instead)? That's likely the unit causing the problem (and it's a problem with the AI, not your unit).
I have confirmed that that situation caused an error that prevented recruiting by the Experimental AI. It is fixed in trunk now and will be in the next release (1.11.5). Hopefully it will fix your problem also.
Post Reply