Loading...
  OR  Zero-K Name:    Password:   

Need for Station-Keeping in Unit Movement

28 posts, 1252 views
Post comment
Filter:    Player:  
Page of 2 (28 records)
sort
6 years ago
Simply put, units need to make an effort to remain at the location that they have been placed at. This does not currently happen.

Example 1: Place a unit as a supplement to static defenses. Enemy enters range, unit moves to attack. Enemy is destroyed. Unit remains wherever it happened to be when enemy was destroyed, instead of returning to previous position (where it was when enemy was sighted).

Example 2: Unit is sent to a location and set to Hold Position. Large formation of friendly units pass through area with unit holding position. Stationary unit is pushed along by friendly unit formation, ends up out of position. Unit decides that its new location is just as good as where the player put it, and continues to Hold Position there.

Example 3: Unit set on patrol route. Enemy enters attack range. Unit moves to attack enemy. Enemy retreats at similar speed to patrol unit, remaining within visual range. Patrol unit follows enemy on a road trip across the continent, rather than turning back after moving sufficiently far away from the initial patrol route.


I can't speak for anyone else, but I find these scenarios to be a problem. When I put a mobile unit in a certain place, it's there for a reason, and I would like for it to remain where I put it until I want it to go somewhere else. As far as I can tell, the unit movement setting works as intended, with the exception of this oversight, where it does not make any attempt to remember the location of its last player-issued movement order. To my knowledge, other similar RTS games in the past did have this memory.
+6 / -0
All units have move state button.

one is what you request, stay still, dont move, this is not the default, so unless you choose to tell them to stay still, they will go and attack\fight when enemies comes in sight.

The other 2 is for go and fight at short distance or longer distance.

I am unsure about returning to initial position after theyre gone and had a little fight. but ultimately this would rarely be needed becuase they would mostly retreat to a less advantagous position and the situation has most likely changd and your micro\manual movement should probably readjust.
+0 / -2
6 years ago
I'm pretty sure you either didn't read or didn't understand the post.

Here's the deal. I put a unit somewhere that I want it. Something happens that moves it, either bumping into friendlies or fighting something, or whatever. It then decides it should stand where it ended up after that happened, instead of going back to there I told the damn thing to stand.

Have you ever set a line of units up behind your turrets? Yeah, maybe some slings for indirect fire, or impalers? Then send a formation out from your base. That formation will go through the line of impalers like an avalance, carry some of them off as they go and leave others shoved far from where they will be useful or protected, and the impalers will ignore the fact that they were moved out of the place they were set to stay.

You mentioned the Move State. That's exactly what I was talking about. Unless set to Hold Position, a unit will follow an enemy based on the move state. The problem is that once that enemy is gone, the unit AI decides that it doesn't need to do anything else, and should stay at whatever random location is was at when the enemy died. Now, unlike older RTS games, the AI in ZK will actually try to stay at a safe distance when shooting at things, and maneuver during combat, which is very helpful under most scenarios. HOWEVER, once it's done killing things, I want the unit to go back to where I told the stupid thing to stand, not to stand in the middle of the map doing nothing until another enemy comes along to chase. I usually have something in a particular location for a reason. Maybe to intercept enemy units before they can get to my artillery, or to hold off the swarm until I'm done building my turrets, or whatever. If my units go off chasing enemies and never come back, that means THEY AREN'T DOING WHAT I NEED THEM TO DO ANYMORE. Having to watch the map and jump on every instance of combat to make sure my units haven't wandered off is a bit more micromanagement than I like to do.

Maybe this isn't a concern for people who just set up automated production queues and have all their units rush into combat in endless zerg waves so that the player doesn't have to do anything manually, but it's a problem me.

Or perhaps your assumption that I'm full of crap and clueless is based on your experience with multiplayer, where you're only against other human beings who do things vastly differently than any AI opponent? Is that where bothering to control individual units seems stupid to you? Try the campaign. Go ahead, it won't hurt. Try it. See how often your units don't stay doing what you want if they aren't actively executing a specific order. Then come and tell me that I'm talking about something that never happens. Go ahead, I'll wait.
+2 / -2
This is a valid concern but idk what an ideal fix would be. If all units rolled back after being pushed off from their held position, Crab and Fencer would be badly impacted. And idk what happens if all static holdpos units were unpushable.
+2 / -0


6 years ago
I have not invested the time to think through the janky edge cases that could arise from various solutions. When does a unit decide to stop chasing and how does it do this? What if on its way back to its starting location it encounters more enemies?
+0 / -0
6 years ago
The idea isn't to be un-pushable, but for the unit to try and return to the set location. Once something is pushed from where it was set, it should autpmatically return to that position.

I'm not sure that there is an ideal solution, since I expect that there are various strategies that exploit this behavior to kite units, luring expensive units into ambush or away from what they're guarding by harassing with small, fast, cheap units. Either some new movement mode, or simply a toggle button on unit bahaviors would be my first thoughts.

Fundamentally, I was so accusomed to this behavior from previous RTS games that it's incredibly annoying/frustrating/infuriating that it's absent from an otherwise impressive unit AI in ZK.
+1 / -0

