OpenXcom Forum

Contributions => Programming => Topic started by: Hobbes on December 15, 2014, 03:22:20 pm

Title: AI and explosives
Post by: Hobbes 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.
Title: Re: AI and explosives
Post by: Warboy1982 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!
Title: Re: AI and explosives
Post by: Meridian 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?
Title: Re: AI and explosives
Post by: Hobbes on December 15, 2014, 07:01:43 pm
stop telling people how the sausage is made!

Quoting from OpenXcom.org/About/ (https://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.
Title: Re: AI and explosives
Post by: The Reaver of Darkness 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.
Title: Re: AI and explosives
Post by: Hobbes 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.
Title: Re: AI and explosives
Post by: Warboy1982 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.
Title: Re: AI and explosives
Post by: Hobbes 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.

(https://www.openxcom.com/content/modimages/PDURWELV121620141214.png)

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)?
(https://www.openxcom.com/content/modimages/WTTHTHSD121620141221.png)

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?
Title: Re: AI and explosives
Post by: Warboy1982 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.
Title: Re: AI and explosives
Post by: volutar 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.
Title: Re: AI and explosives
Post by: robin 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.


Title: Re: AI and explosives
Post by: Warboy1982 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.
Title: Re: AI and explosives
Post by: Hobbes 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:

(https://www.openxcom.com/content/modimages/EHWSBTZL121620140807.png)

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.
Title: Re: AI and explosives
Post by: robin 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.
Title: Re: AI and explosives
Post by: Hobbes 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.
Title: Re: AI and explosives
Post by: volutar on December 16, 2014, 05:57:34 pm
Being myself a person, who joined this project in 2011, when it just went 0.3, I found it highly "non vanillish" in every possible way, except for VISUAL (visual replication was the only thing that developers could make), and something from not very reliable Ufopaedia.org (mostly gameplay info was taken not from the game observation, not CODE itself).

So, being a perfectionist I took "Ufo defense.exe" and reversed it. Completely. I made many corrections in the https://ufopaedia.org, and actually by my effort favoured OpenXcom into rails of "gameplay replication" from not very viable "visual replication".

I given alot of actual deep info about vanilla x-com insides for the few actual contributors. Warboy became my friend and  main "agent" towards OXC development. He's really good programmer, and v1.0 is actually obliged to him, his passion. Without him it would probably stuck at v0.6.

And if anything you find in OXC doubtful, in terms of being "vanilla", better blame me. Perhaps I didn't explain that correctly to him, or didn't understand that correctly myself. Explosion code for the AI was handled like 1.5-2 years ago methinks?... I don't really remember if that code is of Warboy or Daiky, but actually, looking into vanilla, I can say:

AI is using actual units as throw targets, if it sees them. If not - it trying to use NODES to make max damage.

Code: [Select]
if ( p_AI_Target_UnitPos_addr )
{
  _x = p_AI_Target_UnitPos_addr->x;
  _y = p_AI_Target_UnitPos_addr->y;
  _z = p_AI_Target_UnitPos_addr->z;
}
else
{
  nodeId = xc_BF_AI_Get_Node_Of_Maximum_Grenade_Damage(p_ObData_DAT[curitem->obdata_ref].weapon_damage);
  if ( nodeId == -1 )
    return;
  _x = a_Routes_DAT[nodeId].x;
  _y = a_Routes_DAT[nodeId].y;
  _z = a_Routes_DAT[nodeId].z;
}

And please, stop pestering Warboy, if you want to see TFTD soon.
Thank you.
Title: Re: AI and explosives
Post by: ivandogovich on December 16, 2014, 07:19:19 pm
Thanks for that Explanation, volutar!
I can understand that a thread like this can be frustrating to the devs and warboy particularly, but I really do appreciate how much I've learned through it.  I can understand the danger of knowing how the sausage is made can diminish the game, but I still find this game and incredible piece of work, and I'm thankful and awed by the devs, everytime I play it!  So thanks for all the awesome work, and thanks for the explanation!
Cheers!
Title: Re: AI and explosives
Post by: Warboy1982 on December 17, 2014, 07:01:44 pm
interesting, i had thought it was nodes only in vanilla, but it's clear they used both, so guess i'll have to add node behaviour (or something better) at some point as well.
Title: Re: AI and explosives
Post by: The Reaver of Darkness on December 19, 2014, 12:52:35 pm
I guess I agree that danger from blaster launchers and grenades should be present right from the start. After all, I can't remember getting my whole squad hit much in the original unless I was stupidly leaving them clustered up.

As for the Lightning making your troops open to fire right from the start: this is actually potentially advantageous for your soldiers. If you have to step out from behind a wall to see the aliens, that opens them up to take a shot at you with reaction fire. But if you're already facing them, you can make the first shot. Make it an aimed shot, and kill an alien with a heavy plasma who's got a good line of fire. The one with the pistol and an obstructed path can be shot later, and any facing away from you or any terrorists are last priority.
Title: Re: AI and explosives
Post by: bladum on December 19, 2014, 02:13:00 pm
why not just make this as a global variable in ruleset ? initialGrenadeDelayForAliens with default value of 3
Title: Re: AI and explosives
Post by: jackstraw2323 on December 19, 2014, 03:37:07 pm
I understand if dev's don't want to change but how about allowing the mod on explosives use to be in the unit section of the rules file? That way individual units could be made explosives aggressive if someone wanted. I've got a unit with built in explosives that on terror missions is totally passive until turn 3.
Title: Re: AI and explosives
Post by: Warboy1982 on December 19, 2014, 03:56:08 pm
you could make your own build instead of putting pressure on me?
the source code is publicly available, you can alter it in any way you see fit.
Title: Re: AI and explosives
Post by: Arthanor on February 12, 2015, 08:08:54 pm
While that's a bit harsh of an answer, how about someone made a pull request to implement jackstraw's solution? What's the likelihood of that being pulled into the mainstream OpenXCom?

Making your own build for your mod defeats the purpose of publishing a mod: nobody will use it. Making a pull request to address such a recurrent topic as the early explosives? Might be good for the community as a whole!
Title: Re: AI and explosives
Post by: Hobbes on February 12, 2015, 08:17:00 pm
While that's a bit harsh of an answer, how about someone made a pull request to implement jackstraw's solution? What's the likelihood of that being pulled into the mainstream OpenXCom?

Making your own build for your mod defeats the purpose of publishing a mod: nobody will use it. Making a pull request to address such a recurrent topic as the early explosives? Might be good for the community as a whole!

If you want to make such a build then you'll need to be constantly updating it to the newest nightlies, just like a mod. Plus, having two different builds running around is not a good idea because of the confusion.

Based on the discussion and the reasoning behind the no-explosives choice, I've actually changed my mind regarding this issue because its effect is rather minimal when you consider the whole tactical mission. I doubt that people would actually notice a difference if things were changed to  vanilla. The aliens starting facing the Skyranger has a much bigger (and deadlier) effect, but it is a great idea and the no explosives helps to balance it.
Title: Re: AI and explosives
Post by: Arthanor on February 12, 2015, 08:35:49 pm
I'm not suggesting to make another build, I agree that it is not a good solution. It either splits the community or nobody uses it so it was a waste of time. That's why I'm asking if moving the number of turns before using explosives to a ruleset (I am thinking of it as a weapon property) would be likely to be pulled in the main OpenXCom build. If it is, I might look into doing it (then people could set it to whatever they want and it would end the debate once and for all). If it isn't likely to be pulled, I won't waste my time and try to sustain an alternate build.

I had/have plans to give aliens new ammo in late game: Anti-plasma (anti-matter can be turned into plasma as well as matter, as far as I know). It would be explosive, of course. This restriction means that for the first 3 turns, aliens armed with this new ammo would be totally harmless, which is useless, hence my interest.
Title: Re: AI and explosives
Post by: Hobbes on February 12, 2015, 08:51:44 pm
I was going to discourage you by saying that there might already too many options, but instead I'll simply say: try it. You got a valid reason for the feature and it may get pulled into the main build. And if it doesn't, then you'll have learned how to do it :)
Title: Re: AI and explosives
Post by: Arthanor on February 12, 2015, 09:17:32 pm
Oh, I don't need any discouragement. Already plenty of other things I want to do! If I knew that the feature is likely to get in, I would consider it seriously though.
Title: Re: AI and explosives
Post by: Yankes on February 12, 2015, 09:20:18 pm
I think it could be done on fine grained way, every item with splash damage can have "deley" property that determine when AI can start using this weapon.
This could be too much for master branch but my extended version will accept it.
Title: Re: AI and explosives
Post by: Arthanor on February 12, 2015, 09:49:15 pm
That's what I am thinking. Another weapon/ammunition property that is checked by the AI for when it can bring out a given toy instead of just checking against "3".

It's good to have some support :) After I get the XAE to the stage I want, I think I will look into it.
Title: Re: AI and explosives
Post by: Solarius Scorch on March 20, 2015, 09:54:24 am
I also support de-hardcoding this value. The reason is, it's a source of discontent and confusion for so many people that just giving them the tool to change it would probably save everyone a lot of trouble. :)

Besides, some mods are much more influenced by this than others. For example, Piratez is a fast, close-quarters game, where in many instances most enemies are dead by 3rd turn, or you're doing something wrong. This makes grenades much less viable for the AI, and especially when explosives are the only weapons this particular unit has.

And if we do have this configurable via ruleset, can we please have the number adjustable too? (Something like explosivesDelay: X, where X is the number of turns, and 0 means they can be used straight away.)
Title: Re: AI and explosives
Post by: Meridian on March 20, 2015, 10:52:15 am
I support it too.
And yes, I know you have introduced it willingly and after a careful consideration... feel free to ignore me, but I just feel the need to say what's in my heart.

I even thought of building a custom version of OpenXcom for my LP, because of this... but I was too lazy... so instead I just banned the usage of any throwable explosives for XCOM side during the first 2 turns too. But sometimes I forget it and get angry that I break my own rules.
Title: Re: AI and explosives
Post by: redv on March 20, 2015, 04:25:23 pm
Done. Unhardcoded first turn when AI can use grenades.
PR: https://github.com/SupSuper/OpenXcom/pull/993

I support it too.
And yes, I know you have introduced it willingly and after a careful consideration... feel free to ignore me, but I just feel the need to say what's in my heart.

I even thought of building a custom version of OpenXcom for my LP, because of this... but I was too lazy... so instead I just banned the usage of any throwable explosives for XCOM side during the first 2 turns too. But sometimes I forget it and get angry that I break my own rules.

Totally agree about custom build.
Title: Re: AI and explosives
Post by: Solarius Scorch on March 20, 2015, 09:30:45 pm
Done. Unhardcoded first turn when AI can use grenades.
PR: https://github.com/SupSuper/OpenXcom/pull/993

Warboy, pretty please. :)
Title: Re: AI and explosives
Post by: robin on March 21, 2015, 02:38:47 pm
Awesome!

I already have a (outdated) fork of openxcom; now I need to understand how to update it and add your commit, possibly without nuking the whole openxcom project in the process.
Title: Re: AI and explosives
Post by: Arthanor on March 22, 2015, 08:33:10 pm
That's a great start, but wouldn't it make more sense to add it to the ruleset as a weapon property?

For mods which gives new weapons to the AI (ex.: A human faction with a rocket launcher like the hybrids from Solarius), this won't work.
Title: Re: AI and explosives
Post by: redv on March 22, 2015, 11:38:35 pm
Good point.
Done: https://github.com/SupSuper/OpenXcom/pull/996/files
Title: Re: AI and explosives
Post by: Arthanor on March 23, 2015, 01:28:24 am
Nice! Thank you for implementing this :D Now to hope that it will be pulled in..! If not, I'll have to pull it into my local repo before compiling. This is too good to miss.
Title: Re: AI and explosives
Post by: Dioxine on March 24, 2015, 04:24:53 pm
Blanket unhardcoding usage of area damage (HE stun & Incendiary) in the Variables section works better IMO. I don't want to go through dozens of weapons, setting this variable up for every single one, since either I want aliens to be able to fight back, or not. Either way, I don't intend to exclude any weapons from these rules.
Title: Re: AI and explosives
Post by: robin on March 24, 2015, 06:32:27 pm
Blanket unhardcoding usage of area damage (HE stun & Incendiary) in the Variables section works better IMO. I don't want to go through dozens of weapons, setting this variable up for every single one, since either I want aliens to be able to fight back, or not. Either way, I don't intend to exclude any weapons from these rules.
Yeah, it is a "game-wide" setting for me too. Weapon-by-weapon makes sense for making exceptions to a general desired value: let's say you want 0 delay for everything (and thus you set the general delay to 0) but the blaster launcher because you feel it's too overkill.
To be fair though, copypasting a single line around isn't a big deal (I know The Piratez mod has tons of weapons, you fingers will cramp a little but you'll be fine in the end :P).
Title: Re: AI and explosives
Post by: Solarius Scorch on March 24, 2015, 07:28:22 pm
Yeah, it is a "game-wide" setting for me too. Weapon-by-weapon makes sense for making exceptions to a general desired value: let's say you want 0 delay for everything (and thus you set the general delay to 0) but the blaster launcher because you feel it's too overkill.

+1.

To be fair though, copypasting a single line around isn't a big deal (I know The Piratez mod has tons of weapons, you fingers will cramp a little but you'll be fine in the end :P).

