Difference between revisions of "Talk:LOFTEMPS.DAT"

From UFOpaedia
Jump to navigation Jump to search
Line 54: Line 54:
  
 
::Tried setting UFO floor tiles to 1 tonight, didn't affect the vision of either my soldiers or the aliens. Still not conclusive, mind you - it may only work on walls or other "non-floor" tiles. - <span style="font-size:xx-small">&nbsp;[[User:Bomb_Bloke|Bomb Bloke]] ([[User_talk:Bomb_Bloke|Talk]]/[[Special:Contributions/Bomb_Bloke|Contribs]])</span> 10:32, 20 November 2010 (UTC)
 
::Tried setting UFO floor tiles to 1 tonight, didn't affect the vision of either my soldiers or the aliens. Still not conclusive, mind you - it may only work on walls or other "non-floor" tiles. - <span style="font-size:xx-small">&nbsp;[[User:Bomb_Bloke|Bomb Bloke]] ([[User_talk:Bomb_Bloke|Talk]]/[[Special:Contributions/Bomb_Bloke|Contribs]])</span> 10:32, 20 November 2010 (UTC)
 +
 +
I have another possible theory, but not tested it yet.
 +
1) MCD[31] is used for scanning the static terrain and reveiling fog of war. The LOFTemps are used only to test on visibilty between units. The reason why I think this, is because using LOFTemps to test on the visibility of all tiles in the field of view would take a lot of calculations, because the resolution is so much higher.
 +
2) floors/ceiling tiles always block LOS. MCD[31] is ignored for floor type tiles. There are no floor tiles that I know of in the game where you can see through. By the way other types of blocking (HE, smoke, fire) are 0 too in the MCD, but I believe HE/smoke/fire is not going through roofs like they don't exist? So they must have some seperate hardcoded block value (I guess 1 in all cases).
 +
Anyway, this is the way it'll be implemented in OpenXcom, until a better theory shows up.
 +
--[[User:Daiky|Daiky]] 01 Feb 2011

Revision as of 10:30, 1 February 2011

Danial or BombBloke - thanks for making this. I am curious about how these files work...

"There are 112 entries, each of which are 32 bytes long. ... In Binary, the file creates 16x16 bitmaps, where 1 is solid and 0 is empty. These are then layered using the 12 loft references in the MCD files to create a 16x16x12 3D object."

I can see how 16x16 bits = 32 bytes for a 16x16 bitmap. But why are there "112" entries? How does this fit in with the "12 loft references" from MCD? (112/12=9.33... does it mean there there can be up to 9 "whole" 12-high objects in LOFTEMPS.DAT?)

Also: We're talking about the battlescape map, I presume... How does the "112" fit with the total number of objects in the game and/or max that can be on the battlefield at any given time? Is there any relationship?

And, BB you've said LOFT probably = Line Of Fire Table. What might EMPS mean?

As you can see, I know almost nothing about how the graphics are set up. So I have questions. :) If either of you can fill in any, please do so. If all the above can be addressed, delete this comment. Thanks! ---MikeTheRed 12:27, 17 Nov 2005 (PST)


Each MCD entry has 12 LOFT references, with each one pointing to the 16x16 bitmaps (the 112 entries on the LOFTEMPS.DAT file. The shape of the tile is thus built from the entries on the LOFTEMPS file. Those entries can have several shapes, like this: | . _ (I'm using punctuation marks that resemble it). Those are very simple shapes: if you want to 'draw' a wall you would use something like this: | | | | | | | | | | | | (the 12 LOFT references on the MCD file, each refering to an entry on the LOFTEMPS). When the game stacks them one over the other it produces a wall.

For a very technical explanation check this post by BladeFireLight: Map Control Data (MCD)

Also, check the end of that post. There's a link there to Koralt's MCD Editor. That is what I use for modifying the terrain files and it is easier to understand how it works with it, I think.

And the LOFTEMPS has nothing to do with the objects limit on the battlefield. I have no idea why there's only 112 entries though.

Hobbes 13:24, 17 Nov 2005 (PST)


They probably just kept adding to the file when needed, and 112 just happened to be the number they ended on.

I think, with the 112 lofts, by the 12 elevations, there's a possible 1344 "3D" objects in the game...

I've just added a graphic that should help you (and everyone else) understand a little better.

--Danial 9:16, 18 Nov 2005

P.S. I figured that loftemps was "Loft Elevation Maps" myself.


Thanks everybody! Wow, that's a lot of info. Cool... I (or anybody else) will copy over to the Article anything in this Discussion that's not yet there (looks like most of it is), then delete this Discussion ---MikeTheRed 16:38, 17 Nov 2005 (PST)


I get the impression that you could add to the loftemps.dat file, if you wanted to allow for more shapes... I see no reason why 256 different indexes would be a problem.

--Bomb Bloke 04:20, 18 Nov 2005 (PST)


LOFTemps visibility VS MCD visibility

The article says "These are used for Line of sight (LOS) and line of fire (LOF) purposes." But in the MCD record, offset 31, there is a flag "Can see through?"... This makes me think LOFTEMPS are not used for LOS?

--Daiky 19 Nov 2010

If you try this patched version of the Lightning, you should find that the thing has no "cracks"; that is to say, you can't see out of it unless you step out of it. However, the walls have that MCD flag set to 1, while the floors/ceiling have it set to 0. Both are obviously blocking visibility, hence the MCD article is either wrong, or at the very least misleading.
I know for a fact that tiles with an MCD[31] value of 0 will block visibility according to their LOFTemps records. It may be that tiles with a value of 1 block all visibility regardless of their LOFTemps records. -  Bomb Bloke (Talk/Contribs) 13:10, 19 November 2010 (UTC)
Tried setting UFO floor tiles to 1 tonight, didn't affect the vision of either my soldiers or the aliens. Still not conclusive, mind you - it may only work on walls or other "non-floor" tiles. -  Bomb Bloke (Talk/Contribs) 10:32, 20 November 2010 (UTC)

I have another possible theory, but not tested it yet. 1) MCD[31] is used for scanning the static terrain and reveiling fog of war. The LOFTemps are used only to test on visibilty between units. The reason why I think this, is because using LOFTemps to test on the visibility of all tiles in the field of view would take a lot of calculations, because the resolution is so much higher. 2) floors/ceiling tiles always block LOS. MCD[31] is ignored for floor type tiles. There are no floor tiles that I know of in the game where you can see through. By the way other types of blocking (HE, smoke, fire) are 0 too in the MCD, but I believe HE/smoke/fire is not going through roofs like they don't exist? So they must have some seperate hardcoded block value (I guess 1 in all cases). Anyway, this is the way it'll be implemented in OpenXcom, until a better theory shows up. --Daiky 01 Feb 2011