Jump to content

UFO AI patch


kyrub

Recommended Posts

This is a small AI patch for X-COM Enemy unknown:

It should have visible effect on AI combat performance, making it generally more dangerous to player. The improvement should be most noticeable in close-combat action, on terror-sites or in Alien ships. The Aliens should now represent bigger danger to player's tanks and armored units, as well as to his psi-defense tactics.

 

The patch does *not* change any game mechanics, alien or weapon stats. The UFO defense game has the same rules as ever. As far as I am aware, it can be used both with Xcomutil and UFO extender. The patch fiddles exlusively with the way AI decides its actions. The only exception to this rule is the global re-setting of AI_energy_factor [uNITREF 45] to 1. This was most probably a bug in the original game, causing energy exhaustion.

 

Features

- Aliens use a lot more of autoshot and snapshots, aimed shots only on long distances

- Alien energy spending problem fixed

- Aliens more likely to use grenades with many targets

- melee aliens are no more shy of > 3 X-com soldiers

- melee aliens will be a lot more decisive

- AI psi targetting is more random

- AI may attempt to psi attack even a relatively psi strong unit

- non-aggressive Aliens will try to snipe you more often

- Aliens trying the base assault should be much more aggressive

- Aliens will pick up their rifles after panicking

 

Usage:

- a fresh install of X-COM EU is recommended!

- extract the zipfile to your UFO folder, overwrite everything

- (optionnally) install UFO Extender, Xcomutil or whatever

- run with the appropriate exe (UFO defense.exe or geoscape.exe or UFO Loader.exe with extender...)

 

Thanks and full kudos:

- Seb76 for disassembling the game

- Xusilak for porting the code to TFTD

- Volutar for his 'AI pick objects' discovery

- BombBloke for pointing out at the AI functions from demoversion

UFO_ai_patch_v1.zip

aipatch_DOS.zip

UFO_ai_patch_v1_MOKtime.zip

Link to comment
Share on other sites

:) Wow, interesting. Is this the first ever AI patch? Is it possible to remove the "AI sees all" after 20 turns, too?

That is super easy. I just don't know if it is desirable. I tried to be as conservative as possible.

 

Btw, not only the AI sees all after 20 turns, it also auto-decides to go for x-com soldiers after those 20 turns. That really feels a bit stupid, instead of waiting for interrupts or any other possible tactics (searching cover). Maybe disabling this second part (auto "combat mode") could do the job as well.

Link to comment
Share on other sites

"AI sees all" after 20th turn meant to be a helper for "last alien" hunt. If you disable it, you'll probably get more lurkish aliens. I doubt people will like it :P. Though as a side-effect of this "all map revealing" is instant panic of alien units if there are <3 of them left... well it's another story.
Link to comment
Share on other sites

"AI sees all" after 20th turn meant to be a helper for "last alien" hunt. If you disable it, you'll probably get more lurkish aliens. I doubt people will like it :P. Though as a side-effect of this "all map revealing" is instant panic of alien units if there are <3 of them left... well it's another story.

Ah, Volutar, the one-who-found the picking up! -- With all respect, are you sure about the panicking? The condition reads like this: IF turn > 20 OR if aliens < 3 THEN make every soldier visible (loop). No talk of panic, if I'm not wrong. Other than that, I generally agree with the "last alien" bit. It's pity it is so exploitable. I thought about putting some +RNG turn there instead of hardcoded 21st turn.

 

It would be nice to get rid off the grav lift bug (Aliens cannot shoot down through grav lift). Do you have any idea about the whereabouts?

Link to comment
Share on other sites

  • 2 months later...
Ah, Volutar, the one-who-found the picking up! -- With all respect, are you sure about the panicking? The condition reads like this: IF turn > 20 OR if aliens < 3 THEN make every soldier visible (loop). No talk of panic, if I'm not wrong. Other than that, I generally agree with the "last alien" bit. It's pity it is so exploitable.

Panic is a side effect of instant revealing of ALL XCOM units on the map. Morale depends on how many of your solders been killed AND how many enemy units this exact unit sees (sort of a fear factor).

It would be nice to get rid off the grav lift bug (Aliens cannot shoot down through grav lift). Do you have any idea about the whereabouts?

Actually have no idea, because I was never aware of this nor read about. Are XCom units capable of shooting down through grav lift, or it's just a AI bug?

See, AI theoretically could be enabled for XCOM units too, and all "line of fire" or "line of sight" algorighms work for Xcom/Civs/Aliens exactly the same way. It could be line of sight bug or line of fire, when you see enemy but cannot shoot... In both cases same restrictions (this gravlift block bug) applied to XCOM units too.

 

After kind of "vacation" I've returned :P.

Link to comment
Share on other sites

I wish you could 'weaken' psi capabilities to only I SEE YOU (same as in Apoc). That way psi wouldn't be too brutal yet It still would be dangerous

 

The AI patch does *not* change any game mechanics (my Icing mod does = the difference). But I_see_you_psi option may be introduced with UFO extender. Note that you may use Extender AND AI patch together, by installing Extender and then overwriting the exe with AI patch.

 

 

- I'm sorry for not being able to react here. Sadly, in coming month, I don't see any improvement. -

Link to comment
Share on other sites

Actually have no idea, because I was never aware of this nor read about. Are XCom units capable of shooting down through grav lift, or it's just a AI bug?
It's an AI bug. Furthermore, the AI can reaction-shot down grav lifts fine; it's just intentionally shooting down grav lifts that's impaired.
Link to comment
Share on other sites

