Daishiva, question


  • Please log in to reply
10 replies to this topic

#1 hatfarm

hatfarm

    Lieutenant

  • Members
  • PipPipPipPip
  • 172 posts
  • Gender:Male
  • Location:Normal, IL, USA

Posted 22 August 2004 - 04:24 PM

Hey there, I just have a quick question. In my other post you said you have a file documenting everything you know, where is this file as I'd love to see it. If you're okay with it, I'd like to post some of that information on my new site as I think it would fit. Thanks.

#2 daishiva

daishiva

    .net modder

  • Members
  • PipPipPip
  • 93 posts

Posted 23 August 2004 - 12:33 AM

Link

Hasnt been updated in awhile (as noted by the now broken link) but the information is correct to my knowledge
Author of MapEdit.net and PckView.net - http://www.daishiva.com
Member 2^8

#3 NKF

NKF

    Mr. Badger in disguise

  • Site Staff
  • PipPipPipPipPip
  • 4,449 posts
  • Gender:Male
  • Location:In my mind

Posted 30 January 2005 - 12:28 AM

I've a question of my own:

I thought I'd give pckview a go, as I've had a little idea that's been buzzing around my head so badly that I had to at least get it started. Only one small part of it involves changing a few graphics. I thought I'd get this part out of the way before moving on to the easier bits.

I was going to replace a few pictures in bigobs.pck, so I extracted an image from it, edited it, made absolutely sure that the UFO battlescape palette was loaded after I'd done the editing, then saved it back as a bmp. I then checked that the palette was saved correctly, and it was.  

Now, every time I try to import it back into bigobs.pck I get an exception error. I thought it was probably the RLE compression or maybe I'd accidentally saved it as an OS2 bitmap, So I decided to fiddle around with the options for saving the .bmp file. And when it does load, the image is torn. Or rather the image is slanted. But when I reload any of the bitmaps saved by pckview, they load back into the game just fine.

I've tried saving and resaving the new file in a variety of editors, from the Gimp, Irfanview and Photoshop elements 3.0 to no avail.

So is there any particular format for plain bitmap files that must be used?

- NKF
NKF - finally built a gaming PC in 2020 (though not any of that RGB nonsense). Can now play games up to '89!

#4 Munkeylord

Munkeylord

    Am I back? possibly.

  • Members
  • PipPipPipPip
  • 261 posts
  • Gender:Male

Posted 31 January 2005 - 04:33 AM

you try editing the original frame that you extracted from the game to make the pic? sometimes that causes a problem if you make a new frame then try to import it. if you did that.....hell thats new to me

#5 daishiva

daishiva

    .net modder

  • Members
  • PipPipPip
  • 93 posts

Posted 31 January 2005 - 07:53 PM

NKF, on Jan 29 2005, 04:28 PM, said:

I've a question of my own:

I thought I'd give pckview a go, as I've had a little idea that's been buzzing around my head so badly that I had to at least get it started. Only one small part of it involves changing a few graphics. I thought I'd get this part out of the way before moving on to the easier bits.

I was going to replace a few pictures in bigobs.pck, so I extracted an image from it, edited it, made absolutely sure that the UFO battlescape palette was loaded after I'd done the editing, then saved it back as a bmp. I then checked that the palette was saved correctly, and it was. 

Now, every time I try to import it back into bigobs.pck I get an exception error. I thought it was probably the RLE compression or maybe I'd accidentally saved it as an OS2 bitmap, So I decided to fiddle around with the options for saving the .bmp file. And when it does load, the image is torn. Or rather the image is slanted. But when I reload any of the bitmaps saved by pckview, they load back into the game just fine.

I've tried saving and resaving the new file in a variety of editors, from the Gimp, Irfanview and Photoshop elements 3.0 to no avail.

So is there any particular format for plain bitmap files that must be used?

- NKF

<{POST_SNAPBACK}>


If you are editing the large bigobs.pck file that contains more than one image, the program doesnt save it exactly how the game wants for some reason.

If you do the following:
open pck
export one file to bmp
import bmp over original image (no change)
save
There is just a few bytes that dont get saved, and it baffles me why that information was there in the original files in the first place. As a result, the weapons in game dont come up exactly right, sometimes more than one is shown, sometimes they are off alignment.

As to what format you need
All bitmaps are saved as 8-bit (256 color) bitmaps. The palette of the bitmap does not matter when importing, as the program assumes you are importing a previously exported image, so all it does is read the indexes of the bitmap and use the internal palette to display what you have loaded. If you are loading a image 'block', then it also assumes you are importing an exported image, where it can calculate each individual image location based on the width and height of the large bmp.

