Difference between revisions of "Talk:MISSIONS.DAT"

From UFOpaedia
Jump to navigation Jump to search
Line 101: Line 101:
 
::: So the two battleships that don't ever spot your base are unrelated to the battleships that come if you're spotted? [[User:magic9mushroom]]
 
::: 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>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>
 
:: <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>

Revision as of 14:51, 10 August 2009

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

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)

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.

- 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)

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