Difference between revisions of "Talk:MISSIONS.DAT"

From UFOpaedia
Jump to navigation Jump to search
(32 intermediate revisions by 11 users not shown)
Line 1: Line 1:
Some questions:
+
Some questions [<i>Zaimoni</i>: now answered empirically]:
 
* What is going on with the start time for 0/0 on Research missions?  The Jan 1999 one is always 2.5h, but I recently saw an Antarctica Research mission at 3d for 0/0.
 
* What is going on with the start time for 0/0 on Research missions?  The Jan 1999 one is always 2.5h, but I recently saw an Antarctica Research mission at 3d for 0/0.
 
* How consistently does the time to the next UFO react to a successful Battlescape game?  (I just saw a Retaliation 1/1 go from 7Eh to 136h upon successful completion.)
 
* How consistently does the time to the next UFO react to a successful Battlescape game?  (I just saw a Retaliation 1/1 go from 7Eh to 136h upon successful completion.)
Line 24: Line 24:
  
 
--[[User:Zaimoni|Zaimoni]],  23:51 Sept 21 2006 CDT
 
--[[User:Zaimoni|Zaimoni]],  23:51 Sept 21 2006 CDT
 +
:After a shootdown, the next UFO for that mission is delayed between 1 and ~9 days ( the formula is 48+RAND()*400 half hours ). A retaliation mission will be scheduled if RAND()*100 < 4*(24-difficultyLevel).
 +
:If RAND()*100 < (50-6*difficultyLevel), the retaliation mission will use the same zone as the shot UFO, else it'll be the zone containing the base the craft in coming from. The first UFO is scheduled in 100 half-hours (the value is taken from the table I speak of later at the bottom of this page).
 +
:[[User:Seb76|Seb76]] 18:56, 12 July 2008 (PDT)
 +
<hr>
 +
 +
I don't think I'll be continuing this savegame, but I just had a Feb 1999 that only generated a new Terror Mission.  The other mission...not visible.  [I may have messed it up &mdash; I did edit the Jan 1999 Terror mission from Europe to Southern Africa.]
 +
 +
--[[User:Zaimoni|Zaimoni]],  10:38 Dec 30 2006 CDT
 +
 +
== Retaliation ==
 +
 +
Zaimoni, I've been thinking about the comment about HWD's activating retaliation missions from the start. Are you able to check the mission types of the first couple of UFOs through mission.dat without editing the HWD stats onto the base? I'm not entirely convinced that retaliation missions are instigated by having a hyperwave decoder (stats or the module).
 +
 +
- [[User:NKF|NKF]]
 +
 +
: Yes, I can check (and have checked) that by hex editor.  [It's a moderately different game with total information on arrival times and mission types...much easier to resume after a month or so hiatus.]  I haven't tested with a game whose Hyperwave detection was edited.
 +
 +
: I normally save immediately after starting a new game to apply my custom soldier editor to the game.  While I'm at it, I check MISSIONS.DAT.  I have always gotten two missions: a Research mission in the same region as my starting base, and a terror mission with a decidedly non-uniform random distribution of location that I haven't bothered to try to analyze.
 +
 +
: I'm not sure whether there's a random component to getting a Retalation series scheduled by shooting down the first Research UFO, or whether it's just hypersensitive to some sort of detail.  If the series is not significantly interfered with, the base defense mission would happen 2-3 weeks in.
 +
 +
: --[[User:Zaimoni|Zaimoni]],  3:23 Mar 20 2007 CDT
 +
 +
Just ran some quick checks, nothing too intensive.
 +
* Editing hyperwave detection in a hex editor: no obvious effect, but would have to tweak the initial MISSIONS.DAT (move the Terror Act to within range) to be absolutely sure.  The game does not transmogrify Research UFOs in real-time; I need to test Terror UFOs.
 +
* Start a new game after abandoning one: race information is not cleared in MISSIONS.DAT, but other information is cleared.  In particular, both ufo-c and subufo-c are overwritten to their defaults.
 +
 +
--[[User:Zaimoni|Zaimoni]],  23:11 Apr 11 2007 CDT
 +
 +
'''so''', the question which should be asked:
 +
 +
Is it too difficult to make an editor which changes the sequences? I dunno anything with hex-editors, programming, high level mathematics, etc. It would be interesting to have an opportunity to spawn multiple UFO everyday and not be able to shoot them all down as which is the case for the current mode of EU (and TFTD). The only thing that comes close to something of this current scenario is an inflitration mission where you have 5+ alien ships all at once and not having the capability to deal with them all. I dunno... i just wish having more tweaks to make it harder would be a good thing as opposite to just using editors to dull the technology of xcom to increase difficulty.
 +
 +
Six terror sites at once??? hell yeah! [[User:EsTeR|EsTeR]]
 +
 +
: It should be safe to create Retaliation acts and Terror acts by directly editing MISSIONS.DAT, there will be no internal consistency issues with other files.  Editing existing entries in MISSIONS.DAT to other valid entries should be safe (note that not all mission types have been authoritatively mapped).  Editing duration should be safe, but problems could happen with invalid races or UFO c/sub-c pairs.  Creating other mission types will require counter-editing ACTS.DAT.  I haven't specifically checked the behavior of ZONAL.DAT when spawning new acts.
 +
 +
: The ufo-c/ufo-sub-c pair 0/0 is always valid, at least.
 +
 +
: Research, Base, Terror, and Retaliation have fully documented ufo-c/ufo-sub-c pairs.  I haven't done any verification at all for Abduction or Infiltration.
 +
 +
: Changing the relative durations between UFOs, time delays incurred when shooting down UFOs, or number of missions spawned per month, requires finding that information first. --[[User:Zaimoni|Zaimoni]],  10:16 Oct 17 2007 CDT
 +
 +
Just a note to add to this section lest I forget, and as late follow up to the notes that re on the page: back when I first got the idea that the first UFO was on a retaliation mission, I did not know that there was a 2% chance for every UFO to generate a retaliation mission. Armed with this knowledge, this is probably the sequence of events that happened to me at the time: I shot down the first UFO, recovered it and then got my base attacked. The 2% might've triggered then. This would very well the impression I had that UFOs could start on retaliation missions. They don't, but they can generate an attack. -[[User:NKF|NKF]] 03:10, 3 June 2010 (EDT)
 +
 +
== Alien missions data discovered in geoscape.exe [finally ;-)] ==
 +
 +
