Skip to content
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

AutoTarget unarmed buildings again to help AI crush it's enemy #3467

Merged
merged 3 commits into from Jun 29, 2013

Conversation

Mailaender
Copy link
Member

This reverts #3337 for ra and the changes introduced by @psydev for d2k/cnc in that regard. The AI needs AutoTarget because it solely uses AttackMove to fight it's enemies.

@chrisforbes
Copy link
Member

I think it would be better to fix the AI.

@ScottNZ
Copy link
Contributor

ScottNZ commented Jun 23, 2013

Me too

@pchote
Copy link
Member

pchote commented Jun 27, 2013

We're going to need some fix to this issue before the playtest - shipping a broken AI isn't really an option.

@Mailaender
Copy link
Member Author

See, this playtest will never be released on June :P

@pchote
Copy link
Member

pchote commented Jun 27, 2013

A release on Sunday is still entirely plausible.

A simple fix for the AI would be to extend AutoTargetIgnore with flags for IgnoredByHumans / IgnoredByBots.

On 28/06/2013, at 4:37 AM, Matthias Mailänder notifications@github.com wrote:

See, this playtest will never be released on June :P


Reply to this email directly or view it on GitHub.

@pchote
Copy link
Member

pchote commented Jun 28, 2013

I would like to take this as-is for the next playtest unless @chrisforbes or @ScottNZ really object.
This pr gets us back to the working state of release-20130514. We can redo the enhancements that broke this for a later release.

pchote added a commit that referenced this pull request Jun 29, 2013
AutoTarget unarmed buildings again to help AI crush it's enemy
@pchote pchote merged commit 04ae39c into OpenRA:bleed Jun 29, 2013
@Mailaender Mailaender deleted the autotarget-bots branch August 1, 2013 19:13
@pchote
Copy link
Member

pchote commented May 9, 2017

A simple fix for the AI would be to extend AutoTargetIgnore with flags for IgnoredByHumans / IgnoredByBots.

The engine has advanced, and we can now fix this even more generally. Elaborating as requested by @rob-v.

  • Replace AutoTargetIgnore with an AutoTargetable trait that has exposes a string[] Types field.
  • Add a matching string[] Types to AutoTarget and only target actors that have an intersecting types list
  • Introduce a GrantConditionOnBotOwner trait that grants a condition when an actor is owned by a bot.
  • Add HoldFireCondition, ReturnFireCondition, DefendCondition and AttackAnythingCondition fields to AutoTarget to grant conditions based on the actor's current stance.
  • Tag each actor type (infantry, vehicles, buildings, etc) with their respective type, and set up two instances of AutoTarget:
    • Actors owned by a bot or in the AttackAnything stance should autotarget everything
    • Actors owned by a human and not in the AttackAnything stance should autotarget everything except buildings.

This could extend even further in the future by adding relative priorities for each autotarget type for things like the threat rating node in TS and ai difficulties in all mods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants