aliens

Author Topic: Toss grenades around corners.  (Read 5265 times)

Offline Zeta Reticulan

  • Captain
  • ***
  • Posts: 65
    • View Profile
Toss grenades around corners.
« on: February 22, 2023, 04:49:46 pm »
How cool would it be if grenades could be tossed around a corner or an entry way without exposing your soldier to enemy fire? If it's possible to mod, the max throwing distance should be really short when throwing around a corner. A mod like this would make grenades useful even if you have a grenade launcher mod installed.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11721
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Toss grenades around corners.
« Reply #1 on: February 22, 2023, 06:20:43 pm »
Just Ctrl+D, Ctrl+K... ::)

Offline Zeta Reticulan

  • Captain
  • ***
  • Posts: 65
    • View Profile
Re: Toss grenades around corners.
« Reply #2 on: February 22, 2023, 08:04:09 pm »
You're telling me xcom had this feature all along? 😮

Offline BlackStaff

  • Colonel
  • ****
  • Posts: 336
    • View Profile
Re: Toss grenades around corners.
« Reply #3 on: February 23, 2023, 01:48:53 am »
Just Ctrl+D, Ctrl+K...
Only if debug mode is enabled in "options.cfg"!  :D   ;D   ;D
« Last Edit: February 23, 2023, 02:03:06 am by BlackStaff »

Offline TBeholder

  • Sergeant
  • **
  • Posts: 41
    • View Profile
Re: Toss grenades around corners.
« Reply #4 on: February 27, 2023, 05:36:00 am »
How cool would it be if grenades could be tossed around a corner or an entry way without exposing your soldier to enemy fire?
As in, object bounce physics instead of instant "whoops, all momentum is suddenly gone"? Well, yes.
Even if it was implemented, however…
1. In order to not look weird too, it should at least crudely tell the obstacles apart when deciding how elastic the collision should be, i.e. requires an extra tile property. Not that it was a big deal, but still.
2. In UFO:AI bounce physics is implemented (it’s on Quake 3 engine, after all), and it is, indeed, cool. But also, last checked this led to the following chain of events: <hidden movement> <impact sound> <impact sound> <green flash> <alien dying sound> …more often than once per two missions. The invaders keep taking losses from devious hu-mon architecture (like street lamps). Grenade bounce is the new point-blank rocket, at least in dense terrains. :)
« Last Edit: February 27, 2023, 06:32:08 am by TBeholder »

Offline Xilmi

  • Commander
  • *****
  • Posts: 642
    • View Profile
Re: Toss grenades around corners.
« Reply #5 on: February 27, 2023, 10:36:55 am »
You're telling me xcom had this feature all along? 😮
No, I think they're trying to mock you for wanting something that would make the game much easier.
Ctrl+d, ctrl+k is "kill all enemies and immediately win the mission".

Offline Zeta Reticulan

  • Captain
  • ***
  • Posts: 65
    • View Profile
Re: Toss grenades around corners.
« Reply #6 on: February 27, 2023, 04:13:39 pm »
It wouldn't make it that much easier if tossing around a corner has a very short range, just like in real life. SWAT teams and military usually toss a grenade into a room before going in.
« Last Edit: February 27, 2023, 04:16:56 pm by Zeta Reticulan »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11721
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Toss grenades around corners.
« Reply #7 on: February 27, 2023, 04:48:31 pm »
It's not about the game being easier, it's about the engine being completely unsuited for this. It's almost like asking for an FPS sequence. The missile (grenade in this case) would have to originate not only off-centre, but from a completely different tile, which is unprecedented and completely against both the mechanics and the spirit. Not to mention that it wouldn't simulate other issues, like for example the thrower being 100% safe during the throw. And then you went into objects bouncing off walls, which is honestly in a "let's write a new engine from scratch" territory.
I certainly didn't mean to sound condescending ("mocking" is a bit of a strong word IMO), but it really wasn't a very sensible idea. Which is still okay; most ideas in general aren't very good, whereas som are. That's how brainstorming works. :)

Offline Zeta Reticulan

  • Captain
  • ***
  • Posts: 65
    • View Profile
Re: Toss grenades around corners.
« Reply #8 on: February 27, 2023, 06:49:08 pm »
Actually, I didn't say anything about bouncing off a wall, just the ability for the grenade to turn a corner. Maybe something like the way points for the blaster launcher. But if it's not possible, oh well.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11721
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Toss grenades around corners.
« Reply #9 on: February 27, 2023, 07:03:18 pm »
Sincere apologies; I mixed your post with Beholder's. But most points still stand.

Actually, I didn't say anything about bouncing off a wall, just the ability for the grenade to turn a corner. Maybe something like the way points for the blaster launcher. But if it's not possible, oh well.

Actually you could make it work like Blaster Launcher... But it won't be a thrown grenade, it will be a one-shot "gun". This has been used by Robin in his "From the Apocalypse" mod to emulate the Boomeroid, and I also parroted his solution in X-Com Files. But I doubt it would satisfy your request.

Offline Zeta Reticulan

  • Captain
  • ***
  • Posts: 65
    • View Profile
Re: Toss grenades around corners.
« Reply #10 on: February 27, 2023, 07:07:19 pm »
Interesting. I'll have to look into it. It would turn the grenade into an instant grenade I assume, because isn't  instant grenades treated like a one shot gun?
« Last Edit: February 27, 2023, 07:11:59 pm by Zeta Reticulan »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11721
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Toss grenades around corners.
« Reply #11 on: February 27, 2023, 07:59:13 pm »
Interesting. I'll have to look into it. It would turn the grenade into an instant grenade I assume, because isn't  instant grenades treated like a one shot gun?

Yes, precisely. It's just a pistol with one bullet which disappears after use.

Offline Zeta Reticulan

  • Captain
  • ***
  • Posts: 65
    • View Profile
Re: Toss grenades around corners.
« Reply #12 on: February 27, 2023, 10:18:08 pm »
I need to get my hands on that code.

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Toss grenades around corners.
« Reply #13 on: February 27, 2023, 11:39:13 pm »
Actually you could make it work like Blaster Launcher... But it won't be a thrown grenade, it will be a one-shot "gun".
I need to get my hands on that code.

I may be misunderstanding but do you mean something like this:
Code: [Select]
items:
  - type: STR_EXAMPLE_WEAPON
    size: 0.2
    costSell: 36900
    weight: 8
    bigSprite: 19
    floorSprite: 19
    bulletSprite: 6
    fireSound: 11
    hitSound: 19
    hitAnimation: 36
    power: 60
    damageType: 4
    accuracyAimed: 100
    tuAimed: 50
    clipSize: 1 # <==
    battleType: 1
    twoHanded: true
    invWidth: 1
    invHeight: 1
    arcingShot: true # <==
    maxRange: 1 # <==
    waypoints: 2 # <==
    accuracyMultiplier:
      firing: 0.0
      throwing: 1.0

The above code is untested I'm not sure if arcingShot: works with the waypoints: setting.
« Last Edit: February 27, 2023, 11:41:18 pm by The Martian »

Offline Zeta Reticulan

  • Captain
  • ***
  • Posts: 65
    • View Profile
Re: Toss grenades around corners.
« Reply #14 on: February 28, 2023, 02:26:41 am »
Don't know much about the codes, but I think that is what I mean. Can a weapon have 2 different firing modes? One using way points (when tossing around a corner), and the other an arcing shot (when thrown in a straight line)?