Spk Editing


  • Please log in to reply
17 replies to this topic

#1 inteck

inteck

    Sergeant

  • Members
  • PipPipPip
  • 67 posts

Posted 26 November 2004 - 06:47 PM

What are the best utilites for viewing/modding spk (not pck) files??

#2 BladeFireLight

BladeFireLight

    Xcomutil Developer

  • Members
  • PipPipPipPip
  • 665 posts
  • Gender:Male
  • Location:Joplin, Missouri, USA

Posted 28 November 2004 - 02:57 AM

I belive Diashiva has an editor that does all xcom graphic files.

-Blade FireLight
QUOTE
Combat is very simple, there is a first place and second place, second place is laying face down in the mud, sometimes, so is first place.

#3 Munkeylord

Munkeylord

    Am I back? possibly.

  • Members
  • PipPipPipPip
  • 261 posts
  • Gender:Male

Posted 28 November 2004 - 05:04 AM

i'm almost possitive daishiva has one. the xcview program i used before for editing soldier inventory screens, it works pretty damn good too

#4 inteck

inteck

    Sergeant

  • Members
  • PipPipPip
  • 67 posts

Posted 30 November 2004 - 01:33 AM

I  have been to daishivas site, and the only thing available for download over there was the map editor :P ...  Is this the same one that edits all the graphics??  Or is it a different program than xcview???  I am planning on re-doing a lot of the weapons graphics, but all I have is pck_viewer and win pck.  Neither program does everthing that I need.  The spks and scr for starters....Also, If the editor is good enough for a simpleton like me to use, I would like to go in and correct a minor, but really irritating graphics screw up in the Tftd interception screenshot  *the two ufo screenshots that need to be switched around of course* since no one else seems have done it.

#5 Bomb Bloke

Bomb Bloke

    The Smily Admin

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

Posted 30 November 2004 - 01:59 AM

You checked the 'Programs of the Now' section. Check the 'Programs' section.
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! :)

#6 inteck

inteck

    Sergeant

  • Members
  • PipPipPip
  • 67 posts

Posted 01 December 2004 - 12:22 AM

