Color Palettes

The role-playing games (I-X) that started it all and the various spin-offs (including Dark Messiah).

Moderator: Moderators

User avatar
Big Daddy Jim
Swordsman
Swordsman
Posts: 551
Joined: 29 Oct 2007
Location: Republic de Panama

Postby Big Daddy Jim » Dec 23 2009, 1:38

Ck-NoSFeRaTU wrote:Aah, I get it... So, currently only BMP supported? I simply tried to add some pcx files and after getting some bunch of these errors I'm give up. Now I'm successfully imported that evil IB-Mb-A. So problems with BMP seems resolved and now remain to find how to import files like MM6TITLE.PCX on which mm8leveleditor breaks.


No, you don't "get it". The MM8LevelEditor is able to reliably Import and Export any and all LOD-related files including .TGA.BMPs, .SPRITE.BMPs, .PCX formats, .SMK videos, et al. I've successfully done this dozens (if not hundreds) of times without problem or incident.

BDJ
"BDJ the Coding Wizard has moved out of the Coding Fortress, has retired from Might & Magic game modification, and now lives a peaceful life in Alto Lino, Republic de Panama.

http://www.mediafire.com/BDJs

User avatar
Vector
Pixie
Pixie
Posts: 118
Joined: 30 Sep 2006
Location: United States
Contact:

Postby Vector » Dec 23 2009, 2:19

Ck-NoSFeRaTU wrote:Aah, I get it... So, currently only BMP supported? I simply tried to add some pcx files and after getting some bunch of these errors I'm give up. Now I'm successfully imported that evil IB-Mb-A. So problems with BMP seems resolved and now remain to find how to import files like MM6TITLE.PCX on which mm8leveleditor breaks.


Your PCX files should import fine into MM8lvleditor. Are you actually saving the modified pcx files in the pcx file format? You can't name a bitmap image 'MM6TITLE.PCX' and expect MM8lvleditor to import it in as a pcx file.

Also note, if you look at the MM8lvleditor build notes, you will see exactly what is and what is not supported. It is not soley BMP supported, it supports so many other file formats. As BDJ states, there are many here who have imported/exported the file formats you mention dozens, if not hundreds of times.

Good luck.
||\............/||_||\............/||_\\.....//
||..\......../..||_||..\......../..||__\\.//
||....\..../....||_||....\..../....||__//.\\
||......\/......||_||......\/......||_//.....\\

Might and Magic X: The Anduran Saga
Official Website: http://www.mightandmagic10.thegaminguniverse.com/

Ck-NoSFeRaTU
Leprechaun
Leprechaun
Posts: 23
Joined: 22 Dec 2009
Location: Russia

Postby Ck-NoSFeRaTU » Dec 23 2009, 6:26

Big Daddy Jim wrote:No, you don't "get it". The MM8LevelEditor is able to reliably Import and Export any and all LOD-related files including .TGA.BMPs, .SPRITE.BMPs, .PCX formats, .SMK videos, et al. I've successfully done this dozens (if not hundreds) of times without problem or incident.

My phrase about supporting only BMP refers to LodAdd. Ok, I have recorded small movie (4mb) where I exported and then trying to import tga.bmp file with mm8leveleditor. Whats wrong? With mm6title.pcx same situation, with others pcx files all fine.
Vector wrote:Your PCX files should import fine into MM8lvleditor. Are you actually saving the modified pcx files in the pcx file format? You can't name a bitmap image 'MM6TITLE.PCX' and expect MM8lvleditor to import it in as a pcx file.

Sure it is a pcx file. This file is just a resized version of exported original.
Vector wrote:Good luck.

Thanks, If nothing helps then when I have some free time I'll try to look in mm8le source codes to undestand whats going wrong.

User avatar
GreatEmerald
CH Staff
CH Staff
Posts: 3330
Joined: 24 Jul 2009
Location: Netherlands

Postby GreatEmerald » Dec 23 2009, 11:17

Hmm, not sure how mm8leveleditor works, but at least LODEdit doesn't export all the files directly, for example, it converts PCX to BMP, so you have to recovert it to PCX and recreate the alpha mask, then save back as PCX and only then import.
And it may be true that Photoshop saves it with wrong settings, making it unreadable. Make sure it's saved as Indexed Colour (not RGB or anything like that) and IIRC it needs to have some settings changed from default when you choose that option.

