aliens

Author Topic: psyHoTik's experiments  (Read 13316 times)

Offline psyHoTik

  • Sergeant
  • **
  • Posts: 38
    • View Profile
psyHoTik's experiments
« on: March 17, 2016, 08:36:29 pm »
Here I will post my useless, lame, noob, unprofessional, untested, unlicensed builds. They are done mostly for fun and testing but maybe (by accident) some of them will be even playable ;)

Experiment 1 - Alien Snipers
The goal was to give the aliens the ability to shoot at revealed targets they don't personally see, just like X-com soldiers do in most cases (you fire at enemy spotted by another soldier). In theory this could make game more challenging and unarmed or weak enemies would still pose a threat as they could relay your position to their buddies. The build actually works and such game may be even considered fun...

...BUT...

...there is a huge side effect. If you meet an alien during your turn and he saw you, then your soldier will be visible to AI during subsequent alien turn, even if you run into a dense smoke, far away from any enemy eyes or kill the spotting alien. This means this soldier will be sniped even if no longer visible to any alien. The problem is that turnsSinceSpotted is updated every "full" turn (X-com+alien). This idea requires it to be updated every half of the turn, like grenade timers. I wonder if this could be done without corrupting too much... Anyway, feel free to test it yourself :)


Problem solved, now it should work as planned :) The change, however, effectively halved the alien intelligence parameter as TurnsSinceSpotted is updated twice a turn. Multiplying intelligence by 2 will be required to keep the status quo.
« Last Edit: March 17, 2016, 11:01:50 pm by psyHoTik »

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: psyHoTik's experiments
« Reply #1 on: March 17, 2016, 11:12:29 pm »
The change, however, effectively halved the alien intelligence parameter as TurnsSinceSpotted is updated twice a turn. Multiplying intelligence by 2 will be required to keep the status quo.
Can't you do the adjustment in the code that loads the alien stats ? read "n" from the file, store "n*2" in memory.

Offline psyHoTik

  • Sergeant
  • **
  • Posts: 38
    • View Profile
Re: psyHoTik's experiments
« Reply #2 on: March 17, 2016, 11:13:57 pm »
Can't you do the adjustment in the code that loads the alien stats ? read "n" from the file, store "n*2" in memory.
That's what I meant. I'll do it but not today ;)

Offline harre

  • Sergeant
  • **
  • Posts: 45
    • View Profile
Re: psyHoTik's experiments
« Reply #3 on: March 18, 2016, 01:10:35 am »
Can't you make a fork and have your changes there for everyone to see, remember it's GPL code ;)

Offline Slaughter

  • Colonel
  • ****
  • Posts: 282
    • View Profile
Re: psyHoTik's experiments
« Reply #4 on: March 18, 2016, 03:44:39 am »
Looking forward to being sniped from far away by unseen aliens
Do the alien do aimed shots if from afar?

Does this include use of explosives - 'nades, Blaster Bombs, etc?

Offline psyHoTik

  • Sergeant
  • **
  • Posts: 38
    • View Profile
Re: psyHoTik's experiments
« Reply #5 on: March 18, 2016, 09:19:16 am »
Can't you make a fork and have your changes there for everyone to see, remember it's GPL code ;)
Some day maybe :) I need to learn more how the forking works. Besides, at the moment, I don't consider myself good enough to do it in such official way ;) Of course I'll gladly share any code.

Do the alien do aimed shots if from afar?

Well, I'm not sure because I haven't touched the routines for choosing firing mode. But the distance is already included in this process so probably yes.

Does this include use of explosives - 'nades, Blaster Bombs, etc?
Actually, for grenades, blasters and (to some extent) PSI, this was already implemented, even in vanilla. The difference is, that the AI can use this weapons even after loosing visual contact, so implementing this routines for firearms would ruin the gameplay. I restricted sniping only to targets visible to AI in its current turn.

Offline psyHoTik

  • Sergeant
  • **
  • Posts: 38
    • View Profile
Re: psyHoTik's experiments
« Reply #6 on: March 19, 2016, 01:59:46 pm »
Experiment 2 - reworked/balanced Alien PSI

I've implemented mechanics described above for alien PSI. Now they use it mostly like the player do so no line of sight is required to perform PSI attack but the target must have been revealed (spotted by at least one alien) in current turn. This way:
- you won't get PSIed to death on first or second alien turn
- you have some means to defend yourself - as long as you keep you soldiers out of enemy sight, they are safe
- PSI "rod" tactic will not work anymore - unless you expose the "rod" to enemy but it's more probable that he will just get shot.
- on the other hand, alien psionics is not totally impaired by line of sight requirement and still pose a big threat if you get spotted.

