[A14] Grenade Fix v1.1

Started by TheFlameTouched, July 22, 2016, 03:32:54 PM

Previous topic - Next topic

TheFlameTouched

Hey guys, this tiny mod happened because I'm bored and slack brought up how its stupid you can throw grenades at your own pawns feet. So here is a fix that adds a minimum range to grenades = to the grenades splash damage radius +0.1. This should keep your pawns from killing themselves with grenades. Also applies to emp grenades and molotovs and all of the rocket launcher type weapons. (Excluding the ones you can't use, since hey, who cares if a centipede blows itself up.)

Download Grenade Fix v1.1 Here

Do whatever you want with this mod, just no monetization.

Changelog:
v1.0 - Gave grenades a min range.
v1.1 - Now gives launchers a min range.

kaptain_kavern

Ha that's clever. Nice idea
Thx for this mod

lost_RD

This was needed. Interesting that this def was never used before, I guess Tynan changed AI in A14.

TheFlameTouched

I'm not sure I follow you as the defs were being used by core :P i just added a line where applicable to add a minRange check

lost_RD

My bad, I meant tag rather than def  ;D

stigma

Does this apply to other explosive weapons like rocket launchers? If not then it probably should. A lot of raiders seem a little too indifferent about shooting rockets at their own feet and killing themselves along with your pawn.

-Stigma

TheFlameTouched

I was gonna ask if you read the post, but I see now that aside from the changelog I didn't mention doing that :P Yes it does also affect rocket launchers, of all types.

ThiIsMe007

Raiders also have no issues throwing grenades at my colonists while these are fighting in melee with other raiders.

I usually have enough time to move my colonists back to avoid the blast, but melee raiders react slower and therefore often die.

TheFlameTouched

Yep, thats not something this mod changes. This one deals purely with the user of the grenade or rocket launcher checking to make sure they won't blow themselves to pieces if they fire. I haven't touched anything else for it, so raiders (and colonists) will still potentially teamkill each other by trying to attack and enemy thats close to a friendly.

ThiIsMe007

Yes. What your mod is supposed to do it does it well, I can tell since I'm using it (thank you by the way!).

I didn't mean to imply otherwise, sorry if I made myself misunderstood.

I was just musing about the raider grenadier AI, and how it still needs to be improved (by another mod or ideally in the vanilla game itself).

In my opinion, one cannot blame throwing a grenade right where your comrades are standing on "friendly fire". No one but psychopaths do that, and it's easy to exploit.

TheFlameTouched

Glad you like it :D and as for the AI, maybe I'll give that a shot much later :P

stigma

Yes, I think ideally the mod should alter AI to not AOE any area that (at least currently, at the time of shooting/throwing) contains allies. That is a much more robust solution I think, as with this fix you will still get raiders AOEing into a melee with no regard for hurting friendlies.

Still - this is MUCH better than nothing, so thanks a lot! :)

-Stigma

TheFlameTouched

Thing is, not being able to throw potentially friendly damaging grenades would be pretty unrealistic imo, as if something goes wrong your grenadiers become useless. Also whats to stop a commander from calling in a danger close attack :P regardless. AI changes are beyond me at the moment. Enjoy the mod :D

Dingo

#13
Hello everyone, I like the premise of this mod and wanted to use it so I checked if it's fit for A15. It is compatible*, so I went ahead and trimmed down unnecessary code lines to improve compatibility and updated the About.xml. I take 0 ownership for this, all credit to the original author of course. Tested on A15 0.15.1280 with no other mods active. Will conflict with mods that change grenades / launchers properties.

Steam workshop link (with OP's permission)

*Well, not exactly, but it was close. Mainly the PDW change was still recorded in the files.

[attachment deleted by admin - too old]

Adventurer