OK guys, here's a big one: alien missions data is located in the executable at offset 0x70E70 (gold edition) ; it starts with these values (all 16bit words):
 +
 +
.data:00470E70 structAlienMission <5, 1, 0, 12Ch>
 +
.data:00470E70 structAlienMission <6, 1, 2, 104h>
 +
.data:00470E70 structAlienMission <7, 2, 4, 12Ch>
 +
.data:00470E70 structAlienMission 5 dup(<0FFFFh, 0FFFFh, 0FFFFh, 0FFFFh>)
 +
...
 +
It goes on for 64x4x2 bytes (7 mission types and possible data for additional 'supply' type mission).
 +
 +
Every mission type has 8 entries consisting of 4 words.
 +
First word is the ship type, second is the number of ship of this type to spawn successively (each uses the same time counter), and 4th correspond to the time counter in [[MISSIONS.DAT]]. 3rd one is unknown for now.
 +
 +
The example below is for research mission: one small scout (type 5), then one medium scout (type 6) and finally 2 large scouts (type 7).
 +
The time counter is calculated like this: time*RAND()+time/2.
 +
Anyone care to hack the binaries to confirm this? [[User:Seb76|Seb76]] 10:58, 9 March 2008 (PDT)
 +
 +
: Time calculation looks good for those UFOs with randomized time (there are a few known exceptions). -- [[User:Zaimoni|Zaimoni]] 10:16 10 March 2008 (CDT)
 +
 +
: It would be very good to locate what controls fixed vs randomized times for the normal missions. -- [[User:Zaimoni|Zaimoni]] 10:59 13 July 2008 (CDT)
 +
 +
The 3rd word of missions is UFO_trajectory_type. It refers into table at address .data:00471070. So there are 10 types of trajectories possible, with maximum 8 waypoints.
 +
.data:00471070    ufo_10_types_52___ dw 5                      ; UFO_Waypoint_count
 +
.data:00471070                  dw  5,  0,  0,  1,  5, -1, -1, -1; UFO_Waypoint_Site
 +
.data:00471070                  dw  4,  3,  1,  1,  2,  0,  0,  0; UFO_Waypoint_Altitude
 +
.data:00471070                  dw 100, 74, 28, 47,100,  0,  0,  0; UFO_Waypoint_Speed
 +
.data:00471070                  dw 3000                  ; Ground_Timer
 +
--[[User:Volutar|Volutar]] 05:59, 14 April 2011 (EDT)
 +
 +
The 3rd "word" is called a ''Mission Plan'' in the dev notes I have. As Volutar mentioned, there are 10 types, and I'll list the internal descriptions here
 +
 +
Plan    Description
 +
  0      Low level reconnaissance
 +
  1      Intense low level reconnaissance
 +
  2      Occasional landings
 +
  3      Occasional abductions
 +
  4      Systematic abductions
 +
  5      Reconnaissance for base
 +
  6      Establishing base
 +
  7      Visit major cities
 +
  8      Destroy <nowiki>[X-COM]</nowiki> base
 +
  9      Base Supply
 +
 +
--[[User:Zombie|Zombie]] ([[User talk:Zombie|talk]]) 06:10, 31 July 2018 (CEST)
 +
 +
==Clarification pls==
 +
 +
- So all these missions, once started, will continue in the precise sequence no matter what?
 +
 +
:: <i>Yes; only most of these tables have been verified by inspection of the savegame files in a hex editor, however.  Infiltration has not.  Matching the savegame file behavior against the in-game data Seb76 has located is tricky. -- [[User:Zaimoni|Zaimoni]]</i>
 +
 +
- What about the whole thing with whether it's found the site or not (e.g. Terror Ships finding/not finding a city to raid, Battleships finding/not finding your base)? Does this apply to all missions?
 +
 +
