Author Topic: Community Extended LOFTEMPS  (Read 15601 times)

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • 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:



Online Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11730
  • 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

  • Moderator
  • Commander
  • ***
  • Posts: 1512
    • 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.

Online Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11730
  • 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: 9099
    • View Profile
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 »

Online Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11730
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Community Extended LOFTEMPS
« Reply #5 on: February 02, 2021, 05:08:14 pm »
I can only speak for myself, but my proposed additions basically fall into two categories:
- Shapes designed to plug holes in some craft maps.
- Long central shapes to represent stuff like smaller stones or machines.
« Last Edit: October 26, 2021, 11:14:08 am by Solarius Scorch »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9099
    • View Profile
Re: Community Extended LOFTEMPS
« Reply #6 on: February 02, 2021, 08:01:42 pm »
I can only speak fore myself, but my proposed additions basically fall into two categories:
- Shapes designed to plug holes in some craft maps.
- Long central shapes to represent stuff like smaller stones or machines.

Solid shapes should cause the least issues.

It's the complicated multi-part shapes I'm worried about.

Offline The Reaver of Darkness

  • Moderator
  • Commander
  • ***
  • Posts: 1512
    • View Profile
Re: Community Extended LOFTEMPS
« Reply #7 on: February 07, 2021, 04:53:08 am »
We have the shapes for rectangles shrinking toward the bottom or the right, but not toward the top or left, and that is what I find most commonly lacking. There are several nigh-useless complex shapes made for extremely specific vanilla items that can be modeled adequately without using them. The amount of LOFTs is fine, the problem is that there are too many specific shapes and not a full spread of general shapes.

I would keep 66, 72, and 73 for sure. There's a lot of ways to use those.

52-55 and 81-85 are useful for vegetation but not strictly necessary. At the very least they could be condensed into a smaller number of options, or the same number but better generalized.

41-44 could reasonably be condensed into just two options instead of four.

60-63 seem overly specialized and could easily be removed to make space.

What we're missing, in addition to what I mentioned in the first paragraph, is generalized floating pieces. In fact we could easily take 52-55, 60-65, 74-76, and perhaps even 81-85 to make space for a generalized set of missing floating pieces. It would free up 13 (or 18 if you count 81-85) slots to work with.

- - - - -

Please note that I am NOT suggesting we do this. We should at this point leave the existing LOFTs because so many maps have been made using them. But I wanted to illustrate the flaws in the current setup. I think that the new set of LOFTs should carefully add the most important pieces that aren't represented currently, and always save as much space as possible for future additions.

Offline kevL

  • Colonel
  • ****
  • Posts: 482
  • pitchforks and torches
    • View Profile
Re: Community Extended LOFTEMPS
« Reply #8 on: February 07, 2021, 07:34:21 am »
am working on PckView as a LoFT editor

eta unknown ...

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Re: Community Extended LOFTEMPS
« Reply #9 on: February 07, 2021, 12:00:53 pm »
am working on PckView as a LoFT editor

Would be so nice to have this tool! Editing with HEX editing is not really a fun thing.

We have the shapes for rectangles shrinking toward the bottom or the right, but not toward the top or left, and that is what I find most commonly lacking.

That is a good example of what can be added to community extended LOFT!

Please note that I am NOT suggesting we do this. We should at this point leave the existing LOFTs because so many maps have been made using them. But I wanted to illustrate the flaws in the current setup. I think that the new set of LOFTs should carefully add the most important pieces that aren't represented currently, and always save as much space as possible for future additions.
Yep, this is exactly what my goal is - discuss with community what we have missing and add it on top of what we have now.

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Re: Community Extended LOFTEMPS
« Reply #10 on: February 07, 2021, 06:37:28 pm »
The first revision of the file is ready, with new LOFTs ##114-139, new 140-150 by Reaver are to be discussed and approved.

Offline kevL

  • Colonel
  • ****
  • Posts: 482
  • pitchforks and torches
    • View Profile
Re: Community Extended LOFTEMPS
« Reply #11 on: February 07, 2021, 11:33:20 pm »
The first revision of the file is ready, with new LOFTs ##114-139, new 140-150 by Reaver are to be discussed and approved.

here's a preview output ...
« Last Edit: February 08, 2021, 04:41:01 am by kevL »

Offline kevL

  • Colonel
  • ****
  • Posts: 482
  • pitchforks and torches
    • View Profile
Re: Community Extended LOFTEMPS
« Reply #12 on: February 09, 2021, 10:03:04 am »
i notice 135..137 wants another: right&bottom sides

and i wonder if it's worthwhile to mirror 110,111 and 138,139

Online Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11730
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Community Extended LOFTEMPS
« Reply #13 on: February 10, 2021, 11:21:33 pm »
i notice 135..137 wants another: right&bottom sides

That's 83.

and i wonder if it's worthwhile to mirror 110,111 and 138,139

Probably not, N  and W walls are normally used. But I can't speak for all modders.

Offline kevL

  • Colonel
  • ****
  • Posts: 482
  • pitchforks and torches
    • View Profile
Re: Community Extended LOFTEMPS
« Reply #14 on: February 11, 2021, 12:40:58 am »
That's 83.

sweet

Quote
Probably not, N  and W walls are normally used. But I can't speak for all modders.

I'm thinkin if someone makes a Content-object... and say it looks like a fence on the east or south side
maybe the adjacent N or W wallslot is used for something else or is on the edge of a Map but you/me/etc wants a fence there just for aesthetic/pseudo-realism