How does the game determine where to send Alien Terror missions?


  • Please log in to reply
11 replies to this topic

#1 magic9mushroom

magic9mushroom

    Lieutenant

  • Members
  • PipPipPipPip
  • 258 posts

Posted 08 July 2018 - 07:31 AM

Okay, I know ACTS.DAT isn't used when determining where to send Terror missions (since all the Terror values are 0), and my understanding is that ZONAL.DAT isn't used either (from what I hear, the aliens continue to attempt Terror after all values in ZONAL.DAT have been set to zero; moreover, there are several zones in ZONAL.DAT which don't have any cities).

So, how does the game determine where to send the Alien Terror mission for a given month? I can't find any data about it on UFOpaedia.

-m9m

#2 Zombie

Zombie

    Mr. Grognard of X-COM

  • Admin
  • PipPipPipPipPipPip
  • 5,468 posts
  • Gender:Male
  • Location:Wisconsin, USA

Posted 08 July 2018 - 01:57 PM

I believe it's just randomly chosen from from ZONAL first, then a city either within the zone or nearby to it (at least that's how I remember it was explained. Not sure who anymore, maybe it was Seb76 or Zaimoni). ;)

- Zombie

My X-COM Patch Kit For UFO Defense | Emergency XCOM Meeting spoof on YouTube




JellyfishGreen said:

Zombie: Empirical data's your only man, when formulating a research plan.
A soldier's death is never in vain if it makes the formula more plain.
A few dozen make a better case for refining that third decimal place.
They call me Zombie because I don't sleep, as I slowly struggle to climb this heap,
of corpses, data points, and trials, but from the top - I'll see for miles!

#3 magic9mushroom

magic9mushroom

    Lieutenant

  • Members
  • PipPipPipPip
  • 258 posts

Posted 09 July 2018 - 02:06 AM

View PostZombie, on 08 July 2018 - 01:57 PM, said:

I believe it's just randomly chosen from from ZONAL first, then a city either within the zone or nearby to it (at least that's how I remember it was explained. Not sure who anymore, maybe it was Seb76 or Zaimoni). Posted Image

- Zombie

Nope. Just tested this with a hacked ZONAL.DAT: I set everything except Europe to 00, but on three reloads I got Terror in Europe, North America and South America. My guess would be a fixed value in the executable, but I've no idea how to extract stuff from there.

#4 Hobbes

Hobbes

    Peace through superior hairdos!

  • Fan Fiction
  • PipPipPipPipPip
  • 1,197 posts
  • Gender:Male
  • Location:Area 51

Posted 11 July 2018 - 12:39 AM

View Postmagic9mushroom, on 09 July 2018 - 02:06 AM, said:

Nope. Just tested this with a hacked ZONAL.DAT: I set everything except Europe to 00, but on three reloads I got Terror in Europe, North America and South America. My guess would be a fixed value in the executable, but I've no idea how to extract stuff from there.

Here are the regional weights when the game spawns a Terror mission (source: OpenXCom)
  • North America: 18
  • Arctic: 4
  • Antarctic: 4
  • South America: 10
  • Europe: 16
  • North Africa: 12
  • South Africa: 8
  • Central Asia: 12
  • Southeast Asia: 15
  • Siberia: 10
  • Australia: 10

Terrain Pack - 44 new terrains for the original game, using OpenXcom

My X-COM Fan Fictions: The Unknown Menace, Abyssal, Eulogy

#5 magic9mushroom

magic9mushroom

    Lieutenant

  • Members
  • PipPipPipPip
  • 258 posts

Posted 11 July 2018 - 04:43 AM

View PostHobbes, on 11 July 2018 - 12:39 AM, said:

Here are the regional weights when the game spawns a Terror mission (source: OpenXCom)
  • North America: 18
  • Arctic: 4
  • Antarctic: 4
  • South America: 10
  • Europe: 16
  • North Africa: 12
  • South Africa: 8
  • Central Asia: 12
  • Southeast Asia: 15
  • Siberia: 10
  • Australia: 10
I am 99.99% sure you're wrong about Arctic and Antarctic. If OpenXCom agrees with you then it's wrong too.