:( Thanks for the let know, Bomb Bloke.  After one of my many initial :(  "brain pharts" I went back and managed to get the programs :( ......For those interested, but couldn't figure it out, the ufo images in the interception screen have nothing to do with the normal pck, scr, bdy, spk or any other of the image files.  Instead they are located under the Geodata folder in the "Interwin.dat" file.  I can prove this by simply replacing the Tftd interwin file with the Ufo Enemy unknown interwin (kind of weird seing Ufos instead of subs, also uses a different coloring pallet for really strange looking ufo's).......Unfortunately I have found no program that can correctly decipher the images in the file :P  (including the ones from daishiva's site) to correct the sub image reversal of the battleship and the supply ship.  If anyone can give me some help on deciphering this file I would appreciate it....

#7 Bomb Bloke

Bomb Bloke

    The Smily Admin

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

Posted 01 December 2004 - 02:47 AM

Well, I haven't worked on that file in particular, but I'll throw in my two cents.

I reckon the file is a direct mapping to the pallete, that is, much the same as a SCR file is supposed to be. (Check the file formats on DaiShiva's site (programs section again, I believe) to see how the picture formats work).

Erm, I'll take a look and see if I can be more specific, but I'll bet that's it.  :P
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! :)

#8 inteck

inteck

    Sergeant

  • Members
  • PipPipPip
  • 67 posts

Posted 01 December 2004 - 03:48 AM

Actually daishivas pckview(not xcview) can do something kind of weird with the interwin dat file.  If you open pckview and pick the "texture.dat" as the kind of file to open and then open the interwin.dat, it will actually display something like 432 squares of data :P . Normally it will give an error if you try to open something besides the texture file that it was meant for, dat file or not, however it opens it up nonetheless (even though the info displayed is garbage). Probably useless information, but i'll throw it in anyway.

#9 NKF

NKF

    Mr. Badger in disguise

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

Posted 01 December 2004 - 03:52 AM

Direct mapping to the palette indeed. For quite a lot of the images in the game, you simply load the palette from another file, and then you just load in the image file and then draw a pixel of the values that you read in onto the screen. In a 256 colour image, this'll map the pixel directly to the current loaded palette. To draw on a higher resolution drawing surface, you'll have to grab the colour information from the palette before drawing it.

The real trick is knowing where to drop down to the next line, and when and where the next image begins.

Like the texture.dat file, that's easy. Each texture is 32x32, so you jump down to the next line after every 32 pixels, and each texture wil be every 1024 bytes (32x32 = 1024). For variable sized images... eh, that might take a bit of experimentation.

This appears true for a number of the image formats, like the geoscape textures, the background images, the intercept window, and the non-English Geoscape control panels.

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

#10 BladeFireLight

BladeFireLight

    Xcomutil Developer

  • Members
  • PipPipPipPip
  • 665 posts
  • Gender:Male
  • Location:Joplin, Missouri, USA

Posted 01 December 2004 - 04:21 AM

NKF: What do you mean by "non enghish control pannel" ? I though the images on the side were the same and the language .dat file set the text overlays.

-Blade FireLight
QUOTE
Combat is very simple, there is a first place and second place, second place is laying face down in the mud, sometimes, so is first place.

#11 Bomb Bloke

Bomb Bloke

    The Smily Admin

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

Posted 01 December 2004 - 04:23 AM

I betcha all the craft images in that file are of the same size. I reckon if you can work out how many images should be in there, and divide the file size by that number, you'd have the bytes each image took.

If the images happen to be sqaure (and that may or may not be the case), then the root of the image size in bytes might just produce the row size.

Ya never know.

If not, I advise loading the file in notepad. Be creative with the line breaks, and see if you can create something that looks like a picture! Ya never know. I have used that to work out the dimensions of the map files, it may well work here too.
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! :)

#12 NKF

NKF

    Mr. Badger in disguise

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

Posted 01 December 2004 - 05:21 AM

I'd also recommend using MS-Edit as an alternative, as you can also set the number of rows and check the value that's under the cursor at the same time when opening in binary mode. The MS-Edit that comes with Windows 95, 98 and XP will work fine.

The only problem with MS Edit is when trying to line up a file that has a header. My only recommendation for this is to manually delete the header and then save the file under a new name. Then reopen the file with the dimensions that you want. Like most of the map files have a 3 byte header stating the dimensions, and you won't be able to tile it nicely until you've removed the three leading bytes.

Bladefirelight:

lang1.dat and lang2.dat under geodata\

These are image overlays for the German and French sidebars.

Just as a follow up from the above, anyone wanting to have a look at either of these files in MS Edit might want to run it by typing:  

edit /64 path_to_where_you_installed_UFO\geodata\lang1.dat

From the run menu or through the command prompt.

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

#13 daishiva

daishiva

    .net modder

  • Members
  • PipPipPip
  • 93 posts

Posted 01 December 2004 - 06:53 AM

Here you go

tftd
Posted Image

ufo
Posted Image
Author of MapEdit.net and PckView.net - http://www.daishiva.com
Member 2^8

#14 inteck

inteck

    Sergeant

  • Members
  • PipPipPip
  • 67 posts

Posted 01 December 2004 - 04:24 PM

:blink: O.K. i'm lost, daishiva, how did you extract those images?? and what did you do it with???......This is the type of thing and info I have been looking for to correct the Tftd images.  As anyone can plainly see just by giving a quick glance between the two files, the supply ship and battleship images are clearly in the wrong place for tftd as opposed to the supply and terror ship in ufo images.

#15 daishiva

daishiva

    .net modder

  • Members
  • PipPipPip
  • 93 posts

Posted 01 December 2004 - 06:07 PM

Actually I had the sizes wrong. My first clue should have been how things did not look nicely: couldnt read the numbers.

How did I make them? I edited my xcview program to decode/export (not import yet) the files. There is no fancy compression for these files, its just an uncompressed bitmap in 160xfilesize/160 size

tftd
Posted Image

ufo
Posted Image
Author of MapEdit.net and PckView.net - http://www.daishiva.com
Member 2^8

#16 inteck

inteck

    Sergeant

  • Members
  • PipPipPip
  • 67 posts

Posted 01 December 2004 - 06:51 PM

Well, if you can modify your xcview program to import as well as export the images, then the sub imaging mistake MPS made so long ago can finally be fixed.  I for one will be eagerly waiting on that update to xcview.

#17 daishiva

daishiva

    .net modder

  • Members
  • PipPipPip
  • 93 posts

Posted 01 December 2004 - 07:50 PM

Here you go =)
Author of MapEdit.net and PckView.net - http://www.daishiva.com
Member 2^8

#18 Bomb Bloke

Bomb Bloke

    The Smily Admin

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

Posted 02 December 2004 - 01:58 AM

inteck, do you have anything to add to this thread? You said you knew something about the alien aggression stat...  :blink:
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! :)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users