Talk:LOC.DAT

From UFOpaedia
Jump to navigation Jump to search

Altitude

Shouldn't the altitude be set in this file as well? Probably one of the Unknown values, and XCOM and Alien Bases might have rubbish data in them. --Pi Masta 15:27, 8 February 2007 (PST)

Count Down

I have some doubts about offset 6-7. The page says that it is the horizontal destination, it looks more like the time left before crash/terror site will disappear (or maybe the offset has two usages depending on the type of the location?). It is reset to 3 for as long as there is a craft targeting the site. Seb76 10:45, 26 April 2008 (PDT)

As neither crash nor terror sites have meaningful destinations anyway (only start locations), there's no reason why these offsets can't be overloaded to mean something else in these cases. -- Zaimoni 14:32, 26 April 2008 (CDT)

My experience confirm that offset 6-7 is time to count-down. If this is a terror or crash sub - time meeasure in hours. In example, if we show time = 10 that means this site 'll disappear through 10 hours

If this is landed Alien Sub - that time 'll fly up. It time measuring in 5-seconds. 1 minute = value 12. When I checked time to lands Alien Subs, I 'll became to convince it.

As far as I see, offset 6 (word) indeed used for countdown, both set, updated and checked. But offset 8 is very weird. I haven't found use of this field value anywhere. Yes, it set, updated, but never checked. How's that? There are couple of places where field6=5400/speed and field8=5400%speed and another with field6=latitude/speed and field8=latitude%speed, and I have no idea what are they doing this for... It looks like some companion field of offset6, but apparently not used. --Volutar 06:59, 13 April 2011 (EDT)

Field 08 (vertical destination??)

I have found strange algo with weird formula of transferring data from offset8 to offset6 (countdown field)

 v44 = craft->UFO_waypoint_y_field_16 + location->field_8;
 location->field_6 = v44 / craft->CurrentSpeed;
 location->field_8 = v44 % craft->CurrentSpeed;

Any ideas? --Volutar 07:20, 13 April 2011 (EDT)

Multiple interpretations

It turns out that LOC.DAT also contains/indexes key data for configuring alien bases. One of my attempts at manually constructing an alien base entry critically backfired.

For a Floater base, the Reapers are instantiated in a post-processing pass; they start out as Floaters at the *front* of the alien unit list. The game knew enough not to arm the would-be Reapers, but with key fields in LOC.DAT bungled the pass to convert would-be Reapers to Reapers did not execute. -- Zaimoni 21:34, 4 December 2008 (CDT)

Alien ranks higher than Soldier also are created in a post-processing pass; their equipment, however, was templated properly based on what their rank would have been from where the entries were in the file. The proto-Reapers did not have Soldier rank either. -- Zaimoni 21:51, 4 December 2008 (CDT)

Supply ship requests

Just to jot a thought down before I forget:

Since supply ships aren't scheduled to happen as such in ACTS.DAT/MISSIONS.DAT, and are instead requested directly by the alien base, would the base's loc.dat entry store a timer that counts down between the when it makes its next supply ship request? Or are supply ships just generated at fixed times during the month?

- NKF 04:41, 30 April 2010 (EDT)

edit: Shot this idea down as soon as it came to me. An alien base's information is fairly static in loc.dat. I can only guess that the game randomly decides whether or not to create a supply ship each day at 00:00am, with the supply ship's being 'ping'ed for the first time by your radars at 00:30am. Had a few supply ships show up in the span of a few days in one game, then after reloading none appeared until close to the end of the month. -NKF 05:16, 30 April 2010 (EDT)

I think I wrote it somewhere, but once a day each base has a 5% chance of generating an alien supply mission. You can change the "6" there to increase the probability:
.text:00441DC6 66 3D 06 00                   cmp     ax, 6
Seb76 14:49, 30 April 2010 (EDT)