Hi CM, I am using Campaign AI.
Well I adjusted the Wintraps to 9 instead of 13 and the whole base is acting normal in rebuild. I am using the campaign AI and like you said it should be fine at 1, even the Game designers have their map like that. But I found testing on a vanilla CD version of the game that the AI behaved exactly the same way as my modded version, I also tried the Gruntmod version with the same results. It was only when I adjusted the Max Buildings for the Harkonnen that they started rebuilding buildings correctly.
It has to be some internal bug in code or something, maybe a glitch between the game using the Practice AI and Campaign AI getting mixed up at times. I just know what I tested out. By nature I usually am methodical and work with computers as my occupation, I've made mods for other games so I know about backups and doing little changes to test.
My results were as follows and I hope this helps
Emperor would rebuild Buildings but Harkonnen would not
Tried copying working Emperor AI over to Hark, no results
Tried rebuilding Base making smaller and not so close to edge, no results
Tried using Gruntmods and had the same results no better performance by Hark AI
Tried using Vanilla Map in my modded version, No real results
Tried finally using vanilla CD version US 1.06 patch no mods, No results except AI rebuilding Barracks once and replacing only 1 Windtrap.
Then I decided to modify the Max Build to match the units placed for the Harkonnen Side, when I originally did this all buildings were rebuilding but windtraps which seemed to only rebuild when low power was reached.
Then I changed Windtraps to 9 instead of the 13 and not the AI is rebuilding ALL buildings destroyed including windtraps. Emperor still rebuilding base even though nothing was changed on max units.
I also seemed to notice that this weird bug seems to happen when two powerful main houses on the map, one behaves normal the other doesn't, but EACH map seems to react different. In AT9v2 the Emperor is not rebuilding buildings like he should but Hark will rebuild barracks but not the other buildings. More testing needs to be done and AI changes made to that map to confirm that for some reason the game is reading one of the houses or more with MP AI settings.
I just know I tested the Vanilla game, and when the same results were happening it cannot be any change I made to cause this bug. I have seen some other weird bugs with custom maps AI mass spamming Units and sending to attack player base for no reason, I never figure what caused that in the map, I know the game is sensitive to building placement, place a wall piece of the wrong faction the AI behaves funny.
Personally as long as it works I have no problem in changing max buildings for and AI house. I will let you know if the change in another map works the same if it does, then there must be an issue that the developers didn't catch.
Probably I missed the part where you said you were using skirmish AI, you were? I mean, campaign style always have 1 of max building and it rebuilds everything... I think, I never saw anything wrong.
Unless now you sais that you were using campaign style AI and they have the max building into 0 and that can prevent the AI to rebuild certain buildings, wchick it's something Fey knew and told me and I forgot and... My head spins right now...
and no, no limit to 9. the default skirmish AI (which I think it was used on the vanilla game, in "practice" mode) it has a max windtraps of 15, which are needed if that AI wants to have every other building.
I'm sorry if at any point you said your harkonnen were skirmish style kind of AI and I missed it, probably I would think on the "Max building" being part of the problem, because those only affect, as you sais, skirmish one, campaign vanilla-westwood have 1 as max building, and I never bother to try otherwise.
You can even set an AI to build 20 pieces of wall, it will do it like a board chess (unless it has not much room, then yes, it will start connecting pieces of wall one with each other); but it is fun to see the AI weird placemente XD.
in campaign style, the AI usually rebuild whatever building lost first.
in skirmish style, it is using these values to know what to build next.
I THINK It doesn't matter if you destroyed a building or not, he do some math-calculation and then proceed to build whatever building it's next, could be the one you destroyed or something new.
I wrote this with Fey's help on a manual on how the AI to the math, he knows better set-ups for skirmish AIs while I usually pick a vanilla and, if it is weak, I give more resources-units and less to the player to compensate, and sometimes I alter a few values here and there but overall I have no idea what I am doing (Fey totally knows).
But this is the basic:
Btw I did some more testing and adjusted Max buildings for the Hark, 2 Barracks, refineries etc. And they AI started to rebuild the destroyed buildings again. Funny thing is the changes I made were only to the Hark, but the Emperor benefited from them and started rebuilding everything when destroyed. About the only thing that still have a problem was the windtraps for Hark, they only tried to rebuild them when they power was low, so maybe its some coded thing. But I also set the number higher to 13 because that is how many wintraps were placed. But I wonder if Max Buildings has a limit like 9 or something?
I would think that would be used only for MP Practice AI, but changing the Max to 0 causes the AI not build at all, so there may be some connection. I have tested it though and the AI was rebuilding Destroyed Barracks, Refineries, Outposts with no problems. I also noticed the AI likes SMALL bases, Large bases seem to cause weird AI behavior. I did make the base smaller, but when I tested it the Hark were still not rebuilding, but when I did the Max Building changes they started acting normal. I did notice the AI tends to rebuild more on destroyed buildings, than ones you just sell. So there must be some hardcoded AI stuff somewhere besides the stuff we are editing.
Aye, it's possible. We've kinda cracked everything wide open, and I imagine Westwood had extensive editing tools, but maybe not the ideal testing opportunities? Well, we still don't understand morale...
In any case, I recommend making a "default AI" you'd like to import on any mission for editing purposes. Like, mine has optimized repairs, a standard amount of Harvesters and Carryalls per Refinery, a specific Cash Stash setup below the Refinery's max Solaris storage, attack building morale at 100, and other stuff like that. Then you can leave stuff like unit / structure build ratios, build rate, assignment strength, attack frequency, etc. blank or with generic numbers so you can customize them more easily. The build ratios on my default AI are set to zero, but attack frequency is, like, 8 mins first attack, 5 mins for follow-ups, 5 sec buildrate...
If you'd like to have a look and see if you like it, here's the misai file. Just import this somewhere over something you'd like to edit and see about telling it to train some infantry. ayy lmao.misai
If you like an AI and want to set it as your default, move it to your D2kEditor's config folder and replace the default AI there.