Home   Help Search Login Register  

Author Topic: Improving AI's eyesight  (Read 1922 times)

0 Members and 1 Guest are viewing this topic.

Franksie86

  • Guest
Improving AI's eyesight
« on: 31 May 2005, 14:20:28 »
Hi, I'm half way through creating the first mission in a campaign im making based around the Invasion 1944 mod.

I have created a night drop with some great ambience and it looks really good but i have one problem...

the problem is that the AI's eyesight is terrible at night! Is there a way in which I could improve their eyesight so the mission isnt just one big turkey shoot!

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Improving AI's eyesight
« Reply #1 on: 31 May 2005, 14:52:27 »
There are three ways I can think of. Using the reveal command (which means cheating a bit), adding NV Goggles to every squad leader (which is even more cheating since NV Goggles didn't exist in '44) or by raising their skill. Your call. :)

:beat: *Gets Shot* :beat:

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Improving AI's eyesight
« Reply #2 on: 31 May 2005, 15:03:54 »
Improve the weather.

Change the date to get a full moon.

Add more ambient light sources such as vehicles, fires, streetlamps, lit lighthouses and so on.

Add grenade launcher loons (or some kind of mortar addon) with appropriate scripts to keep them firing flares into the sky.

Make the triggers and waypoints controlling the enemy loons more sophisticated.

Make the unit placement more sophisticated so that, for example, the player has fewer bushes in which to hide.

My point is that poor AI nightvision is an axiom of your mission.   Therefore you must design your mission around it.     It sounds as if you have done things the other way around - you have created what is essentially a daylight mission and now you're trying to make it work at night.     Go back to first principle and think about what you are actually trying to do.   Work within the game's parameters -  you'll end up with a much better mission than if you try to bend them.
Plenty of reviewed ArmA missions for you to play

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Improving AI's eyesight
« Reply #3 on: 31 May 2005, 16:01:19 »
Work within the game's parameters -  you'll end up with a much better mission than if you try to bend them.

Or a complete mission.

Hum-dum-di-dum-dum.

;D

:beat: *Gets Shot* :beat:

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Improving AI's eyesight
« Reply #4 on: 31 May 2005, 20:35:55 »
Quote
My point is that poor AI nightvision is an axiom of your mission.... Work within the game's parameters -  you'll end up with a much better mission than if you try to bend them.

I had to look up the word "axiom", but I tend to disagree with you here. Poor AI vision is just an axiom of OFP in ALL cases. The bastards can't see past their own noses, it seems at times. This can be fixed by changing the game's config (like the next ECP will do), or changing an addon's config, but there isn't a whole lot you can do as an editor.

The best thing you can do is to change the skill of the AI. Their skill directly affects how far they can see, so setting it to the max will let them see the farthest possible.

You might say, "but I don't want them to be that accurate when shooting!". Well, this is a valid complaint; however, there is a GREAT way to get around this. Using the 'setdammage' command, give them NEGATIVE health:

this setdammage -1

The lower the negative number, the more 'wobbly' their aim becomes. However, I suggest you set it between -1 (0% skill) and 0 (100% skill). With BIS weapons, this results in more "dispersion" between shots than normal, which makes firefights last longer. If the weapons you are using already have fairly high dispersion, then you might want to make this range smaller.

I've used this method and I'm convinced it is the best workaround. As soon as the unit is hit, he will go to positive damage (as if he were at 0 the whole time), so this doesn't end up giving units "more life". If he gets healed, he will go back down to 0, which is the main flaw.

I swear to god this method is so useful. I think everyone should use it. Try it and see.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Dubieman

  • Guest
Re:Improving AI's eyesight
« Reply #5 on: 01 Jun 2005, 04:14:00 »
Well, I generally agree with Mac on ways to make them mission work better, but if the weapons are not silenced or suppressed, just have the guards look outwards to possible places where the player might be. Once the AI sees the muzzle flash, they're all over you. Stay stealthy and they are sacrificial lambs, with an HK or Bizon that is. :P

As for the health trick. Yes I've used it with JAM HD to make some very nice firefights but screw it up too much and I've had people who won't fire at all. The code shakes them so badly they think they are aiming at the ground too much so they don't fire. But to not be bothered with coding for everyone, just use HD weapons whenever possible. I actually find it more difficult to play standard OFP after using Sebnam2, JAM2, and I44 weapons now.  :'(

