Author Topic: Reaction on heavy weapons  (Read 1878 times)

Offline PPQ

  • Colonel
  • ****
  • Posts: 113
    • View Profile
Reaction on heavy weapons
« on: February 04, 2023, 11:59:59 am »
I have one suggestion for improvement for this mod that I feel would be great.

You know how chainguns in general don't have reaction fire. I would extend that to rocket and grenade launchers as well. Basically anything firing HE.

Offline Juku121

  • Commander
  • *****
  • Posts: 1798
  • We're all mad here.
    • View Profile
Re: Reaction on heavy weapons
« Reply #1 on: February 04, 2023, 12:28:18 pm »
So, Auto-cannons? And that'll mean losing either the auto-shot or the aimed shot for three-mode weapons.

What's the goal here? Avoiding enemies from shooting HE at you, or avoiding friendly fire casualties? Because the first is IMO counterproductive, and the second can be accomplished by zeroing TU before ending your turn.

Offline PPQ

  • Colonel
  • ****
  • Posts: 113
    • View Profile
Re: Reaction on heavy weapons
« Reply #2 on: February 04, 2023, 12:37:59 pm »
So, Auto-cannons? And that'll mean losing either the auto-shot or the aimed shot for three-mode weapons.
Why? What does having reaction fire have to do with those fire modes?


Quote
What's the goal here? Avoiding enemies from shooting HE at you, or avoiding friendly fire casualties? Because the first is IMO counterproductive, and the second can be accomplished by zeroing TU before ending your turn.
To avoid my guys randomly firing off HE and blowing things I don't want up. Mostly friendly fire but also loot and stuff.


EDIT: Don't tell me that the no reaction fire is a hack that adds a fake fire mode that does nothing and sets it as the one used for reaction fire. That would be equal parts impressive and facepalm worthy. Which ironically enough is just the combination that would make the software engineer in me all warm and tingly inside.
« Last Edit: February 04, 2023, 12:41:34 pm by PPQ »

Offline Juku121

  • Commander
  • *****
  • Posts: 1798
  • We're all mad here.
    • View Profile
Re: Reaction on heavy weapons
« Reply #3 on: February 04, 2023, 12:56:59 pm »
Why? What does having reaction fire have to do with those fire modes?
Because only snap shots can perform reaction fire. How do you think the minigun accomplishes its no-reaction? By only having autofire. Snap shot is just removed completely.

I think there might be some way to do reaction aimed/autofire, but I may be misremembering and thinking of a different game. Edit: Likely Xenonauts. /edit In principle, I suppose it'd be possible to block reaction shots via Yankes-scripts, but good luck getting Solarius to mess with those.

To avoid my guys randomly firing off HE and blowing things I don't want up.
Press 'Delete' on your HE guys before ending your turn. Bonus: enemy rocketeers will still reaction-fire your ass.
« Last Edit: February 04, 2023, 02:03:04 pm by Juku121 »

Offline PPQ

  • Colonel
  • ****
  • Posts: 113
    • View Profile
Re: Reaction on heavy weapons
« Reply #4 on: February 04, 2023, 02:13:00 pm »
Because only snap shots can perform reaction fire. How do you think the minigun accomplishes its no-reaction? By only having autofire. Snap shot is just removed completely.

I think there might be some way to do reaction aimed/autofire, but I may be misremembering and thinking of a different game. Edit: Likely Xenonauts. /edit In principle, I suppose it'd be possible to block reaction shots via Yankes-scripts, but good luck getting Solarius to mess with those.
Press 'Delete' on your HE guys before ending your turn. Bonus: enemy rocketeers will still reaction-fire your ass.
Forget what I said than. I want the snap shots.

Offline Juku121

  • Commander
  • *****
  • Posts: 1798
  • We're all mad here.
    • View Profile
Re: Reaction on heavy weapons
« Reply #5 on: February 04, 2023, 03:27:17 pm »
You can have aimed/auto-shots masquerading as snap shots without reaction fire, unless the weapon already has three fire modes. That's why I mentioned the Auto-Cannon.
« Last Edit: February 04, 2023, 03:42:43 pm by Juku121 »

Offline krautbernd

  • Commander
  • *****
  • Posts: 1108
    • View Profile
Re: Reaction on heavy weapons
« Reply #6 on: February 04, 2023, 04:20:24 pm »
In principle, I suppose it'd be possible to block reaction shots via Yankes-scripts, but good luck getting Solarius to mess with those.

This thread mentions a script for disabling reaction shots on weapons, though the script listed initially was apparently incorrect since it used BattleItem in place of RuleItem and weapon instead of reaction_weapon.

This is the corrected script:

Code: [Select]
extended:
  tags:
    RuleItem:
      WEAPON_CANNOT_REACT: int

  scripts:
    reactionUnitReaction:
      - offset: 1
        code: |
          var ptr RuleItem weaponRuleset;
          var int weaponCannotReact;

          reaction_weapon.getRuleItem weaponRuleset;
          weaponRuleset.getTag weaponCannotReact Tag.WEAPON_CANNOT_REACT;

          if neq 0 weaponCannotReact;

            set reaction_chance 0;

          end;

          return reaction_chance;

items:
  - type: STR_PISTOL
    tags:
      WEAPON_CANNOT_REACT: 1

Did some preliminary testing (just x-com, not aliens), and from what I can tell this does indeed remove reaction fire from weapons and can be implemented as a submod.
« Last Edit: February 04, 2023, 04:22:11 pm by krautbernd »

Offline Juku121

  • Commander
  • *****
  • Posts: 1798
  • We're all mad here.
    • View Profile
Re: Reaction on heavy weapons
« Reply #7 on: February 04, 2023, 05:50:22 pm »
Cool! I imagine it'd be even useful to integrate into the main mod, even if rocket launchers will still remain snap shot capable.

Offline Chuckebaby

  • Colonel
  • ****
  • Posts: 408
  • Chrysalis are people too
    • View Profile
Re: Reaction on heavy weapons
« Reply #8 on: February 04, 2023, 09:40:23 pm »

Did some preliminary testing (just x-com, not aliens), and from what I can tell this does indeed remove reaction fire from weapons and can be implemented as a submod.

Cant you simply drain the soldier T.U's ?
Be the same thing ?