OpenTopped.RangeBonus Can Not Work Properly
Description
An infantry with a weapon maximum range 5 entered a vehicle can give it 10 range bonus, code works. But usually, it could not attack enemy at range 15 automatically. Instead, it start to attack enemy at range 5 to 7. I have to click the enemy manually to order it attack at range 15.
Phobos Version
v0.3.0.1
Conditions to reproduce
v0.3.0.1 used in Mental Omega
INI code
[Vehicle]
OpenTopped.RangeBonus=10
OpenTopped.IgnoreRangefinding=true;useful code, should be true
[Vehicle's Weapon]
Range=8
[Passanger's Weapon];init
Range=5
Steps to reproduce
...
Expected behaviour
Passangers in the vehicle should attack enemies automatically at the range with bonus.
Actual behaviour
Passangers in the vehicle doesn't attack enemies automatically at the range with bonus. Bonus range works by manual attack or giving the first attack then hit-and-run.
Additional context
No response
Checklist
- [X] The issue happens on the latest official version of Phobos and wasn't fixed yet.
- [X] I agree to elaborate the details if requested and provide thorough testing if the bugfix is implemented.
- [X] I added a very descriptive title to this issue.
- [X] I used the GitHub search and read the issue list to find a similar issue and didn't find it.
- [X] I have attached as much information as possible (screenshots, gifs, videos, debug and exception logs, etc).
Yes, the same thing is observed with the Tesla tower. This is especially expressed in the Tesla tower + Tesla trooper. Perhaps there is some idea that a unit/tower on its own could shoot a little closer than a manually directed one. But, with increased range, the independent attack begins to work too close in percentage to the maximum range. Apparently this problem is not limited to OpenTopped.RangeBonus. Without prescribing this, the problem also exists.
This is a Phobos issue only in the way that the tag introduced by Phobos suffers from something that many other tags do. And that something is: guard range.
Guard range defaults to the weapon's regular range, and there are many tags that increase attack range of a weapon, but they don't affect the guard range of the object having that weapon. Thus, if the weapon's range is increased, the weapon won't be fired until the regular range is met. This is the case even for such tags as AirRangeBonus and BunkerWeaponRangeBonus.
This can be averted by giving the object a higher GuardRange= value as default to compensate for any potential range increase.
This is a Phobos issue only in the way that the tag introduced by Phobos suffers from something that many other tags do. And that something is: guard range.
Guard range defaults to the weapon's regular range, and there are many tags that increase attack range of a weapon, but they don't affect the guard range of the object having that weapon. Thus, if the weapon's range is increased, the weapon won't be fired until the regular range is met. This is the case even for such tags as AirRangeBonus and BunkerWeaponRangeBonus.
This can be averted by giving the object a higher GuardRange= value as default to compensate for any potential range increase.
Well, that could work. Thank you.