I think it's more fair for the player than vanilla mechanics but also more challenging than PSI Line of Sight mod. Please try it yourself :) Sniping aliens are included in this build.
« Last Edit: March 19, 2016, 03:08:51 pm by psyHoTik »

Offline Slaughter

  • Colonel
  • ****
  • Posts: 282
    • View Profile
Re: psyHoTik's experiments
« Reply #7 on: March 19, 2016, 04:30:13 pm »
Personally I don't mind alien PSI as it works much, even if finding Ethereals without PSI protection is ABSOLUTE MURDER. Althrough these rules are nice - its somewhat unfair when I had all my troops and aliens can still psi them. Still, your experiments are very good and such things are where great concepts come from!

Nice to see psi rod not work anymore.

Is there a mod wich makes X-COM PSI line-of-sight while alien PSI is normal? I think that would make perfect sense, considering aliens are Psionic forever while X-COM finds out one of these days, the aliens oughta know more, their third-eyes are opened, so to speak.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: psyHoTik's experiments
« Reply #8 on: March 19, 2016, 04:43:32 pm »
I think the customizable psi and blaster balance mod allows that. It's a really easy thing to mod too.

Offline Slaughter

  • Colonel
  • ****
  • Posts: 282
    • View Profile
Re: psyHoTik's experiments
« Reply #9 on: March 19, 2016, 07:54:29 pm »
Any plans for further experiments?
Say, alien UFOs attack X-COM craftm

Enviado de meu SM-G3502T usando Tapatalk
« Last Edit: March 19, 2016, 08:19:08 pm by Slaughter »

Offline psyHoTik

  • Sergeant
  • **
  • Posts: 38
    • View Profile
Re: psyHoTik's experiments
« Reply #10 on: March 19, 2016, 09:38:24 pm »
Still, your experiments are very good and such things are where great concepts come from!
Nice to hear that. It gives motivation for further work :)

Any plans for further experiments?
Say, alien UFOs attack X-COM craftm
Sorry, but my skills are far too low for such features. I'll focus mostly on battle AI, as it is actually quite easy to understand and modify.

Offline Slaughter

  • Colonel
  • ****
  • Posts: 282
    • View Profile
Re: psyHoTik's experiments
« Reply #11 on: March 19, 2016, 11:25:11 pm »
Battle AI, huh?

Well, how about making the AI:
a) Use smoke grenades if not hiding (the aliens in Apoc are capable of using them)
b) Be able to properly launch well co-ordinate assaults on multiple fronts
c) Act more clever when X-COM is preparing for an assault or camping up the door for reaction shots. Say, one alien opens the UFO door, another throws a grenade.
d) Does the UFO AI know about doors that can be opened in UFO? Pretty sure it is totally ignorant about this possibility, unlike the TFTD AI.
e) Civilians run towards the goddamn Skyranger, or at least towards somewhere hidden, rather than herp-derping around like mind-addled morons. Maybe actually keep some of the "herp-derp" behavior because sometimes people DO act derpy in unexpected situations.
f) PSI-controlled X-COM agents can pick guns and reload them. Always hated that kind of cheesery. Take the mind-control like a man!
g) AI isn't as interested in controlling soldiers unable to harm other soldiers - so no more "give lasers/firearms to psi-wimps so our top Power Armor soldiers aren't threatened anymore by psi". Bonus if the AI is smart enough to send that controlled soldier towards weapons that can harm the soldiers.

I'm sure someone can suggest more.

I'm sure someone can suggest something way better

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11457
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: psyHoTik's experiments
« Reply #12 on: March 20, 2016, 04:10:19 pm »
The Psi mod is great news. It's close to how vanilla works, but feels more fair, more tactical and generally more... advanced.

The aliens sniping from afar is very cool, but I guess some more changes will be needed to make it work nicely. Like for example being able to define sight range during a day, too (OXCE only allows it for the night.

Actually, you can consider this a request on my part. ;)
« Last Edit: March 20, 2016, 04:12:37 pm by Solarius Scorch »

Offline psyHoTik

  • Sergeant
  • **
  • Posts: 38
    • View Profile