User avatar
Vector
Pixie
Pixie
Posts: 118
Joined: 30 Sep 2006
Location: United States
Contact:

Postby Vector » Dec 23 2009, 14:40

Ck-NoSFeRaTU wrote:Sure it is a pcx file. This file is just a resized version of exported original.


I know what your problem is. Your PCX file has to be the exact same size as the original.
||\............/||_||\............/||_\\.....//

||..\......../..||_||..\......../..||__\\.//

||....\..../....||_||....\..../....||__//.\\

||......\/......||_||......\/......||_//.....\\



Might and Magic X: The Anduran Saga

Official Website: http://www.mightandmagic10.thegaminguniverse.com/

User avatar
GrayFace
Round Table Hero
Round Table Hero
Posts: 1526
Joined: 29 Nov 2005

Postby GrayFace » Dec 26 2009, 0:18

I've fixed the bug, also fixed sprites import and improved textures import. Now this is the release (version v1.0):
http://sites.google.com/site/sergroj/mm ... edirects=0

vladimir-maestro wrote:if you import monster sprite - file should have name as "MON***.sprite.bmp".
sensitive to registry!!!

Sometimes mm8leveleditor doesn't import sprites correctly.

GreatEmerald wrote:Ah, Linux-style case sensitivity :) I wonder if LODs allow you to add files with different cases as different files, like files on Linux? Like, MON001.bmp and mon001.BMP in one place?

No, case is ignored in LODs.

GreatEmerald wrote:Hmm, not sure how mm8leveleditor works, but at least LODEdit doesn't export all the files directly, for example, it converts PCX to BMP, so you have to recovert it to PCX and recreate the alpha mask, then save back as PCX and only then import.

That's interesting. Can you give me a link to that LODEdit?

GreatEmerald wrote:And it may be true that Photoshop saves it with wrong settings, making it unreadable. Make sure it's saved as Indexed Colour (not RGB or anything like that) and IIRC it needs to have some settings changed from default when you choose that option.

24-bit RGB are actually supported and used by default in M&M. I use Corel Photo-Paint and have no problems with them.
BTW, you can change Seg_scrl.pcx height in MM6 and it would work perfectly.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

Ck-NoSFeRaTU
Leprechaun
Leprechaun
Posts: 23
Joined: 22 Dec 2009
Location: Russia

Postby Ck-NoSFeRaTU » Dec 28 2009, 14:02

GreatEmerald wrote:And it may be true that Photoshop saves it with wrong settings, making it unreadable. Make sure it's saved as Indexed Colour (not RGB or anything like that) and IIRC it needs to have some settings changed from default when you choose that option.

Photoshop saves it with exact settings which imported file has, by default. So for PCX it is RGB/8bit, for BMP - Indexed/8Bit. And it isn't a problem, because this file can be successfully imported for different PCX resource, but not the MM6TITLE.PCX. So there is a bug somewhere, and updated LodAdd proffs this, because it doesn't have any problems about updating this resource.

Vector wrote:I know what your problem is. Your PCX file has to be the exact same size as the original.

This file has different size and size isn't a problem, because other PCX files with different sizes were imported without any problems. As I mentioned above it is a problem ONLY with MM6TITLE.PCX, with other pcx resources all works fine.

GrayFace wrote:I've fixed the bug, also fixed sprites import and improved textures import. Now this is the release (version v1.0):
http://sites.google.com/site/sergroj/mm ... edirects=0

Great! Its work now! ^_^ BTW, are you planning to release a source code of it as you did for mmXpatches? I'm very interested in source codes of all stuff placed on http://sites.google.com/site/sergroj/mm/. Especially this one and mm7extension.

mkienenb
Pixie
Pixie
Posts: 105
Joined: 30 Dec 2009
Location: Elmira, NY

MM8LevelEditor image import palette handling

Postby mkienenb » Dec 30 2009, 16:28

Big Daddy Jim wrote:The MM8LevelEditor is able to reliably Import and Export any and all LOD-related files including .TGA.BMPs, .SPRITE.BMPs, .PCX formats, .SMK videos, et al. I've successfully done this dozens (if not hundreds) of times without problem or incident.

BDJ[/size]


Well, there have been some reports of bugs dealing with image imports over the years. Some years, I've been unable to address them in a timely manner. Recently someone reported a problem importing a sprite. In the process of investigating it, I noticed that sprite (and probably bitmap and icon) imports do not handle the situation where the palette doesn't exactly match the original palette for the object being replaced.