:: <i>The base assault battleships are not on the Retaliation Act sequence, they're controlled by [[XBASES.DAT]].  Reverse-engineering how the Retaliation Act ships find bases hasn't been precisely done yet (don't let the UFOs get too close to the base), mind shielding reduces the range at which a UFO can spot a base.</i>
 +
 +
::: So the two battleships that don't ever spot your base are unrelated to the battleships that come if you're spotted? [[User:magic9mushroom]]
 +
 +
:::: <i>Correct.  I've had entire Retaliation Acts cycle without scheduling a base attack battleship, but this was with [[XBASES.DAT]] never flagging a base for retaliation.</i>
 +
 +
:: <i>As for Terror Ships: whether a UFO lands or not, appears to be controlled by its ufo-c/ufo-sub-c indexing.  If they have orders to land, they won't have problems finding an appropriate site. -- [[User:Zaimoni|Zaimoni]]</i>
 +
 +
::: So that means that of the two Terror Ship indexes you have listed, only one occurs in any given mission? [[User:magic9mushroom]]
 +
 +
:::: <i>For all act types, the indexes are incremented in strictly increasing order (with all ufo-sub-c indexes run through before the ufo-c index is incremented).  It may take more than one hour for a ufo to reach hyperwave detection with incomplete hyperwave coverage. -- [[User:Zaimoni|Zaimoni]]</i>
 +
 +
:::::So are there two Terror Ships per mission or not?
 +
 +
:::::: <i>The separation between Terror Ship 2/0 and Terror Ship 3/0 is a few days, so it's conceptually two missions with one Terror Ship each with the Terror Act.  Empirical research into ufo behavior suggests that if they are not shot down, Terror Ship 2/0 never lands, while Terror Ship 3/0 always lands (and gives you a terror site). -- [[User:Zaimoni|Zaimoni]]</i>
 +
 +
- With the infiltration, what does the "it starts again" mean? Does that mean that once an infiltration mission has started in a zone, endless infiltrations will run there until all countries there are infiltrated?
 +
 +
:: <i>Infiltration is the only mission type that loops.  It will continue even after all countries in the zone have been infiltrated.  Russia is empirically immune to infiltration in all versions higher than DOS 1.0. -- [[User:Zaimoni|Zaimoni]]</i>
 +
 +
::: So what happens at the conclusion of an Infiltration mission after all countries in the zone are infiltrated? Does a country outside the zone get infiltrated? Does no country get infiltrated? [[User:magic9mushroom]]
 +
 +
::::Nothing happens. Was rather fortunate to experience this a few times - and when I ran a no-funding-country scenario where I edited the save and flagged all the countries as withdrawn. Rather amusing to see them infiltrate an already infiltrated country and yield no results. In this case, the only real impact is the area activity points, which the neighbours will notice. -[[User:NKF|NKF]] 05:30, 10 August 2009 (EDT)
 +
 +
- It says the order for infiltrations is Terror ship -> Battleship -> Supply ship -> Battleship, but my own experience contradicts this - I shot down each UFO in an infiltration run, and the sequence was Terror ship -> Supply ship -> Battleship -> Battleship.
 +
 +
:: <i>While Infiltration has not been verified by me in-game yet, the tables all assume that all UFOs in the sequence are detected.  This is more interesting if this was with the Hyperwave Decoder. -- [[User:Zaimoni|Zaimoni]], 8:42, 9 August 2009 (CDT)</i>
 +
 +
::: It was with a Hyper-Wave Decoder and I shot down each before the next appeared. [[User:Magic9mushroom|Magic9mushroom]] 04:07, 10 August 2009 (EDT)
 +
 +
:::: <i>All eight are in the executable, in the order specified in MISSIONS.DAT.  However, the four mentioned are pretty much "in a row": the sixth should arrive exactly one hour later after the fifth, and so on.  That is, you have one hour to shoot down the Terror Ship to delay the three others by ~2 weeks. -- [[User:Zaimoni|Zaimoni]], 9:37, 10 August 2009 (CDT)</i>
 +
 +
::::: Well, it was days between detecting each one. They definitely arrived in the order Terror Ship, Supply Ship, Battleship, Battleship.
 +
 +
:::::: <i>See it in the executable, fixing that now.  (Mapping duration from executable to empirical is tricky, as is estimating turning points and landing counts.)  -- [[User:Zaimoni|Zaimoni]], 9:37, 10 August 2009 (CDT)</i>
 +
 +
Thanks in advance. [[User:Magic9mushroom|Magic9mushroom]] 04:14, 9 August 2009 (EDT)
 +
 +
 +
I understood what mean third entry in section Alien Data Missions at executable file.
 +
As I said in forum Seeing speeds of USO sub we can determine the mission of this USO sub even without transmission resolver - even in january 2040
 +
Every USO sub in every missions (interdiction, colony, probe and other) have unique speeds and we can determine mission of USO on their speed
 +
And we can determine what amount of times a sub touch down on his mission - because every mission has unique rule for touch down USO subs
 +
And we can determine what amount of time USO Sub will touch down on their mission - because every Sub in every mission has unique and ALWAYS equal amoun of time to touch down (p.s. this time we can see in file Loc.dat)
 +
 +
And third entry - it's index of speeds of sub.
 +
 +
I have table of speeds of all USO subs. Where can locate it?
 +
 +
== Non-scheduled Terror Missions ==
 +
 +
What is it known on terror missions which are NOT in MISSIONS.DAT? At least in TFTD, such missions are, as a rule, on the 1st of each month, 1:00 (are they always ship route attacks?). Saving the game before the attack but after  the midnight (1st, 0:00), and next loading and continuing it, always leads to a mission in the same (exact) location, on the same type of the ship, and with the same alien race (or Mixed Crew). Only numbers of particular creatures of a given race can change. So, the mission properties must be stored somewhere between the midnight and 1:00 (when the attack occurs). The game must store this information somewhere, and it is not MISSION.DAT for sure.
 +
 +
Such a first-o'clock alien terror mission does not influence the normal, scheduled alien missions (so, it is even possible to have another terror mission just few hours after the first one, if only the other mission had been scheduled). Where is it stored?
 +
 +
Does a similar phenomenon occur in UFO:EU as well?
 +
 +
[[File:Nstm.zip]] - a set of savegames for tests, the explanation inside.
 +
 +
[[User:Sherlock|Sherlock]] 20:24, 30 January 2013 (EST)
 +
 +
:It's in [[LOC.DAT]]. As in, the terror site already existed before it became visible to you, so you actually saved AFTER the attack started. - <span style="font-size:xx-small">&nbsp;[[User:Bomb_Bloke|Bomb Bloke]] ([[User_talk:Bomb_Bloke|Talk]]/[[Special:Contributions/Bomb_Bloke|Contribs]])</span> 02:02, 31 January 2013 (EST)
 +
 +
== Addresses ==
 +
 +
I'm not great at this sort of thing so I'd like to know if the following is correct.  Zaimoni's example, ''"E.g. infiltration(3) in Europe(4) would have the offset 3*8+4*(7*8)=0xF8"'' means the entries are ordered by missiontype*8 + region*56 (respectively from [[ACTS.DAT]] and [[ZONAL.DAT]]) ???
 +
 +
Running that logic through excel I generated the addresses below.  I guess they make sense; it could look like what's going on in-game though I don't have any saves where I am dead-certain what missions are running... which is what brought me to this page... :)
 +
 +
{| class="wikitable" style="font-size:90%;"
 +
|-
 +
! Adr.Hex !! Mission
 +
|-
 +
| 0 || Research in North America
 +
|-
 +
| 8 || Harvest in North America
 +
|-
 +
| 10 || Abduction in North America
 +
|-
 +
| 18 || Infiltration in North America
 +
|-
 +
| 20 || Base in North America
 +
|-
 +
| 28 || Terror in North America
 +
|-
 +
| 30 || Retaliation in North America
 +
|-
 +
| 38 || Research in Arctic
 +
|-
 +
| 40 || Harvest in Arctic
 +
|-
 +
| 48 || Abduction in Arctic
 +
|-
 +
| 50 || Infiltration in Arctic
 +
|-
 +
| 58 || Base in Arctic
 +
|-
 +
| 60 || Terror in Arctic
 +
|-
 +
| 68 || Retaliation in Arctic
 +
|-
 +
| 70 || Research in Antarctic
 +
|-
 +
| 78 || Harvest in Antarctic
 +
|-
 +
| 80 || Abduction in Antarctic
 +
|-
 +
| 88 || Infiltration in Antarctic
 +
|-
 +
| 90 || Base in Antarctic
 +
|-
 +
| 98 || Terror in Antarctic
 +
|-
 +
| A0 || Retaliation in Antarctic
 +
|-
 +
| A8 || Research in South America
 +
|-
 +
| B0 || Harvest in South America
 +
|-
 +
| B8 || Abduction in South America
 +
|-
 +
| C0 || Infiltration in South America
 +
|-
 +
| C8 || Base in South America
 +
|-
 +
| D0 || Terror in South America
 +
|-
 +
| D8 || Retaliation in South America
 +
|-
 +
| E0 || Research in Europe
 +
|-
 +
| E8 || Harvest in Europe
 +
|-
 +
| F0 || Abduction in Europe
 +
|-
 +
| F8 || Infiltration in Europe
 +
|-
 +
| 100 || Base in Europe
 +
|-
 +
| 108 || Terror in Europe
 +
|-
 +
| 110 || Retaliation in Europe
 +
|-
 +
| 118 || Research in North Africa
 +
|-
 +
| 120 || Harvest in North Africa
 +
|-
 +
| 128 || Abduction in North Africa
 +
|-
 +
| 130 || Infiltration in North Africa
 +
|-
 +
| 138 || Base in North Africa
 +
|-
 +
| 140 || Terror in North Africa
 +
|-
 +
| 148 || Retaliation in North Africa
 +
|-
 +
| 150 || Research in South Africa
 +
|-
 +
| 158 || Harvest in South Africa
 +
|-
 +
| 160 || Abduction in South Africa
 +
|-
 +
| 168 || Infiltration in South Africa
 +
|-
 +
| 170 || Base in South Africa
 +
|-
 +
| 178 || Terror in South Africa
 +
|-
 +
| 180 || Retaliation in South Africa
 +
|-
 +
| 188 || Research in Central Asia
 +
|-
 +
| 190 || Harvest in Central Asia
 +
|-
 +
| 198 || Abduction in Central Asia
 +
|-
 +
| 1A0 || Infiltration in Central Asia
 +
|-
 +
| 1A8 || Base in Central Asia
 +
|-
 +
| 1B0 || Terror in Central Asia
 +
|-
 +
| 1B8 || Retaliation in Central Asia
 +
|-
 +
| 1C0 || Research in Southeast Asia
 +
|-
 +
| 1C8 || Harvest in Southeast Asia
 +
|-
 +
| 1D0 || Abduction in Southeast Asia
 +
|-
 +
| 1D8 || Infiltration in Southeast Asia
 +
|-
 +
| 1E0 || Base in Southeast Asia
 +
|-
 +
| 1E8 || Terror in Southeast Asia
 +
|-
 +
| 1F0 || Retaliation in Southeast Asia
 +
|-
 +
| 1F8 || Research in Siberia
 +
|-
 +
| 200 || Harvest in Siberia
 +
|-
 +
| 208 || Abduction in Siberia
 +
|-
 +
| 210 || Infiltration in Siberia
 +
|-
 +
| 218 || Base in Siberia
 +
|-
 +
| 220 || Terror in Siberia
 +
|-
 +
| 228 || Retaliation in Siberia
 +
|-
 +
| 230 || Research in Australasia
 +
|-
 +
| 238 || Harvest in Australasia
 +
|-
 +
| 240 || Abduction in Australasia
 +
|-
 +
| 248 || Infiltration in Australasia
 +
|-
 +
| 250 || Base in Australasia
 +
|-
 +
| 258 || Terror in Australasia
 +
|-
 +
| 260 || Retaliation in Australasia
 +
|-
 +
| 268 || Research in Wilderness
 +
|-
 +
| 270 || Harvest in Wilderness
 +
|-
 +
| 278 || Abduction in Wilderness
 +
|-
 +
| 280 || Infiltration in Wilderness
 +
|-
 +
| 288 || Base in Wilderness
 +
|-
 +
| 290 || Terror in Wilderness
 +
|-
 +
| 298 || Retaliation in Wilderness
 +
|}
 +
 +