It also varies depending on the size of the lift. 2x2 lifts like those in the entry points to alien bases or the 3x3 lift do allow you to shoot down them from an angle, but 1x1 lifts don't let either X-Com or aliens shoot down. At least, not directly to the tile directly below if you're standing on the lift. Since the aliens are normally bound by the move nodes, they won't often stray off their path and end up standing at advantageous angles around the lift to be able to shoot down them.

 

While X-Com and alien units are affected by this, the aliens are unfortunate in that they are often the ones caught on the wrong side. :P

 

TFTD fixed this by making the lift landing solid, so no one can shoot up or down. I think this was a fair solution.

 

- NKF

Link to comment
Share on other sites

TFTD fixed this by making the lift landing solid, so no one can shoot up or down. I think this was a fair solution.

 

- NKF

 

I belive you are only talking about the green puddles in interior alien colony.

 

I know that you can destroy synonium device in Alien Artefact mission with DPL and that is on the top flor while lift is on the bottom.

Same goes for the lift on ships (human ships that is).

Link to comment
Share on other sites

  • 2 months later...

Hi,

 

first I want to thank kyrub for providing this interesting patch. I downloaded the CE version and applied it on top of seb's Ufo Extender. So far this seems to work alright. So with this setup I started a new game to try out the behavior of the more intelligent aliens. So far though they seem to be quite unlucky. I came upon 2 incidents (crashed UFOs) and had a very smooth mission against floaters and a mostly easy going mission against sectoids.

 

There are two things I noticed though and I am not sure if they came with the patch, my mixed setup with UFO extender or are just cirumstance ?!

 

First, I seem not to get any visible hidden movement in the aliens turn - thrice I saw aliens right at the start of my turn without noticing them during the alien turn ? Secondly I bought some rifles and brought them to the second mission and was surprised to find out they were not loaded, when I assigned them to my agents. Maybe this happened without the ai patch too, but I never recognized this before ... Can anyone confirm this behavior ?

 

Finally something I am not sure at all if it is related. At the end of the second mission I had a small scout surrounded, opened the door (sebs mod) and saw two sectoids right in front of me. I threw a grenade on the first field and left the entrance area (one step away). On the alien turn the grenade blew up and killed the remaining 2 sectoids. Now I was surprised that I have 3 wounded agents which were outside the scout when the grenade went up ? Don't the ship walls protect me from the blast ??

 

Anyway I am having great fun and looking forward for all innovative extensions to UFO.

 

Thanks and Cheers,

Michael

Link to comment
Share on other sites

  • 3 months later...
Any chance that "no retaliation fix" (The retaliation mission is stopped when the battleship is shot down by the base defense) from your Icing Mod will be implemented into this patch? Or may I ask you to point which offset values should be changed to fix it?
Link to comment
Share on other sites

Hi ArtAndr, welcome to Strategycore forums.

 

Retaliation: I am against including the "fixes" that may be features of the game. I did not include it because now I am really inclined to believe the repeated retaliation is not a bug. It is just a badly (IMhO) implemented idea: basically, since Aliens know where to find you, it is logical they will re-try the attack. That's why you should build many base defences, to reduce the risk of base attack and its loss.

 

The idea backfired mainly due to the fact that the base defense itself is quite easy, once you change the base pattern, and there is no need to build expensive defences... It's easy to defend BUT it is frustrating and boring to do it every month.

 

Any other feedback is welcome.

 

 

--------------------

Fix it yourself if you want to:

 

address X-Com EU CE

0x48763

68A00000006A3F6A0AE8EF5101 ==> 0FBF4F1E66C7048D80B8490000

 

0x4879D

44 ==> 38

 

Looking at the fix, I was really lazy at the time. So, be cautious to use this with the Extender feature "quick resolution of base defense sequence". It may / may not break the game.

Link to comment
Share on other sites

Thanks for answering, Kurub! My point of view: if aliens stop sending dropships after unsuccessful base assault, they should as well stop it after losing their ship during landing attempt. That's about fix.

What about feedback: a lot more auto's, yeah. Melee aliens more dangerous, a Reaper bit my soldier! At last!

That's all for now. Honestly, I played not much yet, a bit on modding spree now. You know, that feeling, when you find information, and realise you CAN change this thing you always considered odd... and that thing too (oh, I cannot change that thing myself, so i'll try to take it from other's mod)... rebalance here a bit... damn, I don't want to play it after all. That's why I don't install your Icing Mod (althougt like all it's features), just want to try to fine-tune game for myself. Thanks again for help!

 

P.S. Don't you mind if I ask some questions here, if I get some?

 

P.P.S Sorry for poor English :)

Link to comment
Share on other sites

  • 2 weeks later...
The patch fiddles exlusively with the way AI decides its actions.

 

Just went very excited after reading this topic for the first time, I thought it wasn't XCOM related!

 

My question is... how does the AI decide its actions? :clapping:

Link to comment
Share on other sites

Hmm... my knowledge of X-COM AI is actually quite scattered. Few bits here, few bits there. The big image is out of my grasp. What exactly would you like to know?

 

Sorry, I'll try to be more specific. You mention on your original post that the patch changes the way the AI chooses its actions. From that phrasing I'm supposing that you have some idea of the decision making processes that the AI follows while moving/firing/etc.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...