Author Topic: Auto-Retreat Behaviour  (Read 2258 times)

Offline Shrugging Khan

  • Hero Member Mark III
  • *****
  • Posts: 1,217
  • Neinzul Y PzKpfw Tiger!
Auto-Retreat Behaviour
« on: July 07, 2013, 10:03:37 am »
This is something I feel is very much lacking from the game. Hybrids appear to already be capable of something similar, but human forces do not quite have that option yet: Retreat upon losing a certain amount/percentage of health.
I'll just copy my Mantis suggestion: http://arcengames.com/mantisbt/view.php?id=11942

Possibly global, certainly control-group-based.

Upon having its HP reduced to a certain percentage (or a fixed threshold), a ship will automatically attempt to flee to either

a) The next system
b) The next rally point
c) The next unit capable of repairs
d) The next force field

This is merely one possible selection of options. Having several and ordering them by priority might also be interesting.

Thanks for any support or input.
The beatings shall continue
until morale improves!

Offline chemical_art

  • Core Member Mark IV
  • *****
  • Posts: 3,952
  • Fabulous
Re: Auto-Retreat Behaviour
« Reply #1 on: July 07, 2013, 10:59:52 am »
Part of why I can imagine this not being done on a larger scale is that it would put a larger strain on the cpu. Its one thing for a few dozen ships to.have a very basic auto retreat, its another to have a few thousand have a more complex form of it. That said, a limitted form of it might be cool for larger stuff like starships and up, but at a glance it seems to be as mich a liability as asset as the behavior may result in like moving across a system across ai forces because it is the only friebdly one.
Life is short. Have fun.

Offline Shrugging Khan

  • Hero Member Mark III
  • *****
  • Posts: 1,217
  • Neinzul Y PzKpfw Tiger!
Re: Auto-Retreat Behaviour
« Reply #2 on: July 07, 2013, 11:03:35 am »
It's obviously meant to be optional; to be used at the player's discretion.

I know I would find it highly useful :P
The beatings shall continue
until morale improves!

Offline Histidine

  • Hero Member
  • *****
  • Posts: 581
Re: Auto-Retreat Behaviour
« Reply #3 on: July 07, 2013, 02:15:45 pm »
A cost threshold might be useful as well (not much point having Mk I fighters trying to break off if you can replace each one in 0.5 seconds).

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: Auto-Retreat Behaviour
« Reply #4 on: July 07, 2013, 03:04:05 pm »
Not sure why we need this automation. I honestly think that this bit of "micro" is good to keep around in the game. For the expensive stuff at least, it isn't that hard to deal with if you are paying attention.

At the very least, I don't think the rewards this would bring would be worth the pain if trying to implement and use.

On the other hand, I do miss my MRS tugs.

Offline Diazo

  • Master Member Mark II
  • *****
  • Posts: 1,717
  • I love/hate Diff 10
Re: Auto-Retreat Behaviour
« Reply #5 on: July 07, 2013, 03:27:28 pm »
I'm going to have to vote against this.

My biggest issue with it is the pathing, how often do you go straight in and straight out of a system?

You crash a system with your fleet, kill a guardpost and then go off at an angle to kill another guardpost. However, in the battle to kill that second guardpost your Bomber Starship hits the low health threshold and retreats.

The problem is the Bomber Starship goes straight to your entry wormhole, not following the angle path you came in on and wakes a 3rd guard post up before you were ready.

As the Bomber Starship did this automatically you did not notice and are now scrambling to get as much as your fleet out as you are now fighting significantly more AI forces then you expected to.

D.

Offline Shrugging Khan

  • Hero Member Mark III
  • *****
  • Posts: 1,217
  • Neinzul Y PzKpfw Tiger!
Re: Auto-Retreat Behaviour
« Reply #6 on: July 07, 2013, 03:50:37 pm »
So...because it might be bad in certain situations, you oppose its implementation under any circumstances?

By that logic, we'd never have had auto-kite either ???
The beatings shall continue
until morale improves!

Offline Diazo

  • Master Member Mark II
  • *****
  • Posts: 1,717
  • I love/hate Diff 10
Re: Auto-Retreat Behaviour
« Reply #7 on: July 07, 2013, 03:56:19 pm »
Erm, it's more a case of I don't see this being useful 99% of the time and so is not worth spending developer time on, combined with the fact that if you forget this is on and you are in the late game so that guard post the ship retreating wakes up is a couple hundred ships? That's a potential game over (well, more likely a total fleet loss)  if you are riding your fleet right on the edge.

Perhaps it's just my playstyle, but for me a single ship off by itself in AI territory is dead so why would I want a mechanic that automatically sent ships off by themselves in AI territory?

D.

Offline Shrugging Khan

  • Hero Member Mark III
  • *****
  • Posts: 1,217
  • Neinzul Y PzKpfw Tiger!
Re: Auto-Retreat Behaviour
« Reply #8 on: July 07, 2013, 04:55:18 pm »
Maybe you wouldn't.

