Author Topic: Community Extended LOFTEMPS  (Read 205 times)

Offline Finnik

  • Colonel
  • ****
  • Posts: 169
    • View Profile
Community Extended LOFTEMPS
« on: January 12, 2021, 09:36:23 pm »
Hello all!

This topic could be interesting to modders, especially for those who like to create new interesting maps.

As you might know, the OXC, just as the original game has actually a 3D battlescape engine behind flat sprites. To process the shape of all map tiles, the game uses LOFTEMPS - "Line of Fire Templates" table, which creates a 3D voxel representation of the tile https://www.ufopaedia.org/index.php/LOFTEMPS.DAT.



That data is stored in a binary file UFO\GEODATA\LOFTEMPS.DAT and can be edited with any HEX editor. You might also notice, that the vanilla LOFT layers set has a lot of pretty specific to vanilla tiles, but some times this set can limit your creativity of tile creation. The thing is that as far as I know, for all those years we are modding OXC(E), nobody made any editions to that file. Thus, we can share maps we are creating, and do not worry if their LOFT dataset would be compatible - we all use the same file. Sadly, the engine was not meant to process this file modularly, so all terrains in all loaded mods should use the same file, other cases are not supported.
This could be a problem for terrain-sharing projects, like Community Mod Pack (https://openxcom.mod.io/community-map-pack).

With this project, I want to achieve two goals:
  • Push LOFT we are using to its limits (AFAIK it's 255 layers, and UFO/TFTD uses only 112/114 layers) with extra shapes we would like to have in terrains we are creating.
  • Keep terrains in the OXC community compatible with each other.

For that, I am creating a new LOFTEMPS.DAT file with HEX editing, and I want to fill it with shapes, that are required by modders. I would like then if we all agree on it to include it to CMP and major mods. The idea is already supported by some modders, and to organize proposing of bitmap shapes I am planning to use google doc:



If you would like to contribute to the process, let me know with a PM here on the forum or via Discord - Finnik#0294 (preferably via discord, so I will answer faster  ;) ), I will send you an access link to the file. For now, I am slowly adding proposed shapes to LOFTEMPS.DAT:



Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 9899
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Community Extended LOFTEMPS
« Reply #1 on: January 13, 2021, 10:55:31 am »
It's a very commendable initiative. While the vanilla set is good enough in 95% of cases, the remaining 5% can be quite frustrating.

I'm on it already.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1365
    • View Profile
Re: Community Extended LOFTEMPS
« Reply #2 on: January 21, 2021, 02:28:04 pm »
While the vanilla set is good enough in 95% of cases,

I disagree. Anytime I'm making a map shape that isn't something we already have in vanilla, I find I am able to get satisfactory LOFTs about 50% of the time. Even something like 20% of the complex shapes in vanilla on things like the Skyranger are very poorly modeled.

BEST case I could say it is 75% satisfactory.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 9899
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Community Extended LOFTEMPS
« Reply #3 on: January 21, 2021, 07:36:12 pm »
I disagree. Anytime I'm making a map shape that isn't something we already have in vanilla, I find I am able to get satisfactory LOFTs about 50% of the time. Even something like 20% of the complex shapes in vanilla on things like the Skyranger are very poorly modeled.

BEST case I could say it is 75% satisfactory.

LOFTs are only meaningful for determining the line of fire and sight. They are not meant to actually represent shape of things, and it's pointless to expect them to do so. I actually scrapped some of my custom designs because I saw that while they looked different, the actual in-game effect would be pretty much the same as some already existing tiles.

I still think 95% is a sensible assessment for an average. I haven't checked, but I'm not surprised to hear that crafts are one of the poorest examples.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 6609
  • OXCE developer
    • View Profile
    • My Wiki
Re: Community Extended LOFTEMPS
« Reply #4 on: January 21, 2021, 10:19:11 pm »
LOFTs are only meaningful for determining the line of fire and sight. They are not meant to actually represent shape of things, and it's pointless to expect them to do so. I actually scrapped some of my custom designs because I saw that while they looked different, the actual in-game effect would be pretty much the same as some already existing tiles.

Exactly.

I would go even further, in my opinion, there are too many LOFTs already, the game could use less.

Especially when the motivation (or at least part of the motivation) is to prevent bugreports like "WTF i cant see trough it" or "why did my bullet hit air".
The example from the first post (ID=130) is a great example of a LOFT that will cause nothing but endless trouble and pain.
I can't stop you from making new LOFTs... but for heaven's sake, have mercy and create something that isn't as messed up as that particular example... I'm really not looking forward to having to debug and explain all the bugreports and player frustrations it will cause.
« Last Edit: January 21, 2021, 10:32:28 pm by Meridian »