Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New feature: AI medics and officers
New feature: AI medics and officers[message #331320] Sun, 16 March 2014 20:43 Go to next message
Flugente

 
Messages:3339
Registered:April 2009
Location: Germany
New feature: AI gets medics and officers, and we learn how to spot them

Enemy soldiers are pretty nondescript. Wether or not they become a primary target for us mainly depends on the threat (=gun) they pose. Boring. We also do not know that until they use this. More boring. Even worse, observing what the enemy does does not result in any additional information on them. Boo-oring. :sleep:

Another problem is that in the few cases where an enemy should become a high-value target (mortar guys, snipers, radio operators) we do not know that until its too late. We can use tooltips, but that might feel like cheating, and we have to hover over each guy, which is tedious.

I've now changed that. Now, if your mercs see an enemy, they might gain a bit of information on him. If your team has collected enough information, they know his role. Think of it as seeing a guy with an antenna, and then deducting that he might be the guy that radioed artillery on your squad. Or the other guy, with that shiny uniform and the medals? He might be an officer of sorts. Taking him out might sow confusion among enemy ranks.

At the moment, the following enemy roles have been defined:
  • 1 - officers
  • 2 - medics
  • 3 - snipers - anyone with a sniper rifle (trait not required)
  • 4 - radio operators - anyone with the radio operator and a working radio set
  • 5 - mortar guys - anyone with a mortar (trait not required)
http://i58.tinypic.com/2vds0bc.png

What is an officer you ask? Well, if the enemy team size is high enough, a soldier with the squadleader trait might become an officer. His officer rank equals the number of his squadleader traits, so there are 2 stages. The highest-ranking officer grants boni to suppression resistance and morale to the entire enemy team in the sector. So these guys are very, very high-value targets.

Another new addition are enemy medics. These guys are enemies that have a first aid or med kit and the doctor trait. They will seek out wounded comrades and bandage and heal them: they perform surgery on them, like your doctors can do. For balancing reasons, they perform it slightly different, can do surgery just with a first aid kit, and drain their kits less. A medic can restore a lot of enemy health points if 'not taken care of', thereby greatly increasing their chances of survival.

https://www.youtube.com/watch?v=9GtrzY-b2Hg[/video]
A medic in action (you might want to view this in fullscreen). You can also see how to turn the symbol display on and off via the [Ctrl] + [c] menu.

Relevant ini settings:
[Tactical Enemy Role Settings]

;******************************************************************************************************************************
; These settings allow enemy soldiers to gain certain abilities that will allow them to play a number of roles and make combat harder.
;******************************************************************************************************************************

; allow enemy roles, required for the following settings
ENEMYROLES = TRUE

; If player mercs observe enemy soldiers, they can uncover their role once they have been seen a least this many turns.
; The following roles will be indicated by small icon next to the soldiers (can be toggled in the [CTRL] + [c] menu):
; - officers
; - medics
; - radio operators
; - snipers
; - mortarmen
ENEMYROLES_TURNSTOUNCOVER = 6

; allow AI medics for the enemy team. A soldier spawning with a first aid or med kit can become a doctor.
; AI doctors bandage their wounded comrades and perform surgery on them. They do so much faster than the player mercs.
; Requires ENEMYROLES to be TRUE.
ENEMY_MEDICS = TRUE

; As the AI will likely have a much higher consumption of medical supplies, you can reduce the med kit drain
; This allows the AI to heal more wounded before its medkits run out
; 0.1 means drain is only 10%. Default 0.1, values between 0.01 and 1.0.
ENEMY_MEDICS_MEDKITDRAINFACTOR = 0.1

; radius in which a medic searches for patients. Targets farer away are ignored. It is required that the medic sees the patient
; Default 20, values between 5 and 60.
ENEMY_MEDICS_SEARCHRAIUS = 20

; allow AI officers for the AI team. An officer is a soldier with the squadleader trait. There are two stages of this:
; a officer with squadleader trait is considered a lieutnant, an officer with squadleader(expert) is a captain.
; For now, a officer grants 2 boni to the entire enemy team present:
; - a bonus to suppression resistance
; - a percentage bonus to morale
; Important: Only the bonus of the highest officer present counts.
; Requires ENEMYROLES to be TRUE.
ENEMY_OFFICERS = TRUE

; for every officer, the enemy team needs at least this many soldiers total
ENEMY_OFFICERS_REQUIREDTEAMSIZE = 10

; maximum number of officers the enemy team may ever have
ENEMY_OFFICERS_MAX = 4

; The boni listed here are for lieutnant, they are doubled for captains.
; bonus to suppression resistance of the entire enemy team if officer is present. Default 10, values between 0 and 50.
ENEMY_OFFICERS_SUPPRESSION_RESISTANCE_BONUS = 10

; bonus to morale of the entire enemy team if officer is present. 0.1 means a 10% bonus. Default 0.1, values between 0.0 and 1.0.
ENEMY_OFFICERS_MORALE_MODIFIER = 0.1


Does not break savegame compatibility.

This was added to the trunk in r7072 and GameDir r1987.


Re: New feature: AI medics and officers[message #331321] Sun, 16 March 2014 21:08 Go to previous messageGo to next message
Gambigobilla

 
Messages:717
Registered:July 2008
Yet another great feature which probably will not be included in stable release. But stable releases are not my thing because im not a stable guy. Keep'em coming! Great job as always! :super:

P.S: "ENEMY_MEDICS_SEARCHRAIUS" is this a typo or intended?
Re: New feature: AI medics and officers[message #331325] Sun, 16 March 2014 23:24 Go to previous messageGo to next message
Hazapuza

 
Messages:263
Registered:February 2009
Location: Finland
And of course the commissars officers will shoot any and all retreating redshirts, no? Wink

Awesome work, Flugente.
Re: New feature: AI medics and officers[message #331326] Sun, 16 March 2014 23:34 Go to previous messageGo to next message
Charlie_May

 
Messages:27
Registered:March 2009
Nicely done!

Only could the icons be a little smaller? I find them a bit too flashy and distracting. Then again, they are toggleable so it's not a big deal. Great feature, as always!
Re: New feature: AI medics and officers[message #331327] Sun, 16 March 2014 23:47 Go to previous messageGo to next message
lockie

 
Messages:3933
Registered:February 2006
Location: Scotland
Are we sure the mortar guy isn't a fish-seller ? Razz

It's a nice feature , for sure :bow:


Re: New feature: AI medics and officers[message #331328] Mon, 17 March 2014 02:06 Go to previous messageGo to next message
Uriens

 
Messages:330
Registered:July 2006
Great feature. Thanks flug. :cheers:
Re: New feature: AI medics and officers[message #331332] Mon, 17 March 2014 10:15 Go to previous messageGo to next message
sevenfm

 
Messages:1539
Registered:December 2012
Very nice! :bluecool:

My two cents:
1. Icons indeed could be a bit smaller
2. What about 'spotter' role (use binoculars for recon when more then 5-10 soldiers still alive and no direct threat to spotter)?
3. Fisherman is cool ROFL


Re: New feature: AI medics and officers[message #331335] Mon, 17 March 2014 10:42 Go to previous messageGo to next message
Maalstroom

 
Messages:343
Registered:December 2008
Location: en route to San Hermanos
One of your best flug!
I agree, the icon could be a lot smaller. Smile Make it awesome Flug!
Re: New feature: AI medics and officers[message #331336] Mon, 17 March 2014 11:51 Go to previous messageGo to next message
silversurfer

 
Messages:2292
Registered:May 2009
Wow, cool feature. Smile

One thing that troubles me is that the officer in your demonstration video is running away from the medic that is trying to treat him... Very Happy

Re: New feature: AI medics and officers[message #331337] Mon, 17 March 2014 13:08 Go to previous messageGo to next message
cowhide

 
Messages:30
Registered:October 2013
I love this Embarrassed

Especially the officers are a nice addition. Maybe add sergeants too?

[Updated on: Mon, 17 March 2014 13:09] by Moderator

Re: New feature: AI medics and officers[message #331340] Mon, 17 March 2014 17:21 Go to previous messageGo to next message
silversurfer

 
Messages:2292
Registered:May 2009
Gambigobilla

P.S: "ENEMY_MEDICS_SEARCHRAIUS" is this a typo or intended?

I fixed that in revision 7079 (GameDir 1991).

Re: New feature: AI medics and officers[message #331342] Mon, 17 March 2014 19:03 Go to previous messageGo to next message
Nasenbaer

 
Messages:36
Registered:July 2013
Location: Germany
Wow! Very nice Addon! Thanks again Flug!!

Does this Feature include Medics among the Militia as well? And will they care for woundet Mercs?
Re: New feature: AI medics and officers[message #331345] Tue, 18 March 2014 00:09 Go to previous messageGo to next message
Flugente

 
Messages:3339
Registered:April 2009
Location: Germany
Update: r7080 and GameDir r1992 bring a few improvements:
  • lowered default value for ENEMYROLES_TURNSTOUNCOVER to 4
  • increased default value for NEMY_MEDICS_SEARCHRADIUS to 40
  • new option: ENEMY_MEDICS_WOUND_MINAMOUNT controls how serious a wound must be before a medic considers it worthy of attention. This should prevent medic from risking their life to treat a 1 hp wound.
  • new option: ENEMY_MEDICS_HEAL_SELF: medics can heal themselves.
  • new option: ENEMY_OFFICERS_SURRENDERSTRENGTHBONUS adds a team surrender strength bonus for officers
  • tanks cannot become medics, and can't be treated by them either :scan:
  • Menubutton for Role symbol toggle is red if off and green if on. Before it was guesswork if nobody was yet uncovered.
  • wounded soldiers seek medics, max range is ENEMY_MEDICS_SEARCHRADIUS / 2
  • direct sight line between medic and target is no longer required. Might turn this back on later, lets see how this turns out.
  • not directly from this feature: if hostile civilians allied to the army are in sector, their surrender strength is added to the enemy team. This solves the problem that one could press the army to surrender even if they were joined by a dozen angry rednecks with shotguns Wink
Thank you all for the flowers :nails:

http://www.youtube.com/watch?v=mAm13IaGaIU&feature=youtu.be[/video]
The same situation as in the first video, with a few upgrades.

Hazapuza
And of course the commissars officers will shoot any and all retreating redshirts, no? Wink

Awesome work, Flugente.
Well... that works rather well, actually. :moosegrin:

Sevenfm
2. What about 'spotter' role (use binoculars for recon when more then 5-10 soldiers still alive and no direct threat to spotter)?
Hmm. Might work. Have to test some time.

silversurfer
Wow, cool feature. Smile

One thing that troubles me is that the officer in your demonstration video is running away from the medic that is trying to treat him... Very Happy
Addressed with this update. Two issues remain:
  • AI runs to medic... and then runs away again. I don't want to end their turn prematurely , as this might be a serious exploit: shoot the AI and watch them pile up at a medic.
  • Potentially, the AI could stop combat once it is wounded and run to a medic. I've lowered the search radius for this, but this a potential source of odd AI behavior.
Luke
I love this Embarrassed

Especially the officers are a nice addition. Maybe add sergeants too?
While their rank is lieutnant/captain in the ini and the code, they are never used ingame. You can think of them as whatever rank you prefer. Sergeant, Major, pack leader, Da Big Boss...

Nasenbaer
Wow! Very nice Addon! Thanks again Flug!!

Does this Feature include Medics among the Militia as well? And will they care for woundet Mercs?
No. That would be easy (~ 2 minute of coding), but I feel this would be too pwoerful in the hands of players, especially if they equip their militia. 30 free doctors is not what we want.
Think of it like this: whatever you think of the arulcan army, they are an army. The militia, however you equip them, are still a ragtag bunch of rudimentary trained volunteers. Commanding, radio, gear maintenance, medical duties - this falls to the few professionals on their side - the elite mercenaries you control.

The icons were made by me, thus the meagre quality Wink If someone supplies better ones, we can use those *looks in smeagol's general direction* :venus:


Re: New feature: AI medics and officers[message #331348] Tue, 18 March 2014 02:56 Go to previous messageGo to next message
Hazapuza

 
Messages:263
Registered:February 2009
Location: Finland
Flugente
Well... that works rather well, actually. :moosegrin:

Gah, I knew I should've paid more attention to your mod. Perhaps I'll shoot me some guardsmen one of these days. :diabolical:
Re: New feature: AI medics and officers[message #331349] Tue, 18 March 2014 03:51 Go to previous messageGo to next message
Slax

 
Messages:1435
Registered:July 2006
Location: People riding polar bears...
Oh lordy, this could go just about anywhere from here.
Within a year we'll have enemy necromancers, MG teams, pizza delivery boys and... uh, CHER! Yeah. That's it. All of that stuff.

And neat little field bases for big maps. :kettle:

Flugente gets a cupcake.

Re: New feature: AI medics and officers[message #331351] Tue, 18 March 2014 04:08 Go to previous messageGo to next message
Uriens

 
Messages:330
Registered:July 2006
Please no, anything but Cher. :yikes:
Re: New feature: AI medics and officers[message #331352] Tue, 18 March 2014 08:43 Go to previous messageGo to next message
smeagol

 
Messages:2710
Registered:June 2008
Location: Bremen, Germany
Flugente

The icons were made by me, thus the meagre quality Wink If someone supplies better ones, we can use those *looks in smeagol's general direction* :venus:


Huh? I did show you the icons I made, didn't I?


Re: New feature: AI medics and officers[message #331358] Tue, 18 March 2014 14:04 Go to previous messageGo to next message
Gorro der Grüne

 
Messages:1539
Registered:March 2009
Location: Broadwurschd-City
No Message Body
Re: New feature: AI medics and officers[message #331359] Tue, 18 March 2014 14:16 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3802
Registered:July 2009
Having guns counts as a cheat to you ...


Re: New feature: AI medics and officers[message #331360] Tue, 18 March 2014 15:16 Go to previous messageGo to next message
Gorro der Grüne

 
Messages:1539
Registered:March 2009
Location: Broadwurschd-City
Having the prime targets indicated does
Re: New feature: AI medics and officers[message #331361] Tue, 18 March 2014 15:49 Go to previous messageGo to next message
smeagol

 
Messages:2710
Registered:June 2008
Location: Bremen, Germany
Gorro der Gr


Re: New feature: AI medics and officers[message #331362] Tue, 18 March 2014 17:43 Go to previous messageGo to next message
Gorro der Grüne

 
Messages:1539
Registered:March 2009
Location: Broadwurschd-City
the is no problem to qualify ANY cheat as superior playing style
Re: New feature: AI medics and officers[message #331368] Tue, 18 March 2014 19:52 Go to previous messageGo to next message
Maalstroom

 
Messages:343
Registered:December 2008
Location: en route to San Hermanos
Goro please take into consideration that there were no medics, commanders or whatsoever available for the AI before this feature. So i find it better to look for special characters than to shoot the first enemy you see. This feature makes the game more fun and you shouldn't be such a negativist fellow... depressive and majek are enough...
Re: New feature: AI medics and officers[message #331369] Tue, 18 March 2014 20:00 Go to previous messageGo to next message
Gorro der Grüne

 
Messages:1539
Registered:March 2009
Location: Broadwurschd-City
I'm not against the feature I'm STRONGLY against the visiabilty of those improvements -> You don't have to watch what they do since the carry a neonlight telling You what/who they are.
Re: New feature: AI medics and officers[message #331371] Tue, 18 March 2014 20:10 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3802
Registered:July 2009
Gorro der Gr


Re: New feature: AI medics and officers[message #331380] Wed, 19 March 2014 07:44 Go to previous messageGo to next message
Eternal

 
Messages:8
Registered:February 2006
Gorro der Gr

[Updated on: Wed, 19 March 2014 07:45] by Moderator

Re: New feature: AI medics and officers[message #331408] Thu, 20 March 2014 01:26 Go to previous messageGo to next message
Flugente

 
Messages:3339
Registered:April 2009
Location: Germany
smeagol
Huh? I did show you the icons I made, didn't I?
Hmm you did. Me forget. Here they are (GameDir r1995), had to adjust colours:
http://i57.tinypic.com/32zkz07.png
@Gorro: pretty much what others said... You will only see those icons once you've seen that enemy at least ENEMYROLES_TURNSTOUNCOVER turns and if the display is on. The officer/medic stuff can be turned on or off in the ini, and is independent on wether you see it.

I also don't think the problem of the AI is that it targets the wrong player mercs, but that it rarely gets a chance to damage any merc once the player is seriously geared up. In my current campaign, 6 mercs can take 30* soldiers with ease, even in daylight wilderness maps. The problem is that the AI decisions are clearly bad, but upgrading the AI is hard (there is a reason why everybody working on the AI has either stopped that or gone AWOL). Also,
  • 1: merc gear is always better suited to the combat (unless the player fucks it up himself) than the enemies.
  • 2: If the player observes 1 to be false, he can grab enemy gear, and then 1 is true again Wink

*: adjust for player willingness to use quicksave/-load


Re: New feature: AI medics and officers[message #331409] Thu, 20 March 2014 01:34 Go to previous messageGo to next message
Gambigobilla

 
Messages:717
Registered:July 2008
But i want the fisherman.
Re: New feature: AI medics and officers[message #331410] Thu, 20 March 2014 01:39 Go to previous messageGo to next message
Maalstroom

 
Messages:343
Registered:December 2008
Location: en route to San Hermanos
Yeah me too - The guy was fishing with dynamite Smile) We miss the poacher/peterman fisherman Smile)Also the icons can be smaller. The "fisherman" looks like he's holding a club... Smile

[Updated on: Thu, 20 March 2014 01:42] by Moderator

Re: New feature: AI medics and officers[message #331414] Thu, 20 March 2014 10:56 Go to previous messageGo to next message
smeagol

 
Messages:2710
Registered:June 2008
Location: Bremen, Germany
I can make the icons smaller... if the fisherman is what you want, you might get it.

Would it be possible to add a text line when you kill someone with a role (alrteady revealed or not is up for debatte)? I think it would be a nice addition to get a "You killed an officer" line when headshotting the sector commander.


Re: New feature: AI medics and officers[message #331415] Thu, 20 March 2014 11:38 Go to previous messageGo to next message
smeagol

 
Messages:2710
Registered:June 2008
Location: Bremen, Germany
Oh... almost forgot... will we be able to preset roles in the mapeditor at some point? That'd be quite nice imo.

I've tested spotting enemies with roles now in a few sectors and all I came along were one medic and one officer in something like 4 sectors... (no mortar and sniper guys doesn't worry me, because I'm playing low progress and I'm not even sure if I already added radios to the opponents itemchoice lists yet...).

I think icon sizes are okay, only you used a weird looking color palette which is quite greenish (my originals were using grey scales).

I also like the idea of having different officer ranks/levels (Lt, Cpt, sarge for different levels of bonus/penalties for enemies), which would get separate icons.


Re: New feature: AI medics and officers[message #331418] Thu, 20 March 2014 13:42 Go to previous messageGo to next message
Flugente

 
Messages:3339
Registered:April 2009
Location: Germany
Purely grey icons are hard to see, especially indoors or at night. From a visual standpoint, pink would probably stand out the most Wink

'You killed an officer' - that would be cool. Enemy reactions would be even better, like some taunt the enemy uses when they lose an officer. Hmm.

Snipers & mortars guys require an item, medics/radio operators are created if they have that item upon spawning. So you can kinda control via map editor if one those spawns.

Officers are created from soldiers with the deputy/squadleader trait if there are still free 'officer slots' and the ratio to normal soldiers is good enough (both ini values). Can you preset traits in the map editor?. I'm mot that familiar with that thing anymore. Kriplo probably knows best how hard/easy it would be to set a new property for soldiers in the editor.

Atm we have 2 officer ranks which differ in magnitude of bonus only. Adding more is easy, but what would be the differences - what new properties would/should they have?


Re: New feature: AI medics and officers[message #331420] Thu, 20 March 2014 13:59 Go to previous messageGo to next message
sevenfm

 
Messages:1539
Registered:December 2012
About icon sizes and colors:
I'm not a visual designer or artist, but, from my point of view, this style of colors is preferred for me:
http://i.imgur.com/OOpUGFW.png
Icons are definitely recognizable, and colors are not too bright and correspond to general ja color scheme.


Re: New feature: AI medics and officers[message #331424] Thu, 20 March 2014 19:52 Go to previous messageGo to next message
tais

 
Messages:807
Registered:February 2008
Location: NL
I'd make the icons a tiny bit larger and ofcourse fill in the roles instead of ranks..

I'm thinking of something like this
http://i.imgur.com/nXmalcp.png

(the three guys left of the red line)


Re: New feature: AI medics and officers[message #331425] Thu, 20 March 2014 21:46 Go to previous messageGo to next message
Buggler

 
Messages:207
Registered:November 2009
Agree on the duller colors for the icon as I assumed it will be a permanent icon (till e soldier is dead) once it is uncovered.

Permanent features should have dull colors to blend well (like health and energy bars);
Conveying information on player's intended action should have bright colors to scream for attention (like the footsteps and targeting cursor).
(Avoid using 255 on any primary color value for bright colors as it will be too contrasty for our eyes on Ja2's landscape, 200~230 will be sufficient. Green Militia icons in strategic screen was previously so and it definitely hurts my eyes back then.)

Tais' icon size is perfect for the ever-increasing screen DPI.
Re: New feature: AI medics and officers[message #331426] Thu, 20 March 2014 21:47 Go to previous messageGo to next message
Flugente

 
Messages:3339
Registered:April 2009
Location: Germany
Go on then, you people make them happen Smile


Re: New feature: AI medics and officers[message #331445] Fri, 21 March 2014 18:58 Go to previous messageGo to next message
tais

 
Messages:807
Registered:February 2008
Location: NL
five roles five icons I'd say
http://i.imgur.com/6bXf0C7.png
this good enough?


Re: New feature: AI medics and officers[message #331446] Fri, 21 March 2014 19:07 Go to previous messageGo to next message
sevenfm

 
Messages:1539
Registered:December 2012
Tais
Looks good for me.

Officer icon will probably look beter if that christmas tree is reversed Smile
Also, there are two officer levels if I understand correctly.


Re: New feature: AI medics and officers[message #331450] Fri, 21 March 2014 19:50 Go to previous messageGo to next message
tais

 
Messages:807
Registered:February 2008
Location: NL
every country has it's own way of making insignia, the christmas tree is US army style.
I've added your upside down christmas tree design and also a lieutenant and captain rank, all of these should give enough options for anyone that wants to use them
http://i.imgur.com/nqJooGq.png


Re: New feature: AI medics and officers[message #331453] Fri, 21 March 2014 20:23 Go to previous messageGo to previous message
Gambigobilla

 
Messages:717
Registered:July 2008
I don't know much about JA2 lore so which one do Arulcans use? Christmas tree or upside down one?
Previous Topic: New Feature: gear templates
Next Topic: New feature: individual backgrounds
Goto Forum:
  


Current Time: Mon Jun 25 12:47:19 EEST 2018

Total time taken to generate the page: 0.01224 seconds