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

AI Observations #3

Open
contactgus opened this issue Jan 13, 2014 · 12 comments
Open

AI Observations #3

contactgus opened this issue Jan 13, 2014 · 12 comments

Comments

@contactgus
Copy link

I've been trying to change the AI subskills on Altis to make them more skilled but less accurate. I used the Zeus mod and copied the max settings from here: http://forums.bistudio.com/showthread.php?164740-Zeu_CFGAIskill&p=2558891&viewfull=1#post2558891 into the setMissionSkill.sqf file using the format "_unit setskill ["aimingAccuracy",0.4];" etc for each subskill

I found that that each subskill was defaulting to values of 0.5 no matter what change I made. I added skill debug logs using this as a reference: http://forums.bistudio.com/showthread.php?154124-AI-Skill-Problems&p=2384645&viewfull=1#post2384645

Only when I removed the "_unit allowFleeing 0;" line from the setMissionSkill.sqf did I manage to get customised subskills.

I'm new to this and not a programmer so I could be missing something.

@AgentRev
Copy link
Member

Your setSkill calls are placed after allowFleeing, right?

@contactgus
Copy link
Author

no, before. I'll test putting them after it now

@contactgus
Copy link
Author

Yeah that works fine, Thanks!

I've also noticed that the AI will not fire on an ifrit or strider but will attack civilian vehicles. This means that I can drive into a group in an ifrit and not get shot at. I can hear the leader give the "engage that mrap" order but no one fires at me. The leader appears to be the one with the AT launcher. I would expect that at the very least that the AT soldier would fire at me but would I prefer if the other soldiers would shoot at the strider or MRAP to try and take out it's wheels.

@contactgus
Copy link
Author

The AI do fire an underslung grenade every now and again but I guess with the accuracy changes that I made that they are not capable of hitting me. Surely the AT guy should fire though

@AgentRev
Copy link
Member

The AT guy cannot fire, because he has no actual rockets. It did work before, but Bohemia have recently changed missile ammo so that it cannot be added into vests, so a backpack must be added for him to receive the rockets. It will be fixed in the next update.

I'm still looking into why they are not attacking military vehicles.

@contactgus
Copy link
Author

Great, thanks for your time

@contactgus
Copy link
Author

Just to let you know, I added a backpack to the AT AI and gave all the small and midgroup AI Grenade launchers so they would fire on Military vehicles. I used an eventhandler to keep re-arming them with grenades (additemtovest)
My Zeu_cfgaiskills config:
aimingAccuracy[] = {0,0,1,0.4};
aimingShake[] = {0,0,1,0.6};
aimingSpeed[] = {0,0.2,1,0.6};
endurance[] = {0,0,1,1};
spotDistance[] = {0,0.2,1,0.7};
spotTime[] = {0,0,1,0.7};
courage[] = {0,0,1,1};
reloadSpeed[] = {0,0,1,1};
commanding[] = {0,0,1,1};
general[] = {0,0,1,1};
I then set each subskill in setmissionskill to 1 so that it uses the max values above and if I need to tweak the settings between restarts I only have to edit the zeu userconfig file. I also used a default arm3profile with Regular settings (affects AI too). I found that this works quite well but it looks to me like the exposed area that they spawn in and the defendarea script is limiting the AI (they sometimes spring up and down between crouch and stand). These settings were tested on stratis and resulted in smarter bots with less accuracy who sometimes do some random stuff, even flanking at times

@mawendt
Copy link

mawendt commented Jan 22, 2014

Have you given any thought to also providing a couple of flares to each with a condition to use if they become in contact during night hours? It becomes unnerving when I'm not in contact and someone starts popping flares in the near distance at night.

 
Force a random use of grenade launched smoke. Off my head maybe a random forcing use of smoke to blind or mark players location during a battle. Creates mostly an atmosphere but may blind players where expert AI probably wouldn't be affected that much.
 