6 years ago
I like the concept, especially near enemy defenses it is way too common for units to be lured in. How would it handle skirmishers though? If you set them to limited move and an enemy approaches, they will fall back to stay out of the enemy's range. With this change, would they stop falling back(kiting) at a point and die to the shorter range units that took their place?

For hold position you could probably try out your suggestion by setting the unit to repeat. Then it will keep repeating its move order, trying to go where it's supposed to be.
+0 / -0
6 years ago
It differed from game to game in how I've seen this behavior handle edge cases that you mentioned.

For simplicity's sake, what I envision here would basically be an automatic move command back to the original position when there are no enemies present. Theoretically that could mean not following additional enemies that appear between the 'No enemies present' return-to-location command and when the unit arrives there. Or it could be treated differently depending on the Move State setting. Hold Position = return to original position without chasing enemies. Short range would act like an attack-move command, so it would engage additional enemies before returning. Long range would maybe not return at all, which would be what the current behavior is for all Move States.

What I have seen in other games is, functionally, the Move State engagement range is calculated not from the unit itself, but from its set location. So when it moves far enough from that location, is breaks off and returns regardless of enemy distance beyond that range. While this is still vulnerable to kiting, it does set a finite limit of how far out of position a unit can be pulled, unless set to unlimited pursuit range. It also limits how far from a patrol route the unit will go before returning to it automatically.

As with any simple behavior, there would still be ways to exploit it, but I'd rather have my units try to do what I told them to do instead of relying entirely on the unit AI to be useful in a given location.
+2 / -0
On the limited move setting, I wouldn't expect any change from the existing behavior while fighting an enemy unit. Just that it would return once there are no more enemies.

Perhaps the movement distance limitation would only apply when the unit is moving towards the enemy, but would be ignored while moving away? This would still potentially allow unlimited kiting if you get around behind the target and get it to back away in the desired direction, but that would be a lot more difficult and risky compared to the current system. Still, this should prevent units from being drawn forward towards enemy defenses like you mentioned.
+0 / -0


6 years ago
I made you a ticket: https://github.com/ZeroK-RTS/Zero-K/issues/3044

The oversight is likely because I make the unit AI and I don't want my idle units going off and doing anything by themselves. I have all my ground units permanently set to hold position. On hold position units only chase and kite with an attack move command. I don't really know what people who do want their units to run off want or find frustrating.

quote:
For simplicity's sake, what I envision here would basically be an automatic move command back to the original position when there are no enemies present.
Attack move and patrol already works this way, and it allows units to be chased across the map. Are you sure this is exactly what you want?

The ticket contains details on subproblems and unknowns. The core of such a system seems to be this:
  • Units can have a home.
  • A unit with a home, an Attack command and no other commands should, under some circumstance, delete its Attack command and make a Fight command on its home.
  • A unit with a home and an Attack command followed by Fight/Patrol should, under some circumstance, delete its Attack command.

A good implementation depends on answering the following two questions:
  • How do you detect when to set and clear a units home?
  • When exactly do you delete the Attack command? This will depend on the relative locations of the unit, home and target of the attack command.
+1 / -0

6 years ago
I would suggest that the Home for any unit set to Hold Position is wherever the player (specifically the player, hopefully we can check for that) told them to move to, since the expectation for a Hold Position unit is it will try and hold whatever position it's put in.

A special case for the Crabe (and any other unit that loses armour on movement) should also prevent it from returning home unless it's a) already not receiving an armour bonus or optionally and more difficult b) hasn't received any incoming damage in, say, 10 seconds.



For units on Maneuver... A separate button for Set Home would be more distinct, but also a lot slower (and less intuitive?).

Let's consider what might break if units on Maneuver had a home auto-set to wherever the player last specifically told them to go. Does a Fight command also set a new home? A Move command probably should, but maybe a Fight command should not - in which case, it should probably un-set any existing home, or they will unintuitively leash back to it later.

After thinking about it for a few minutes, I can't think of any states where units on Maneuver shouldn't have a home set when receiving a direct Move command, and only occasionally would I complain if they got one from a Fight either.

I think if Roam behaviour specifically excludes units from this home-setting and returning behaviour, then I would be fine with all specific Move or Fight commands that weren't automatically added also set the units home to whatever position the command was ordered for. We can probably extend that to the Fight command for Hold Position without it undermining anything, because if you're telling Hold Position units to fight you expect them to get into trouble along the way.


Only drawback I can currently see is if you issue a very long range Fight command, you might mean "clear and chase everything along the way" so it's possible that the home should only be set for a Fight command after the unit reaches the target location and the Fight is cleared. If I understand the order system correctly, this would ensure it's fought everything it could, reached the place you wanted it at, and is now idle?
+0 / -0


6 years ago
Home setting is more complicated than that. My requirement is that it must set an intuitive home automatically and that there should be no expectation to manually set a home, as that is just creating a clunky UI. Perhaps there could be a hotkeyable command that sets home position, but I tried that with Set Target and now we have two extra buttons on the UI.