Re: psyHoTik's experiments
« Reply #13 on: March 20, 2016, 10:07:57 pm »
Well, how about making the AI:
a) Use smoke grenades if not hiding (the aliens in Apoc are capable of using them)
b) Be able to properly launch well co-ordinate assaults on multiple fronts
c) Act more clever when X-COM is preparing for an assault or camping up the door for reaction shots. Say, one alien opens the UFO door, another throws a grenade.
d) Does the UFO AI know about doors that can be opened in UFO? Pretty sure it is totally ignorant about this possibility, unlike the TFTD AI.
e) Civilians run towards the goddamn Skyranger, or at least towards somewhere hidden, rather than herp-derping around like mind-addled morons. Maybe actually keep some of the "herp-derp" behavior because sometimes people DO act derpy in unexpected situations.
f) PSI-controlled X-COM agents can pick guns and reload them. Always hated that kind of cheesery. Take the mind-control like a man!
g) AI isn't as interested in controlling soldiers unable to harm other soldiers - so no more "give lasers/firearms to psi-wimps so our top Power Armor soldiers aren't threatened anymore by psi". Bonus if the AI is smart enough to send that controlled soldier towards weapons that can harm the soldiers.
You are expecting too much, my friend :) Remember, that human brain has been perfected by millennia of evolution, while alien AI is actually 60 KB of code ;) Your ideas are interesting and reasonable but, sadly, most of them are uncodable or require a huge amount of work for little observable effect. Let's talk them over:

a) probably doable (somehow) but consider the following:
- Apoc is more action-oriented (especially in real-time mode), while UFO and TFTD are more about hiding and seeking and are best know for that you never know where to expect the enemy. Exploding alien smoke grenades would give a hint about enemy position, spoiling some atmosphere
- smoke will hinder AI much more than the player, as aliens, by default, require a visual contact to shoot, unlike X-com agents, who could shoot through the smoke
- it would require creating new object (alien smoke grenade) and changing spawning routines so each alien will be equipped with it.
- if implemented I see two functions for alien smoke: 1. alien is carrying primed smoke grenade, which explodes when alien is killed to cover his buddies. 2. when escape evaluation fails because every available tile is in X-com visual range, the alien throws smoke grenade or just drops it to the ground and then moves. Like I said, however, it won't be easy to implement.
b) very difficult (impossible?) to code (unless you can translate it to algorithms ;) )
c) as above
d) what do you mean? In OpenXcom the same AI is used for UFO and TFTD. It can definitely move through the doors, unless you mean opening doors by "right click", without crossing them which it cannot do.
e) that was exactly my idea, as I always were sorry for this poor guys too :) Unfortunately, as Warboy told me, it is impossible to "tell" the AI where the Skyranger is so this won't work. I will ,however, experiment with civillian AI and see what are the results. You may not believe but they are not acting random - they have routines for hiding and running away, similar to those used by aliens. I think their problem are mostly low health and TUs so they are doomed anyway  no matter how smart they would be. They also quickly "forget" what they were running from, which I will try to change if I'll have some time.
f) I think this one is already implemented if you turn on Alien Pickup Weapons mod. Keep in mind that mind control lasts only for one turn, so they may have not enough time to do it.
g) this one (choosing targets based on carried weapon) may ne even doable... Picking up weapons - see above

The aliens sniping from afar is very cool, but I guess some more changes will be needed to make it work nicely. Like for example being able to define sight range during a day, too (OXCE only allows it for the night.

Actually, you can consider this a request on my part. ;)
I'll see what can be done, but I cannot promise anything :) What exactly you need? Global setting for day/night visibility for the whole mod? Or sight radius as a parameter for given alien race? If we are talking about sniping aliens - do you mean sight range as visual range or the range that alien can shoot at unseen (revealed by spotter) target?

Also, question for the Devs: Is it possible to make AI set grenade timer to more than 0? I can't see what happens next, after grenadeAction is completed (and AI decided to use grenade). Where are the routines for priming and throwing itself?
« Last Edit: March 20, 2016, 10:16:39 pm by psyHoTik »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11457
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: psyHoTik's experiments
« Reply #14 on: March 20, 2016, 10:18:12 pm »
I'll see what can be done, but I cannot promise anything :) What exactly you need? Global setting for day/night visibility for the whole mod? Or sight radius as a parameter for given alien race?

I'd like to be able to set it by armour, just like with night vision. So some atmours are better for scouting, some have severe vision problems, etc. It would also work for unusual settings for aliens (25 tiles in full light, check this out).

If we are talking about sniping aliens - do you mean sight range as visual range or the range that alien can shoot at unseen (revealed by spotter) target?

Nevermind, I was referring to your first idea.