you working ai teams? i have some good fairy ideas. mawendt
From: contactgus notifications@github.com
To: A3Wasteland/Release_Files Release_Files@noreply.github.com
Sent: Friday, January 17, 2014 7:36 PM
Subject: Re: [Release_Files] AI Observations (#3)

Just to let you know, I added a backpack to the AT AI and gave all the small and midgroup AI Grenade launchers so they would fire on Military vehicles. I used an eventhandler to keep re-arming them with grenades (additemtovest)
My Zeu_cfgaiskills config:
aimingAccuracy[] = {0,0,1,0.4};
aimingShake[] = {0,0,1,0.6};
aimingSpeed[] = {0,0.2,1,0.6};
endurance[] = {0,0,1,1};
spotDistance[] = {0,0.2,1,0.7};
spotTime[] = {0,0,1,0.7};
courage[] = {0,0,1,1};
reloadSpeed[] = {0,0,1,1};
commanding[] = {0,0,1,1};
general[] = {0,0,1,1};
I then set each subskill in setmissionskill to 1 so that it uses the max values above and if I need to tweak the settings between restarts I only have to edit the zeu userconfig file. I also used a default arm3profile with Regular settings (affects AI too). I found that this works quite well but it looks to me like the exposed area that they spawn in and the defendarea script is limiting the AI (they sometimes spring up and down between crouch and stand). These settings were tested on stratis and resulted in smarter bots with less accuracy who sometimes do some random stuff, even flanking at times

Reply to this email directly or view it on GitHub.

@contactgus
Copy link
Author

I too would like smoke grenades to be used by the AI as they don't have much cover where they defend but I couldnt get them to automatically use it. I even added "Throw" as a weapon but I didnt try to use a GL launched smoke grenade. I might try the zeu_cfgaiskills example mission and see if there is a way to get them to automatically do it. As for flares, our server only runs daytime from 7am to 7pm and then reboots so we don't need flares but you might be interested in this arma2 script: http://forums.bistudio.com/showthread.php?111037-Ai-Shoots-Flares-script-version-1-3
I'm not really the best person to discuss these things as I'm very new to all this

@Torndeco
Copy link

Honestly i would just go add bCombat AI to your server, its very + lots of configurable options u can enable / disable.

Plus has a nicer user base to help debug and if u look over code, author has already been benchmarking various functions runtimes etc (nice to see, especially at such an early stage)

@contactgus
Copy link
Author

Great, at first glance it looks awesome and hopefully will suit my level of understanding better :D . Thanks for the tip!

@mawendt
Copy link

mawendt commented Jan 24, 2014

OK, I understand - however, even if we can't get the AI to automatically use a weapon/frag/smoke/gl smoke whatever we can simulate it by randomized decision forceing.
 
You can create an interrupt somewhere within an AI script that has a threshold like "if the random number is greater than 90 and AI is within 300 meters of an enemy and, ai has grenade launcher and, gl flare and, time is night, then use gl flare" or "if the random number is greater than 90 and, AI is within 300 meters of an enemy and, AI has smoke grenade, then throw smoke grenade direction enemy". Although the scheme is in a word problem, it can be coded out.
 
The idea of forcing an action under a random threshold number doesn't depend on the ai automatically doing something, but simulating a random decision (after all, who knows why/when/what an ai is thinking?) and forces an action to simulate an ai decsion.
 
Could use the same logic train to force the ai to do anything - like attempt to satchel a damaged vehicle or construction wall, lay a mine on a road junction, an ai patrol taking a 15 min pause in a town to set up an ambush then move to another random location, have ai spread out to 200m from the spawned mission point, whatever.
 
Thought I might pass it along to you for any future updates. I would think to force the AT use against an enemy vehicle of any type ("if enemy is within 300m and enemy is in any kind of vehicle and ai has an AT weapon then use At weapon and target enemy") - the same script could be leveraged under any weapon with varying targets.
 
Cheers. mawendt

From: contactgus notifications@github.com
To: A3Wasteland/Release_Files Release_Files@noreply.github.com
Cc: mawendt mawendt@rocketmail.com
Sent: Wednesday, January 22, 2014 9:57 AM
Subject: Re: [Release_Files] AI Observations (#3)

I too would like smoke grenades to be used by the AI as they don't have much cover where they defend but I couldnt get them to automatically use it. I even added "Throw" as a weapon but I didnt try to use a GL launched smoke grenade. I might try the zeu_cfgaiskills example mission and see if there is a way to get them to automatically do it. As for flares, our server only runs daytime from 7am to 7pm and then reboots so we don't need flares but you might be interested in this arma2 script: http://forums.bistudio.com/showthread.php?111037-Ai-Shoots-Flares-script-version-1-3
I'm not really the best person to discuss these things as I'm very new to all this

Reply to this email directly or view it on GitHub.

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

No branches or pull requests

4 participants