I am having trouble getting multi-weapon units to behave how I want them to, mainly because FireState and MoveState are somewhat limited in terms of controlling when, where and how a unit attacks another unit. Specifically, the fact that a unit will stop and engage an enemy as soon as any one of its weapons are in range means a unit with a weak long-range support weapon and a powerful close-range main weapon will stand there firing the weak weapon, rather than close in to engage with its powerful weapon.
The only "way" around this is slaving the longer-range weapon to the short-range weapon but this is not ideal, and only works if the unit is set to hold position.
So I request an additional state command that tells a unit at what range it can stop moving towards a target and just fire. Call it 'engagementState', if you will.
It would have two modes:
Default/Normal/Passive, in which case the unit will behave as it does now, only approaching targets until any of its weapons are in range (aka its longest-ranged weapon starts shooting);
and
Aggressive/Full/etc, in which case the unit will approach the target until ALL of its weapons, or at least its Weapon 1, are in range (but will still fire its long-range weapons as it's closing in).
That is all, thank you for your time!
Unit "Rules of Engagement" State
Moderator: Moderators
-
- MC: Legacy & Spring 1944 Developer
- Posts: 1948
- Joined: 21 Sep 2004, 08:25
-
- MC: Legacy & Spring 1944 Developer
- Posts: 1948
- Joined: 21 Sep 2004, 08:25
Re: Unit "Rules of Engagement" State
As far as I can tell this would only determine what range beyond maximum weapon range a unit would move to engage? It still wouldn't move any closer to a unit than it needs to start firing any (aka its maximum range) weapon.
Re: Unit "Rules of Engagement" State
yeah we need to be able to set maxRange too.
I had a pull request but it was rejected. Someone else had one too.. BrainDamage maybe?
https://github.com/spring/spring/pull/194
But that only recalculates it - we need to be able to set it directly.
edit: herp... looks like it wasn't rejected afterall? https://github.com/spring/spring/pull/126
I had a pull request but it was rejected. Someone else had one too.. BrainDamage maybe?
https://github.com/spring/spring/pull/194
But that only recalculates it - we need to be able to set it directly.
edit: herp... looks like it wasn't rejected afterall? https://github.com/spring/spring/pull/126
Re: Unit "Rules of Engagement" State
I can't read github apparantly. Wasn't rejected but was never accepted. I know devs have a distaste for SetUnitValue but where else would this go? Seems ridiculous to add Spring.{Get,Set}UnitMaxRange just for this
Re: Unit "Rules of Engagement" State
cleaner than SetCOBValueSpring.{Get,Set}UnitMaxRange
Re: Unit "Rules of Engagement" State
I disagree (it is not SetCOBValue and there are other unit-script constants that can still only be set by this function) - but I am willing to implement it via its own callin. What is quite upsetting is receiving zero feedback on the PR for 6 months
Re: Unit "Rules of Engagement" State
The current state of mind of the repository owners makes contributions difficult.What is quite upsetting is receiving zero feedback on the PR for 6 months
Partly justified due to lots of bad suggestions/code/patches but in the end there's a lot to lose in good contributions that will benefit everybody.
Like DRM this hurts the good users more than the bad users.
Re: Unit "Rules of Engagement" State
Lua it?
MultiStateButton <-> UnitRectionOnAttack(State)
Could be even tweaked to allow for things like intelligent reaction on gamedev side for the unit?
(React with Retreat out of Range with follow up attack on old position) etc.
TL,DR;
MultiStateButton <-> UnitRectionOnAttack(State)
Could be even tweaked to allow for things like intelligent reaction on gamedev side for the unit?
(React with Retreat out of Range with follow up attack on old position) etc.
TL,DR;