OpenXcom Forum
OpenXcom Forks => OXCE Support => OpenXcom Extended (OXCE) => OXCE Support Y-scripts => Topic started by: efrenespartano 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:
- 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
-
already scriptable today
-
already scriptable today
Cool! How can I do it, Meridian? :D
Enviado desde mi LG-M400 mediante Tapatalk
-
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.
-
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.
-
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?