--[[User:Tlist|Tlist]] ([[User talk:Tlist|talk]]) 13:46, 25 May 2014 (EDT)
 +
 +
== Something's off with Zombie's numbers ==
 +
 +
I hate to contradict the great Zombie, but the countdown timers here seem to have an off-by-one. The numbers as they are now predict a 3x Abductor flotilla for Abduction, a 2xLarge Scout+Terror+Supply+2xBB flotilla for Infiltration, and a Medium Scout+Large Scout+2xSupply+BB flotilla for Base, but in all three cases the first of those is not actually part of the flotilla. We need to fix this, but I'm not sure how because I don't know where the data is in GEOSCAPE.EXE (I have DOS version). Can anyone help me out here? [[User:Magic9mushroom|Magic9mushroom]] ([[User talk:Magic9mushroom|talk]]) 07:34, 31 August 2019 (CEST)
 +
 +
Okay, I've got it. It ''is'' an off-by-one. The time index associated with a UFO in the data files is not the countdown timer to that UFO. It's the amount of time ''added'' to the countdown timer when that UFO is spawned - i.e. the timer for the ''next'' UFO. The countdown timer for the first UFO in the mission is presumably set during mission creation, and is not stored with the rest of the mission data (this explains why it can be different for the first vs. subsequent Alien Research missions, as that one is not generated in the usual fashion).
 +
 +
