Land at 80% for aircraft

Land at 80% for aircraft

Requests for features in the spring code.

Moderator: Moderators

Post Reply
Viktor
Spring Developer
Posts: 19
Joined: 21 Jun 2007, 22:22

Land at 80% for aircraft

Post by Viktor »

How about to add 80% in Land At switch and Land to repair pad and repair now command for aircraft?
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post by Neddie »

You know, I think that would be a good idea. Is there a way to allow the landing options to be decided game-side by the modder - I know some would benefit from being able to choose what is available to the players.
Lippy
Posts: 327
Joined: 16 Jul 2006, 00:24

Post by Lippy »

That would be very useful I think. It would be best if the aircraft, after repairing, would go back to what it was doing before-hand.

But then again this could probably be done with a lua widget.
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post by Neddie »

Well, couldn't it insert a wait command, go in for the repair, and then resume the prior routine? Or just insert the repair in the middle of the command chain - I'm not sure if that can be done yet, but it would be helpful.
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Post by 1v0ry_k1ng »

+ 10000000

i suggested this to tobi not long ago, though i said 70%
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Post by SwiftSpear »

Modders need alot more power when it comes to dealing with aircraft. This is something I can see being quite useful though. Different mods might need a different percentage figure though... heck in BA if my plane hits 50% I know it's not going to survive much longer and it would save me the res if it doubled back.

[edit] Not having the ability to turn this off also might break FF completely...
j5mello
Posts: 1189
Joined: 26 Aug 2005, 05:40

Post by j5mello »

isn't land at zero basically turning it off?

oh in concert with this is it possible to get air facs to display the land at option and pass it down to created units much like fire and move states?
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Post by Pxtl »

Fundamentally, I'd rather _all_ the non-TA default switches (particularly the ones controlling complex AI behaviour like Land At) be factored out into a scripted approach. Mod-defined script-driven switches FTW.

Has anyone ever used the immelman switch?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

That would nuke AIs
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Post by Pxtl »

AF wrote:That would nuke AIs
AIs are capable of doing the LandAt orders directly (as in, monitoring the health of every air unit and telling it to return for repairs if it believes it is too damaged).

LandAt is really a unit-AI that got incorporated into the main Spring code because UnitAIs are too cumbersome for things that are absolutely necessary.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Pxtl wrote:Fundamentally, I'd rather _all_ the non-TA default switches (particularly the ones controlling complex AI behaviour like Land At) be factored out into a scripted approach. Mod-defined script-driven switches FTW.
I think the line shouldn't be drawn between TA and non-TA. Ideally on/off and cloaked would get turned into Lua as well.

Obviously there needs to be some interface between the AI and Lua.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Ys but then you have 2 conflicting routines fighting eachother
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

AF wrote:Ys but then you have 2 conflicting routines fighting eachother
What do you mean?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

AI says return at 60%
Mod script says return at 80%

both argue over when aircraft should return. The end result being it returns at 80% not 60% and the AI routine assumes the units at the frontline fighting when actually its returned. The unit risks being kicked off of the merrygo round of orders and being abandoned by the AI because the AI is waiting for it to finish a task itll never start.
User avatar
LathanStanley
Posts: 1429
Joined: 20 Jun 2005, 05:16

Post by LathanStanley »

make a slider.

land at "x" (push slider)

:roll:
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

AF wrote:AI says return at 60%
Mod script says return at 80%

both argue over when aircraft should return. The end result being it returns at 80% not 60% and the AI routine assumes the units at the frontline fighting when actually its returned. The unit risks being kicked off of the merrygo round of orders and being abandoned by the AI because the AI is waiting for it to finish a task itll never start.
Why would that happen? If the mod says "this plane goes back at 80%" and wants it to stay at that the AI or the user won't have the option of changing it.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Right nown planes go back at a certain percentage that can be changed by the user.

For some mods it would be best to return at 80%.

It was suggested that the AI could use its own routine to make units go back at a certain health other than 80.

Lets envisage the following scenario

Code: Select all

ATTACK TASK BEGIN
ISSUE ORDER TO ATTACK UNIT X
WAIT UNTILL UNIT X DIES, THEN RELEASE UNIT AND DESTROY THIS TASK
ATTACK TASK END
Now lets say the mod sends the unit back to base before unit x dies. the unit will stay at the base indefinately untill unit x dies either through self destruct or some other unit. Because the AI has no information about this 80% rule, the AI continues to wait and the unit remains idle.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

That applies to all CommandAI stuff, which is bound to become more flexible, not less. (e.g. CommandAI decides to chase enemy unit, AI doesn't know and thinks the unit is still at it's old place and makes wrong decisions because of this...)

Also like the current repair system, I'd presume the aircraft would continue it's previous orders after repairing, so there would be no problem for the AI.

(If it wouldn't resume it's orders it would be useless micro which is against the spirit of Spring)

My underlying point is that an AI should be flexible and not blindly trust all layers below it always behave exactly the same. (If it assumes this it's prone to break too if e.g. CommandAI behaviour changes, which it does sometime..., or if you ever want to implement decent comsharing with humans)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Its fine saying that but your not the one who has a thousand things to account for aswell as a thousand things to account for just incase that you arent sure about.

com sharing with the player also nukes a huge number of AI routines, placing immense constraints on your AIs setup and requiring that the AI be simplified in such a way that the AIs difficulty is compromised greatly or the AI maker has to put in a great amount of effort. If it happens, it happens by consequence.
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Post by Acidd_UK »

There are several 'do this once then return to previous order queue' commands that i could see being useful - you set your factory to get bombers to patrol near your front lines. Then when you have a few bombers, set them to 'attack point/target/area'. They would go in and fire their weapons once (useful for bombers, obv) then return to their original patrol. Would anyone else find that really useful?
Post Reply

Return to “Feature Requests”