Setting home for some subset or orders that will possibly complete in the future sounds like it will break in edge cases. If you attack move across the map then you want your unit to chase anything it encounters, within reason, so its home cannot be on the other side of the map.

I'll make an attempt on a complete design for home state changes, technically detecting them may not be easy though:
  • If a unit has no home and an empty order queue then set its current position to home.
  • If a unit has no home and a self-assigned Attack command then set its current position to home.
  • If a unit has a home and has any command other than a self-assigned Attack command then delete its home.
Here "having a command" is only talking about its immediate command.

This design fails. What if a unit has a Fight command, self-assigns an Attack command and you then use Space+Click to insert a small Move command? It will complete the Move command and go back to the Attack command, only now its home is far from its Fight origin. What about tactical AI move commands? I feel like fight origin needs to come into the system somewhere.
+0 / -0
6 years ago
I have put all my units on hold position a long time ago because of this, and it sucks.

Fightmove is basically only useful for skirmishers and artillery anyway.
+0 / -0
6 years ago
Alright, I'll see if I can specify the intended behavior based on a 'Home' location. (Bear in mind I'm not familiar with script terms for unit orders, so I'll use generic terms)

Units set to Hold Position:
Set 'Home' when unit completes a 'Move' or 'Attack-Move' command from player. Check whether unit is within a very small range of 'Home' every 1 to 2 seconds. If unit is beyond acceptable range from 'Home', issue 'Attack-Move' command to 'Home'. (Intended result is that when the unit arrives at the location that the player sent it to, it will return to that location if pushed away by friendly unit collisions or enemy units with abiities that move the unit such as Placeholder. Check does not need to be too frequent, to avoid spamming commands due to changing situation in combat.)

Units set to Maneuver:
For 'Move' order from player, set 'Home' when 'Move' order is complete. When executing 'Attack' command, check whether unit is within the 'Maneuver' movement range, centered on 'Home' every 0.5 to 1 second. If unit leaves this range, delete 'Attack' command and set 'Attack-Move' to 'Home'. When 'Attack' command completes, return to 'Home'
For 'Attack-Move' or 'Patrol' from player or unit AI, set 'Home' at current position when enemy unit is detected and 'Attack' command begins. When 'Attack' command completes, insert command to return to 'Home' before resuming movement. (Intended result is that when a unit set to 'Maneuver' completes a 'Move' command from the player, it sets that location as 'Home' and will cancel its 'Attack' and return to 'Home' when it is a certain distance from 'Home'. When the unit switches from moving to attacking during an 'Attack-Move' or 'Patrol', the location where it was when it started to attack should be set as 'Home', and otherwise operate as above. When no enemies are present, return to 'Home'. Check more often due to maneuvering.)

Units set to Roam:
No change. Does not use 'Home'.

This would still leave units set to 'Maneuver' vulnerable to being pushed out of position by friendly units, but if it needs to be in an exact position it should probably be set to 'Hold Position' anyway.

So 'Hold Position' sets 'Home' when it finishes a 'Move' command, and 'Maneuver' sets 'Home' either when finishing a move with no enemies present, OR sets 'Home' as its current location when an enemy is detected while not already in combat. Only completing a 'Move' command to 'Home' should allow a new 'Home' to be set, to avoid setting a new 'Home' whenever a new enemy appears during combat.

I hope that I have adequately conveyed the idea, though I can't be certain since I am not familiar with the scripting language used.
+0 / -0

6 years ago
or you can just learn how to multitask.
+0 / -5
If you do not intend to meaningfully contribute to the dicussion, please go somewhere else.

Rephrased to prevent unintended anyeurisms.
+0 / -0

6 years ago
well, you might think to yourself: "hm how are all other people managing this as they have the same problems."
So, since you downvoted me AUrankAdminGoogleFrog: what do you do to prevent your units running into the enemy?
+0 / -0

6 years ago
quote:
I have all my ground units permanently set to hold position. On hold position units only chase and kite with an attack move command.
+1 / -0
Multitasking is important, and attention is important, but one of the BIG things I like about Zero-K is that it tries to minimize unnecessary use of the attention resource wherever it can be minimized.

Maneuver returning to a set position seems like one of those things - the engine already supports better unit AI than most RTS games, and "You lot, guard this area, you can dodge but don't go too far, okay?" seems like a very reasonable command to be able to give to a group of units and then, ideally, forget about them when the battle is elsewhere, without having them run into some static defenses and die.

Having your units do something stupid and run off and die, OR stand still and be unable to dodge despite being quick, and choosing which of these bad things I prefer is not a fun problem for me.

I like this idea, I want this idea, I think it's the way stationkeeping and maneuver returning -should- work, and should HAVE worked, in all RTSes since the idea of maneuver stances were invented. That it doesn't already is sadness, and if it can be done, I would love it to be done.
+2 / -0

6 years ago
What do you define as "unnecessary use of the attention resource"?
At what point it´s unnecessary?
+0 / -0
Page of 2 (28 records)