Difference between revisions of "Talk:UFO Interception"

From UFOpaedia
Jump to navigation Jump to search
m (Reorganising, no content added)
Line 196: Line 196:
 
  Cannon          1/2      ALL      40
 
  Cannon          1/2      ALL      40
 
  Stingray        1/16    Agg      98
 
  Stingray        1/16    Agg      98
                          Std      65
+
                1/24    Std      65
                          Cau      49
+
                1/32    Cau      49
 
  Avalanche      1/24    Agg      107
 
  Avalanche      1/24    Agg      107
                          Std      71
+
                1/36    Std      71
                          Cau      53
+
                1/48    Cau      53
 
  Laser Cannon    1/12    ALL      65
 
  Laser Cannon    1/12    ALL      65
 
  Plasma Beam    1/12    ALL      187
 
  Plasma Beam    1/12    ALL      187
 
  Fusion Ball    1/16    Agg      460
 
  Fusion Ball    1/16    Agg      460
                          Std      307
+
                1/24    Std      307
                          Cau      230
+
                1/32    Cau      230
  
 
(The firepower value is an arbitrary relative number based on 16gs of firing)
 
(The firepower value is an arbitrary relative number based on 16gs of firing)

Revision as of 10:34, 6 November 2009

Pursuit

TBD: Discuss pursuit on the Geoscape, bad intercept vector algorithm, speed differences, etc. Also re-engaging targets, targets that land, over land vs over water, multiple interceptors.

Engagement

Interception Attack Modes

[TBD Summarise. Actually the main article already summarises this well.]

I noticed recently that the different attack modes have different functions. I'll briefly summarize what I saw here, and if someone can confirm, we can add it to the wiki.

Cautious Attack: Enter range to fire with longest range weapon. Pull back to standoff distance if craft takes damage from UFO return fire.
Standard Attack: Enter range to fire with both weapons. Pull back to standoff distance if craft takes significant damage from UFO return fire [in one shot?].
Aggressive Attack: Chase UFO to get as close as possible(64 range units), firing weapons all the way. Never pull back to standoff distance.

Also, the UFO seems to have a greater chance of running away at the more cautious settings, [and vice versa] but that makes sense. ;) Arrow Quivershaft 01:29, 29 February 2008 (PST)

I'm not entirely sure what the differences in behaviour regarding pulling out into standoff range when damaged are between the various modes (hadn't really noticed it too much myself), but the modes mainly function at adjusting the range of the craft and UFO.
In short: out of firing range, longest ranged weapon, shortest range weapon and as close as possible. One note about cautious mode is that it will revert to the next closest loaded weapon. If the longest range weapon runs out of ammo, the ship will close in to the next best weapon.
It's odd we left this explanation out, but yeah it needs to be there. - NKF 02:22, 29 February 2008 (PST)

Any Interception craft at "Cautious Attack" that takes damage will attempt to retreat out of range to Standoff distance. Craft on "Standard Attack" will do the same sometimes. I see it most often when chasing Battleships with Firestorms or Avengers, and they get knocked good by a shot from the Battleship. Happens more often with Firestorms, so it's probably percentage based. Craft on "Aggressive Attack" will never return to standoff distance unless changed to a different mode or ordered to pull back or disengage; in that mode, the mentality is "Him or me."

I don't get to see this much anymore because I usually use Aggressive Attack because a lone Avenger can go toe-to-toe with a Battleship and still make it back in fairly good shape(30% damage or so). A Firestorm can usually manage to limp back as well, but in considerably worse condition. Arrow Quivershaft 12:25, 29 February 2008 (PST)


Engaging with multiple craft

If I understand the latest edit, UFOs will not "divide" their fire amongst multiple targets, but will fire at each of them as frequently as they would fire at a single ship. If that's the case, is there really any advantage to having all ships engage at the same time?--Ethereal Cereal 15:29, 5 March 2007 (PST)

Thats because whoever wrote it was a moron, thats precisely what doesn't happen as I finally managed to identify just before writing it. Its tough to tell though, especially as you cant get them all to go in at once, and if you go in on aggressive attack it gets very quick at the end and hard to say whats going on. --Sfnhltb 15:43, 5 March 2007 (PST)

The most convincing aspect for me anyway was the results - three interceptors armed with plasma mostly going in singly almost always get eaten, three at once (or as close as you can get it, and setting the cycle speed way down helps synchronise them better) nearly always wins and often doesn't take a single casualty. --Sfnhltb 15:47, 5 March 2007 (PST)

