Talk:MISSIONS.DAT

From UFOpaedia
Revision as of 15:16, 10 March 2008 by Zaimoni (talk | contribs)
Jump to navigation Jump to search

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


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

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)