OpenXcom Forum

Modding => Help => Topic started by: Alpha Centauri Bear on October 20, 2020, 09:53:21 pm

Title: UFO firing frequency in UFO and TFTD
Post by: Alpha Centauri Bear 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?
Title: Re: UFO firing frequency in UFO and TFTD
Post by: Alpha Centauri Bear 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.
Title: Re: UFO firing frequency in UFO and TFTD
Post by: Meridian 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]
Title: Re: UFO firing frequency in UFO and TFTD
Post by: Alpha Centauri Bear 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!