Jump to content

I think I have the answer to the AI being passive.


Recommended Posts

It's the sight ranges. The aliens are passive because usually you see them first and if you're smart you stay far enough away that they can be picked off. Even if the AI can see you they are loathe to cross open ground to assault you (smart.) I've reviewed a bunch of my battles that is definitely most of the problem. The AI has no understanding of being sniped or trying to locate where fire is coming from from what I can tell. Therefore, unless it can see you it's just going to stay in place and die. They do fight quite well at closer ranges.

Additionally, with the increased accuracy it is now easier than ever to pick aliens off at long range using squad sight. This is actually an advantage for the human even though it affects both sides.

My suggestion is to increase the aliens sight range by about 2-3 tiles all around and see what that does. The only aliens that should probably have less sight range than a human are the Sebillans. Andron and Harridans probably should have sight range exceeding the human substantially I'd probably add 4-6 tiles to their ranges.

The humans are the ones that should be worried about being sniped not the other way around. That's how it was in the OG and I think that is major difference here. Human AV's should be an equalizer not an advantage. Perhaps the Scimitar should give you sight parity with an Andron. While the Hunter should give you no more than a Caesan.

Link to comment
Share on other sites

I've been tinkering with AI weights and the like and while I can get non-coms to stop hiding behind cover (sometimes), they'll only actively fire when the enemy is ~8 tiles away. I've tried multiplying the plasma pistol accuracy by x1000, changing minimum accuracy to take a shot to 5%, and various other stuff, but it doesn't matter: they will only fire once they've got to that certain range, despite the plasma pistol having a range of 15 by default.

Link to comment
Share on other sites

Maybe it's a combination of the alien's perceived weapon accuracy and sight ranges then. In my mind, the aliens should fire at any range they can see you at if they have nothing better to do. I wonder if all the accuracy changes that have occured since the AI was developed have not "sync'ed up" with the AI code? AI should use exactly the same calculation that the game uses to determine accuracy. It shouldn't be a copy of the calculation in a separate code routine, it should be THE same function otherwise the AI will not take into account weapons mods, changes, etc... If you've raised pistol accuracy by 1000 times and AI still won't take a shot either they can't see you or they aren't using the games accuracy calculation to determine if a shot is "good".

Edited by StellarRat
Link to comment
Share on other sites

Maybe it's a combination of the alien's perceived weapon accuracy and sight ranges then. In my mind, the aliens should fire at any range they can see you at if they have nothing better to do.

Absolutely. It's more important in this game than in the OG because of suppression - you might do no damage, but if you suppress them you pretty much make them miss their next turn while denying them reaction fire. Instead, they'll charge into close quarters and then fire.

Link to comment
Share on other sites

Instead' date=' they'll charge into close quarters and then fire.[/quote']I think that's where the sight range thing is really hurting them. They don't know to charge because they don't know you're there while your busy picking them off at long range. If they could actually see you then at least they'd try to close the range. Instead they neither fire or close the range. They need more sight range and they need to understand that shooting is OK at longer ranges even if they want to stay under cover. The Sebillans put up a great fight if they can actually see you.
Edited by StellarRat
Link to comment
Share on other sites

For all practical purposes raising the sightrange might work, but I think the important part is making the AI "curious". They should be able to investigate shots, even if they only hear them (for example if you're shooting another alien), and they should activly try to engage you as soon as one alien spotted your troops. I mean we're talking about very advanced beings here, they should have a method of battlefield communication that allows them to work as a team.

So while I think fixing the sightrange and/or the minimum accuracy aliens fire with is a good first step the more important part is, in my opinion, making the aliens creative, curious and teamfocused.

Link to comment
Share on other sites

With all due respect to my honoured colleague, I must remind StellarRat of the endless battles fought on this forum over sight ranges, these battles culminating in the current detente where only Harridans have a longer sight range than humans. GJ did develop systems for guessing where human troopers were, and apparantly the systems were so effective that they were withdrawn or blunted. Perhaps those systems should be invigorated?

Link to comment
Share on other sites

I think that where the sight range thing is really hurting them. They don't know to charge because they don't know you're there while your busy picking them off at long range. If they could actually see you then at least they'd try to close the range. Instead they neither fire or close the range. They need more sight range and they need to understand that shooting is OK at longer ranges even if they want to stay under cover. The Sebillans put up a great fight if they can actually see you.

I think I might have stumbled onto something: setting the base grenade range in config.xml to 40 (up from 4) seemed to make the caesans take shots from range. It seems to me that if they're not in a position to throw a grenade, non-combatants will do sod all. Whether they really want to throw a grenade doesn't seem to matter.

Of course there's the problem of units now being able to throw grenade across the planet, but at least it's a start.

Link to comment
Share on other sites

With all due respect to my honoured colleague, I must remind StellarRat of the endless battles fought on this forum over sight ranges, these battles culminating in the current detente where only Harridans have a longer sight range than humans. GJ did develop systems for guessing where human troopers were, and apparantly the systems were so effective that they were withdrawn or blunted. Perhaps those systems should be invigorated?
I do remember that, but I believe various factors have changed since then and it might be time to discuss them again. Additionally, the biggest sight range fiasco was a combination of alien accuracy and too powerful weapons in combination with too long a sight range (way too long if I remember) caused by Gjis-Jan doing some testing and forgetting to take out the test code. Sight range taken on it's own along with a substantial increase to the "desire to fire range" (or bug fix?) it might well solve the passive AI issues. Also, it might be time to revive the "location guessing" routines, if, and only if, they are not "cheating".
Link to comment
Share on other sites

I think I might have stumbled onto something: setting the base grenade range in config.xml to 40 (up from 4) seemed to make the caesans take shots from range. It seems to me that if they're not in a position to throw a grenade' date=' [i']non-combatants will do sod all[/i]. Whether they really want to throw a grenade doesn't seem to matter.