As such, I'm going to move all the times given (which are correct, but misinterpreted) down one row, and put question-marks in the top row (since I don't actually know most of them, except Terror which I empirically know to always be 2.5h). [[User:Magic9mushroom|Magic9mushroom]] ([[User talk:Magic9mushroom|talk]]) 08:46, 31 August 2019 (CEST)

Revision as of 06:46, 31 August 2019

Some questions [Zaimoni: now answered empirically]:

  • What is going on with the start time for 0/0 on Research missions? The Jan 1999 one is always 2.5h, but I recently saw an Antarctica Research mission at 3d for 0/0.
  • How consistently does the time to the next UFO react to a successful Battlescape game? (I just saw a Retaliation 1/1 go from 7Eh to 136h upon successful completion.)

--Zaimoni, 6:50 Sept 21 2006 CDT

I couldn't understand much of your research but it made me wonder about one question: is it possible to determine the amount of UFO missions and their types that you will see during a month (and also the areas?). Or are those set in a total random fashion?

If so this could be considered as spoilers but it could also be used for an article describing alien strategy on the field manual.

--Hobbes 18:39, 21 September 2006 (PDT)

MISSIONS.DAT is a spoiler, definitely. It stores the time (in 30-minute increments) for all non-Supply scheduled UFOs that have not arrived yet. While it won't tell you all of the UFOs arriving in the month, it will positively ID arrival time, mission, physical type, and race of each one in the queue. I'm in the middle of redocumenting it.

My current conjecture is that the 0..3 sequence indexes the "size" of the UFO. The legacy content just listing ufo-c coordinates is misleading (it seems to be enumerating the visible sequence of ufos), but I want to positively observe the entire sequence of ufo-c/ufo-sub-c pairs before updating.

At all times, the current mission types and areas are in MISSIONS.DAT...except for supply missions. You really want a Hyperwave Decoder covering each alien base you're harvesting. So far, Beginner and Superhuman schedule the same at the beginning of the months after Jan 1999: 1 Terror mission, one non-terror mission. I don't know the criteria for scheduling Retaliation missions. (I've never seen them show up except immediately after Battlescape missions, but that obviously isn't exhaustive.]

Particularly interesting: Battlescape messes with the arrival time of the next mission after the one you're cleaning up on. This needs more careful analysis (e.g., is it just mission completion?)

--Zaimoni, 22:35 Sept 21 2006 CDT

The increase in time to next UFO occurs either (or both) at shootdown, or at the start of the Battlescape mission. Since I used XCOMUtil interceptor with six soldiers for this test, I can't tell which one. No change between the beginning and the end of the Battlescape mission. [But a genuine Terrorship will happen soon enough...that gets a no-crew Interceptor and a full Skyranger.]

--Zaimoni, 23:51 Sept 21 2006 CDT

After a shootdown, the next UFO for that mission is delayed between 1 and ~9 days ( the formula is 48+RAND()*400 half hours ). A retaliation mission will be scheduled if RAND()*100 < 4*(24-difficultyLevel).
If RAND()*100 < (50-6*difficultyLevel), the retaliation mission will use the same zone as the shot UFO, else it'll be the zone containing the base the craft in coming from. The first UFO is scheduled in 100 half-hours (the value is taken from the table I speak of later at the bottom of this page).
Seb76 18:56, 12 July 2008 (PDT)

I don't think I'll be continuing this savegame, but I just had a Feb 1999 that only generated a new Terror Mission. The other mission...not visible. [I may have messed it up — I did edit the Jan 1999 Terror mission from Europe to Southern Africa.]

--Zaimoni, 10:38 Dec 30 2006 CDT

Retaliation

