How to make AI repair health/ammo droids

Started by Phobos, November 12, 2011, 06:49:45 PM

Previous topic - Next topic
I have ideas to make this work online. One of them is to make a fake unbuilt turret platform to place below the bots (inside the floor so you can't see or bump them) so the AI pilots would be tricked into using fusion cutters near droids. I think this would be online compatible too, I will test the theory later. If you have other ideas post them here.

October 12, 2014, 06:28:02 AM #1 Last Edit: October 12, 2014, 06:48:20 AM by Phobos
On further testing it seems the AI only willing repair certain types of buildings, defined by classlabel. So far I tested these:
armedbuilding - used for turrets, AI will only construct these in certain conditions. I compared jawa ODFs to my custom sides. The fusion cutter ODFs are nearly identical, yet the custom AI won't repair turrets on mos. I also tried changing unit type classlabels for my units to "trooper", "pilot" from stock rebels, and "support" from stock jawas, it had no effect. Since the mission and world ODFs are also nearly identical, I suspect the EXE might be coded to only let AI fix armedbuilding's when the ODFs are placed in the common but am not sure.
commandpost - destructible command posts
commandhover - AI will repair these when damaged, not much use for making them repair ammo bots.
commandwalker - Same as commandhover.
powerupstation - The AI will not repair these under any conditions, even when the ODF has TargetNeutral = 1, or they are assigned to teams.

And for zombies, my barricades are currently armedbuilding so they will attack them (only when it is defined as player team), when set to powerupstation they will not attack them. Since my barricades are same classlabel as the default turret, the AI on my team should be repairing them too. But the test unit armed with only a fusion cutter just runs around the map and does nothing. I might try moving the ODF from world to common next and see if that fixes the problem.

So now the question is, what makes the AI repair/construct neutral faction turrets (com_weap_gunturret)?. i tested the same holo ODF for constructing barricades but the AI still ignore it =/
once this works a dummy pad ODF can be built to trick AI into repairing health droids, but it wouldn't be online compatible on stock maps without a download.