aliens

Author Topic: Implemented: UFOs landing  (Read 12921 times)

Offline karvanit

  • Captain
  • ***
  • Posts: 94
    • View Profile
Implemented: UFOs landing
« on: November 11, 2012, 01:55:50 pm »
On the ufo-landings branch I have code that makes UFOs land after reaching their waypoint. It should be bug-free, but since it changes the Ufo API slightly, I have posted here to get people to review it and comment.
The API changes:
  • Added getStatus() and setStatus() to Ufo class.
  • Changed *HoursCrashed() to *TimeOnGround().

The status is automtically changed when the UFO is damaged enough, or has it's altitude changed.
The status member is not saved, it is recalculated on load instead.

PS: I would prefer people using the GitHub comment-on-commit UI, but I'll also monitor this thread.


Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: Implemented: UFOs landing
« Reply #1 on: November 11, 2012, 02:04:00 pm »
yay for one important step towards having a fully working game!

- I assume you also implemented UFOs taking off again after a certain time (fixed time or variable set by mission-type or something?)?

- if they "fulfilled their mission" (aka landed and took off again after timer runs out), how does the "geoscape AI" take notice of this?

- do they also take off again if assaulted on the ground but battle lost/aborted?

Offline karvanit

  • Captain
  • ***
  • Posts: 94
    • View Profile
Re: Implemented: UFOs landing
« Reply #2 on: November 11, 2012, 02:10:13 pm »
- I assume you also implemented UFOs taking off again after a certain time (fixed time or variable set by mission-type or something?)?

- if they "fulfilled their mission" (aka landed and took off again after timer runs out), how does the "geoscape AI" take notice of this?

This does not add proper landing, it just contains the code that can make it possible and lands UFOs for some time before disappering them, to test the code.
 
- do they also take off again if assaulted on the ground but battle lost/aborted?
They get removed from the game. This is fine for now, but what does vanilla XCOM do?
« Last Edit: November 11, 2012, 02:15:39 pm by karvanit »

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: Implemented: UFOs landing
« Reply #3 on: November 11, 2012, 02:47:43 pm »
in the original, if you attack a landed UFO and fail, the UFO immediately takes off and flies away at maximum speed... I'm not sure if the alien mission is already counted as a success, but I think I remember reading that as soon as the UFO lands, it has succeeded.

you don't even need to kill an alien, just land and take off again and the UFO will take off.

(I think that is something that needs changing, too... the UFOs should need a certain time on the ground to "fulfill" their mission, and should simply stay put if the xcom ground mission fails and the alien casualties haven't been too high.)

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Implemented: UFOs landing
« Reply #4 on: November 11, 2012, 03:59:09 pm »
Quote
I think I remember reading that as soon as the UFO lands, it has succeeded.

not as soon as it lands, as soon as it takes off

https://www.ufopaedia.org/index.php?title=Scoring#Alien_Scoring

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: Implemented: UFOs landing
« Reply #5 on: November 11, 2012, 04:04:06 pm »
oh, really? now that is just plain stupid :P  I hope we will fix this, as it is certainly a bug. I think alien missions need counters: a certain amount of time "on the ground" or "hovering at target" is needed for success. if disturbed, the counter will remember, and if the UFO is capable of resuming the mission, it will. anything else would be weird, don't you think?

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Implemented: UFOs landing
« Reply #6 on: November 11, 2012, 04:58:57 pm »
i don't think it's a bug, and it makes logical sense.

when the mission is complete the aliens pack up and go home, the "mission complete" state triggers the "take off" state and the aliens score points.
i do agree your method makes MORE sense, but there's nothing wrong with doing it this way, the only real difference would be that the aliens stay on the ground for x minutes after the "mission complete" state ratehr than taking off immediately.

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: Implemented: UFOs landing
« Reply #7 on: November 11, 2012, 05:12:05 pm »
no, what I meant is the second part of the explanation from the UFOpaedia page you linked to: "If a single ufo lands multiple times, it will score each time it starts flying again including if disturbed by an unsuccessful X-COM mission."

THAT does not make any sense, and it's a bug, or rather a design oversight: yes, it basically makes sense to score the points when the mission is finished, and yes, the mission is (usually) finished once the UFO takes off again, but that does not take into account that the UFO will take off when disturbed by X-Com soldiers. in that case, the condition "UFO takes off" is met under different circumstances, and the aliens score points when they shouldn't :)

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Implemented: UFOs landing
« Reply #8 on: November 11, 2012, 06:08:12 pm »
ah.

well, yay and nay.

i agree that the aliens shouldn't receive a "mission complete" every time you force them to take off without killing them, but you SHOULD be penalized in some way, and aliens scoring 50 points is one way.
« Last Edit: November 11, 2012, 06:26:24 pm by Warboy1982 »

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: Implemented: UFOs landing
« Reply #9 on: November 11, 2012, 06:46:21 pm »
true, but on the other hand the aliens are trying to do something, and if landing there disturbs them, then that's actually something that benefits you, so you might even argue that it should score points for x-com :P

I think it's about fair that nobody scores points directly. the aliens already gain points for flying around on the geoscape; if you took off because you were bloodied by them on the battlefield you probably already lost points; if you just landed and took off again, well, they can land again and continue their mission, and that's not a tactic you can apply indefinitely, because the aliens invariably have more ships than you.

:)

the logical expansion of this line of thought would be to have the aliens call in reinforcements if they notice you flying around their UFOs, which is something that I would really like to see post V1.0 - imagine yourself trying to harrass a scout only to be attacked by a battleship racing in from somewhere :)