Yeah, but it's not very elegant, is it? :)
Title: Re: AI and explosives
Post by: Arthanor on March 25, 2015, 12:45:50 am
A general/default setting for the # of turns before AI can use explosives could make sense, but it removes some of the versatility of it.

Consider a terror unit that blows itself up as an attack (doesn't the cybermite do that?). You might want to enable this unit (otherwise it is useless for 3 turns), but not other weapons.

Having the setting for each weapon, with a default at 3 to keep it like Warboy intended, enables the most customization. Adding a line for weapons that need to be changed is not that bad. Relatively, it is a very small addition to the size of any mode (given that there are other lines to add the explosives weapons, and a lot of other added stuff that doesn't change).
Title: Re: AI and explosives
Post by: Yankes on March 25, 2015, 12:58:04 am
I don't think that mix explosive ammo and blast launcher in one category is good thing.

I understand concerns of modders and I think that best way to handle it is have overall delay that can be overrider by weapon.
This will best handle common case and some exceptions.
Title: Re: AI and explosives
Post by: volutar on March 25, 2015, 07:48:01 am
Reasoning behind this "wait for N turns to use explosives":
1. Aliens are turned towards the craft since first moments of battlescape (all 100% of them for superhuman)
2. 2/3 vanilla crafts (i.e. most of them) of XCOM1 have wide opened access during AI turn, and they simply can blast whole team. Lightning craft doesn't suffer from this issue, and technically if you're using it, you won't suffer much from AI being using grenades from the beginning.

TFTD crafts don't have widely opened doors (all crafts have auto doors), and this "wait for N turns" becomes obsolete at least, and really gameplay altering at most.

The weapon list, which can cause this "storm of whine" because of vanished team in 1st turn, is much shorter than list of "issue safe" weapon. Logicaly, it'd be much easier and better to make this variable exactly for the alien grenade and blaster launcher. There's no other weapon causing initial issue, and no need to touch anything else. And by default all kind of weapon is usable from the beginning.

And since TFTD is in development, this change is in "todo". And really, there's no need to bump this thread endlessly.
Title: Re: AI and explosives
Post by: Dioxine on March 25, 2015, 09:38:22 am
2. 2/3 vanilla crafts (i.e. most of them) of XCOM1 have wide opened access during AI turn, and they simply can blast whole team.

Yup, they're flying coffins. So what? A game ought try to kill a player, not just fiddle with him a bit then let him win :)
Truth is while this is a lifesaver in vanilla (even if it's as non-vanilla and pro-casual 2010's whiner generation as it gets), if you play a mod with a properly designed dropship (an offensive, not Skyranger's defensive, layout), the battle is often basically won by turn 3. And if you don't - who said you're supposed to win every time? Drop these smoke grenades under your feet and start praying.
But it seems you have arrived at a best possible solution (behaviour consigned to select vanilla weapons), no point in dwelling on the topic.

To be fair though, copypasting a single line around isn't a big deal (I know The Piratez mod has tons of weapons, you fingers will cramp a little but you'll be fine in the end :P).

I won't, the feeling of having just done a monkey's job won't wash away that easily :)
Title: Re: AI and explosives
Post by: Arthanor on March 25, 2015, 07:23:38 pm
The weapon list, which can cause this "storm of whine" because of vanished team in 1st turn, is much shorter than list of "issue safe" weapon. Logicaly, it'd be much easier and better to make this variable exactly for the alien grenade and blaster launcher. There's no other weapon causing initial issue, and no need to touch anything else. And by default all kind of weapon is usable from the beginning.
Having a fix for only the alien grenade and blaster launcher leaves all modded weapons hanging. Extending it so it can be used for modded weapons is much better (or just generalizing it to something that sets the # of turns for all explosive weapons, although that's not as good).

Quote
And since TFTD is in development, this change is in "todo".
Which of the implementation is in "todo"?
Title: Re: AI and explosives
Post by: volutar on March 25, 2015, 08:46:48 pm
Having a fix for only the alien grenade and blaster launcher leaves all modded weapons hanging.
It seems you misunderstood the logic of update. It should make this temporary usage taboo value a part of item description, when it needed, with 0 as default. And will be set for just two items (i.e. blaster launcher =3, alien grenade =3) in xcom1 ruleset. If you want to make different values for your modded weapon - no problem. It's just the way of unhardcoding, and making this feature game/supermod specific.
For more challenging play someone could make a mod setting these explosive weapon to 0.
Title: Re: AI and explosives
Post by: Arthanor on March 25, 2015, 10:04:24 pm
Which is why I was asking which implementation was on your ToDo list. I am happy to learn that it is the one I was hoping for. Thank you.
Title: Re: AI and explosives
Post by: hellrazor on March 26, 2015, 10:30:55 am
Well this might be a little bit off topic.
But would it be possible that the AI throws grenades (if avaible and in throwing range) onto remebered postion of multiple troops?

Smoke cover in the moment acutally prevents this pretty good, because the alien have to approach you to see you, but they still know were you were,
if they have seen you before. And in this case let them throw a grenade into the smoke ( if xcom units have been spotted in the position were hte smoke is now).
Title: Re: AI and explosives
Post by: volutar on March 26, 2015, 03:46:18 pm
They already can target and hit "remembered" troops, standing out of view, depending on "intellegence" value, of course.
Title: Re: AI and explosives
Post by: podbot on August 12, 2015, 04:24:59 pm
Has this no explosives before turn 3 behaviour been changed for TFTD?

Just had an interesting game where most of my team were killed turn 2 by a sonic grenade.

I killed one Lobsterman inside the shipwreck on turn one. On turn two I was greeted by several lobstermen just outside my ship, (also shot two of my aquanauts). Only managed to kill off two them. Then ended my turn and my team got killed by the grenade.

I know the landingcraft has a door so I guess could leave most of my team inside the ship and try to clear the immediate area around the ship before disembarking.

See attached save file. The save is on turn 3, the AI just had it's second turn. I'm playing with the openxcom_git_master_2015_08_10_1809 nightly.
Title: Re: AI and explosives
Post by: Meridian on August 12, 2015, 04:30:26 pm
Has this no explosives before turn 3 behaviour been changed for TFTD?

Currently it is set to 3 for xcom1 and to 2 for xcom2.
I don't know if it is intentional or not.
Title: Re: AI and explosives
Post by: Hobbes on August 12, 2015, 04:37:50 pm
Has this no explosives before turn 3 behaviour been changed for TFTD?

Currently it is set to 3 for xcom1 and to 2 for xcom2.
I don't know if it is intentional or not.

On TFTD it is set for 2 turns:
Code: [Select]
turnAIUseGrenade: 2
turnAIUseBlaster: 2
Title: Re: AI and explosives
Post by: Warboy1982 on August 12, 2015, 04:59:11 pm
that's intentional.
deployment from tftd landing crafts take on average a turn less due to no having ramp to overcharge your units for movement, and the doors being mounted on the crafts to protect any troops inside from being seen or targetted. the main problem with xcom1 that this was trying to address was getting nuked in your skyranger or on the ramp, but as this is less of an issue in tftd it was adjusted accordingly.