I checked in a change to the cvs version of the editor which ignores (with warnings) images with a missing or incorrect palette. In retrospect, that is probably not the right answer for imports, although it's a good idea for exports. The design of MM8LevelEditor doesn't handle updating two files at the same time easily, so I probably won't do a proper fix any time soon, which would involve searching for a matching existing palette and using that if found, or creating a new palette if none was found.

I'm not making any promises, but the release of the new TCC mod has piqued my interest in MM editing again. I'm considering a rewrite of the MM8LevelEditor (which unfortunately really is the MM8LevelViewerExporterViewer for practical purposes) which is focused on the task of actually changing the game data without having to know all of the fine details of the underlying files, especially since clever individuals like you and Greyface have shown there's ways to overcome some of the inherent limitations in the mm.exe engine.

I'm playing around with using the Eclipse Rich Client Platform as the basis, as it's ideal for everything such an editor should be able to do. I tried doing this a few years back, but hit enough issues that I didn't pursue the project.

User avatar
GrayFace
Round Table Hero
Round Table Hero
Posts: 1526
Joined: 29 Nov 2005

Postby GrayFace » Jan 3 2010, 10:12

Ck-NoSFeRaTU wrote:Great! Its work now! ^_^ BTW, are you planning to release a source code of it as you did for mmXpatches? I'm very interested in source codes of all stuff placed on http://sites.google.com/site/sergroj/mm/. Especially this one and mm7extension.

Yes, definitely. I'll release MMExtension source code with the next version and will send you source code for working with lods if you give me your e-mail (or mail me). I'm developing it right now, so there won't be a public release of source code yet.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

User avatar
GrayFace
Round Table Hero
Round Table Hero
Posts: 1526
Joined: 29 Nov 2005

Postby GrayFace » Jan 4 2010, 18:06

LodAdd version 1.1 is released.
[+] Improved import into bitmaps.lod - better zoom levels creation.
[+] Supports *.str files exported by mm8leveleditor.
[-] Some textures weren't added correctly into bitmaps.lod.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

User avatar
GrayFace
Round Table Hero
Round Table Hero
Posts: 1526
Joined: 29 Nov 2005

Postby GrayFace » Jan 5 2010, 18:44

LodAdd version 1.1.1 is released. I've fixed a critical bug that occurred when adding completely new files.
Now LodAdd is in my mods tools thead.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

mkienenb
Pixie
Pixie
Posts: 105
Joined: 30 Dec 2009
Location: Elmira, NY

Re: MM8LevelEditor image import palette handling

Postby mkienenb » Jan 7 2010, 4:57

Big Daddy Jim wrote:The MM8LevelEditor is able to reliably Import and Export any and all LOD-related files including .TGA.BMPs, .SPRITE.BMPs, .PCX formats, .SMK videos, et al. I've successfully done this dozens (if not hundreds) of times without problem or incident.
BDJ[/size]


mkienenb wrote:Well, there have been some reports of bugs dealing with image imports over the years. Some years, I've been unable to address them in a timely manner. Recently someone reported a problem importing a sprite. In the process of investigating it, I noticed that sprite (and probably bitmap and icon) imports do not handle the situation where the palette doesn't exactly match the original palette for the object being replaced.


GrayFace gave me some help on sprite file structures in the LOD, and I now have the information needed to fix sprite loading. I'm not quite done with the fix, but maybe this week I'll have it in place. The problem is that the sprite import needs to set the number of pixels and amount of blank lines at the bottom of the image. So an import probably only works right if you import an image of the same size.

User avatar
Big Daddy Jim
Swordsman
Swordsman
Posts: 551
Joined: 29 Oct 2007
Location: Republic de Panama

Re: MM8LevelEditor image import palette handling

Postby Big Daddy Jim » Jan 7 2010, 13:29

mkienenb wrote:
Big Daddy Jim wrote:The MM8LevelEditor is able to reliably Import and Export any and all LOD-related files including .TGA.BMPs, .SPRITE.BMPs, .PCX formats, .SMK videos, et al. I've successfully done this dozens (if not hundreds) of times without problem or incident.
BDJ[/size]


