Author Topic: AI and explosives  (Read 35120 times)

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
AI and explosives
« on: December 15, 2014, 03:22:20 pm »
Perhaps the best advantage of splaying the troops out at the start is the ability to kill several aliens in the first turn and spread everyone out quickly. This can be invaluable for terror sites, and prevents the aliens from using explosives to kill off the majority of your crew early on.

FYI: in OpenXCom the AI doesn't use grenades before turn 3.

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: AI and explosives
« Reply #1 on: December 15, 2014, 04:25:32 pm »
FYI: in OpenXCom the AI doesn't use grenades before turn 3.
stop telling people how the sausage is made!

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9099
    • View Profile
Re: AI and explosives
« Reply #2 on: December 15, 2014, 05:33:12 pm »
Yeah, I wish I could forget this one too... takes a LOT of pressure away from me. Could it be made configurable once you have nothing else to do?

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: AI and explosives
« Reply #3 on: December 15, 2014, 07:01:43 pm »
stop telling people how the sausage is made!

Quoting from OpenXcom.org/About/

"The goal of the project is to bring back the tried and true feel of the original with none of the issues."

I don't recall aliens using grenades on your soldiers the moment they get off the Skyranger being a technical issue on the original game in years of playing. In fact, I rather consider it part of the 'tried and true feel of the original', since losing half your squad to an alien grenade is part of those 'rage quit' moments that characterize the original game.

And having these kind of changes made into OpenXcom, that make a real difference from the original game, without people knowing about them isn't something I agree with either. And specially when modders are expecting the original's game behavior when working on their stuff, which is this case.
« Last Edit: December 15, 2014, 08:56:12 pm by Hobbes »

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: AI and explosives
« Reply #4 on: December 16, 2014, 02:10:13 am »
Kind of takes off the pressure to get everyone out of the ship before a blaster bomb whips around the corner and into your Skyranger.

I'd make it so that the aliens cannot fire blaster bombs into places that are not seen by them but are seen by another alien, until turn 3 then they can. Then you only have to worry about getting your Skyranger blastered before removing troops if:
1.) an alien with a blaster launcher starts nearby
2.) you make a hole in the nearby ship, revealing aliens with blasters
3.) you take too long to step out

It would still happen, but less than it did in the original.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: AI and explosives
« Reply #5 on: December 16, 2014, 02:46:02 am »
Kind of takes off the pressure to get everyone out of the ship before a blaster bomb whips around the corner and into your Skyranger.

I'd make it so that the aliens cannot fire blaster bombs into places that are not seen by them but are seen by another alien, until turn 3 then they can. Then you only have to worry about getting your Skyranger blastered before removing troops if:
1.) an alien with a blaster launcher starts nearby
2.) you make a hole in the nearby ship, revealing aliens with blasters
3.) you take too long to step out

It would still happen, but less than it did in the original.

You missed my point: I definitely prefer the pressure of being grenaded or blaster bombed by the aliens right from turn 1, like the original. Changing the AI just to make it easier on the player... well, to me that's just not the XCom spirit.

But getting back on topic, I mentioned the fact that the new Lightning configuration might make landings a bloody mess, because the player might not have a chance to react. With alien grenades and blaster bombs, you can do several things to lessen the chance of getting hit. But if you tried the new configuration and it isn't as bad as I imagine it (although I still suspect that 5 Cyberdiscs might be a total nightmare in some scenarios) then great.
« Last Edit: December 16, 2014, 02:51:49 am by Hobbes »

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: AI and explosives
« Reply #6 on: December 16, 2014, 05:50:37 am »
A: the pathfinding for blaster launchers is MUCH more advanced in openxcom.
B: the grenade position selection doesn't use nodes in openxcom, meaning aliens can throw grenades ANYWHERE.
C: the aliens face the ramp on spawn in openxcom, meaning stun launchers are probably already pointed at you, and all the aliens know exactly where all your guys are. (see points A and B for reasons why this might constitute a problem)

