View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0004443 | Spring engine | Unit Scripting | public | 2014-06-17 23:59 | 2014-07-08 14:41 |
| Reporter | FLOZi | Assigned To | Kloot | ||
| Priority | normal | Severity | feature | Reproducibility | N/A |
| Status | resolved | Resolution | fixed | ||
| Product Version | 97.0.1+git | ||||
| Summary | 0004443: The case for 'maneuverleashlength' | ||||
| Description | Long story as short as I can muster: in OTA there was a tag 'maneuverleashlength' which determined how far away a unit could be 'kited' by an enemy when set to Maneuver In Spring it looks like that is hardcoded to magic 500 https://github.com/spring/spring/blob/develop/rts/Sim/Units/CommandAI/MobileCAI.cpp#L690 Could we have a unitdef tag? I know, I know... no more unitdef tags. But this replaces magic number and is much cleaner than rewriting whole movestate control in lua. | ||||
| Additional Information | A real-game example of where this is useful: US riflemen in S44 have shorter range than other teams (0000119:0000130 elmo). On Hold Position they sit there and die whilst being fired upon. On Maneuver they move to attack anything within 500 elmo + max range (535), which usually means they walk into a machinegun and die. We would like to be able to make them move to attack anything within say 130 elmo + max range so they close the gap with enemy riflemen but don't go trying to attack the howitzer on the other side of the map. | ||||
| Tags | No tags attached. | ||||
| Checked infolog.txt for Errors | |||||
|
|
"Change the constant into a unit member variable and make that assignable from Lua (at *run*time) instead." As there is currently no suitable API function to add this to, I can either 1. Add a new one-off function e.g. Spring.SetUnitManeuverLeash(unitID, leashLength) 2. Add it as a new key to Spring.MoveCtrl.SetGroundMoveTypeData instead [3. Implement "a proper generic SetUnitParam callout for runtime-manipulable data." But that is something better left to the experts.] Please advise to which implementation is preferable. |
|
|
jk said 2. is prefered |