aliens

Author Topic: UFO firing frequency in UFO and TFTD  (Read 381 times)

Offline Alpha Centauri Bear

  • Captain
  • ***
  • Posts: 73
    • View Profile
UFO firing frequency in UFO and TFTD
« on: October 20, 2020, 09:53:21 pm »
Compare these articles.

https://www.ufopaedia.org/index.php/UFOs#Quick_Comparison_Table
*** Actual interval between UFO attacks is calculated by subtracting 2 per difficulty level from this value, then randomly increasing the result by 0-100%. For example, the Battleship on Superhuman (difficulty 4 in the game code) will fire every 16 to 32 frames (average 24).

https://www.ufopaedia.org/index.php/Alien_Submarines#Alien_Submarine_Overview
*** Actual interval between Alien Sub attacks is calculated by subtracting 2 per difficulty level from this value, then randomly increasing the result by 0-100%. For example, the Dreadnought on Superhuman (difficulty 6 in the game code) will fire every 12 to 24 frames (average 18).

Is it really different in UFO and TFTD?

This is the only line of code I see regarding that.
https://github.com/MeridianOXC/OpenXcom/blob/986efaaa5fbd028e94e69d5870b868bafd1aad55/src/Savegame/SavedGame.cpp#L1008

So it seems it cannot possible be more than 4.

Meridian, can you confirm how it works in OpenXcom Extended TFTD?

Offline Alpha Centauri Bear

  • Captain
  • ***
  • Posts: 73
    • View Profile
Re: UFO firing frequency in UFO and TFTD
« Reply #1 on: October 20, 2020, 10:01:16 pm »
Update.

Apparently difficulty coefficients are set in xcom2/difficulty.rul as below:
difficultyCoefficient: [0, 1, 2, 4, 6]

That explains *6* in the TFTD article above. Doesn't explain *4* in UFO article, though.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 6814
  • OXCE developer
    • View Profile
    • My Wiki
Re: UFO firing frequency in UFO and TFTD
« Reply #2 on: October 20, 2020, 10:58:54 pm »
difficulty coefficients in UFO are: [0, 1, 2, 3, 4] and in TFTD: [0, 1, 2, 4, 6]

Offline Alpha Centauri Bear

  • Captain
  • ***
  • Posts: 73
    • View Profile
Re: UFO firing frequency in UFO and TFTD
« Reply #3 on: October 21, 2020, 12:26:25 am »
difficulty coefficients in UFO are: [0, 1, 2, 3, 4] and in TFTD: [0, 1, 2, 4, 6]

😅

Thank you for resolving this!