mkienenb wrote:Well, there have been some reports of bugs dealing with image imports over the years. Some years, I've been unable to address them in a timely manner. Recently someone reported a problem importing a sprite. In the process of investigating it, I noticed that sprite (and probably bitmap and icon) imports do not handle the situation where the palette doesn't exactly match the original palette for the object being replaced.


GrayFace gave me some help on sprite file structures in the LOD, and I now have the information needed to fix sprite loading. I'm not quite done with the fix, but maybe this week I'll have it in place. The problem is that the sprite import needs to set the number of pixels and amount of blank lines at the bottom of the image. So an import probably only works right if you import an image of the same size.


Mike,

I've constantly and reliably imported (for replacement) sprites and sprite-sets that have different sizes from the original using the MM8LevelEditor for our MM6-based TCC game. I've never encountered any problem whatsoever.

FYI ...

BDJ
"BDJ the Coding Wizard has moved out of the Coding Fortress, has retired from Might & Magic game modification, and now lives a peaceful life in Alto Lino, Republic de Panama.



http://www.mediafire.com/BDJs

mkienenb
Pixie
Pixie
Posts: 105
Joined: 30 Dec 2009
Location: Elmira, NY

Re: MM8LevelEditor image import palette handling

Postby mkienenb » Jan 7 2010, 17:35

Big Daddy Jim wrote:Mike,

I've constantly and reliably imported (for replacement) sprites and sprite-sets that have different sizes from the original using the MM8LevelEditor for our MM6-based TCC game. I've never encountered any problem whatsoever.

FYI ...

BDJ


Thanks for the info. I don't know why it happens in some situations and not others. Maybe there is yet another bug still remaining to be fixed. Sergey said it did make a difference when he tested it in his LOD tools, though.

User avatar
Big Daddy Jim
Swordsman
Swordsman
Posts: 551
Joined: 29 Oct 2007
Location: Republic de Panama

Re: MM8LevelEditor image import palette handling

Postby Big Daddy Jim » Jan 7 2010, 22:53

mkienenb wrote:
Big Daddy Jim wrote:Mike,

I've constantly and reliably imported (for replacement) sprites and sprite-sets that have different sizes from the original using the MM8LevelEditor for our MM6-based TCC game. I've never encountered any problem whatsoever.

FYI ...

BDJ


Thanks for the info. I don't know why it happens in some situations and not others. Maybe there is yet another bug still remaining to be fixed. Sergey said it did make a difference when he tested it in his LOD tools, though.


The only major problem that I have encountered in the editor occurs when rebuilding the SPRITES.LOD file. After extracting ALL from a modified file and then importing ALL into a 'virgin' SPRITES.LOD, only the graphics are imported and the local 'header' info remains unchanged. If an oversized sprite-set was originally imported, the XY paint mask parameters must be changed, and that info is in the local header info. So, it is really impossible to rebuild the file back to the original.

FYI ...

BDJ
"BDJ the Coding Wizard has moved out of the Coding Fortress, has retired from Might & Magic game modification, and now lives a peaceful life in Alto Lino, Republic de Panama.



http://www.mediafire.com/BDJs

mkienenb
Pixie
Pixie
Posts: 105
Joined: 30 Dec 2009
Location: Elmira, NY

Re: MM8LevelEditor image import palette handling

Postby mkienenb » Jan 8 2010, 1:29

Big Daddy Jim wrote:
The only major problem that I have encountered in the editor occurs when rebuilding the SPRITES.LOD file. After extracting ALL from a modified file and then importing ALL into a 'virgin' SPRITES.LOD, only the graphics are imported and the local 'header' info remains unchanged. If an oversized sprite-set was originally imported, the XY paint mask parameters must be changed, and that info is in the local header info. So, it is really impossible to rebuild the file back to the original.

FYI ...

BDJ


Every piece of information I get is helpful. Thank you!

User avatar
GrayFace
Round Table Hero
Round Table Hero
Posts: 1526
Joined: 29 Nov 2005

Re: MM8LevelEditor image import palette handling

Postby GrayFace » Jan 9 2010, 13:33

mkienenb wrote:Thanks for the info. I don't know why it happens in some situations and not others. Maybe there is yet another bug still remaining to be fixed. Sergey said it did make a difference when he tested it in his LOD tools, though.

Problems occur when the size of zipped bits array is bigger than it was.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.


Return to “Might and Magic”

Who is online

Users browsing this forum: Bing [Bot] and 6 guests