Zaimoni, I've been thinking about the comment about HWD's activating retaliation missions from the start. Are you able to check the mission types of the first couple of UFOs through mission.dat without editing the HWD stats onto the base? I'm not entirely convinced that retaliation missions are instigated by having a hyperwave decoder (stats or the module).

- NKF

Yes, I can check (and have checked) that by hex editor. [It's a moderately different game with total information on arrival times and mission types...much easier to resume after a month or so hiatus.] I haven't tested with a game whose Hyperwave detection was edited.
I normally save immediately after starting a new game to apply my custom soldier editor to the game. While I'm at it, I check MISSIONS.DAT. I have always gotten two missions: a Research mission in the same region as my starting base, and a terror mission with a decidedly non-uniform random distribution of location that I haven't bothered to try to analyze.
I'm not sure whether there's a random component to getting a Retalation series scheduled by shooting down the first Research UFO, or whether it's just hypersensitive to some sort of detail. If the series is not significantly interfered with, the base defense mission would happen 2-3 weeks in.
--Zaimoni, 3:23 Mar 20 2007 CDT

Just ran some quick checks, nothing too intensive.

  • Editing hyperwave detection in a hex editor: no obvious effect, but would have to tweak the initial MISSIONS.DAT (move the Terror Act to within range) to be absolutely sure. The game does not transmogrify Research UFOs in real-time; I need to test Terror UFOs.
  • Start a new game after abandoning one: race information is not cleared in MISSIONS.DAT, but other information is cleared. In particular, both ufo-c and subufo-c are overwritten to their defaults.

--Zaimoni, 23:11 Apr 11 2007 CDT

so, the question which should be asked:

Is it too difficult to make an editor which changes the sequences? I dunno anything with hex-editors, programming, high level mathematics, etc. It would be interesting to have an opportunity to spawn multiple UFO everyday and not be able to shoot them all down as which is the case for the current mode of EU (and TFTD). The only thing that comes close to something of this current scenario is an inflitration mission where you have 5+ alien ships all at once and not having the capability to deal with them all. I dunno... i just wish having more tweaks to make it harder would be a good thing as opposite to just using editors to dull the technology of xcom to increase difficulty.

Six terror sites at once??? hell yeah! EsTeR

It should be safe to create Retaliation acts and Terror acts by directly editing MISSIONS.DAT, there will be no internal consistency issues with other files. Editing existing entries in MISSIONS.DAT to other valid entries should be safe (note that not all mission types have been authoritatively mapped). Editing duration should be safe, but problems could happen with invalid races or UFO c/sub-c pairs. Creating other mission types will require counter-editing ACTS.DAT. I haven't specifically checked the behavior of ZONAL.DAT when spawning new acts.
The ufo-c/ufo-sub-c pair 0/0 is always valid, at least.
Research, Base, Terror, and Retaliation have fully documented ufo-c/ufo-sub-c pairs. I haven't done any verification at all for Abduction or Infiltration.
Changing the relative durations between UFOs, time delays incurred when shooting down UFOs, or number of missions spawned per month, requires finding that information first. --Zaimoni, 10:16 Oct 17 2007 CDT

Just a note to add to this section lest I forget, and as late follow up to the notes that re on the page: back when I first got the idea that the first UFO was on a retaliation mission, I did not know that there was a 2% chance for every UFO to generate a retaliation mission. Armed with this knowledge, this is probably the sequence of events that happened to me at the time: I shot down the first UFO, recovered it and then got my base attacked. The 2% might've triggered then. This would very well the impression I had that UFOs could start on retaliation missions. They don't, but they can generate an attack. -NKF 03:10, 3 June 2010 (EDT)

Alien missions data discovered in geoscape.exe [finally ;-)]

OK guys, here's a big one: alien missions data is located in the executable at offset 0x70E70 (gold edition) ; it starts with these values (all 16bit words):

.data:00470E70 structAlienMission <5, 1, 0, 12Ch>
.data:00470E70 structAlienMission <6, 1, 2, 104h>
.data:00470E70 structAlienMission <7, 2, 4, 12Ch>
.data:00470E70 structAlienMission 5 dup(<0FFFFh, 0FFFFh, 0FFFFh, 0FFFFh>)
...

It goes on for 64x4x2 bytes (7 mission types and possible data for additional 'supply' type mission).

Every mission type has 8 entries consisting of 4 words. First word is the ship type, second is the number of ship of this type to spawn successively (each uses the same time counter), and 4th correspond to the time counter in MISSIONS.DAT. 3rd one is unknown for now.

The example below is for research mission: one small scout (type 5), then one medium scout (type 6) and finally 2 large scouts (type 7). The time counter is calculated like this: time*RAND()+time/2. Anyone care to hack the binaries to confirm this? Seb76 10:58, 9 March 2008 (PDT)

Time calculation looks good for those UFOs with randomized time (there are a few known exceptions). -- Zaimoni 10:16 10 March 2008 (CDT)
It would be very good to locate what controls fixed vs randomized times for the normal missions. -- Zaimoni 10:59 13 July 2008 (CDT)

The 3rd word of missions is UFO_trajectory_type. It refers into table at address .data:00471070. So there are 10 types of trajectories possible, with maximum 8 waypoints.

.data:00471070     ufo_10_types_52___ dw 5                      ; UFO_Waypoint_count
.data:00471070                   dw   5,  0,  0,  1,  5, -1, -1, -1; UFO_Waypoint_Site
.data:00471070                   dw   4,  3,  1,  1,  2,  0,  0,  0; UFO_Waypoint_Altitude
.data:00471070                   dw 100, 74, 28, 47,100,  0,  0,  0; UFO_Waypoint_Speed
.data:00471070                   dw 3000                   ; Ground_Timer