From what I can remember, the UFO's rate of fire gets faster and faster the closer you get to the UFO. I've tested this with two different ships with identical armament, with one on aggressive and the other on cautious. The one on cautious fired normally, but the one that got right up to the UFO was exchanging and receiving ammo at a considerably faster rate than the one on cautious.
That still this doesn't answer the question wether the UFO splits the attacks or fires on the ships normally.
Still, I find the odds of knocking out a UFO with multiple ships a lot better than to attempt it sequentially. (edit: or mind you if I'd checked through all the edits, all this has been covered already. Oh well.) - NKF
I did 10 tests each way yesterday from the same save - sequentially 1 win from 10, even that the last interceptor was fully red damage at the end (cant tell the exact numbers, for some reason after the fight the geoscape was zooming out past maximum and crashing to the battlescape). Simultaneous was 9 wins from 10, 0 shot down 2 times, 1 down 4 times, 2 down three times. I then did a few further tries later with all three having slowed the cycle rate down and got 0 shot down 3 times out of 4, as generally the first one in was the one that almost always died if any did, if you can get them all attacking closer together it ensures it doesnt take the first two or two of the first three salvoes. --Sfnhltb 05:06, 6 March 2007 (PST)

I think some of what's written at Battleship#Weapons should be copied over. I've never tried it myself, personally; I don't bother engaging battleships until I have an Avenger. What I'd really like is some way to stop Terror Ships before I get Plasma Cannons... two Interceptors armed with Avalanches? Or does it take three?--Ethereal Cereal 21:59, 5 March 2007 (PST)

From the encounter I had yesterday, would suggest 3 is needed, it can trash them so quickly that you need to throw in loads. The one thing I noticed was that Avalanches in some ways seemed better than the Plasma cannons because you can get off a 1-2 rounds of missiles before the Plasma even starts firing due to the range difference, which is critical with your paper thin Interceptors vs the Battleships. --Sfnhltb 04:56, 6 March 2007 (PST)
2 interceptors with avalanches can bring down a terror ship and make it back to base in one piece. I think 10 avalanches will kill it. You do need to do the agressive trick with at least one interceptor to make sure all 6 missiles actually hit.
(Never tried interceptors vs battleship, it sounds suicidal.) --MB 11:56, 6 March 2007 (PST)


Review of Air Combat Mechanics

I'd like to put together everything we know about air combat game mechanics here, preparatory to perhaps a new article. I will also put here the results of testing and investigation I'm doing. Spike 15:26, 3 July 2009 (EDT)

General Behaviour

Survival Time of Multiple Attackers

Engaging a UFO with more than one attacking aircraft makes the UFO split its fire. This gives the attacking aircraft more time to perform attacks, before either being destroyed or being forced to disengage.

The following table gives the increased average survival time of attacking ships. The test scenario used XCom craft in Aggressive mode. The UFO was a Terror Ship. The test scenario did not consider survival by eliminating the UFO (the XCom craft were effectively unarmed). This was a pure endurance situation, the worst case scenario.

# of Attackers  Avg Survival Time
    1           1.0 - nominal
    2           1.5
    3           2.5
    4           3.0

This is a slightly surprising result. In principle, if the total damage output of the UFO was constant, the average survival time would just be divided by the number of attackers; e.g. 2x as long for 2 attackers, 3x as long for 3 attackers, etc. The UFO actually seems to be doing more damage, or killing targets faster, when facing multiple XCom opponents. This is a result that requires an explanation. The survival time is measured in rounds fired by the XCom aircraft. So another possibility is that the XCom aircraft are somehow able to fire more rounds when multiply engaged. However I don't think this is the case. It was not systematically tested but the XCom fire rates do not seem to increase noticeably when multiply engaged.


X-Com Behaviour

Testing the Effects of Range and Attack Mode

I did some tests on timing events in the Interception Window. In particular, I was interested in seeing how long an XCom aircraft is exposed to enemy fire, whilst closing range to the target. In other words, what happens when the XCom aircraft's weapons do not give it a full stand-off advantage.

My test rig for this was to hack up a "magic weapon" to use as a timer. This was a modified Cannon that does no damage, with range increased to the maximum/opening range in the interception window. I use the 2 game second (2gs) firing interval of the Cannon as a timer.

Note: In all of the following sections, I refer to "game seconds". But actually this is a supposition. What I'm actually measuring is multiples of the firing interval of a standard Cannon. This is stated in the in-game UFOPaedia to be 2 (game) seconds. But (as we will see below), the in-game statements of firing intervals of craft weapons are neither accurate or consistent. So it may or may not be meaningful to talk about these being actual game seconds. Maybe they are no more than multiples of the Cannon firing interval. And quite possibly the Cannon firing interval itself is not fixed, but is variable.

I hacked the executable by using XComUtil and editing the XComUtil.cfg configuration file, then rerunning xcusetup.bat to reinstall XCU. I discovered that XCU was not apparently able to reliably change the fire rate of weapons, so I stuck with the game default values (eg 1 per 2 gs for Cannon). Here are my findings:

  1. In the Interception Window, all aircraft close range with the enemy at the same rate (measured in shots fired).
    1. This is regardless of whether the aircraft is an Interceptor (2100 kts, Acc=3) or an Avenger (5400 kts, Acc=10).
    2. This is also regardless of whether the attack mode is Cautious, Standard, or Aggressive
    3. Of course, the range that the aircraft will attempt to close to, and hold, does depend on the attack mode
    4. The approach speed of 2 mutually approaching aircraft is 0.5km per game second, i.e. 1800 kmh / 900 kts (assuming the Cannon rate of fire to be 1 per 2 game seconds).
    5. Evidence for this:
      1. Closing from 70km to 30km, 40 volleys of Cannon fire are fired, at 1 / 2gs
      2. 40 volleys x 2gs = 80 gs time taken to close
      3. 40km / 80gs = 0.5 km/s
    6. This was also cross checked with a (hacked) Stingray launcher (zero damage, 75km range, 100 rounds) as the timer.
      1. Closing from 75km to 0km. 10 rounds fired. Stingray fire rate is 1 / 15 or 16gs
      2. 10 x 15 gs = Time taken was 150 - 160 gs,
      3. 75km / 150 gs = 0.5 km/s
  2. The fire rate for missiles varies with the attack mode, but the fire rate for cannon type weapons seems to be unchanged. See more below.
  3. Or it's just barely possible that the fire rate, and the closing speed, both change by the same margin and remain in the same ratio.
    1. However I think this is unlikely and it violates Occam's Razor.
    2. Also, even if true, it doesn't really make any difference.
  4. The initial opening range on the Interception Window is 75km (600 distance units).
    1. That is the maximum distance visible, at the top of the window. Opening range = maximum range.
    2. UFOs seem to often settle at 70km range, if they are able to control the range.
    3. XComUtil does not let you enter a weapon range value above 75km. Probably Scott Jones was aware of this limit.
  5. Clearly, the Geoscape phase of Interception is different from the Interception Window
    1. Geoscape time freezes while you are in the Interception window
    2. Nothing happens at all until you hit the first button, so there's no rush
    3. On the Geoscape, relative aircraft speed is highly significant to whether an interception is possible.
    4. Probably so is Acceleration.
  6. Caveats
    1. I didn't try multiple aircraft interceptions. Maybe these are different.
    2. I only tried one target type, a Small Scout (speed 2200 kts). It would be prudent to try other target types though.
    3. I think there's enough granularity in the tests I did (45 data points, greater than 100% difference in speed and acceleration between Interceptor and Avenger). But more is always good.
    4. I didn't test the speed of breaking off, or the speed of opening range after the initial closing. It's possible this is affected by aircraft speed and/or relative speed, and/or by acceleration.
  7. Misc Notes
    1. XComUtil does not let you enter an ammo capacity higher than 200. Other sources claim the field can be hacked higher than this.
    2. There is a bug in the in-game UFOPaedia. It mistakenly reads the damage value field when reporting the hit chance for a craft weapon. Hence:
      1. Cannon shows 10% not 25%
      2. Avalanche shows 100% not 80%
      3. Laser Cannon shows 70% not 35%
      4. Plasma Beam shows 140% not 50%
      5. Fusion Ball shows 230% (!!!) not 100%
      6. Possibly the reason this bug was missed is that the first weapon in the data files, Stingray, actually does have Dmg = %Hit

Spike 19:38, 2 July 2009 (EDT)


From my own experience: Attack mode only adjusts the range of the inteceptor and UFO. The actual distance between the ships however influences how fast the weapon exchanges go. The closer they are the faster the exchange. However, I believe this is all at the same rate of fire - it just plays out faster between that particular interceptor and UFO (in the case of multiple interceptors).
By the way, when a UFO flees and you minimize the screen before it goes out of range, and then you chase after it and catch up to it again and then re-open the screen, the UFO will be way out of range as you close in on it. I guess in a way, real world position does influence position of the UFO at the time the interception window is opened. -NKF 02:52, 3 July 2009 (EDT)

Hi NKF. Actually I've found attack mode does affect some important variables and I will reveal all as soon as I get to a proper PC - in transit right now. There is the question of whether fire rate increases at shorter range - the "Space Invaders Effect" - and whether it is real in terms of game time units, or just subjective on the user display. I still don't know though I have seen no evidence for it and pretty good evidence against. But not conclusive and to be honest I have avoided test situations where that might happen in order to reduce variables in my tests. So there might be such an effect.

I am not sure I understand your point about re-engagement. To me it makes sense that Interception always opens at maximum range, since the presumption is that the target has opened the range beyond effective combat range, and then susbequently in the Geoscape we have closed again to within the outer limits of combat range, triggering the Intercept window. Or have I misunderstood what you are saying?

Anyway I hope to be able to write something soon to put together most of how the air combat system works, or at least a good chunk more of it, at least from the human side.

Spike 15:02, 3 July 2009 (EDT)

To test range/ROF You may want to test dual interceptors with your magic test weapon. Have both armed with one test weapon and have one interceptor arm a cannon/laser cannon. Set both to standard range. The one with the cannon/laser cannon would obviously have to be much closer. Watch your test weapon's ammo consumption.
What I meant with re-engaging a UFO that had previously fled, but you then minimized the window before it went beyond the limits of the intercept screen (and thus keeping the intercept window 'live' even though it's beyond intercept range). When the UFO slows down enough for the interceptor to catch up, and you then re-open the intercept screen, the UFO will sometimes be way off the screen. I'm guessing this is based off your actual distance in the Geoscape at the time you re-opened that interceptor's intercept window. Also I'm guessing the UFO must be in a fleeing-state for the intercept window to automatically shut itself down once it's beyond range. Heh, not sure if that made any sense. -NKF 23:00, 3 July 2009 (EDT)

Observed Rates of Fire

The quoted fire rates (or rather fire intervals) in the in-game UFOPaedia and elsewhere in this on-line UFOPaedia are wrong. Results from experiment show the following provisional information:

Weapon:         Fire Interval in Game Seconds
                Aggressive/Standard/Cautious    
Cannon                   2 /  2 /  2
Laser Cannon            12 / 12 / 12
Plasma Cannon           12 / 12 / 12
Stingray                16 / 24 / 32
Avalanche               24 / 36 / 48
Fusion Ball             16 / 24 / 32

These fire rates/intervals are significantly different from those previously understood. In particular we see a massive increase the relative fire rate of conventional Cannon versus other weapons, identical fire rates for Plasma Cannon and Laser Cannon, and quite similar fire rates as between advanced Cannon and Stingray launchers. This has a major impact on computed firepower and payload characteristics for all weapons, and on the relative differences between weapons.

It should be noted that in almost every case, these observed fire interval values deviate from the advertised values, and in fact they deviate from values coded into the "craft" data structures of the game executable, which have been retrieved by code digs. The observed values don't even have the same relative relationship as the reported values. Experiment has shown that modifying the reported fire interval values in the executable has no effect of any kind on the observed rate of fire. The conclusion, based on the observed data, must be that the game is ignoring the reported fire intervals in the craft data structure, and hard coding rate of fire values into the air combat algorithms. The fire intervals in the craft data structure are being ignored.

I've done some more tests and these confirm that hacking the fire intervals in the craft weapon data structures (of XCom craft weapons) has no effect. Spike 20:09, 13 July 2009 (EDT)

Effect of Attack Mode on Rate of Fire

The other major observation in the data above is that Attack Mode does influence rate of fire, but only for missile/launcher weapons. If we take Aggressive mode as the baseline, firing intervals for launched weapons only increase as follows:

Attack Mode  Firing Interval  Firing Rate
Aggressive       x 1.0           nominal
Standard         x 1.5           x 2/3
Cautious         x 2.0           x 1/2

In effect this penalises launcher weapons when used at stand off range (Standard), especially when weapon types are mixed on the same aircraft (Cautious). Conversely, it gives a high offensive premium to conducting launched weapon attacks in Aggressive mode, conceding the defensive advantage of stand-off range.

Firepower Based on Observed Rates of Fire

The observed rates of fire change the firepower relationships between weapons.

Armament       Rate(gs) Mode     Firepower
Cannon          1/2      ALL      40
Stingray        1/16     Agg      98
                1/24     Std      65
                1/32     Cau      49
Avalanche       1/24     Agg      107
                1/36     Std      71
                1/48     Cau      53
Laser Cannon    1/12     ALL      65
Plasma Beam     1/12     ALL      187
Fusion Ball     1/16     Agg      460
                1/24     Std      307
                1/32     Cau      230

(The firepower value is an arbitrary relative number based on 16gs of firing)

Observations: since even paired launchers must be used in Standard attack mode in order to maintain stand-off distance, it's interesting to compare their Standard firepower figure with the figures for the cannon weapons. In which case we see, for example, that the Laser Cannon is a very close match for the Avalanche in firepower - and can keep firing for 400 game seconds (gs) rather than the Avalanche's endurance of (in Standard mode) 72gs. Of course, stand-off distance is itself a massive advantage which cannot be ignored.

Effect of Range on Rate of Fire

It's likely that the perception that range can affect rate of fire just arises from the fact that attack mode affects both rate of fire AND range. However this should be tested.

Test strategy:

Attack in Standard mode with different weapons. Hack the ranges of either or both weapons. This allows the actual firing range of the longer-ranged weapon to be controlled to any arbitrary value. Set the range of the shorter-ranged weapon to be eg 25/50/75% of the range of the longer ranged weapon.

Actually for direct comparisons, you need 2 hacked short ranged weapon and probably one unhacked longer ranged weapon "C" which you are testing (eg Avalanches). Then put up 2 aircraft, one with short range weapon A at 25% of the range of C, and the other with short range weapon B at eg 50% of the range of C. Then attack with both at the same time and watch the ammo counters on the C. As usual, set the damage of all weapons to zero so that the experiment is not interrupted by the untimely destruction of any craft!


A high ammo count for the launchers will also assist.

Just to round off the attack mode test towards the end, it might be a good idea to have a test weapon that has a range equal to standoff range (or even beyond) to see how standoff range behaves as an attack mode. A standoff range cannon would certainly be something to look at. -NKF 18:13, 4 July 2009 (EDT)

I have been hacking pretty much everything up to 100 ammo as that gives good granularity and a nice round number to work from. It's a good suggestion about Standoff mode, it didn't occur to me to test that - even though I had weapons set at 75km. From memory nothing happens until you select one of the 3 other attack modes - but I will check again. Spike 19:13, 4 July 2009 (EDT)
OK I've confirmed this and amended the main page. Re your question, even if the range of the weapon is hacked to equal or exceed standoff range, it does not fire when in Standoff mode (or in Disengage). So Standoff mode also appears to mean "Weapons Safe". In fact, with a hacked weapon range, you can have the curious phenomenon that the aircraft actually pulls back from Standoff range (70km) to maximum firing range (eg 75km) when ordered into a Standard/Cautious attack. Spike 07:05, 5 July 2009 (EDT)

Another interesting result. A UFO with a hacked weapon range of 75km will open fire immediately, even if the XCom Craft is at Standoff range. In normal play, the UFO never initiates the attack. The status window message even reflects this "UFO Returns Fire!". In effect, XCom normally controls the initiation of hostilities, by choosing if and when to move into weapon range. The UFOs always react to XCom moves but never initiate. The hacked weapon situation is different. (It also makes testing harder since you have to hit an Attack button quickly or the UFO gets an unfair head start, skewing the numbers). I might try using 69km for testing. It still makes the period of time while the UFO is closing into range pretty insignificant. But it allows me to control when the "clock" starts on the test. Spike 14:43, 5 July 2009 (EDT)


Further results: Equip 2 craft with Fusion Ball Launchers and Stingrays. According to the published fire interval numbers (25 and 15 respectively) these have different rates of fire. By observation, they have the same rate of fire. This is seen on Beginner and Superhuman. It is seen on Aggressive, when ranges are the same, and it is also seen on Cautious, when the FBL attacks at more than twice the range of the Stingray. This is using 100 rounds for each weapon, and about 5 trials. I think this proves conclusively that rate of fire does not vary with range.

However, I'm still not sure how to reconcile 2 facts:

  1. For missile weapons (only), hacking the firing interval bytes in the executable up or down does decrease or increase the rate of fire.
  2. The observed ratios of rates of fire of the different missile weapons do not match the ratios between the firing interval bytes in the executable.

Basically the bytes in the executable must be part of the rate of fire calculation, but not the whole calculation. Spike 17:13, 13 July 2009 (EDT)


OK contrary to what I said earlier, on repeat testing, I don't see any effects from changing the game executable XCom craft weapon data firing interval offsets (starting at offset 0x6fb18 in WinCE geoscape.exe). I don't see it either for missile-type weapons nor gun-type weapons. I do see an RoF effect when changing offset 0x10 of UFOs in the craft data at 0x6f9a8. This affects the built-in weapons of UFOs only, and is not used for XCom craft. My conclusion is that the RoFs values in the craft weapon data structure for XCom craft weapons are ignored, that the actual values are hard coded elsewhere in the executable, and are proportional to the values given above at Observed Rates of Fire. The only effect of hacking these craft data weapon values is to change what is listed in the in-game UFOPaedia; there is no actual effect. Spike 20:09, 13 July 2009 (EDT)

Damage Mechanics

Air combat damage is understood to be a random value between 50% and 100% of the listed damage, which should be understood as the maximum damage. Unlike for ground combat, the listed damage value is not the expected value per hit. The expected damage per hit will be 75% of the listed damage.

Test Strategy:

This could be confirmed with a similar strategy as described below for UFO Damage Mechanics.

Accuracy Mechanics

Accuracy is a function of the weapon type used, as listed in the in-game UFOPaedia. Unlike ground combat there are almost certain to be no skill factors involved. There are probably no tactical factors involved. There is some speculation that different Attack Modes might create accuracy modifiers, but no hard evidence. This needs to be tested.

Testing Strategy:

This can be confirmed by deduction from long term damage output tests, once damage mechanics and rate of fire mechanics are confirmed. The testing should control for Attack Mode and for range (separately), to make sure these don't have an impact on accuracy. They should also control for target size/type in case that is a factor.

Control of Range

In general, the craft with the higher airspeed is able to control the engagement range within the Interception Window. Reportedly, Aggressive mode can override this behaviour for a short period of time. On the other hand, it may just be that the target is travelling below its maximum airspeed, as UFOs often do, but then accelerates to maximum speed to avoid a range it does not prefer to be at.

Update: An XCom craft with equal airspeed (Interceptor buffed to 2200 vs Small Scout @ 2200) can move to any desired range. A UFO with equal airspeed is unable to break off. So it seems that superior airspeed is required to break off, but equal airspeed is sufficient to control range. Or it may be simpler than that: if the opponent can't break off, then the attacker can always control the range. Spike 20:09, 13 July 2009 (EDT)

Question: Is it ever impossible for an XCom craft to break off from a UFO, due to the UFO's higher speed and/or aggression? I don't think so. The rules seem pretty different for UFOs, as opposed to XCom craft.

Question: do UFOs attempt to hold an advantageous stand off range, as XCom craft do in Cautious and Standard attack modes?

Question: Do UFOs use Attack modes in the same way that XCom craft do, and if so, what are the effects?


UFO Behaviour

General Notes

The game provides very little access to UFO behaviour, so understanding of UFO mechanics is sketchier and information is harder to come by. However there are some facts to go on and some reasonably well-accepted suppositions.

UFO craft weapons have a weapon strength and weapon range value stored in the game executable in the structCraftData format. This is the same structure that stores their speed, damage capacity, and size.

UFOs are capable of attempting to hold range, to close, and to break off, just like XCom aircraft. The behaviour is not well understood but appears in part to be influenced by the Attack mode of the XCom craft. Of course, initiating an attack often has an effect on this behaviour (e.g. the UFO attempts to break off).

UFO Average Damage Output

In repeated tests, a Terror Ship (weapon strength 120) killed an Avenger in 480 game seconds (or more specifically, the time required to fire 20 Avalanches at close range in Aggressive mode). The Avenger has 1200 defence points, so this implies that the Terror Ship generates an average of 2.5 damage points per game second, in this test scenario at least.

Obviously some tests with other UFOs would be useful, followed by tests with hacked UFOs.


UFO Rate of Fire Mechanics

There is another value in structCraftData (at offset 0x10) which may have some bearing on UFO weapons. This value ranges from 56 (decimal) for the smaller UFOs (including the unarmed Small Scout), down to 24 for the 3 largest types: Terror Ship, Supply Ship, Battleship. This value could be an accuracy factor, or it could be a rate of fire or fire interval for the UFO weapon. On the other hand, it could be a defensive factor (base chance to damage the UFO?), or something altogether different.

The possibility that this is value is a fire interval (or an accuracy factor) should be easily testable, once the damage output of UFOs is understood well enough to be predicted.

Test Strategy:

Quite simple to test. Hack the structCraftData value to increase or decrease eg. by a factor of 2. Re run the survival tests (see above). If survival time increases or decreases by the expected (linear) proportion, this is probably the fire interval value. If there is an effect of a different magnitude, this could be an accuracy value rather than an RoF value. If there is no effect, the value is probably unrelated to UFO offensive action, but might be a defensive value of some kind (eg "difficulty to hit").

Also for extra confidence (and a simpler test), try increasing and decreasing the value to extreme levels and observing if UFO fire rate decreases/increases accordingly.

Update: Tests show it's most likely this value is indeed a UFO firing interval value (inverse rate of fire). Seb76 has found from inspection that the firing interval varies randomly by 100%-200% of this base value, reduced by 2*Difficult Level (i.e. faster firing at higher difficulty level). (XCom craft weapon firing rates are not affected by Difficulty Level).

UFO Damage Mechanics

It is not known for sure how air combat damage for alien attacks is calculated. Provisionally, it is reasonable to assume that aliens inflict air combat damage in the same way, i.e. 50%-100% of their listed damage (found in the game executables), with an average of 75% of listed damage per hit.

This should be verified however.

Test strategy:

  1. Identify a UFO that has the lowest possible rate of fire.
  2. Engage with an aircraft.
  3. Stay as close to the edge of the UFO's weapon rang as possible.
  4. Watch the message window like a hawk
  5. After the first hit is sustained, break off and save game
  6. Check damage vs aircraft by inspection of save game files (or via a logger)
  7. Repeat as necessary to build up a statistically valid number of data points
  8. Verify that the average damage value is 0.75 of listed weapon strength - or not

Update: UFO damage appears to be the same as XCom craft damage, 0.5-1.0 of base damage, per hit.

UFO Accuracy Mechanics

Accuracy values for aliens are not known, other than that they do appear to miss at least some of the time. Some data suggests that alien UFO weapon accuracy might be a fixed value of 2/3 (66%). This is very preliminary information.

Test Strategy:

Once damage per hit is understood, and alien rate of fire is understood, alien weapon accuracy can be deduced from running the "survival time" tests (see above) and measuring the total damage.

Update: From Seb76's investigations it seems to be the case that this 2/3 accuracy factor is not an accuracy factor, but the result of the 100%-200% variation in UFO rate of fire. This averages to 1.5 or a 2/3 reduction. It seems the actual accuracy of UFO weapons is 100%, i.e. they always hit.

Probable UFO Attack Resolution Mechanics

Evidence indicates UFO attacks are resolves in this way:

480 game seconds divided by firing interval of 24 (from offset 0x10 for the Terror Ship) = 20 attacks 20 attacks x RoF random 2/3 x 120 strength x 0.75 average random damage = 1200

It's difficult to reliably count the number of attacks made by a UFO, or even the number of hits, as they flash in and out of the Interception Window status display quickly and somewhat erratically. However, the figure of 20 attacks by the UFO during 20 Avalanche attacks made against it, does not seem unreasonable. If offset 0x10 is actually a fire interval value, this would make sense, as both the Terror Ship and the Avalanche (in Aggressive mode) would have a fire interval of 24 game seconds.

As noted above, faced with multiple opponents, the damage rate of the UFO seems to increase. Maybe this literally is a fudge factor, inserted by the game programmers to prevent these mobbing tactics from being too effective. Or it could be a consequence of something similar to an Attack Mode, for UFOs. Or it might be just an artefact of the test scenario - for example, in the test the UFOs were not taking any damage, perhaps this enables them to be more aggressive.

Operational and Logistic Aspects

Repairs

Refueling

Rearming

  • Seb76 Loader option to relaunch aircraft before they are fully ready.
  • Add link to "Duty Cycle" discussions & table


Patrolling fuel usage

TBD: Summarise fuel consumption for patrol/not, hybrid/not.


I saw somewhere that the skyranger at least uses less fuel when patrolling, but I have this vague recollection that the hybrids don't. Am I right in this or does it need investigating to determine one way or the other? --Sfnhltb 16:05, 5 March 2007 (PST)

You are correct, hybrids don't conserve fuel while patrolling. Only the originals do. --Pi Masta 17:15, 5 March 2007 (PST)
That does appear to be the case. I just tested this with a Firestorm (not an Avenger), and there were a few quirks: fuel consumption was the same whether patrolling or not (which is what you were asking about); fuel readout only decreased in 5% increments (not well-documented); it returned to base when it hit 50% fuel, regardless of distance-to-base (argh). (Skyrangers and Interceptors will stay out below 50%, based on distance.) Fuel consumption was 0.5% of total per minute.
A patrolling Skyranger used up 0.02% of fuel per minute. A constantly-moving one used up 0.0455% per minute. This is more or less consistent with what is documented at Skyranger.--Ethereal Cereal 18:29, 5 March 2007 (PST)


Strategic Aspects

Scoring vs Location of Intercept

I am currently on 23rd January, so should be able to check whether XCOM Activity relates more or less directly to your pay rise at the end of the month fairly soon, but if it does then clearly you will always want to shoot down UFOs over a sponsor country instead of neutral territory (especially the big scoring recovery missions).

--Sfnhltb 06:31, 28 February 2007 (PST)


IIRC the amount of money you get is randomly assigned, though increase, decrease, or no change is based upon 'score', and the country's 'happiness' with XCOM. I think this can be seen by saving near the end of the month and noting the funding changes on each save (w/o doing anything special), I believe each time they will be random amounts (but again the sign of the change is dependent on the score, directly or indirectly).

I'm not sure if a higher score as an effect on the average increase (or conversely lower score with average decrease). It is possible. However I imagine that you are still correct that downing a UFO over a sponsors country is better than over a neutral country. Pi Masta 11:51, 28 February 2007 (PST)

Hmm, we should add a graphic to the wiki showing where the sponsor land masses are.--Ethereal Cereal 12:22, 28 February 2007 (PST)

Yeah I had noticed it was random, I think your starting cash is as well, where the random range comes is was something I will be testing at the end of the current month of the game I am on, which might take a while as I am only playing intermittently (lots of work on atm)

--13:11, 28 February 2007 (PST)


Don't bother with the funding deals. I did this looong ago, both at the StrategyCore forums as well as a complete country-by-country funding breakdown at the xcomufo.com forums. Granted, this was for the starting funds, not for subsequent months. But I did run about 2000 trials on that scenario and found that funding was random within a certain range. --Zombie 14:44, 28 February 2007 (PST)

Hmm, well compared to the starting funds that you tested that were almost static overall (unless I am misreading it, +/- 15k or so?), the monthly amount varies a whole lot more, certainly +/- 250k from the average on a given good month I tested briefly to get an idea of it (and could grow more for an even better month I suspect). I would be interested in finding out what exactly affects it, and how responsive it is to key elements you might be able to control (like how beneficial is shooting down more aliens in sponsor country, compared to the same region (if that affects anything at all), and overall.

Btw, in case you still are thinking about the question regarding the discrepancy between your income and expenditure at startup, i can tell you where the 1860000 comes from at least - its in LIGLOB (A0611C00 in backwards hex) - its basically the source of the Finance graph (except score, which comes from XCOM.DAT combined with UIGLOB), which of course assigns it all to Maintenance - which in theory could include 1.7 million for the planes, 300k for the scientists, 250k for the engineers, 160k for the soldiers, and 224k for the maintaince of facilities of the base, so it doesnt solve it, but at least you can eliminate paying for things in trying to work out what it is.

The most obvious answer here is that you pay for craft rental (1.7 mill) and your soldiers (160k) = 1.86 million, and you dont pay for the scientists, engineers or base maintainance. --Sfnhltb 16:41, 28 February 2007 (PST)


The monthly funding (according to the OSG) is determined by these two equations:

Alien activity in country + (Overall alien activity/5)
X-COM activity in country + (Overall X-COM activity/10)

These numbers are compared and if the alien score is greater than X-COM, the country decreases funding by a random amount, but no less than 20%. If X-COM is greater than the alien score, the country increases funding by a random amount, but no greater than 20%. I'm not sure what the upper or lower boundary is. It could be 0%. Who knows, the frequency of the non-20% limits may increase as score does. Suppose the easiest way would be to edit alien score to 0 and X-COM score to something high and check the results. That would correspond to "EXCELLENT" on the End Of Month report. Another test is to edit both X-COM and alien score to zero and check the funding there. This would correspond to "OK" on the EOM report. One thing is for certain, it would take a great many reloads to form any type of conclusion. One of these days I'll have to write up an AHK script and dedicate some computer time to this project. It won't be right away though. --Zombie 21:47, 28 February 2007 (PST)

Ah, that explains something I was seeing - basically if you get double the Alien score, everything is good, if you are less than that everything is bad. When using very large numbers that is, to minimise other factors.
I think the increase is between 5-20%, if they come up as happy. But sometimes even with the same scores they turn out just to be satisified (current game I am playing, overall score 2.6k, alien score was 132 (and I think quite a bit of that I am double counting, country and region)
And yeah, no matter how high the XCOM scores went (very high values in the 4th byte didnt register, but I could get 30k or 60k I think, and there was no change in the range of values to cursory inspection at least. I am fairly sure that happy/satisfied/unhappy is an on/off switch that is fired by a comparision of the scores in a manner as you list above (but there is some randomness in it however).
The scale of the increase in funds seems to be based entirely on the existing funding level, so basically you just get a random percentage value within fixed limits (5-20% on the upswing, havent explored going down enough to say with enough confidence). If US is paying out 10 Million (and you have removed the funding cap, or it wont go higher), values are in the range of 500k to 2 Million if it increases, or 0 if they are only satisfied.
There isnt a whole lot of random numbers it rolls either, which you see with that nice round 10 mill, you get nice neat values spread out every 100k (rounding issues would make it look like there were more possibilities with a smaller existing fund). So its a random int between 5 and 20. Going down is probably a mirror image I would guess, but thats not got any real evidence behind it. --Sfnhltb 18:16, 1 March 2007 (PST)


Misc

Old Chat

Ye Olde Bayse Maynetaynanse

Of course the thing that has lead me onto, is trying to work out how it calculates base maintenance. A lift only new base costs 30k (4k for the lift, 26k extra somewhere), and a vanilla starter base costs 224k, but the parts only add up to 169k, so the extra unassigned part raises to 55k. Whats going on?

So I dismantle the starter base (after dumping all loose objects like people, planes and guns), the first Hangar drops the cost by 10k (not 25k), the next one by 4k (huh?), then 10k again for the last hangar, workshop drops it by 35k (correct!), the radar drops it another 35k (way high!), the living quarters are 30k, the lab 35k (a bit high), the stores 35k (massive - 7 times what it should be), and the lift 30k (4k in UFOpedia).

I thought maybe this was messed up somehow because of being the starter base, but it seems to behave the same way in new bases - as I say empty base with lift 30k, lift + stores + small radar = 95k, adding alien containment, stores, living quarters to starter base is 55k up on the starting cost (second stores 10k off when removed, second living quarters 10k, alien containment 35k)

So the same facilities take different maintainance depending on how many you have of them (it seems), and most of them cost different to what it says they do. No idea what the relationship or reasoning is behind all of this.

--Sfnhltb 17:05, 28 February 2007 (PST)

No what's happening is that there are completed 'empty' modules. When you dismantle a facility it doesn't set the days to build to 255 like it should, and instead just puts the dirt tile there. Apparently these completed dirt modules take monthly maintenance (but isn't shown in the monthly costs IIRC). If you want me to find the post I can, but this is something I'm familiar with and in fact the 'editor' I'm making (PyXCom) should be able to fix it. (another thing is even if you build something and dismantle it before it's built, it will still count down and suck your money away)
Atleast I think this is the issue you are having. Pi Masta 19:57, 28 February 2007 (PST)

No I worked it out, I added the basic details to Known_Bugs#Facility_Maintenance_Costs, there might be something additional as you say, as destruction a facility doesnt clear the construction counter as you say - in fact you can see that it keeps construction counters from previous saves as well at times, the clearest indication its doing stuff like this is if you start a game and name your first base something long, say 'ABCDEFG', and then start again and make a new base with a one character 'X', in the BASE.DAT you will see something like 'X CDEFG' (the space indicating actually a null (00) to show end of string). So when you save it doesnt 100% overwrite all bytes, just the minimum it needs to save the information for your current save (which may have errors like you suggest).

--Sfnhltb 20:03, 28 February 2007 (PST)