-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable counterintel by default for AI units #6635
base: develop
Are you sure you want to change the base?
Conversation
URL0101: Cybran land scout cloaking URAxxx: Cybran aircraft personal stealth UEA0304: UEF Strat jamming
@lL1l1 Rather than doing this at the unit level. Since its for AI only could we perhaps tackle at the aiBrain layer? Jip introduced callback triggers against the aiBrains for OnUnitStopBeingBuilt which I believe could tackle this. A reason why this is a good approach is that we can make it only impact the AI's that we are interested in such as the default and campaign. 3rd party AI's handle their own counter intel units(which isn't really relevant since this just changes the on built state). There is a set of brain files that live under /lua/aibrains with one for each AI type. You can see the default one in the aibrain.lua file under /lua/aibrain.lua, make the change and paste into the other brains to maintain separation. Just a thought. |
So you want me to put the callback into |
I was just having a look as I've forgotten. I couldn't find a reference to it using the base-ai.lua file In the OnCreateArmyBrain function I could see this.
}` Provides all the key references. So I think the base-ai.lua is a base template rather than something that is used. So in theory if we want all the default AI including campaign to use it we update all the brain files for the various AI. In answer to your other question. Sadly no it won't apply to spawned units since they don't perform that callback. The callback is just for when a unit is built (I couldn't remember if it applies to just factories or if both factories and engineers). If you want me to validate first I can run the changes locally here before you put in the effort. disclaimer : The default skirmish AI can also handle enabling the counter intel stuff itself when it forms its platoons, it just hasn't been done yet. |
Description of the proposed changes
Implements a discord suggestion.
Testing done on the proposed changes
All units work as expected when spawned for the player and the default civilian AI.
Spawn command:
Checklist