Author Topic: Throwing weapons  (Read 3636 times)

Offline vadracas

  • Colonel
  • ****
  • Posts: 285
  • Just another player/modder combo.
    • View Profile
Throwing weapons
« on: April 04, 2020, 07:15:16 pm »
So I've been thinking of implementing something where if you really need to, you can throw your weapon at an enemy as an attack. My problem is that I have no idea how to move the actual weapon to that location like the generic throw action does. Is that an option accessible to modders?

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11722
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Throwing weapons
« Reply #1 on: April 04, 2020, 09:48:53 pm »
So I've been thinking of implementing something where if you really need to, you can throw your weapon at an enemy as an attack. My problem is that I have no idea how to move the actual weapon to that location like the generic throw action does. Is that an option accessible to modders?

No, it's not a modding option.

Still, I think the idea is hilarious (had it for years myself) and I'd be happy to see it, for the lulz if nothing else :)

Normal throw: normal throw
Ctrl + throw: treat the item as a thrown missile, with damage depending on its weight, as well as new custom modifier(s) to reflect things like hardness or sharpness

Offline vadracas

  • Colonel
  • ****
  • Posts: 285
  • Just another player/modder combo.
    • View Profile
Re: Throwing weapons
« Reply #2 on: April 04, 2020, 11:26:02 pm »
Is it worth adding this as a thread for OXCE?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9091
    • View Profile
Re: Throwing weapons
« Reply #3 on: April 04, 2020, 11:30:13 pm »
No, it's a feature that's just not needed.

This is as much of a cosmetic detail (or easter egg) as it gets and it is really not worth the effort needed to implement it.

... now feel free to crucify me.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11722
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Throwing weapons
« Reply #4 on: April 04, 2020, 11:46:04 pm »
Yeah, not a real request on my part. Just pointing out it would be funny, and I probably would be consistently using it if it existed.

Offline vadracas

  • Colonel
  • ****
  • Posts: 285
  • Just another player/modder combo.
    • View Profile
Re: Throwing weapons
« Reply #5 on: April 04, 2020, 11:55:34 pm »
But I really wanna throw my sword at someone. :( :( :(

lol, I understand, but I would absolutely use it if it was available.

Offline Vangrimar1

  • Colonel
  • ****
  • Posts: 143
    • View Profile
Re: Throwing weapons
« Reply #6 on: April 05, 2020, 05:00:38 am »
I think you can make a spear, for example, which can be used in hand-to-hand combat and throw if necessary. Just pick it up does not work. ;)

Offline vadracas

  • Colonel
  • ****
  • Posts: 285
  • Just another player/modder combo.
    • View Profile
Re: Throwing weapons
« Reply #7 on: April 05, 2020, 02:16:04 pm »
I think you can make a spear, for example, which can be used in hand-to-hand combat and throw if necessary. Just pick it up does not work. ;)

Yeah, I know I can do that, but there is a major flaw with the current system. If I implement a "throw" action, it doesn't actually throw the weapon to that tile, meaning that I either have infinite uses of the "throw" action or I lose my weapon completely after I throw.

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Throwing weapons
« Reply #8 on: April 14, 2020, 10:49:33 pm »
If you can spawn an item where a weapon projectile hits then you could create a melee weapon that also has a single charge of ammo and fires in an arc.

When the melee weapon's ammo is exhausted the weapon is deleted, a new item is then created on the tile that the projectile hit giving the illusion that the weapon was thrown as the projectile.

I think it is already possible to spawn units so perhaps spawning items may also be possible via scripting?

Offline vadracas

  • Colonel
  • ****
  • Posts: 285
  • Just another player/modder combo.
    • View Profile
Re: Throwing weapons
« Reply #9 on: April 14, 2020, 11:12:17 pm »
If you can spawn an item where a weapon projectile hits then you could create a melee weapon that also has a single charge of ammo and fires in an arc.

When the melee weapon's ammo is exhausted the weapon is deleted, a new item is then created on the tile that the projectile hit giving the illusion that the weapon was thrown as the projectile.

I think it is already possible to spawn units so perhaps spawning items may also be possible via scripting?


Ah yes, the mighty script. Perhaps I'll dig into a way to do that.