OpenXcom Forum

OpenXcom => Fan-Stuff => Topic started by: luke83 on August 28, 2012, 01:07:43 pm

Title: LOFT TEMPLATES
Post by: luke83 on August 28, 2012, 01:07:43 pm
Hello All,
 Is there anyway to upgrade the list of LOFT templates to  better suit any new art created? Where is this data kept and is it changeable?

Thanks
Title: Re: LOFT TEMPLATES
Post by: Volutar on August 28, 2012, 01:40:02 pm
No it's not changable. At least before new MCD format will be invented. You may use those oroginal 112/114 or even add new - up to 255 (it is possible).
Title: Re: LOFT TEMPLATES
Post by: luke83 on August 28, 2012, 01:42:31 pm
I am sorry, maybe i have mis-understood , It is possible to add some NEW ones onto the E=end of the original file up to a max of 256 tiles?

 After all these years , has anyone else added new ones already? What Program did they use?
Title: Re: LOFT TEMPLATES
Post by: Volutar on August 28, 2012, 01:56:41 pm
I believe this can be done with hex editor in binary mode (16bit x 16 lines). I think it is possible to edit this file with editor which can read/write 1bit raw images.

Anyways, this is not necessary. Trying to do mods in obsolete oldschool format, which has died already many years ago... I insist on inventing new tile format. At least for NEW things.
Title: Re: LOFT TEMPLATES
Post by: luke83 on August 30, 2012, 02:18:56 pm
Hex Editors , Well that counts me out :P
Title: Re: LOFT TEMPLATES
Post by: moriarty on August 30, 2012, 02:40:17 pm
do you have a link to detailed information about LOFTemplates? only thing I could find was https://www.ufopaedia.org/index.php?title=Glossary#L[/color]]https://www.ufopaedia.org/index.php?title=Glossary#L (https://[color=orange), which really doesn't tell you much.
If you have more info, I might help you on it... I have some basic hex editing knowledge, which basically started when I was editing soldiers and money in xcom savegames, back in the days... as well as stunning all aliens in TFTD battlescape savegames, when I didn't want to fight them :P
Title: Re: LOFT TEMPLATES
Post by: Daiky on August 30, 2012, 03:10:04 pm
hex editing, now that was the real modding... today modders are spoiled with things like XML or YAML :P

on-topic: I know Bomb Bloke from strategycore did LOFTEMPS editing and he had ways to visualize them, don't know if he has tools to edit them.
Title: Re: LOFT TEMPLATES
Post by: moriarty on August 30, 2012, 03:15:33 pm
absolutely.

I still remember the amazement when I tried to give myself too much money and ended up with negative amounts. that was when I learned about stuff like data types :)

did you ever edit a savegame to stun an alien? it's really rather weird: if you set their stun value above their current health, and load the game again, the aliens are invisible but your soldiers can still see them. apparently the game checks for consciousness before drawing unit sprites, to avoid drawing "ghosts". then, if you either shoot them or simply press "end turn", they drop unconscious, because only at those points the game checks to see if they actually fall unconscious. :)

EDIT: oh, I just found https://www.ufopaedia.org/index.php?title=LOFTEMPS.DAT] (https://https://www.ufopaedia.org/index.php?title=LOFTEMPS.DAT). cool. it's really a voxel model at the LOF level, interesting. It should be quite easy to edit those or make new ones, really. of course it would be even easier if somebody made an editor, but that might just be too much trouble.

@Volutar: what kind of format do you propose as a replacement for this model?
Title: Re: LOFT TEMPLATES
Post by: Daiky on August 30, 2012, 03:20:53 pm
this guy made an editor: https://openxcom.org/forum/index.php/topic,265.0.html

But I don't know the status of that project, and if it really can read/write loftemps.dat...

It's like minecraft !! :p Oh no, I'm going to start playing minecraft again, aaarrrgh
Title: Re: LOFT TEMPLATES
Post by: moriarty on August 30, 2012, 03:22:25 pm
right, I was just thinking about that one... thanks for finding it :) he was trying to use it for making new graphics, but I guess it's perfect for editing LOF Template data.
Title: Re: LOFT TEMPLATES
Post by: Volutar on August 30, 2012, 03:32:42 pm
moriarty, simple text format for new tiles (+image). I hope Daiky remembers :-P, we've discussed on this long time ago.
Title: Re: LOFT TEMPLATES
Post by: Volutar on August 30, 2012, 04:16:51 pm
moriarty, that voxel editor can edit only whole 3d model. You cannot adapt it to edit loft single layers and compose 3d models with them. In order to get this voxel-by-voxel editor work for openxcom, MCD tile format should be changed.