--Volutar 05:59, 14 April 2011 (EDT)

The 3rd "word" is called a Mission Plan in the dev notes I have. As Volutar mentioned, there are 10 types, and I'll list the internal descriptions here

Plan     Description
  0      Low level reconnaissance
  1      Intense low level reconnaissance
  2      Occasional landings
  3      Occasional abductions
  4      Systematic abductions
  5      Reconnaissance for base
  6      Establishing base
  7      Visit major cities
  8      Destroy [X-COM] base
  9      Base Supply

--Zombie (talk) 06:10, 31 July 2018 (CEST)

Clarification pls

- So all these missions, once started, will continue in the precise sequence no matter what?

Yes; only most of these tables have been verified by inspection of the savegame files in a hex editor, however. Infiltration has not. Matching the savegame file behavior against the in-game data Seb76 has located is tricky. -- Zaimoni

- What about the whole thing with whether it's found the site or not (e.g. Terror Ships finding/not finding a city to raid, Battleships finding/not finding your base)? Does this apply to all missions?

The base assault battleships are not on the Retaliation Act sequence, they're controlled by XBASES.DAT. Reverse-engineering how the Retaliation Act ships find bases hasn't been precisely done yet (don't let the UFOs get too close to the base), mind shielding reduces the range at which a UFO can spot a base.
So the two battleships that don't ever spot your base are unrelated to the battleships that come if you're spotted? User:magic9mushroom
Correct. I've had entire Retaliation Acts cycle without scheduling a base attack battleship, but this was with XBASES.DAT never flagging a base for retaliation.
As for Terror Ships: whether a UFO lands or not, appears to be controlled by its ufo-c/ufo-sub-c indexing. If they have orders to land, they won't have problems finding an appropriate site. -- Zaimoni
So that means that of the two Terror Ship indexes you have listed, only one occurs in any given mission? User:magic9mushroom
For all act types, the indexes are incremented in strictly increasing order (with all ufo-sub-c indexes run through before the ufo-c index is incremented). It may take more than one hour for a ufo to reach hyperwave detection with incomplete hyperwave coverage. -- Zaimoni
So are there two Terror Ships per mission or not?
The separation between Terror Ship 2/0 and Terror Ship 3/0 is a few days, so it's conceptually two missions with one Terror Ship each with the Terror Act. Empirical research into ufo behavior suggests that if they are not shot down, Terror Ship 2/0 never lands, while Terror Ship 3/0 always lands (and gives you a terror site). -- Zaimoni

- With the infiltration, what does the "it starts again" mean? Does that mean that once an infiltration mission has started in a zone, endless infiltrations will run there until all countries there are infiltrated?

Infiltration is the only mission type that loops. It will continue even after all countries in the zone have been infiltrated. Russia is empirically immune to infiltration in all versions higher than DOS 1.0. -- Zaimoni
So what happens at the conclusion of an Infiltration mission after all countries in the zone are infiltrated? Does a country outside the zone get infiltrated? Does no country get infiltrated? User:magic9mushroom
Nothing happens. Was rather fortunate to experience this a few times - and when I ran a no-funding-country scenario where I edited the save and flagged all the countries as withdrawn. Rather amusing to see them infiltrate an already infiltrated country and yield no results. In this case, the only real impact is the area activity points, which the neighbours will notice. -NKF 05:30, 10 August 2009 (EDT)

- It says the order for infiltrations is Terror ship -> Battleship -> Supply ship -> Battleship, but my own experience contradicts this - I shot down each UFO in an infiltration run, and the sequence was Terror ship -> Supply ship -> Battleship -> Battleship.

While Infiltration has not been verified by me in-game yet, the tables all assume that all UFOs in the sequence are detected. This is more interesting if this was with the Hyperwave Decoder. -- Zaimoni, 8:42, 9 August 2009 (CDT)
It was with a Hyper-Wave Decoder and I shot down each before the next appeared. Magic9mushroom 04:07, 10 August 2009 (EDT)
All eight are in the executable, in the order specified in MISSIONS.DAT. However, the four mentioned are pretty much "in a row": the sixth should arrive exactly one hour later after the fifth, and so on. That is, you have one hour to shoot down the Terror Ship to delay the three others by ~2 weeks. -- Zaimoni, 9:37, 10 August 2009 (CDT)
Well, it was days between detecting each one. They definitely arrived in the order Terror Ship, Supply Ship, Battleship, Battleship.
See it in the executable, fixing that now. (Mapping duration from executable to empirical is tricky, as is estimating turning points and landing counts.) -- Zaimoni, 9:37, 10 August 2009 (CDT)

Thanks in advance. Magic9mushroom 04:14, 9 August 2009 (EDT)


I understood what mean third entry in section Alien Data Missions at executable file. As I said in forum Seeing speeds of USO sub we can determine the mission of this USO sub even without transmission resolver - even in january 2040 Every USO sub in every missions (interdiction, colony, probe and other) have unique speeds and we can determine mission of USO on their speed And we can determine what amount of times a sub touch down on his mission - because every mission has unique rule for touch down USO subs And we can determine what amount of time USO Sub will touch down on their mission - because every Sub in every mission has unique and ALWAYS equal amoun of time to touch down (p.s. this time we can see in file Loc.dat)

And third entry - it's index of speeds of sub.

I have table of speeds of all USO subs. Where can locate it?

Non-scheduled Terror Missions

What is it known on terror missions which are NOT in MISSIONS.DAT? At least in TFTD, such missions are, as a rule, on the 1st of each month, 1:00 (are they always ship route attacks?). Saving the game before the attack but after the midnight (1st, 0:00), and next loading and continuing it, always leads to a mission in the same (exact) location, on the same type of the ship, and with the same alien race (or Mixed Crew). Only numbers of particular creatures of a given race can change. So, the mission properties must be stored somewhere between the midnight and 1:00 (when the attack occurs). The game must store this information somewhere, and it is not MISSION.DAT for sure.

Such a first-o'clock alien terror mission does not influence the normal, scheduled alien missions (so, it is even possible to have another terror mission just few hours after the first one, if only the other mission had been scheduled). Where is it stored?

Does a similar phenomenon occur in UFO:EU as well?

File:Nstm.zip - a set of savegames for tests, the explanation inside.

Sherlock 20:24, 30 January 2013 (EST)

It's in LOC.DAT. As in, the terror site already existed before it became visible to you, so you actually saved AFTER the attack started. -  Bomb Bloke (Talk/Contribs) 02:02, 31 January 2013 (EST)

Addresses

I'm not great at this sort of thing so I'd like to know if the following is correct. Zaimoni's example, "E.g. infiltration(3) in Europe(4) would have the offset 3*8+4*(7*8)=0xF8" means the entries are ordered by missiontype*8 + region*56 (respectively from ACTS.DAT and ZONAL.DAT) ???

Running that logic through excel I generated the addresses below. I guess they make sense; it could look like what's going on in-game though I don't have any saves where I am dead-certain what missions are running... which is what brought me to this page... :)