Of course there's the problem of units now being able to throw grenade across the planet, but at least it's a start.

AH! I was wondering after the previous post about not wanting to shoot past 8 tiles if somehow the grenade range was involved! Good find! You might be on to something! That might fix some of the problem. I think a sight range increase might still be called for though.
Link to comment
Share on other sites

I think I might have stumbled onto something: setting the base grenade range in config.xml to 40 (up from 4) seemed to make the caesans take shots from range. It seems to me that if they're not in a position to throw a grenade' date=' [i']non-combatants will do sod all[/i]. Whether they really want to throw a grenade doesn't seem to matter.

Of course there's the problem of units now being able to throw grenade across the planet, but at least it's a start.

Well, that definately sounds like a great point to start. If there is a way to remove that correlation we would be one step closer to interesting combat.

Link to comment
Share on other sites

I dont' know all the technical stuff, but in my latest play in v19 stable, it's apparent that the alien AI just doesn't like to gamble on long range shots. Whereas, I'm finding that it's usually worth trying to shoot at range even if my % to hit is 0 - 3%. Many times, in just trying for a long-shot at supression fire, I've actually hit and killed enemies with I was supposed to have 0% chance.

Now, that may be an issue on its own, but when the bad guys aren't willing to use the same strategy, you do end up with these long-range, one-sided confrontations.

Link to comment
Share on other sites

I dont' know all the technical stuff, but in my latest play in v19 stable, it's apparent that the alien AI just doesn't like to gamble on long range shots. Whereas, I'm finding that it's usually worth trying to shoot at range even if my % to hit is 0 - 3%. Many times, in just trying for a long-shot at supression fire, I've actually hit and killed enemies with I was supposed to have 0% chance.

Now, that may be an issue on its own, but when the bad guys aren't willing to use the same strategy, you do end up with these long-range, one-sided confrontations.

Yes, I think I was sort of hinting at that. The other thing is that aliens don't have rocket launchers. The rocket launcher can miss by a tile or two and still kill and wound. So miss really isn't a miss with a rocket launcher. The aliens do have the plasma cannon, but it shows up around January and they aren't willing to take long shots with it (like all their others weapons), but they probably should.
Link to comment
Share on other sites

Okay, I've cobbled together a small AI mod for v20. It's not been rigorously tested because, well, Christmas celebrations. But give it a shot. In the few games I've had lightscouts' non-coms shoot at range; tell me if this isn't true for you and I'll add more changes. I can't help fiddling about, but I've tried to stay to a bare minimum in case the grenade thing isn't the only factor.

Stinky's Simple AI Tweaks for v20.

Backup of v20 stable 4's aiprops.xml in case anything goes wrong.

Hopefully you won't have to use the second link. Both are installed by pointing the files to be extracted to your Xenonauts folder (not the one containing your save files!). It'll be something similar to "C:\Program Files (x86)\Steam\steamapps\common\Xenonauts\".

What it does:

  • Aliens that don't have a grenade now get 250 strength. They check they're in grenade range and then fire; since they now have a throwing range of 29 odd tiles, they shouldn't be standing up then crouching again if they can fire. This is an attempt at a low-imapct solution. If soldiers, warriors and upwards still close the distance too much, I can take out alien grenades and boost their strength. That'd be a shame, but I think it's better to have AI using guns properly for the time being.
  • Minimum accuracy required to take a shot is 3%, down from 35%. Cover no longer scares them.
  • Reapers shouldn't run out of sight of Xenonauts any more.
  • Human allies will run from aliens and try to hide behind Xenonauts, if I've done it right. If I haven't, well, those civs were probably going to die anyway.

I've put a comment before all the stuff I changed, so if you want to take out the reaper change, it should be straightforward.

I've left out certain things I've been toying with; I'm trying to see if I can get Caesans to use guerilla tactics while not being passive. But what with family around, I doubt I'll be able to get it going properly. Right now the AI weights (except for reapers and survivors) are the defaults, let me know if you want them to hug cover a bit less etc.