We have to decide either we stick to original MCD format with LOFT table and 12 layer references, or get into precise voxel models 16x16x24 (in this case we have to rebuild every game tile).

In this second case with 1 bit per voxel we'll get 768 bytes per tile (196kbytes for 256 tiles), otherwise (for 1byte per voxel) it will be 6k per tile and 1.5mbytes for 256 tiles (map tileset), which is kinda big, specially if you want to fit this on mobile devices.

Is it really worth it, to spend so much time and effort for bulding voxel models of such tiny resolution as 320x200?

I doubt it. I can make this LOFT (bitmap) editor which will be capable of editing of original MCDs (including LOFT assembling, image and tile mcd fields). But what for? This format is obsolete. I refuse to do anything within stupid MCD format, which is absolutely INCAPABLE to fixes or mods which will require of extra tile flags or values.

This one my little suggest (https://openxcom.org/forum/index.php/topic,295.msg2324.html#msg2324) to make maps more solid, less stupid (with inability to stand near northern or western ufo outer wall) was ignored... this is useless. forget it.
Title: Re: LOFT TEMPLATES
Post by: Daiky on August 30, 2012, 04:50:19 pm
what about YAML to replace the MCD format?
Title: Re: LOFT TEMPLATES
Post by: LCSand on August 30, 2012, 05:14:10 pm
In the long run something has to replace the MCD and other old game resource formats.
I am a fan of zip files containing xml files and other stuff. You know like all current office formats or pk3(from quake).
Maybe it is time to think about the new formats.
Title: Re: LOFT TEMPLATES
Post by: Volutar on August 30, 2012, 06:46:03 pm
The thing is modders here didn't hold their horses and want "modding tools" for non extendable original data format, which is stated to be "not changed by even one bit" (because of copyright things).

Daiky, Yaml to replace mcd? You must be joking? :) With "speed" issue of current yaml engine I can't even predict how long battlescape load time will be (considering there will be voxel object coded into text form). And what about sprites themselves? Also "color rows in yaml"?
Nah. Yaml is only for SHORT CONFIGS, not for any visual: 3d voxels/images/vector data. Who ever will be editing tiles or sprites in notepad?..
Title: Re: LOFT TEMPLATES
Post by: luke83 on August 30, 2012, 10:29:26 pm
"The thing is modders here didn't hold their horses and want "modding tools" for non extendible original data format, which is stated to be "not changed by even one bit" (because of copyright things)."
Most of these tool have been around for years and are designed for personal home use,  i cant think of any modding tool that i use that has been made by a active developer for Openxcom so i cant see any Copyright issues. Also any MOD found uploaded on my Mod site is for people who own the game to try out, Like Openxcom i dont supply The entire game files , i only provide the 1 or 2 files needed to try that mod you still need a copy of UFO defence to use, the is the same as any other MOD out there for other games.

 Game should always support original format even if you do create any New format as well ( UFO2000 support would be a nice first step), if we are going to reinvent every format we should just plan to move towards 3D game also.

