How do *_penalty in attack parameters work for turrets?

Place to report issues and suggest improvements to the API documentation.
heyqule
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Sun Mar 05, 2017 1:35 am
Contact:

How do *_penalty in attack parameters work for turrets?

Post by heyqule »

How do the range for *_penalty (health/rotate/fire_penalty) for attack parameters work? Fire turret uses 15 for its fire_penalty, what does that 15 imply? Are there a min / max range for it? Let say I want my turret to pick very high/max health with minimal rotation. If I set health_panelty to -15 for targeting high health unit and rotate_penalty 15 to discourage turning, what do they exactly mean?

It will be nice to have more detailed doc on the penalty topic.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

health_penalty and rotate_penalty clarification

Post by Deadlock989 »

health_penalty and rotate_penalty are properties of BaseAttackParameters that affect the target selection of turrets. Their descriptions are worded similarly - they say that "higher penalties" discourage the turret from selecting higher health targets or making longer turns, and for health_penalty a "negative penalty" encourages selection of targets with higher health.

What are the units? Is it like fire_penalty where any non-zero value counts, or is it a graduated scale of -1 to 1 with different levels of effect, or is health_penalty scaled to health points and rotate_penalty to orientation units, or something else?
Post Reply

Return to “Documentation Improvement Requests”