@Barron: you set your negatives between -1 and 0? I always increase to get worse effects.

Grendel

  • Guest
Re:Improving AI's eyesight
« Reply #6 on: 01 Jun 2005, 05:46:47 »
Well you learn something new every day!!

Thanks for the setdammage/accuracy tip guys!!!

-grendel

Offline Morglor9

  • Members
  • *
Re:Improving AI's eyesight
« Reply #7 on: 01 Jun 2005, 06:45:34 »
As soon as the unit is hit, he will go to positive damage (as if he were at 0 the whole time), so this doesn't end up giving units "more life". If he gets healed, he will go back down to 0, which is the main flaw.

I have to say, the healing thing probably won't happen. i've never seen a loon smart enough to move to a medic/medical tent and heal himself.

Then again, I never leave loons half a live...they're either 100% dead or I'm 100% dead.  ;)
Cymbaline

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Improving AI's eyesight
« Reply #8 on: 01 Jun 2005, 09:49:24 »
Quote
I tend to disagree with you here. Poor AI vision is just an axiom of OFP in ALL cases. The bastards can't see past their own noses, it seems at times. This can be fixed by changing the game's config (like the next ECP will do), or changing an addon's config, but there isn't a whole lot you can do as an editor.

We're not really disagreeing.    Poor AI vision is indeed a general problem, but excessive AI vision is also a problem sometimes.   And a worse one, since you end up dead.   ;D

One point I forgot to mention before is that many players turn up their brightness and contrast levels far too high for a night mission.    The player can see because he is cheating, but of course the AI can't.    To rectify this all you have to do is turn down the brightness to a reasonable level.    You could include a remark about this in the readme (or even the Briefing)  "This mission is designed to be played properly.  If you're going to turn brightness up full, don't bother playing because it won't be much fun."

Another trick is to use different units for the player.    An ordinary soldier is much easier for the AI to spot at night than a blackop.

Morglor9, units do move to medics to get healed.   You see it more often with other groups on your own side than the enemy.
Plenty of reviewed ArmA missions for you to play

bdfy1

  • Guest
Re:Improving AI's eyesight
« Reply #9 on: 01 Jun 2005, 19:18:02 »
 General Barron
Quote
this doesn't end up giving units "more life". If he gets healed, he will go back down to 0, which is the main flaw.
IIRC  the units will become more  tough ? i.e you will have to hit them twice as hard to kill ? And unit will become more accurate whenn healed by medic ?

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Improving AI's eyesight
« Reply #10 on: 01 Jun 2005, 21:04:20 »
He will not be harder to kill. However, once he gets injured and then healed he will shoot accurate again.

:beat: *Gets Shot* :beat:

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Improving AI's eyesight
« Reply #11 on: 01 Jun 2005, 23:15:29 »
Quote
IIRC  the units will become more  tough ? i.e you will have to hit them twice as hard to kill ?
Nope. I've confirmed this personally.

Lets say you start a unit at "-1" damage. Then, lets say he gets hit for 0.3 damage. The unit will first be set to 0 damage, then he will take the 0.3 damage. The same will happen if he starts at "-0.5", "-100", or any other number.

So he will end up having the correct amount of damage: 0.3-- the same damage he would have had if he started at the normal 0 damage.

Since the unit is now at a normal (>=0) damage, like any other unit, he will now be put down to 0 damage if he gets healed. Usually AI that aren't in your squad don't live long enough to get healed, so I mainly suggest using this technique on them. If the player has a chance to heal, then you should never try this on the player in a mission.

As for the amount of wobble: the game reads the negative number as if it were a positive amount of damage, in order to determine how much wobble to give. So if a unit is at -0.8 damage, he will wobble just as much as if he were at +0.8 damage. If he is at -10 damage, he will wobble just as much as if he were at +10 damage--which is a hell of a lot! Too much for most AI to actually aim with, so they end up not shooting.

This is one reason why I suggest using a number between -1-0. The other reason: if he is originally wobbling like he is at +10 damage (setdammage -10), and then he gets hit and gets set to +0.3 damage, he will have a drastic increase in accuracy. But if he is originally wobbling like he is at ~0.5 damage, then any increase in accuracy will be very slight and hardly noticable.

« Last Edit: 01 Jun 2005, 23:16:29 by General Barron »
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!