All this original post was about is How can i create some new  Loft template to  better represent new items, the original game great to play, i understand its limitations but you know what, it is still fun after all these years, if i want something shiny and new i will XCOM:ENEMY UNKNOWN ( this will be the only game i will buy all year).
Title: Re: LOFT TEMPLATES
Post by: Volutar on August 31, 2012, 06:22:54 am
Quote
i cant think of any modding tool that i use, has been made by a active developer for Openxcom so i cant see any Copyright issues
You cannot modify any of original files. Otherwise you violate copyrights.
Yes, there are lot of modifications of original files, but all of them are violative. The thing is copyright holder doesn't care on this old project. Nevertheless this is violation.
Quote
Game should always support original format even if you do create any New format as well
Agreed. And I wasn't saying something like "we should get rid of old format support". Those "classic" loaders have to be used until 1.0.
Quote
if we are going to reinvent every format we should just plan to move towards 3D game also.
1. No matter are we going or not - old formats are non editable and are not extendable. Thus in order to keep them intact, we have to invent our own which will be mod-friendly.
2. Not necessary to go towards 3D. Classic isometric view is fine and with bitmap sprites could look much more crisper than 3D. Though, combination of different weapon, armor, appearence and animation of units will be a pain, and hybrid engine with 3D units in bitmap surroundings is preferable (example - Sacred 1).
Quote
How can i create some new  Loft template to  better represent new items
The answer is - this is allowed only for new tiles. If you modify any classic tiles in that way, what everyone is used to - will be ruined (break expecations), it simply alters gameplay, and possibly violate copyrights. BTW, my proposal of making pathfinder better with inventing new tile "markers" also violates and breaks things.

