Difference between revisions of "Talk:LOFTEMPS.DAT"

From UFOpaedia
Jump to navigation Jump to search
Line 41: Line 41:
  
 
--[[User:Bomb Bloke|Bomb Bloke]] 04:20, 18 Nov 2005 (PST)
 
--[[User:Bomb Bloke|Bomb Bloke]] 04:20, 18 Nov 2005 (PST)
 +
 +
----
 +
 +
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?
 +
 +
--[[User:Daiky|Daiky]] 19 Nov 2010

Revision as of 10:45, 19 November 2010

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)


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