OpenXcom Forum

Modding => Released Mods => IDT Modding Hub => Topic started by: Finnik on January 12, 2021, 09:36:23 pm

Title: Community Extended LOFTEMPS
Post by: Finnik 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 (https://www.ufopaedia.org/index.php/LOFTEMPS.DAT).

(https://www.ufopaedia.org/images/6/64/Loftemps_Example.png)

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 (https://openxcom.mod.io/community-map-pack)).

With this project, I want to achieve two goals:

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:

(https://media.discordapp.net/attachments/468854550124822568/798634494726635540/unknown.png?width=1038&height=1041)

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:

(https://media.discordapp.net/attachments/468854550124822568/798635935868387368/unknown.png)
Title: Re: Community Extended LOFTEMPS
Post by: Solarius Scorch 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.
Title: Re: Community Extended LOFTEMPS
Post by: The Reaver of Darkness 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.
Title: Re: Community Extended LOFTEMPS
Post by: Solarius Scorch 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.
Title: Re: Community Extended LOFTEMPS
Post by: Meridian 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.
Title: Re: Community Extended LOFTEMPS
Post by: Solarius Scorch 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.
Title: Re: Community Extended LOFTEMPS
Post by: Meridian 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.
Title: Re: Community Extended LOFTEMPS
Post by: The Reaver of Darkness 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.
Title: Re: Community Extended LOFTEMPS
Post by: kevL on February 07, 2021, 07:34:21 am
am working on PckView as a LoFT editor

eta unknown ...
Title: Re: Community Extended LOFTEMPS
Post by: Finnik 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.
Title: Re: Community Extended LOFTEMPS
Post by: Finnik 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.
Title: Re: Community Extended LOFTEMPS
Post by: kevL 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 ...
Title: Re: Community Extended LOFTEMPS
Post by: kevL 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
Title: Re: Community Extended LOFTEMPS
Post by: Solarius Scorch 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.
Title: Re: Community Extended LOFTEMPS
Post by: kevL 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
Title: Re: Community Extended LOFTEMPS
Post by: Solarius Scorch on February 12, 2021, 02:59:01 pm
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

Yeah, it's totally possible. It's just something a modder decides whether they need it or not. I can't really see much interest TBH.
Title: Re: Community Extended LOFTEMPS
Post by: kevL on February 12, 2021, 11:58:06 pm
kk

my opinion? I've always felt that the LoFts were a bit limiting... but im not a great mapmaker or anything like that. However, before any mission I go over the terrainset and do tweaks and fixes as i see fit.

I'm surprised at how 'comfortable' Finnik's additions are at present. And since the LoFTset can have up to 256 entries, and with the extended LoFTs its only at ~140/150, then as long as the stock lofts stay the same (backward compatible) i don't see why not ...

(but leave the last 50..100 entries blank to allow for any serious customization by individuals, i spose)


... Here's something I'd like to see though: before adding the extended LoFTs, add the two extra lofts from TFTD. Then add the extensions. This way the templates for UFO and TFTD are bongo.
Title: Re: Community Extended LOFTEMPS
Post by: Finnik on February 16, 2021, 10:12:22 pm

... Here's something I'd like to see though: before adding the extended LoFTs, add the two extra lofts from TFTD. Then add the extensions. This way the templates for UFO and TFTD are bongo.

Oh, i did it, and they use the same numbers as TFTD. So you can say we are extending TFTD LOFT file here =)
Title: Re: Community Extended LOFTEMPS
Post by: kevL on February 16, 2021, 10:25:34 pm
kk  :)
Title: Re: Community Extended LOFTEMPS
Post by: Grober Nitho on August 20, 2021, 11:44:40 am
I'd like to request extra loftemps icons for 122 and 123, I know it's not visible during the game, but I'd still like to have the shapes. If you already have your own shape for everything this one why should it be a cuckoo egg? I understand that not everyone needs this, but I would still like someone to make such an extension for me. Each width should be 3 pixels. I will show you the shapes in the attached picture. In principle, block 6 would also be good, but the problem is that the shape is lost. Not important for many people, but important for me :) Thank you.

Translated with DeepL Translator
Title: Re: Community Extended LOFTEMPS
Post by: kevL on August 20, 2021, 03:30:29 pm
PckView, in the next version of MapView2, should be able to edit and add LoFTs easy as pie.

if you're in a rush let me know but no guarantees on a release date.
Title: Re: Community Extended LOFTEMPS
Post by: bulletdesigner on August 20, 2021, 05:42:56 pm
PckView, in the next version of MapView2, should be able to edit and add LoFTs easy as pie.

if you're in a rush let me know but no guarantees on a release date.

nice, can´t wait for that! Even thought i never said anything, this is will help a lot of models  and i was expecting for something like this
Title: Re: Community Extended LOFTEMPS
Post by: Grober Nitho on August 20, 2021, 06:23:35 pm
PckView, in the next version of MapView2, should be able to edit and add LoFTs easy as pie.

if you're in a rush let me know but no guarantees on a release date.

I have version 3.8.2 of mapview2. Is this version still unsuitable?
Title: Re: Community Extended LOFTEMPS
Post by: kevL on August 21, 2021, 12:53:07 am
I have version 3.8.2 of mapview2. Is this version still unsuitable?

wait for ver.4

nice, can´t wait for that! Even thought i never said anything, this is will help a lot of models  and i was expecting for something like this

ok ill push it up on my inner agenda




ps. for those who build their own, I think my source is good to go
https://github.com/kevL/OpenXCOM.Tools


[edit] ver.4 is up
https://openxcom.org/forum/index.php/topic,1321.msg140737.html#msg140737
Title: Re: Community Extended LOFTEMPS
Post by: Finnik on October 26, 2021, 09:51:59 pm
I'd like to request extra loftemps icons for 122 and 123, I know it's not visible during the game, but I'd still like to have the shapes. If you already have your own shape for everything this one why should it be a cuckoo egg? I understand that not everyone needs this, but I would still like someone to make such an extension for me. Each width should be 3 pixels. I will show you the shapes in the attached picture. In principle, block 6 would also be good, but the problem is that the shape is lost. Not important for many people, but important for me :) Thank you.

Translated with DeepL Translator

Such shape cant affect LoF, it would act exactly as simple rectangle.


File updated with all requested frames (see attachment). You can post a request here: https://docs.google.com/spreadsheets/d/1jDk-X515q2uxFxWwDMKaghgsEu_V2biNJU9ErKy7nfU/edit?usp=sharing (https://docs.google.com/spreadsheets/d/1jDk-X515q2uxFxWwDMKaghgsEu_V2biNJU9ErKy7nfU/edit?usp=sharing).

ver.4 is up
https://openxcom.org/forum/index.php/topic,1321.msg140737.html#msg140737

Thank you! Handy tool, editing with GUI is wa-a-a-y faster =)