Difference between revisions of "Talk:BGLOB.DAT"

From UFOpaedia
Jump to navigation Jump to search
m
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Would it be fair to say that of the two values, the first is the "minimum" darkness level of any otherwise unlit or uncovered tile, and the second is the "maximum" darkness level of a tile that has light blocked from it?
+
Offsets 74-75 looks like the 'local time' of the mission. It is translated into brightness by a 24 entries array of words (2 bytes) located at offset 0x6C99C. [[User:Seb76|Seb76]] 05:39, 21 June 2008 (PDT)
  
That is to say, all unlit tiles are at least bglob[0], but no more then bglob[1], dark. - [[User:Bomb Bloke|Bomb Bloke]] 22:05, 12 September 2006 (PDT)
+
----
 +
 
 +
So in decimal, the values are:
 +
 
 +
16,16,16,16,16,16,16,16,16,16,12, 8, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 +
 
 +
Well, yeah, those seem like the sort of values you'd expect to see in BGLOB. However, the highest value I've seen stored at MISSION[74-75] is 15... I'm not sure how you could map that range to the 24 values here. Also it's not really a "night to day to night" cycle, it just goes from dark to light.
 +
 
 +
Any chance MISSION[74-75] isn't the time, but a value derived from the time? That makes a little more sense to me.  
 +
 
 +
- [[User:Bomb Bloke|Bomb Bloke]] 06:03, 21 June 2008 (PDT)
 +
 
 +
----
 +
 
 +
The value is computed from offset 2 of LOC.DAT and the time of the day so I assumed it was local time. Well anyway, it is a time representation of some kind ;-) [[User:Seb76|Seb76]] 09:59, 21 June 2008 (PDT)
  
 
----
 
----
  
I don't think I get what you mean. When TERMP is calculated, it checks (apropriate for this tile) value from BGLOB and won't make a tile darker than this.
+
Note that MISSION[76] also as a purpose here, but I didn't tinker too much with it when I first found out about it (who knows how long ago)... I think I got the impression that the type of mission would affect the BGLOB lighting scheme? - [[User:Bomb Bloke|Bomb Bloke]] 06:03, 21 June 2008 (PDT)
Without additional light sources you won't get shadow value other than those two.
+
 
--Quantifier 22:54, 12 September 2006 (PDT)
+
----
 +
 
 +
I could find the following usage for offset 76:
 +
* Power source explosion check during map creation
 +
* Clean up of LOC.DAT and CRAFT.DAT entries after a crash recovery mission
 +
* UFO CRASH RECOVERY/UFO GROUND ASSAULT message selection before a ground mission
 +
* I found it set to 1 only for crash sites
 +
Also the time is only used for mission types 0 and 1 (where dark zones use ambient level+4). Mission type 2 is hard coded to 8; and types 3,4,5 to 0x10 (for both normal and dark tiles).
 +
I could not find anything else. [[User:Seb76|Seb76]] 09:59, 21 June 2008 (PDT)
 +
 
 +
----
 +
 
 +
Can't seem to replicate my results or remember exactly what they were. All I can remember is that messing with that offset would provide SOME results, hence why I made a point of updating the MISSION wiki page at the time... Ah well, not important, these results look pretty good to me. :)
 +
 
 +
Great to know that's what the power source check is based on. I was wondering, couldn't seem to find a flag for it anywhere else.
 +
 
 +
Bit confused by the "I found it set to 1" bit. What was set to 1? Surely not the LOC referrence? That should always point to whatever record is relevant, shouldn't it?
 +
 
 +
- [[User:Bomb Bloke|Bomb Bloke]] 02:23, 23 June 2008 (PDT)

Latest revision as of 09:23, 23 June 2008

Offsets 74-75 looks like the 'local time' of the mission. It is translated into brightness by a 24 entries array of words (2 bytes) located at offset 0x6C99C. Seb76 05:39, 21 June 2008 (PDT)


So in decimal, the values are:

16,16,16,16,16,16,16,16,16,16,12, 8, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

Well, yeah, those seem like the sort of values you'd expect to see in BGLOB. However, the highest value I've seen stored at MISSION[74-75] is 15... I'm not sure how you could map that range to the 24 values here. Also it's not really a "night to day to night" cycle, it just goes from dark to light.

Any chance MISSION[74-75] isn't the time, but a value derived from the time? That makes a little more sense to me.

- Bomb Bloke 06:03, 21 June 2008 (PDT)


The value is computed from offset 2 of LOC.DAT and the time of the day so I assumed it was local time. Well anyway, it is a time representation of some kind ;-) Seb76 09:59, 21 June 2008 (PDT)


Note that MISSION[76] also as a purpose here, but I didn't tinker too much with it when I first found out about it (who knows how long ago)... I think I got the impression that the type of mission would affect the BGLOB lighting scheme? - Bomb Bloke 06:03, 21 June 2008 (PDT)


I could find the following usage for offset 76:

  • Power source explosion check during map creation
  • Clean up of LOC.DAT and CRAFT.DAT entries after a crash recovery mission
  • UFO CRASH RECOVERY/UFO GROUND ASSAULT message selection before a ground mission
  • I found it set to 1 only for crash sites

Also the time is only used for mission types 0 and 1 (where dark zones use ambient level+4). Mission type 2 is hard coded to 8; and types 3,4,5 to 0x10 (for both normal and dark tiles). I could not find anything else. Seb76 09:59, 21 June 2008 (PDT)


Can't seem to replicate my results or remember exactly what they were. All I can remember is that messing with that offset would provide SOME results, hence why I made a point of updating the MISSION wiki page at the time... Ah well, not important, these results look pretty good to me. :)

Great to know that's what the power source check is based on. I was wondering, couldn't seem to find a flag for it anywhere else.

Bit confused by the "I found it set to 1" bit. What was set to 1? Surely not the LOC referrence? That should always point to whatever record is relevant, shouldn't it?

- Bomb Bloke 02:23, 23 June 2008 (PDT)