this isn't changing the AI to make it easier on the player, this is balancing out carefully considered alterations and deviations from the original. it is also stated somewhere that 100% replication of the vanilla AI is impossible, and this is true. the AI IS different in openxcom, and this was a well considered alteration i made with the previous points (and others) in mind.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: AI and explosives
« Reply #7 on: December 16, 2014, 07:23:25 am »
B: the grenade position selection doesn't use nodes in openxcom, meaning aliens can throw grenades ANYWHERE.

Looks to me the aliens can already throw grenades ANYWHERE in the original game, regardless of what they use the nodes for.



This screen capture was just taken from the CE version of the original game, using the debug mode of the UFOExtender editor (thus it appears "Snakeman Navigator" since it's the end of the AI turn).

Quote
C: the aliens face the ramp on spawn in openxcom

Do they? Care to explain this then (version 1.0 btw)?


Even if this is a bug, setting the aliens to automatically face the ramp adds close to nothing to OpenXcom since the player can simply drop a smoke grenade at the bottom of the ramp and wait 1 turn before disembarking. In fact, knowing that aliens will always face the ramp favors this tactic even more than on the original, since in the original there are situations where you can disembark without using this tactic.

Any other reasons why aliens can't use grenades during the first two turns?
« Last Edit: December 16, 2014, 07:46:55 am by Hobbes »

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: AI and explosives
« Reply #8 on: December 16, 2014, 08:56:56 am »
1: that's what we call a deviation, they missed the spot they were aiming for.
2: i had to ramp that down, it's now a percentage chance based on difficulty, plus there's code to make aliens face in through windows on spawn.
3: please stop this crusade, i wouldn't have said or done these things if i didn't know what i was doing or talking about.
4: i don't much like your tone. if you wish to have a civilized debate, i'm open to it, but if you're going to antagonize me like this, I'll just ignore the thread and move on with my life.
5: i'd really prefer to have this discussion in private, rather than polluting this guy's thread and laying all the internals bare. as such i am moving these posts elsewhere.
« Last Edit: December 16, 2014, 12:36:20 pm by Warboy1982 »

Offline volutar

  • Colonel
  • ****
  • Posts: 351
  • Vanilla digger & Quality assistant
    • View Profile
Re: AI and explosives
« Reply #9 on: December 16, 2014, 09:01:17 am »
Hobbes, could you please make screenshots which will fit 1024 browser width? (pixel size 2x2 is just fine) Keep in mind not all of us have 4k modern displays, and maximizing browsers.

Thank you.

P.S. It also related to Ufopaedia articles you recently made.

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: AI and explosives
« Reply #10 on: December 16, 2014, 12:05:15 pm »
I too would like to be (potentially) exploded from the very first round.
Makes the disembarking phase especially dreadful with all your men amassed like that, and, to me, it's fun; without it, I'm like: "whatever, nothing too catastrophic is gonna happen anyway".
The best (well, actually depends on feasibility) solution would be to give the option to disable the block, for us masochists purists.



Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: AI and explosives
« Reply #11 on: December 16, 2014, 12:19:02 pm »
but it's not pure, if it was pure, they'd use nodes and have inferior pathing on blaster launchers, that's my point. the way they use explosives is completely different to begin with, so the "purist" argument is moot. the AI is different in openxcom: this is a well known and indisputable fact. this aspect of that difference is completely justified, and was added for a good reason. "make it an option" is a total cop-out of a solution, all it gains us is an option screen that takes two days to sift through.
« Last Edit: December 16, 2014, 12:36:44 pm by Warboy1982 »

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: AI and explosives
« Reply #12 on: December 16, 2014, 04:04:05 pm »
1: that's what we call a deviation, they missed the spot they were aiming for.

I've edited URBAN07.RMP and deleted all the nodes from that map. The AI didn't need them to use grenades on that cluster of soldiers:



Quote
2: i had to ramp that down, it's now a percentage chance based on difficulty, plus there's code to make aliens face in through windows on spawn.

That's a good adjustment.

Quote
3: please stop this crusade, i wouldn't have said or done these things if i didn't know what i was doing or talking about.

4: i don't much like your tone. if you wish to have a civilized debate, i'm open to it, but if you're going to antagonize me like this, I'll just ignore the thread and move on with my life.

I merely started this thread informing The Reaver of Darkness of how the AI behavior was different from the original. You told me to shut up with the salami mention. I stated afterwards why I didn't agree, and more important why I thought it was necessary to mention that change to a modder.

From the following discussion I (and a lot of others who aren't capable of understanding the code) learned a lot more about the logical reasons that made you do those changes, and might have made it easier to accept them. Before, the only reason presented by you for this change was merely to prevent squad wipes, which was an argument people a few had issues accepting since to us squad wipes are a major part of the original game.

If I'm on a crusade, then above all it is to improve OpenXcom, while keeping it as true as possible to the original game, and make mods as good as possible. If that results on me questioning some of your choices then please stop looking at them as personal attacks, because that's not their intention. And the same applies to me giving ingame examples of the original game that contradict your interpretation of the original code should act.

Finally if you didn't like my tone, then I apologize. But I'll also add that your attitude can border on "I know better than everyone so shut up" sometimes, from my point of view. And that doesn't help the discussion either. I respect your work in OpenXcom, but that doesn't mean you know everything about the original game. The same way that I've been playing the original game for a long time and I've learned a lot about it from experience, but I always try to open to learning new stuff about it.
« Last Edit: December 16, 2014, 05:45:15 pm by Hobbes »

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: AI and explosives
« Reply #13 on: December 16, 2014, 04:07:44 pm »
but it's not pure, if it was pure, they'd use nodes and have inferior pathing on blaster launchers, that's my point. the way they use explosives is completely different to begin with, so the "purist" argument is moot. the AI is different in openxcom: this is a well known and indisputable fact. this aspect of that difference is completely justified, and was added for a good reason. "make it an option" is a total cop-out of a solution, all it gains us is an option screen that takes two days to sift through.
I understand that the AI is different (and more deadly with explosives), and because of that it won't be "pure" anyway, block or not.
My argument is not purism, or specifically "mechanical purism"; I'm talking from the "feeling", standpoint.

I think you're implying that the block is in place because otherwise, with the new AI, you'll get exploded too easily-frequently.
The question is: how much more frequently?
Because, to me, the lack of those "shit happens" moments, making up the dread that accompanies the disembarking phase, adversely affects in a greater way than them happening "reasonably more frequently".
Form what I've played of openxcom the aliens seem to use explosives "normally" -yes, it seems more effective in using grenades, they seem to be thrown more "in the right spot" (this is likely due to grenades not using nodes as you described I guess?), but nothing unreasonable to handle.
You of course know this information precisely to make the call. Ideally I would accept the tradeoff of some extra "first turn squad wipes" to play with the explosives unblocked.

Anyway. I'm still fine with the block.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: AI and explosives
« Reply #14 on: December 16, 2014, 04:44:02 pm »
The question is: how much more frequently?
Because, to me, the lack of those "shit happens" moments, making up the dread that accompanies the disembarking phase, adversely affects in a greater way than them happening "reasonably more frequently".
Form what I've played of openxcom the aliens seem to use explosives "normally" -yes, it seems more effective in using grenades, they seem to be thrown more "in the right spot" (this is likely due to grenades not using nodes as you described I guess?), but nothing unreasonable to handle.
You of course know this information precisely to make the call. Ideally I would accept the tradeoff of some extra "first turn squad wipes" to play with the explosives unblocked.

Anyway. I'm still fine with the block.

How frequently may be one answer to this whole question.

From my testing on my last post the original AI does not use nodes and can toss grenades anywhere, so the only two apparent factors that can  influence the efficiency of grenades are the Throwing Accuracy of the alien (which dependents on its stats) and the set of conditions that the AI goes through when deciding to use a grenade.
One difference noticed between UFO and TFTD was that the aliens were more likely to use grenades in the latter. Whatever the cause of this, one thing that could be consider is to introduce a random roll (if it doesn't exist already) for alien grenade use with different settings for each part of combat.
As Warboy said, the aliens will spawn facing the Skyranger, which is a good idea, so it would be sensible to balance this by giving the aliens a lesser chance of using grenades during the initial turns. It would allow the "shit happens" during the disembarking phase moments (and make the masochists happy) while lessening down fears that the game might be too hard for other players.
« Last Edit: December 16, 2014, 04:51:55 pm by Hobbes »