View Issue Details

IDProjectCategoryLast Update
0006024AI War 1 / ClassicSuggestion - Unit Abilities And BehaviorsFeb 22, 2012 6:07 pm
ReporterSpikey00 Assigned To 
Status consideringResolutionopen 
Product Version5.025 
Summary0006024: Units ejected from maws, and freed from tractorship should retain their previous orders
DescriptionAs the title suggests, I'd like to see units that were interrupted--either from maws or tractor beams, to resume their previous orders before the swallow/tractored state. If they had no previous orders, I'd like for them to return to their positions prior.
TagsNo tags attached.
Internal WeightFeature Suggestion

Activities

TechSY730

Feb 20, 2012 1:25 pm

reporter   ~0019461

Two cases to considers:
What if the ship was moved to another planet during that time? Should it try to move back to its original planet?
What if it was an attack order on a target that no longer exists by the time they are freed? (If they had multiple orders, they should just move on to the next order, and repeat this. If not, then what?)

Spikey00

Feb 20, 2012 2:17 pm

reporter   ~0019465

They should return to its original planet and if possible to their original location or order, yes. That's when everyone loses track of where those ships are and assume they were lost.

As for the latter, then I suppose it should move back to its original position--that's what I would prefer it to do.


In case there's a rally point fanatic who puts one on each planet, perhaps a CTRL option should be provided to override this default behavior and force the ships to return to the nearest rally point.

TechSY730

Feb 20, 2012 3:22 pm

reporter   ~0019469

So basically,

Resume_Order_On_Freed_From_Captivity(Ship s)
boolean doAutoMoveAnyways = s.orders[0].isAutoOrder; //If the current order was automatically obtained, like shooting at the guy who tractored me, then go ahead and try to move back anyways
if(!s.DoOrders() || doAutoMoveAnyways) //Causes s to process its order queue, executing the actions in order, just like normal. Returns true if at least one order was valid and executed
{
    //No orders done, add a default action, move to planet, or move to coordinate if already on that planet
    //Always use current planet rally post control option
    if(Controls.getForPlayer( s.player).alwaysUseCurrentPlanetRallyOnCaptivityFree && s.planet.ContainsRallyPost())
    {
       s.orders.Add(new RallyPostOrder(s.planet.getRandomRallyPost()));
    }
    else if(s.preCaptivePlanet != null && s.planet != s.preCaptivePlanet)
    {
       s.orders.Add(new PlanetMoveOrder(s.preCaptivePlanet, s.preCaptiveMoveType));
    }
    if(Controls.getForPlayer( s.player).alwaysUseOriginalPlanetRallyOnCaptivityFree) && s.preCaptivePlanet != null && s.preCaptivePlanet.ContainsRallyPost())
    {
        s.orders.Add(new RallyPostOrder(s.preCaptivePlanet.GetRandomRallyPost()); //Note, by the time this order executes, the ship is already on the pre captive planet
    }
    else if(s.preCaptiveCoordinates != null)
    {
       s.orders.Add(new MoveOrder(s.preCaptiveCoordinates, s.preCaptiveMoveType); //Note, by the time this order executes, the ship is already on the pre captive planet
    }
    s.doOrders();
}

TechSY730

Feb 20, 2012 3:26 pm

reporter   ~0019470

Now, I of course don't have AI war's class structure in front of me, so I am guessing wildly on method and property names.

Also, the "preCaptiveX" properties will need to be added for this suggestion to work. Basically, everytime a ship is tractored or eaten, these properties will need to be updated.

Not sure about the "when to clear" policies of these new properties should be. Maybe once they get back to their original planet?

zoutzakje

Feb 22, 2012 6:07 pm

reporter   ~0019613

can't believe I didn't think of putting this on mantis before. released ships from maws just doing nothing has always bugged me. I always have to reselect my ships in order to let them do what I want... and then they get eaten again -.- kinda annoying.

Issue History

Date Modified Username Field Change
Feb 19, 2012 5:38 pm Spikey00 New Issue
Feb 20, 2012 10:40 am tigersfan Internal Weight => Feature Suggestion
Feb 20, 2012 10:40 am tigersfan Status new => considering
Feb 20, 2012 1:25 pm TechSY730 Note Added: 0019461
Feb 20, 2012 2:17 pm Spikey00 Note Added: 0019465
Feb 20, 2012 3:22 pm TechSY730 Note Added: 0019469
Feb 20, 2012 3:26 pm TechSY730 Note Added: 0019470
Feb 22, 2012 6:07 pm zoutzakje Note Added: 0019613