Adr.Hex Mission
0 Research in North America
8 Harvest in North America
10 Abduction in North America
18 Infiltration in North America
20 Base in North America
28 Terror in North America
30 Retaliation in North America
38 Research in Arctic
40 Harvest in Arctic
48 Abduction in Arctic
50 Infiltration in Arctic
58 Base in Arctic
60 Terror in Arctic
68 Retaliation in Arctic
70 Research in Antarctic
78 Harvest in Antarctic
80 Abduction in Antarctic
88 Infiltration in Antarctic
90 Base in Antarctic
98 Terror in Antarctic
A0 Retaliation in Antarctic
A8 Research in South America
B0 Harvest in South America
B8 Abduction in South America
C0 Infiltration in South America
C8 Base in South America
D0 Terror in South America
D8 Retaliation in South America
E0 Research in Europe
E8 Harvest in Europe
F0 Abduction in Europe
F8 Infiltration in Europe
100 Base in Europe
108 Terror in Europe
110 Retaliation in Europe
118 Research in North Africa
120 Harvest in North Africa
128 Abduction in North Africa
130 Infiltration in North Africa
138 Base in North Africa
140 Terror in North Africa
148 Retaliation in North Africa
150 Research in South Africa
158 Harvest in South Africa
160 Abduction in South Africa
168 Infiltration in South Africa
170 Base in South Africa
178 Terror in South Africa
180 Retaliation in South Africa
188 Research in Central Asia
190 Harvest in Central Asia
198 Abduction in Central Asia
1A0 Infiltration in Central Asia
1A8 Base in Central Asia
1B0 Terror in Central Asia
1B8 Retaliation in Central Asia
1C0 Research in Southeast Asia
1C8 Harvest in Southeast Asia
1D0 Abduction in Southeast Asia
1D8 Infiltration in Southeast Asia
1E0 Base in Southeast Asia
1E8 Terror in Southeast Asia
1F0 Retaliation in Southeast Asia
1F8 Research in Siberia
200 Harvest in Siberia
208 Abduction in Siberia
210 Infiltration in Siberia
218 Base in Siberia
220 Terror in Siberia
228 Retaliation in Siberia
230 Research in Australasia
238 Harvest in Australasia
240 Abduction in Australasia
248 Infiltration in Australasia
250 Base in Australasia
258 Terror in Australasia
260 Retaliation in Australasia
268 Research in Wilderness
270 Harvest in Wilderness
278 Abduction in Wilderness
280 Infiltration in Wilderness
288 Base in Wilderness
290 Terror in Wilderness
298 Retaliation in Wilderness

--Tlist (talk) 13:46, 25 May 2014 (EDT)

Something's off with Zombie's numbers

I hate to contradict the great Zombie, but the countdown timers here seem to have an off-by-one. The numbers as they are now predict a 3x Abductor flotilla for Abduction, a 2xLarge Scout+Terror+Supply+2xBB flotilla for Infiltration, and a Medium Scout+Large Scout+2xSupply+BB flotilla for Base, but in all three cases the first of those is not actually part of the flotilla. We need to fix this, but I'm not sure how because I don't know where the data is in GEOSCAPE.EXE (I have DOS version). Can anyone help me out here? Magic9mushroom (talk) 07:34, 31 August 2019 (CEST)

Okay, I've got it. It is an off-by-one. The time index associated with a UFO in the data files is not the countdown timer to that UFO. It's the amount of time added to the countdown timer when that UFO is spawned - i.e. the timer for the next UFO. The countdown timer for the first UFO in the mission is presumably set during mission creation, and is not stored with the rest of the mission data (this explains why it can be different for the first vs. subsequent Alien Research missions, as that one is not generated in the usual fashion).

As such, I'm going to move all the times given (which are correct, but misinterpreted) down one row, and put question-marks in the top row (since I don't actually know most of them, except Terror which I empirically know to always be 2.5h). Magic9mushroom (talk) 08:46, 31 August 2019 (CEST)