Edited by Ol' Stinky
Link to comment
Share on other sites

Okay' date=' I've cobbled together a small AI mod for v20. It's not been rigorously tested because, well, Christmas celebrations. But give it a shot. In the few games I've had lightscouts' non-coms shoot at range.[/quote']Wow! You did a lot just with the XML. It seems to be fairly obvious to me that something is wrong with where the AI is receiving it's information about when to shoot with direct fire weapons. Perhaps either Gjis-Jan or GH has linked the wrong data to the AI (grenade vs. gunfire.) Great work!

Do you feel the sight ranges are OK then?

Link to comment
Share on other sites

Wow! You did a lot just with the XML. It seems to be fairly obvious to me that something is wrong with where the AI is receiving it's information about when to shoot. Perhaps either Gjis-Jan or GH has linked the wrong data to the AI (grenade vs. gunfire.) Great work!

Do you feel the sight ranges are OK then?

Well, give it a try before you get too happy. (;

I don't know if they need a sight extension since I haven't got very far with trigger happy aliens. I wouldn't rule it out, though. My only concern about it is that vehicles might become necessary to lower casualties against Caesans. Right now you can get by with shield scouts.

Link to comment
Share on other sites

Well, they shouldn't get a lot of hits unless they see you and they get a lucky roll, right? It should make things a lot more interesting though since you'll start to take fire (even if inaccurate) much sooner. I'll try to get to it tonight. Tomorrow is out. Maybe Christmas Day for a while.

Link to comment
Share on other sites

This is truly awesome, thank you so much Stinky!

I'll test it over the holidays, since i'll be spending christmas alone in the hospital anyway. Lets see if I can actually manage to outsmart more triggerhappy aliens :)

Damn, that sucks, man.

I couldn't sleep for whatever reason, so I did more testing. All of the aliens seem to have grenade-itis. So here's a second version of the mod. Installation's the same as the others: point it towards your Xenonauts dir when extracting the .zip. The first version of the mod only went up to guards (so corvettes, basically). This one covers everything from Caesan non-coms to Wraith officers. I guess I should set up shop in the mod forum from now on, to try and avoid hijacking this thread any more than I already have.

Edit: I'd forgotten to bump up the minimumAccuracy a bit. I've updated the .zip now. I've set it at 25%, to try and make aliens take shots not too far out of range; with the alien heavy plasma (the one with spread fire) they were taking potshots from miles away that would do pitiful damage and no suppression.

Edited by Ol' Stinky
Link to comment
Share on other sites

Good stuff. It's nice to see that people are playing about with the AI settings given how much trouble we've gone to to make the customisable.

I'll send the grenade / shooting range thing to GJ for him to look into when the holidays are over.

I'm not sure when you made it this moddable - I've been busy IRL for most of v20 experimental - but it seems great so far. Thanks.

I realise you're on holiday, but I don't suppose you know/remember how alien hearing works? The "sound" value's set to -0.1 at the moment (i.e. attracts aliens), but I'm not exactly sure what makes sound. Gunfire and explosions, presumably, but what about footsteps?

Edited by Ol' Stinky
Link to comment
Share on other sites

Hey guys!

I see you've managed to find one of the major new features of the AI, in terms of modding. :)

Thanks for taking the time to take a look at the aiprops.xml. As I mentioned in the another thread, most of the current AI issues are probably due to it not being balanced yet.

During the holidays, I'll be balancing it and introducing some other new features.

The sound feature's been disabled for now. It was something I am working on that will attract aliens to shots fired, etc. However as I don't want to provide the AI with info that the player doesn't have (e.g.: footsteps), I disabled it for now until I decided on what it would get.

Once I get my head out of the code, I'll write up a post on how the aiprops.xml works in terms of the behavior values.

Other insights:

- AI should be using the exact same code as the player accuracy calculation (it calls that routine)

- The AI is setup such that if it can shoot, it will. (Min. engagement range + LOS + Min. accuracy threshold + AP == Shoot; essentially)

- If the AI doesn't shoot, and it does when changing this grenade value; there's a bug. Thank you for finding it.

If you see any strange AI behavior; the very best you can do is give me a save which will allow me to reproduce the behavior. I will forever be grateful if you can provide a save game, as it cuts down the time to fix it tremendously.

You can even just PM them to me.

Also; I do read the forums, and whenever I can, I tend to integrate the ideas you guys have. :)

Link to comment
Share on other sites

Other insights:

- AI should be using the exact same code as the player accuracy calculation (it calls that routine)

- The AI is setup such that if it can shoot, it will. (Min. engagement range + LOS + Min. accuracy threshold + AP == Shoot; essentially)

Excellent info/news on both of these. We won't have to worry about the AI doing something completely wacky if mess around with the weapons.

As for Ol'Stinky - A big

HUZZAH!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...