aliens

Author Topic: UFO trajectory circling over a small area + no landing  (Read 3402 times)

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
UFO trajectory circling over a small area + no landing
« on: November 01, 2018, 06:34:25 pm »
I never really understood UFO trajectories.
I'd need a trajectory where the UFO circles over a (relatively) small land area for a while (like when it's scanning for an X-Com base), but never lands, then disappears (spawning an alien base type site after it).
I'd also need the UFO to appear and disappear in place, without circumnavigating the whole globe like UFOs usually do to reach the "exit zone".
Can it be done?

This is the default trajectory for last UFO of alien base mission, so guess it should be something derived from this:
Code: [Select]
  - id: P6
    groundTimer: 5000
    waypoints:
      - [5, 4, 100]
      - [0, 3, 50]
      - [0, 2, 25]
      - [4, 1, 16]
      - [5, 0, 100]

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: UFO trajectory circling over a small area + no landing
« Reply #1 on: November 02, 2018, 04:25:06 am »
I'd need a trajectory where the UFO circles over a (relatively) small land area for a while (like when it's scanning for an X-Com base), but never lands, then disappears (spawning an alien base type site after it).

The only way to circle a specific area would be to create a number of missionZones and then create a trajectory where the UFO goes from one MissionZone to the other.

Quote
I'd also need the UFO to appear and disappear in place, without circumnavigating the whole globe like UFOs usually do to reach the "exit zone".
Can it be done?

UFOs circumnavigate the whole world because their entry/exit areas (missionZone 5 in vanilla) are set thousands of kilometers away

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9092
    • View Profile
Re: UFO trajectory circling over a small area + no landing
« Reply #2 on: November 02, 2018, 01:15:15 pm »
Code: [Select]
    waypoints:
      - [A, B, C]
      - [D, E, F]
      - [G, H, I]
      - [J, K, L]
      - [M, N, P]

means:
1. go from zone A to zone D at altitude B and speed C
2. go from zone D to zone D at altitude E and speed F
3. go from zone D to zone G at altitude H and speed I
4. go from zone G to zone J at altitude K and speed L
5. go from zone J to zone M at altitude N and speed P

Please note especially line #2, where zone D is targeted AGAIN, this is the only duplicity, everything else happens only once.

Also, if any altitude (B, E, H, K or N) would be zero (=ground), the UFO would first wait landed in the start zone for some time before taking off to the destination zone.

--

So, if you don't need a perfect circle, you can just wander around one of the zones aimlessly (e.g. zone 0),
stay at altitude 2, i.e. never land
and go at some random speeds from 100 to 50

Code: [Select]
    waypoints:
      - [0, 2, 100]
      - [0, 2, 90]
      - [0, 2, 80]
      - [0, 2, 70]
      - [0, 2, 60]
      - [0, 2, 50]
      - [0, 2, 60]
      - [0, 2, 70]
      - [0, 2, 80]
      - [0, 2, 90]
      - [0, 2, 100]

Or, if you must have a circle, define additional zones in each region in a circular pattern (e.g. 4 for square approximation of the circle: zones 6,7,8,9) and go from one to another, like this:

Code: [Select]
    waypoints:
      - [6, 2, 100]
      - [7, 2, 100]
      - [8, 2, 100]
      - [9, 2, 100]
      - [6, 2, 100]
      - [7, 2, 100]
      - [8, 2, 100]
      - [9, 2, 100]
      - [6, 2, 100]
      - [7, 2, 100]
      - [8, 2, 100]
      - [9, 2, 100]
« Last Edit: November 02, 2018, 01:18:15 pm by Meridian »

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: UFO trajectory circling over a small area + no landing
« Reply #3 on: November 02, 2018, 04:44:34 pm »
Code: [Select]
    waypoints:
      - [A, B, C]
      - [D, E, F]
      - [G, H, I]
      - [J, K, L]
      - [M, N, P]

means:
1. go from zone A to zone D at altitude B and speed C
2. go from zone D to zone D at altitude E and speed F
3. go from zone D to zone G at altitude H and speed I
4. go from zone G to zone J at altitude K and speed L
5. go from zone J to zone M at altitude N and speed P
Thanks for the exceptionally detailed answer.
If had to guess the behavior of your example route I would have said:

1. spawn at A at altitude B and speed C (if B=0, land there for x time);
2. go to D at at altitude E and speed F (if E=0, land there for x time);
3. go to G at altitude H and speed I (if H=0, land there for x time);
4. go to J at altitude K and speed L (if K=0, land there for x time);
5. go to M at altitude N and speed P (if N=0, land there for x time) and despawn there.

Why the duplicity at D happens though? Is is hardcoded to hit the second waypoint twice?

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9092
    • View Profile
Re: UFO trajectory circling over a small area + no landing
« Reply #4 on: November 02, 2018, 05:04:59 pm »
The issue is that there is always one more waypoint than flight segments, for example here we have 5 flight segments (and 6 waypoints).

And if we mix 5 objects with 6 objects in 5 lines... somewhere we need to make a (voluntary) mistake/compromise :)

We could do:
1. 5 lines for 5 flight segments...in that case we need one extra waypoint from somewhere (and yes, it is hardcoded to be the 2nd waypoint)
2. 6 lines for 5 flight segments...in that case, one altitude and one speed would be redundant... similar to your example where for example speed C is meaningless, because you switch immediately to speed F... and altitude B or N (depending on how you read it) is meaningless too
3. completely different representation, which doesn't mix flight segments and waypoints

Solution 3 would be "best", but we already have solution 1... and backwards-compatibility is a thing.
« Last Edit: November 02, 2018, 05:07:52 pm by Meridian »