Author Topic: [Answered] powerRangeIncrease  (Read 3678 times)

Offline efrenespartano

  • Commander
  • *****
  • Posts: 757
  • I know a lot about the law and other lawyerings.
    • View Profile
[Answered] powerRangeIncrease
« on: January 27, 2020, 04:43:42 pm »
Hi, folks!

Got a suggestion. powerRangeReduction is useful to limit the damage of certain weapons (Shotguns and pistols comes to mind) to a defined range. But, how about an increment of damage?

Instead of losing power at X number of tiles beyond powerRangeThreshold, the powerRangeIncrease would mean that a fixed power bonus is applied UNTIL the powerRangeThreshold. Let's imagine an SMG:

Code: [Select]
  - type: STR_SMG
    compatibleAmmo:
      - STR_SMG_CLIP
    powerRangeThreshold: 15
    powerRangeIncrease: 5

  - type: STR_SMG_CLIP
    power: 30

This gun will inflict 35 points of damage up to 15 tiles, where it will decrease to 30!

Enviado desde mi LG-M400 mediante Tapatalk

« Last Edit: February 12, 2023, 03:25:53 pm by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8974
    • View Profile
Re: [Suggestion] powerRangeIncrease
« Reply #1 on: January 27, 2020, 05:46:00 pm »
already scriptable today

Offline efrenespartano

  • Commander
  • *****
  • Posts: 757
  • I know a lot about the law and other lawyerings.
    • View Profile
Re: [Suggestion] powerRangeIncrease
« Reply #2 on: January 27, 2020, 06:32:42 pm »
already scriptable today
Cool! How can I do it, Meridian? :D

Enviado desde mi LG-M400 mediante Tapatalk


Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8974
    • View Profile
Re: [Suggestion] powerRangeIncrease
« Reply #3 on: January 27, 2020, 06:42:42 pm »
Cool! How can I do it, Meridian? :D

Using scripts.

I'm not going to write it for you though... you'll need to find someone else.

Offline Yankes

  • Commander
  • *****
  • Posts: 3291
    • View Profile
Re: [Suggestion] powerRangeIncrease
« Reply #4 on: January 27, 2020, 07:44:20 pm »
I see one thing that is missing from scripts, we do not expose range to `hitUnit` hook (you can check distance to other unit but it not always same).

I will look if I can add this.

Offline TBeholder

  • Sergeant
  • **
  • Posts: 41
    • View Profile
Re: [Suggestion] powerRangeIncrease
« Reply #5 on: January 03, 2023, 06:07:31 pm »
I see one thing that is missing from scripts, we do not expose range to `hitUnit` hook (you can check distance to other unit but it not always same).
I will look if I can add this.
hitUnit takes the current power and can adjust it as a variable, correct?
So negative powerRangeReduction does its thing, then on hit the script just caps it if it went above the threshold (presumably set in a tag). Or may even calculate range-by-trajectory from the current and ruleset power values, then apply its own damage (range) formula to the result.
The problem is, while hits to units can be controlled this way, how to handle hits to tiles?