Comment 2 for bug 1529632

Revision history for this message
mevitar (mevitar) wrote :

16.15.1117, the AI still builds from factories it's not supposed to. I think it might be best if i explain the issue with every detail.

Checked it with a regular barrack structure (used NAHAND) and a secondary "barracks" that is there only for the purpose of of build-speed increase (NACLON converted into barracks, without any cloning capabilities). All infantry has BuiltAt and prerequisites set to the primary barracks (NAHAND). Secondary barracks (NACLON) isn't listed for any of them, and it also has Factory.ExplicitOnly=yes.

The effect is that once NAHAND is gone, the AI will finish building infantry that was already building, and it will exit from NACLON. It won't produce more infantry, though, until the NAHAND is rebuilt. However, once it has NAHAND again, all infantry goes out of NACLON as if it was treated as primary factory, even though they don't have NACLON listed under BuiltAt.

When i made some infantry have NACLON in their prerequisite and BuiltAt listed instead of NAHAND, the situation looked like this: the AI still pumped out all infantry from NAHAND, because NAHAND was build first. However, if i destroyed NAHAND, now NACLON was used, and only infantry with BuiltAt=NACLON was being produced. If the AI rebuild NAHAND and i destroyed NACLON, the situation reversed (nothing with BuiltAt=NACLON was produced).
However, after some time of me doing that, the AI simply stopped building infantry altogether, until i destroyed both NAHAND and NACLON.

BTW, it seems to work exactly the same in 0.A (at least as far as the first case, didn't test with mixed BuiltAt for infantry there).