c-thru on 23/8/2006 at 23:11
I was hoping to extract the textures, sprites et al from the *.res files. However, I've hit a few snags:
When extracting the PCX files using tnxtr_s.exe I can't actually determine the appropriate palette to use, e.g. Plnt0.pal through to Plnt4.pal or Shock.pal. Often I end up with something that resembles an inverted image, but I can't seem to get Photoshop to come up with anything looking like it does in-game.
For instance, the PCX files from the resbase.res have the wrong colours. Sometimes when trying to play the game through DosBox I end up with the same effect before it reverts back to its proper palette.
Consequently, I'm assuming that I ought to be converting the images before opening them in PS.
Any ideas would be appreciated.
For those interested:
resgame.res includes text from mission objectives and e-mails. I extracted a lot of it some months ago.
resmiss.res contains the names of the various missions in-game.
resbabl2.res contains debriefings for failed or successful missions.
respterm.res includes more mission briefing texts, the credits and the whole contents of the library from the articles on the Publicans, to the planets, the clans and also the news items.
If anyone wants any of this posting onto a TTLG properly I'd be happy to. The only outstanding issue is the order of the news items and the e-mails. I'd like to get the dates exact because they all appear in a group, rather than being spaced out with the appropriate text itself.
It'd be very helpful if someone were to post the dates of the e-mails/news reports.
Thanks.
Vigil on 23/8/2006 at 23:17
Photoshop treats the palette of a PCX file as being in reverse order from what it actually is. This is not an issue when simply loading or saving PCX files; it does actually *save* the palette in the correct order, as far as other applications are concerned. It only becomes a problem when you are performing palette operations like exporting or importing the palette of a PCX file.
The solution is basically to save your PCX file as a BMP or GIF instead (whose palettes it will treat in the correct order), close and reload the image, and then do all your palette modifications.
Gigaquad on 24/8/2006 at 15:00
It's not the "Photoshop reversed palette" issue, since they look the same in other programs too, and i.e. object textures are extracted properly using palette 0. I guess an appropriate palette(s) needs to be created but I have no idea how. Anyway, an easy way to preview images, sounds and text in res files is with (
http://www.doomworld.com/xwe/) eXtendable Wad Editor.
Here is a full listing I did a while ago:
Code:
Plain text found in the generic .res files in \data:
Use ResViewer to extract/import and hex editor to edit subfiles.
RESOURCE FILE
-------------
subfile# contents
RESBABL2.RES
------------
3 main menu, medal names
13 miss1 debriefing
15 10
17 11
19 12
21 13
23 14
25 15
27 16
29 17
31 no debriefing
33 19
35 2
37 20
39 21
41 22
43 23
45 24
47 25
49 26
51 27
53 no debriefing
55 29
57 3
59 30
63 31
65 32
67 33
69 34
71 35
73 37
75 38
77 39
79 4
81 46
83 47
85 5
87 6
89 7
91 8
93 9
RESCUSTM.RES
------------
21 Random mission generator
RESGAME.RES
-----------
6 freefall12 // Free Fall was Terra Nova's working title
15 SFC callsigns and names
16 saving/loading
17 weapon names, PBA HUD
18 squad ordering and replies, squad reactions, ASF names, commands on frobbable objects in certain missions, exit mission confirmations
19 simulator missions // interesting...
20 damage status
21 various stuff, map text, objectives, mission status
22 options screen
23 SFC ranks
24 mission objectives
25 promotions
26 specific object names
27 tutorial help
28 scripted comments in some missions, dropship comments
29 tutorial instructor
30 (weapon, suit, ASF) status
31 abbrevations
32 generic object names
33 enemy names
34 enemy vehicles
35 drones, enemy vehicles
36 enemy buildings
100 booting up PBA
102 statistics after winning the game
RESHELM.RES & RESHLMHI.RES
--------------------------
80 demolition
81 scripted comments, possibly demolition related
RESMISS.RES
-----------
7 mission names
RESPLNT0.RES - RESPLNT4.RES
---------------------------
12 texture types
RESPTERM.RES
------------
2 description of (enemies, weapons, ASFs, PBAs, SFC members), statistics
3 e-mails
4 news
5 history
6 briefings
7 credits
8 killboard
Vigil on 24/8/2006 at 15:24
Ahh, ok, thanks for clarifying. (Photoshop's PCX palette reversal is still something to watch out though for when importing and exporting palettes.)
c-thru on 24/8/2006 at 20:08
I was going to post that I didn't quite follow, but Gigaquad got there beforehand.
Saving it as another file format wouldn't have any affect on the palette, since that's already been determined by the way in which the PCX file was extracted. The tnxtr_s program requires a palette in order to extract the graphic, and it won't matter which palette you choose, the result will always be similar.
Presumably there is an appropriate palette somewhere though, but it's not in the /data directory, unless perhaps it's in one of the res files.
Inline Image:
http://i79.photobucket.com/albums/j132/nietzschean_herds/b001s000.jpgThat particular image is the 2D background of the player's cabin.
[Edit] Using the WAD editor I've determined most of the res files and their palette:
reshelm - any plnt palette excluding shock
reshelmh - any excluding shock
reshelmn - any excluding shock
reshelmp - any excluding shock
reshelms - any excluding shock
reshlmhh - any excluding shock
reshlmhi - any excluding shock
reshlmhn - any excluding shock
reshlmhp - any excluding shock
reshlmhs - any excluding shock
rescustm - shock
resgame - not known
resbase - not known
restnobj - any excluding shock
respterm - not sure
It's no doubt possible to make a palette file for the ones which don't seem to have one in the \data directory, but it just means manually assigning 255 colours using references / screenshots from in-game.
Gigaquad on 26/8/2006 at 07:47
<strike>The palette file is 768 bytes (3 * 256 bytes). It's just the RGB values (in hex) for all 256 colours in a row. I think the first three bytes
might be the transparent colour, since all existing palettes have 0x00h 0x00h 0x00h as the first three bytes.
I took a screen shot of the quarters and exported the palette (JASC palette format) using Irfanview. The JASC palette can be changed to tnxtr format like this:
* Remove the header
* Convert all R, G, B values from decimal to hex
* Remove all spaces (0x20h) between R, G, B values
* Remove all delimiters (0x0Dh 0x0Ah) between RGB triplets
I did this by hand, but even a lousy programmer could make a converter in no time. I extracted resbase.res with my new palette. This isn't the screen shot, it's the extracted file: (
http://img220.imageshack.us/img220/4153/quartersbj6.jpg) http://img220.imageshack.us/img220/4153/quartersbj6.jpg
</strike>
Of course, all other files in resbase.res have different palettes, but many of them are corrupted. I'm not talking about colours, look at the right side of the image. A bug in the extractor?
Edit: Disregard what I wrote above. The format is Adobe ACT palette. Take a screen shot, export the palette in this format and use XWE to properly extract images with the correct palette (Image -> Select palette).
I just noticed this is the 1000. post on the TN forum...:D
c-thru on 26/8/2006 at 22:22
Ah, it turned out fine after all. Thanks Gigaquad, much appreciated.
Shadowcat on 27/8/2006 at 04:27
Quote Posted by Gigaquad
I just noticed this is the 1000. post on the TN forum...:D
Hooray!
*releases the balloons*
Alcaps Martinis for everyone :)