(I tested this 132 times, enough to get 10 instances for every other zone there. Zero for Arctic and Antarctic. The probability of never rolling that 8 out of 119 is 0.000102; that's well into significant territory.)

#6 Hobbes

Hobbes

    Peace through superior hairdos!

  • Fan Fiction
  • PipPipPipPipPip
  • 1,197 posts
  • Gender:Male
  • Location:Area 51

Posted 11 July 2018 - 11:27 AM

View Postmagic9mushroom, on 11 July 2018 - 04:43 AM, said:

I am 99.99% sure you're wrong about Arctic and Antarctic. If OpenXCom agrees with you then it's wrong too.

It's not possible to have Terror missions in the Arctic/Antarctic because there are no cities on those regions, that's why you're getting 0 missions. I should have removed those values from the list, like I removed the values for the Atlantic/Indian oceans (no cities there too). Those values are only used for determining Retaliation missions in the case of the Arctic/Antarctic/Atlantic/Indian.

Quote

(I tested this 132 times, enough to get 10 instances for every other zone there. Zero for Arctic and Antarctic. The probability of never rolling that 8 out of 119 is 0.000102; that's well into significant territory.)

While testing 132 times is a lot of effort, even if you tested 1000 times you could still get a series of results that doesn't correspond to the theoretical distribution based on the predefined weights, regardless of the probability of that series of results happening.  That's the problem with those empirical tests - if you're only relying on those results you could be basing your entire conclusions on flawed data because the sample was not large enough.

OpenXCom reverse engineered the original code, so it determined how exactly the values on the game files (ZONAL.DAT and others) are used by the engine. The developers had to figure it all out by themselves so it's possible that mistakes were made, and Warboy has figured out a couple of them simply because of my questions that made him recheck the original code.

It's a matter of deductive vs inductive logic
Terrain Pack - 44 new terrains for the original game, using OpenXcom

My X-COM Fan Fictions: The Unknown Menace, Abyssal, Eulogy

#7 magic9mushroom

magic9mushroom

    Lieutenant

  • Members
  • PipPipPipPip
  • 258 posts

Posted 11 July 2018 - 11:42 AM

View PostHobbes, on 11 July 2018 - 11:27 AM, said:



It's not possible to have Terror missions in the Arctic/Antarctic because there are no cities on those regions, that's why you're getting 0 missions. I should have removed those values from the list, like I removed the values for the Atlantic/Indian oceans (no cities there too). Those values are only used for determining Retaliation missions in the case of the Arctic/Antarctic/Atlantic/Indian.

You're the one who said those were the regional weights for a Terror mission. :P

But yeah, the initial values for ZONAL.DAT minus the six regions without cities (Arctic, Antarctic, Pacific, N Atlantic, S Atlantic, Indian Ocean) sounds pretty plausible.

#8 Hobbes

Hobbes

    Peace through superior hairdos!

  • Fan Fiction
  • PipPipPipPipPip
  • 1,197 posts
  • Gender:Male
  • Location:Area 51

Posted 11 July 2018 - 12:05 PM

View Postmagic9mushroom, on 11 July 2018 - 11:42 AM, said:

But yeah, the initial values for ZONAL.DAT minus the six regions without cities (Arctic, Antarctic, Pacific, N Atlantic, S Atlantic, Indian Ocean)

Pacific has a city (Hawaii) so terror missions can spawn there

View Postmagic9mushroom, on 11 July 2018 - 11:42 AM, said:

You're the one who said those were the regional weights for a Terror mission. Posted Image

I was trying to make it simple to understand since the values are also used for Retaliation :P
Terrain Pack - 44 new terrains for the original game, using OpenXcom

My X-COM Fan Fictions: The Unknown Menace, Abyssal, Eulogy

#9 magic9mushroom

magic9mushroom

    Lieutenant

  • Members
  • PipPipPipPip
  • 258 posts

Posted 11 July 2018 - 12:40 PM

View PostHobbes, on 11 July 2018 - 12:05 PM, said:

Pacific has a city (Hawaii) so terror missions can spawn there

No, that's from TFTD. Hawaii isn't a marked location in UFO.

(And in any case, it didn't show up in my test.)

#10 Hobbes

Hobbes

    Peace through superior hairdos!

  • Fan Fiction
  • PipPipPipPipPip
  • 1,197 posts
  • Gender:Male
  • Location:Area 51

Posted 11 July 2018 - 01:16 PM

View Postmagic9mushroom, on 11 July 2018 - 12:40 PM, said:

No, that's from TFTD. Hawaii isn't a marked location in UFO.

(And in any case, it didn't show up in my test.)

Thanks for the correction ;)
Terrain Pack - 44 new terrains for the original game, using OpenXcom

My X-COM Fan Fictions: The Unknown Menace, Abyssal, Eulogy

#11 magic9mushroom

magic9mushroom

    Lieutenant

  • Members
  • PipPipPipPip
  • 258 posts

Posted 12 July 2018 - 05:00 AM

Incidentally...

View PostHobbes, on 11 July 2018 - 11:27 AM, said:

While testing 132 times is a lot of effort, even if you tested 1000 times you could still get a series of results that doesn't correspond to the theoretical distribution based on the predefined weights, regardless of the probability of that series of results happening.  That's the problem with those empirical tests - if you're only relying on those results you could be basing your entire conclusions on flawed data because the sample was not large enough.

OpenXCom reverse engineered the original code, so it determined how exactly the values on the game files (ZONAL.DAT and others) are used by the engine. The developers had to figure it all out by themselves so it's possible that mistakes were made, and Warboy has figured out a couple of them simply because of my questions that made him recheck the original code.

It's a matter of deductive vs inductive logic

I'm aware of the issue. That's why I didn't at any point make claims about what the ratios were (only what they weren't), and went for a 99.9% confidence before even saying what they weren't.

Theory is the only way to get understandable and trustworthy answers, certainly, but if a theory doesn't explain empirical facts it's not describing reality. What we just found out about the zone selection for Retaliation is a good example of how you need both; explanations without testing are treacherous, while tests without explanations are blind. :)

#12 Hobbes

Hobbes

    Peace through superior hairdos!

  • Fan Fiction
  • PipPipPipPipPip
  • 1,197 posts
  • Gender:Male
  • Location:Area 51

Posted 12 July 2018 - 12:32 PM

View Postmagic9mushroom, on 12 July 2018 - 05:00 AM, said:

What we just found out about the zone selection for Retaliation is a good example of how you need both; explanations without testing are treacherous, while tests without explanations are blind. Posted Image

Exactly. This is why I like people still testing the original game to see how their results compare to OpenXCom's implementation of those same features :)
Terrain Pack - 44 new terrains for the original game, using OpenXcom

My X-COM Fan Fictions: The Unknown Menace, Abyssal, Eulogy




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users