So, adding new tilesets (with absolutely new tiles) should be done using NEW tile format (which isn't invented yet). I believe, noone is allowed to modify/improve old tiles (not just because of copyrights, but in sake of keeping gameplay classic). Instead, artists/modders have to re-create them from scratch, and replicate maps using those new (or better to make new maps).
Title: Re: LOFT TEMPLATES
Post by: pmprog on September 11, 2012, 12:10:03 pm
You cannot modify any of original files. Otherwise you violate copyrights.
Yes, there are lot of modifications of original files, but all of them are violative. The thing is copyright holder doesn't care on this old project. Nevertheless this is violation
I don't think that's quite right. Copyright covers distribution of works, as long as you don't distribute the files, you're fine.

However, some try and add a license that prevents you from modifying files. However, this is practically unenforcable, especially on content made before the "connected age" where internet was commonplace, as nobody can actually tell if you've modified them or not, unless you distribute.

People wrote tools and patches to get around the distribution method.


Anyway...
I remember seeing Daiky's 3D world viewer way back, shame that wasn't implemented as the default tactical engine - could have always fixed the camera to the old-school isometric view  :D
Title: Re: LOFT TEMPLATES
Post by: luke83 on September 11, 2012, 12:56:25 pm
Anyway...
I remember seeing Daiky's 3D world viewer way back, shame that wasn't implemented as the default tactical engine - could have always fixed the camera to the old-school isometric view  :D

Yes this would be a cool option , i am learning blender  ATM,i could most likely make some ok looking items blocks for it until the Skilled people show up , right now i am just learning how to moddle in Blender, havent ot gone near the Cool things yet.
Title: Re: LOFT TEMPLATES
Post by: Volutar on September 11, 2012, 02:18:28 pm
And how blender can help with loft templates or new MCD format, huh?
Title: Re: LOFT TEMPLATES
Post by: luke83 on September 11, 2012, 10:14:19 pm
i meant IF the 3d engine was ever getting setup for a 3d version of xcom, From memory daiky just used the LOFT to generate a 3d world. I am aware nothing is possible with the current format.

FYI: Bomblokes toolset now handles creating new  LOFT templates , i have not tried it yet .

Title: Re: LOFT TEMPLATES
Post by: Volutar on September 12, 2012, 06:17:28 am
I will gladly start my tool for new tile format which will be able to handle better pathfinding, larger resolution and better loft representation. But only for NEW format.
Title: Re: LOFT TEMPLATES
Post by: Volutar on September 12, 2012, 07:35:35 am
Actually I would like to see tile format which will get 4 sprites (90 degrees rotated sprites) with one loft object. So it will be possible to use ONE tile with different angles instead of different tiles, even saving some space with re-using same loft, and map rotation also may become possible.
Title: Re: LOFT TEMPLATES
Post by: luke83 on September 12, 2012, 09:48:52 am
You really want a new format type , why not  propose one? I mean do the work, create what you think will work and then offer to community . I am not against a New system, but the OLD system needs to always be a option ( Even if we cant mix and match between the 2 sets). Also then you need tools that normal people ( like me) can use to be able to make new maps.

 I don't pretend to know what i am talking about , but wouldn't it be easier to just import a 3d object and have set rotation for the viewing of that object than to create 4 separate sprites ?
Title: Re: LOFT TEMPLATES
Post by: Volutar on September 12, 2012, 10:15:36 am
1. I haven't heard of such a request from main developers, and without one, I have a risk of creating something noone need.
2. Old MCD format should stay intact, though it will be a "weak point" for making something better if you try to mix them. I think old tiles eventually should be replaced with new (similar or almost same).
3. Map format is another thing. Old maps can be used with new tiles, though, if map editor won't be updated, you won't be able to see what you get. And,sure, eventually map editor should be updated or created totally another.
Title: Re: LOFT TEMPLATES
Post by: luke83 on September 12, 2012, 10:21:36 am
I love the xcom games , and its a shame my young friends wont try them as there to pixel-llated for there own tastes.

   Why could there not be a separate more 3d version of the battlescape being worked on quietly  - Main development team focus on Supsupers goal of recreation of original game and a new 3d friendly Battlescape version getting worked on as a long term project ( as it takes time to make models etc). There would be no reason to mix and match , one version would be to honour the Real games , new version would be to take it to the new generations.  Keep the flexibility that the current project is working towards but do a different battle scape engine.

 Honestly i want both and as you may have noticed , i am willing to help where my limited skills allow.
Title: Re: LOFT TEMPLATES
Post by: Volutar on September 12, 2012, 10:26:54 am
So I can treat this as "noone except for you will need it". Okay.
P.S.: I don't want 3d battlescape engine. And currently there's no such thing as "openxcom engine". There's the SDL with number of weird "shading" functions which make battlescape screen render rate at 4fps, and battlescape code, which uses SDL directly, without particular engine or order. Simple non structured hardcoding.
Title: Re: LOFT TEMPLATES
Post by: luke83 on September 12, 2012, 10:34:14 am
"So I can treat this as "noone except for you will need it". Okay."

I am just saying - you always bring up new map formats - why not plan something out to achieve it. Its got nothing to do with " I NEED it"  , i am just a gamer trying to support a Project with what limited skills i have , i don't understand 99% of the Jargon you programmer people talk about. It just sounds like you want it Really Really Bad.

 I  dont want to sidetrack this project at all , I am happy sticking to original formats as it fine for my Gaming Pleasures. You dont seem happy with alot of choices the Dev team here make ( judging by your comments on some forums) so why not show us how smart you are ( and i do think you are smart) and propose a PLAN.

 I can see a demand for a traditional recreation of x-com in a NEW shiny display - Fraxis remake will be awesome but i am scared it wont have the same feel and longevity.

At the end of the day , i am just a gamer who misses the FEEL of these old game ::)
Title: Re: LOFT TEMPLATES
Post by: Volutar on September 12, 2012, 11:15:48 am
I didn't see much of choices. Mostly fit into formula "we'll take what was done before, and try to get it together, and hope it work somehow".
With this kind of approach modding is quite hard task to do.
Title: Re: LOFT TEMPLATES
Post by: SupSuper on September 12, 2012, 09:40:10 pm
I think luke's got a point. No matter how hard we try, we lead developers can't please everyone. It's a physical impossibility. We gotta pick a focus and stick with it, projects only work through dictatorship, not committee.

However a lot of people take this as "oh if The Almighty Lead Developers don't agree / comment / care, then forget about it!". Why? We're just human beings like everyone else. Part of the reason I made the project open-source was so that everyone could take advantage of it. We have all of OpenXcom to worry about, but you guys are totally free to try out anything! Pursue all your ideas! Find out what works and what doesn't! Go nuts! Develop your own versions of OpenXcom that satisfy you if need be! New file formats! 3D engines! Whatever! You don't need the consenting word of The Almighty Lead Developers at every turn, if enough people in the community care about it, hell if you care about, maybe it's worth pursing. Maybe you'll prove us wrong and in the end we'll just integrate it in and you'll get to feel that more awesome.

Just look at OpenTTD, the standard official version just supports all the standard TTD features (with improvements), but there's a forum full (https://www.tt-forums.net/viewforum.php?f=33) of patches of everyone's crazy ideas in practice without any word from the developers. The community is happy, the developers are happy, everyone's happy.


Regarding new file formats, I think Daishiva was interested in them too, even willing to develop tools for them, so you might have some extra support there.