aliens

Author Topic: is modding reaction mechanics possible?  (Read 4560 times)

Offline matheusitos

  • Squaddie
  • *
  • Posts: 4
    • View Profile
is modding reaction mechanics possible?
« on: July 22, 2013, 10:32:10 pm »
Hello modders

I would like to change the way reaction triggers as to disable multiple reaction shots per single action. So I would want units to react only once if they spot a unit and run another reaction check at every additional movement or action from the spotted unit.

Possible?

Current version makes units shoot more than once if they have TUs to do so.

Thanks! :)

Offline Phezzan

  • Sergeant
  • **
  • Posts: 37
  • Twilight
    • View Profile
Re: is modding reaction mechanics possible?
« Reply #1 on: July 23, 2013, 03:48:03 am »
Yes - in fact the system once worked like that.

Basically there's a checkReactionFire function (that might not be the exact name).
It calls getSpottingUnits() to get a list of guys who might 'react'  and then walks this list to fire reaction shots.

For your purposes you just need to return early after the first guy successfully fires a snap-shot.

It's like a 1-2 line change.

really easy.

I could go on about the sheer amount of redundant operations  in that function, but it's not very important.
Personally I rewrote the whole thing, but the result is very similar to the original.

Offline 54x

  • Colonel
  • ****
  • Posts: 208
    • View Profile
Re: is modding reaction mechanics possible?
« Reply #2 on: July 23, 2013, 01:40:03 pm »
I'd really like to work in an optional suppression mechanic at some point that would impact reaction fire, when I'm a bit less busy and feel able to code.

Offline matheusitos

  • Squaddie
  • *
  • Posts: 4
    • View Profile
Re: is modding reaction mechanics possible?
« Reply #3 on: July 24, 2013, 05:36:21 am »
Thank you for your replies.


That would be a nice addition, 54x. Please do that. :)



So, Phezzan. It is nice to know it's easy. The problem is I don't know how to mod outside the rulesets. :(
Assuming this coding is not to be done in the rulesets, but somewhere else.

Where and how is it done? Do you think if you can direct me, I would be able to do it?

I would rather not ask you to do it for me because I might want to do other changes in the future, right...