View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0003900 | Spring engine | General | public | 2013-07-27 21:24 | 2014-09-08 20:51 | ||||||||
Reporter | PepeAmpere | ||||||||||||
Assigned To | |||||||||||||
Priority | normal | Severity | feature | Reproducibility | always | ||||||||
Status | new | Resolution | open | ||||||||||
Product Version | 94.1.1+git | ||||||||||||
Target Version | Fixed in Version | ||||||||||||
Summary | 0003900: make possible to set minimal attack distance for unit OR make possible to set primary weapon (for the same purpose) | ||||||||||||
Description | Currently the minimal attack distance (=the distance, which every unit reach before starts to fire from at least one weapon, the needed move setting in every attack order) is calculated from range of weapon with the longest range. I want to make new unitDef, which tells the engine, which minimal distance should be reached in case of ATTACK command. There are many possible ways, how to do it, decision is on you Spring devs :). 1) new UnitDef (minimal distance) 2) new WeaponDef (primary weapon) 3) some other solution... Currently i would need special gadget for auto-commanding the unit with 2 or more weapons, where for example one is melee and second ranged, or where one is shortrange and second is a bit longer range, but it has 2 minutes reload. In both cases in current spring, unit would just standing and waiting for death without any lua. I think this problem is engine one, if you would agree attack command execution is engine task :). | ||||||||||||
Tags | No tags attached. | ||||||||||||
Checked infolog.txt for Errors | |||||||||||||
Attached Files |
|
![]() |
|
FLOZi (reporter) 2013-07-27 22:59 Last edited: 2013-07-28 02:44 |
+1 for UnitDef 'MaxAttackRange' (N.B. max not min, it is the maximum (longest) range it can attack at, not the minimum (shortest)) In fact being able to change this on the fly via lua would be ideal. |
smoth (reporter) 2013-07-28 05:15 |
Flozi, minimal range would be nice for units with explosives so if something gets too close it would not fire. I have played a few games that have had that mechanic and called it minimum rang aka the weapon had a radius of 300 on the explosion so it will not fire until the range exceedes 150 as to ensure it is not int the range. |
PepeAmpere (reporter) 2013-07-28 05:54 |
detailed description + examples + deeper discussion + exhibition: http://springrts.com/phpbb/viewtopic.php?f=21&t=30755 |
TheFatController (reporter) 2013-10-07 22:13 |
I would also find this very useful for BA Chicken Defense, currently the Chicken Queen stops at max range when given a fight command and uses its longest range attack which isn't ideal, there are also chicken flamer units which stop at max range (where the flamer weapon does very little damage). Something like a UnitDef 'desiredAttackDistance' which defaulted to the longest weapon range but could be overridden to a lower value would allow me to implement their intended behaviour. Thanks |
PepeAmpere (reporter) 2013-11-20 16:52 |
fatcontroller, until this feature is added (this bug of no "primary" weapon fixed), you can try my solution for /some/ weapons - http://pastebin.com/BSxCJcAS dont solve all, but for melee + one long range weapon with huge reload it works nice |
emmanuel (reporter) 2013-12-03 07:56 |
i think its more at the AI level this must be done ! since the basic life AI is engine part it must be linked between the 3files involved in the process : unitdef , animdef , weapondef ; its at the game maker to choose if the unit is a bit kamikaze and will shoot inside its weapon blast or not : in the unidef then; for the weapon there is just artificials chooses as a mini maxi range = ex : majority of real missiles are not detonated before a safe range and not locked and sometime unable to be shooted at all ; some ammo can have a huge range as the heavy machine gun but the shooter dont own sight and will shoot only them at point blank ; the probleme of seconday weapon with diferent range still the same as the problem never fixed of the proximity priority and the problem of switching trought target (or avoiding target alrready engaged by friends) then lack of animdef script tags for such task ; since no move order can be emited from the animdef scrit it a bit fail to think its can be made from weapon def or unitdef for resume secondary weapon is a bit more sofisicated ai behaviour as ambush or dig a teraforming trench seem to be a whole Ai work and not a like reflex of heart beat/ breath actions |
raaar (reporter) 2013-12-28 15:26 |
recently reported a similar aircraft oriented issue that was marked as a duplicate of this http://springrts.com/mantis/view.php?id=4231 there are 2 different weaponDefs implied here: - minimumRange, integer if near, don't try to get closer. If within, try to back away and don't fire - maximumRange, integer (instead of trying to stay at range of the longest ranged weapon, stay at this range) |
FLOZi (reporter) 2014-08-24 20:58 |
Looking at a lua solution to this, but there are no existing callouts that seem suitable to add it to. THe closest thing to a generic callout for setting unit properties is Spring.SetUnitCobValue / Spring.UnitScript.SetUnitValue. Any point in making a pull request that adds setting of unit->maxRange through those callouts? |
abma (administrator) 2014-09-08 20:51 |
backlink: https://github.com/spring/spring/pull/126 |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2013-07-27 21:24 | PepeAmpere | New Issue | |
2013-07-27 22:59 | FLOZi | Note Added: 0011090 | |
2013-07-28 02:44 | FLOZi | Note Edited: 0011090 | View Revisions |
2013-07-28 05:15 | smoth | Note Added: 0011097 | |
2013-07-28 05:54 | PepeAmpere | Note Added: 0011098 | |
2013-10-07 22:13 | TheFatController | Note Added: 0011719 | |
2013-11-20 16:52 | PepeAmpere | Note Added: 0012187 | |
2013-12-03 07:56 | emmanuel | Note Added: 0012312 | |
2013-12-28 15:26 | raaar | Note Added: 0012514 | |
2014-08-24 20:58 | FLOZi | Note Added: 0013563 | |
2014-09-08 20:51 | abma | Note Added: 0013623 |