(of course, that might enable you to "draw" battleships and counter-attack them, if you have the firepower...)

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Implemented: UFOs landing
« Reply #10 on: November 11, 2012, 07:00:51 pm »
i actually wanted to look into ufos targeting YOUR ships for interception. maybe have ships with important missions be escorted by fighter craft that would move to counter-intercept you, stalling you for time at the very least, and necessitating multiple simultaneous interceptions. also i want dogfights to NOT pause the game to facilitate this, and add a sense of urgency, but these are features for my mod branch, and only after d2uriel's work gets merged.

man, got a bit off topic here.

yay for landing UFOs!

Offline 54x

  • Colonel
  • ****
  • Posts: 208
    • View Profile
Re: Implemented: UFOs landing
« Reply #11 on: January 05, 2013, 12:09:25 pm »
ah.

well, yay and nay.

i agree that the aliens shouldn't receive a "mission complete" every time you force them to take off without killing them, but you SHOULD be penalized in some way, and aliens scoring 50 points is one way.

Maybe aliens should keep a decimal value of how much they've completed of their mission once landed, and then if you fail to grab them on the ground, that value multiplies with the full completion score for a partial completion bonus when they take off?

If we ever patch in depleting alien supplies, you could use the same value for missions that involve "unloading". Likewise a terror ship could actually land for a small amount of time to deploy its troops, giving you a chance to "intercept" it on the ground if you detect it within time.

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: Implemented: UFOs landing
« Reply #12 on: January 05, 2013, 02:37:21 pm »
that would make perfect sense  :)

let's take a look at alien missions, though, to see what aliens should score points for:



Alien Research  - should score points based on percentage, even if disturbed and xcom ground mission is won, I think. after all, they are researching something, and will probably transmit their findings as soon as they are made.

Alien Harvest  - should score points based on percentage, even if disturbed and xcom ground mission is won, I think. to reflect the amount of damage they have done.

Alien Abduction  - just like alien harvest

Alien Infiltration  - should only score points once completed, I think. in other cases, the infiltration simply failed, right?

Alien Base  - should only score points once completed, I think. in other cases, the aliens failed to establish a base, right? although you might argue that those are usually carried out by several ships, so maybe they will use a common "counter"? catching one of the UFOs would slow them down, but wouldn't stop them :)

Alien Terror  - should not take much time! I think the (empty) UFO should fly away, but dropping some terror units shouldn't take more than five minutes. the UFO's mission is completed as soon as the terror units are dropped off. we might make it a possibility to catch the UFO on the ground with its crew still disembarking, but you'd have to dogfight-standoff-chase the UFO to the destination city. even then, the aliens should score points for the mission, because you have to fight the aliens inside a city, which causes panic and endangers civilians, so the aliens got what they wanted. even if they lose the battle on the ground and lose the UFO, too. still, this might be worth it for the added loot and for avoiding the dangerous air-combat against a terror ship! but you'd need a fast troop transport to catch them on the ground, probably an avenger, though a lightning might work :)

Alien Retaliation  - that's only UFOs looking for your base, right? they won't land anyway. so they should score points for the time they spend searching undisturbed.

Alien Supply  - those should definitely score points based on the percentage of time they spent on the ground (and ideally, should have less loot aboard also depending on the time already spent)

Offline 54x

  • Colonel
  • ****
  • Posts: 208
    • View Profile
Re: Implemented: UFOs landing
« Reply #13 on: January 06, 2013, 02:43:40 am »
I think the UFO should carry a few more of the primary aliens than the terror mission, and fly away with those extra aliens. (the terror ship's flight crew, if you will. This could just be one or two aliens for a medium craft, or up to 5 for a terror ship) So if you do manage to catch it on the ground you have a tradeoff: more aliens to fight, (and a ship to salvage) but no civilians to protect. If you wanted to get really cool, we could hook in some custom spawning code to the battlescape and you could dictate how many aliens are placed outside the UFO at mission start by the percentage their deployment completed before they were intercepted. :)

On Alien Base: While I like the idea of that mission being all-or-nothing, if we do implement depleting supply ships, (maybe a depleted engine object, and some of their other objects being deleted from the map template?)  the mission progress should also be used to drain the battleship carrying out the mission. (Or the ships, once we have escorts in place)

edit: There ought to also be a "Rescue Mission" type when you leave a crashed UFO for too long, preferably harder to detect than other missions so that you can't farm the rescue ships. The aliens shouldn't just disappear, they should quickly pick up their survivors and destroy the damaged ship. I realise this wasn't in the original, but that was precisely to prevent this kind of farming and to save game design resources. We have as much time as whoever's coding wants to spend, so it would be really cool to implement that. :)
« Last Edit: January 06, 2013, 02:51:46 am by 54x »

Offline Ran

  • Colonel
  • ****
  • Posts: 196
    • View Profile
Re: Implemented: UFOs landing
« Reply #14 on: March 05, 2013, 07:49:54 pm »
I support this!

While I think landing now works pretty nicely, the behavior of UFOs in general could be improved. I've made some suggestions here.:
https://openxcom.org/forum/index.php/topic,1035.0.html

Something else that has always bothered me:
Please don't make Terror- and Battleships disappear after they reach their destination, let them fly home. This may mean to alter their crew as most has been dropped - or you make them speed away for a short distance and then leave earth so they cannot be intercepted anyway.