I can only speak for myself, and I often operate with small, expensive fleets that have a clear rearward path but plenty of incoming fire. Ship gets damaged, I order it to break off and retreat, save the cost of replacing it, keep pressing the attack with the remaining fleet. That's 90% of all orders I ever give, and a fukcton of micromanagement.

And I really can't imagine such an option to require much developer effort. For example:

Quote from: Pseudocode
if: retreat behaviour toggled and ship hp under threshold
->if: rally point(s) on planet
        -> rally
    else if: MSD present
        -> go to MSD
    else if: intact force field present
        -> go to FF
    else if: non-AI planet neighbouring
        -> go to planet
    else
        -> go to homeworld

Something like this would require a bit of code relying on simple numbers and already existing behaviours, one additional option in the Control Group menu, and ideally one item in the Alt-Right-Click menu. Hardly a major affair.

Grrr. Could someone with actual knowledge of the game's code comment on this?
The beatings shall continue
until morale improves!

Offline The Hunter

  • Full Member Mark II
  • ***
  • Posts: 153
  • H/K Mk5
Re: Auto-Retreat Behaviour
« Reply #9 on: July 07, 2013, 05:31:40 pm »
 I could imagine each ship, each frame, checking health, checking every planet starting from nearest, for objects, then checking distance of objects, finding nearest, then checking the way for safeness. Each ship, every single one. It's not rare that we have thousands of ships and i imagine all load that will be required to check that, and AI War is already not the most stable game ever as far as i know, uhhhhhhh...  :-\

But i think i have an idea for solution.
What if, instead of checking for something, we could just set a point, like with an order, for control group where ships would go if their health below X%, that would be MUCH less resource expensive and will be much more customizable. What you all think? :)
« Last Edit: July 07, 2013, 05:33:46 pm by The Hunter »

Offline Shrugging Khan

  • Hero Member Mark III
  • *****
  • Posts: 1,217
  • Neinzul Y PzKpfw Tiger!
Re: Auto-Retreat Behaviour
« Reply #10 on: July 07, 2013, 05:37:06 pm »
Why the hell would you have to run that check every frame? Once every few seconds would do; if there's something that can cause that much damage that quickly, you wouldn't have the time to run x)

Well, not that I would complain about a hotkey for "retreat/rally damaged ships". That'd already help a bit.
The beatings shall continue
until morale improves!

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: Auto-Retreat Behaviour
« Reply #11 on: July 07, 2013, 05:58:07 pm »
There is a "select damage ship" selection modifier (one for <100%, <66%, and <33%), but they are bound to a really weird place by default (Alt+N+number, which each number is a differect selection modifier), and what kinds of selection techniques it does or does not work with is very inconsistent. (Like it doesn't seem to work with pressing the number key for a control group, but it does work for clicking the control group icon on the side bar, IIRC)


Still, this hotkey has saved my low health stuff on multiple occasions.

Offline Draco18s

  • Resident Velociraptor
  • Core Member Mark V
  • *****
  • Posts: 4,251
Re: Auto-Retreat Behaviour
« Reply #12 on: July 08, 2013, 10:17:45 am »
Quote from: Pseudocode
if: retreat behaviour toggled and ship hp under threshold
->if: rally point(s) on planet
        -> rally
    else if: MSD present
        -> go to MSD
    else if: intact force field present
        -> go to FF
    else if: non-AI planet neighbouring
        -> go to planet
    else
        -> go to homeworld

else { go to homworld } would be really bad.  What if you're on a deepstrike six hops out?  Do you really want your damaged and fleeing ships to fly through hostile territory?

Offline madcow

  • Hero Member Mark III
  • *****
  • Posts: 1,153
Re: Auto-Retreat Behaviour
« Reply #13 on: July 08, 2013, 10:43:41 am »
Somewhat related suggestion that I would love. If you could tag ships as "important", then get a message at the top when that ship gets low health. Potentially one for when it reaches its destination, could be a couple options to toggle on/off.

I would definitely use something like that on golems/starships.  Then pause and react on getting a message.

Crusader kings had something similar to tag people as important/of interest.

Offline LordSloth

  • Sr. Member Mark III
  • ****
  • Posts: 430
Re: Auto-Retreat Behaviour
« Reply #14 on: July 08, 2013, 01:53:21 pm »
Frankly, I don't see the need for this, in particular since the MSD is cloaked and only takes five seconds to start repairing. I just often send that along with the main fleet blob, and it'll survive unless area attacks or tachyon units. When I don't have one along I often also use the damage selection filter, but not in an attempt to save every single fleetship, rather between 'engagements'.

Actually, now that AI Patrols are what they are, I often just hit one or three targets, pull back out of system with everything, then repair and return, though I do have some variations with optional unlocks.

So I don't see the need for this, but if it were to be implemented it: Rally Posts are perma-cloaked and can travel between systems at a fairly decent speed. There's 'reclaimed->rally post', damaged->rally post should be pretty flexible, and be adaptable for most of you cases such as FF, engineers, MSD.

I wouldn't mind something like this for golems (but I'd rather see them scaled), starships, and the big spire ships, but I'm not going to be a proponent of spending time on it unless it's simply implemented and relatively simply debugged etc.