At least that is how it is supposed to work. If you want you can send me your image (bmp) and i can look at it and see what new bugs you have uncovered =)
Author of MapEdit.net and PckView.net - http://www.daishiva.com
Member 2^8

#6 Bomb Bloke

Bomb Bloke

    The Smily Admin

  • Admin
  • PipPipPipPipPip
  • 4,625 posts
  • Gender:Male
  • Location:Tasmania (AU)

Posted 01 February 2005 - 12:45 AM

I managed to load up both the large bigobs file and the small ones with no problems, but I haven't tried writting them...

I dunno if this is it, but could it be that it wants the 'end image' thingy at the end of the image data? I bugged you about that before, because it wasn't listed in your notes... Does your program write that bit in?
BB's X-Com Projects Page - X-Com Games At GamersGate
You're just jealous 'cause the voices only talk to me :P
We love Tammy! :)

#7 daishiva

daishiva

    .net modder

  • Members
  • PipPipPip
  • 93 posts

Posted 01 February 2005 - 12:57 AM

Bomb Bloke, on Jan 31 2005, 04:45 PM, said:

I managed to load up both the large bigobs file and the small ones with no problems, but I haven't tried writting them...

I dunno if this is it, but could it be that it wants the 'end image' thingy at the end of the image data? I bugged you about that before, because it wasn't listed in your notes... Does your program write that bit in?

<{POST_SNAPBACK}>


The first image in the tftd bigobs file has a 255 ONLY at the end of the first weapon (gauss rifle) and i have no idea why it is there or how to put it there on a consistent (not hard-coded) basis. This is the only problem with editing the bigobs file.

.... That, and the program wont load up a image block exported previously. This is because the import function assumes 32x40 images when the bigobs images are 32x48. Yep I'll have to fix that.
Author of MapEdit.net and PckView.net - http://www.daishiva.com
Member 2^8

#8 Bomb Bloke

Bomb Bloke

    The Smily Admin

  • Admin
  • PipPipPipPipPip
  • 4,625 posts
  • Gender:Male
  • Location:Tasmania (AU)

Posted 01 February 2005 - 02:30 AM

What?! You're member 2^8?! That's so unfair!  :)

That 255 is the 'end of image' thingy. It's more or less optional. If you read through just about any PCK file, you'll see that some images use it, some do not. Quite simply, if you were to export an image, you'd spit that out as the last byte, then start with the next image, and so on and so forth.

You'd also need to update the tab files, but I'm sure you knew that.  :)
BB's X-Com Projects Page - X-Com Games At GamersGate
You're just jealous 'cause the voices only talk to me :P
We love Tammy! :)

#9 daishiva

daishiva

    .net modder

  • Members
  • PipPipPip
  • 93 posts

Posted 01 February 2005 - 08:18 AM

Bomb Bloke, on Jan 31 2005, 06:30 PM, said:

What?! You're member 2^8?! That's so unfair!  :)

That 255 is the 'end of image' thingy. It's more or less optional. If you read through just about any PCK file, you'll see that some images use it, some do not. Quite simply, if you were to export an image, you'd spit that out as the last byte, then start with the next image, and so on and so forth.

You'd also need to update the tab files, but I'm sure you knew that.  :)

<{POST_SNAPBACK}>


Aye, but for some reason that one 'optional' byte seems to make things not work in the real game if left out. Its the weirdest thing
Author of MapEdit.net and PckView.net - http://www.daishiva.com
Member 2^8

#10 Bomb Bloke

Bomb Bloke

    The Smily Admin

  • Admin
  • PipPipPipPipPip
  • 4,625 posts
  • Gender:Male
  • Location:Tasmania (AU)

Posted 01 February 2005 - 08:31 AM

Another thing I noticed is that some images in the PCK files contain information after the image (all the black space that is), and some put in the stop byte as soon as they can. Perhaps the bigobs images only do one or the other? I wouldn't think that to be a problem, but... Meh.
BB's X-Com Projects Page - X-Com Games At GamersGate
You're just jealous 'cause the voices only talk to me :P
We love Tammy! :)

#11 NKF

NKF

    Mr. Badger in disguise

  • Site Staff
  • PipPipPipPipPip
  • 4,449 posts
  • Gender:Male
  • Location:In my mind

Posted 01 February 2005 - 11:16 AM

Just thought I'd point out that the two map lighting overlays for the battlescape occasionally have a few extra bytes on the end of the file even though all the tiles are accounted for. My guess is that they are ignored like those extra bytes on the images and only the necessary parts of the image are loaded in.

- NKF
NKF - finally built a gaming PC in 2020 (though not any of that RGB nonsense). Can now play games up to '89!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users