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

Medical AI #4311

Merged
merged 13 commits into from
Sep 4, 2016
Merged

Medical AI #4311

merged 13 commits into from
Sep 4, 2016

Conversation

BaerMitUmlaut
Copy link
Member

When merged this pull request will:

  • Make AI units heal themselves, each other and players in their group
  • This only works when the AI units have to deal with basic medical (they won't do anything when the player is using advanced medical or advanced medical is enabled for AI units) due to the complexity of advanced medical

Some details on the implementation:

  • This uses a CBA state machine, so performance will not be an issue at all, no matter the amount of AI
  • AI units will treat themselves when not suppressed and not having shot at enemies since 30 seconds
  • Only medic units will heal other units in their group, and only when they are not injured or under fire themselves
  • Since AI units usually don't get custom loadouts with a balanced medical equipment they do not consume bandages or syringes at all

@BaerMitUmlaut BaerMitUmlaut added kind/enhancement Release Notes: **IMPROVED:** kind/feature Release Notes: **ADDED:** labels Aug 29, 2016
@BaerMitUmlaut BaerMitUmlaut added this to the 3.7.0 milestone Aug 29, 2016
@thojkooi thojkooi self-assigned this Aug 30, 2016
if ((_this getVariable [QGVAR(treatmentOverAt), CBA_missionTime]) > CBA_missionTime) exitWith {};

private _needsBandaging = ([_this] call EFUNC(medical,getBloodLoss)) > 0;
private _needsMorphine = (_this getVariable [QEGVAR(medical,pain), 0]) > 0.2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two conditions are the same in multiple places. Should we convert those to a macro?

@thojkooi
Copy link
Contributor

thojkooi commented Sep 4, 2016

lgtm

@thojkooi thojkooi merged commit 278e7fa into master Sep 4, 2016
@thojkooi thojkooi deleted the medical-ai branch September 4, 2016 09:25
@nicolasbadano
Copy link
Contributor

congratz @BaerMitUmlaut

@commy2
Copy link
Contributor

commy2 commented Sep 5, 2016

awesome !

I'm tearing up here. Nice job.

@Rastroff
Copy link

Does the AI revive itself now (with basic of course) ? and does it work with Alive ?

@BaerMitUmlaut
Copy link
Member Author

Yes. No idea if it works with Alive, but I don't see why not.

@PabstMirror
Copy link
Contributor

Another reason I wanted to add a setting for medical ai was just in case it caused problems with AI mods
But it's really just doMove and doAnimation commands, nothing that should break anything

@OtherBarry
Copy link

If enableRevive is set to 1, will an AI medic revive a downed player?

@BaerMitUmlaut
Copy link
Member Author

Nope.

@OtherBarry
Copy link

Is there anything I can change to make that happen, or do I just need more
friends?

On Thursday, 22 September 2016, BaerMitUmlaut notifications@github.com
wrote:

Nope.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#4311 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AGol-csgBZdXhdexvqgqkXeS_3e3a_BYks5qsmNhgaJpZM4Jv_aJ
.

Sent from my iPhone

@BaerMitUmlaut
Copy link
Member Author

The Medical AI currently simply does not know how to deal with the revive state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Release Notes: **IMPROVED:** kind/feature Release Notes: **ADDED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants