Mutiple Pallete Problems

Started by taryuu, Mon 15/09/2003 05:52:07

Previous topic - Next topic

taryuu

Working in a 256 colour game, and I'm trying to import colours from a file.  none of the ways I'm trying seem to work.  so, i'm in the pallete tab, i select the range 42 to 83, i uncheck the "this colours is room dependent" box, i click the import slots from file button, i select the .pcx file that has all of my characters on it, and all i get to show up on the pallete is white.  when i try to import the colours using a PSP .pal file, all i get is "invalid format".

now the way i can get it to work is by importing the screen with all of my characters on it as a background, and then unchecking the "this colour is room-dependant" box, then all of the colours show up properly.  the only hitch is is that they will only show up at the bottom end of the pallete.  (188-255)

so, my questions....

1 why can't i import the colours the way the tutorial and manual describe it?

2 how does having the character/sprite colours at the bottom of the pallete afffect the game?

3 why doesn't my PSP7/PSP8 .pal file work?

4 do the background colours have to have the "this colours is room dependant box" checked?

5 sometimes when i try importing teh colours, random colours will appear, what are they?  and why are they there and not MY colours?

taht's it.  that you guys for your time in advance.  i hope i can get this fixed up before teh MAGS contest is over.  altho i guess i could always use the hi-colour mode.  but i don't want to! i believe that there's a solution that i'm too stupid to figure out.
help please!
I like having low self-esteem.  It makes me feel special.
   
taryuu?

Gilbert

The palette slot numbers you'd like to import into must be identical to the pixel colour indices in the PCX picture, it is possible that when you saved the picture, the graphic programme itself determined what colour indices it should use (bad thing, mostly with crap window$ "truecolour" programmes), and somehow the indices of larger had been chosen.

Scorpiorus

Quote1 why can't i import the colours the way the tutorial and manual describe it?
You should be able to... unless there are some problems with the format of a palette file or smth.

Quote2 how does having the character/sprite colours at the bottom of the pallete afffect the game?
It shouldn't affect the game normally. Just uncheck "this colour is room dependent" option, as always you do for the persistent color slots. But be sure you set the palette before start importing backgrounds. When you are importing a background (in the editor) AGS check which slots are free and remaps background palette accordingly (unless you use exact palette import option). Btw, remapping is going the way that the first background palette color becomes the last in AGS palette (slot 255 if it's free, i.e. room-dependent), the 2nd becomes 254, etc. going downwards. So the palette looks like:

LLLLLLLSSSSSSSSS
SSSSSSSSSSSSSXX
XXXXXXXXXXXXXXX
XXXXXXXXXXXXXXX
XXXXXBBBBBBBBBBB
BBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBB <- slot 255

L - locked colors
S - sprite colors (persistent)
X - free background slots (room-dependent)
B - slots used by the current background

...that makes it much easier to increase the number of sprite slots without affecting background palette ones.

Quote3 why doesn't my PSP7/PSP8 .pal file work?
You mean Microsoft palette (*.pal)?
Nope, that doesn't work. You need a standart 256-color PCX palette file. Although it's extension is .pal too it has a constant size - 3*256 = 768bytes whereas microsoft pal is about 1Kb. Also you can import a *.pcx file so AGS retrieves the palette by itself.

Quote4 do the background colours have to have the "this colours is room dependant box" checked?
Yes, you have to reserve as many slots as the most-color-riched background has.

Quote5 sometimes when i try importing teh colours, random colours will appear, what are they? and why are they there and not MY colours?
As Gilbert pointed out, there are might be problems when a paint program remaps the slots. Open the color table of a PCX file in Photoshop and see what slots 42-83 are. Because, unlike background importing, here AGS uses exact palette import from the source. Selecting the range is only prevents AGS from overwiting the whole palette.

Sorry if it a bit confusing. Feel free to ask more on subject, about particular details maybe.

~Cheers

taryuu

ok, so the problem still is, i can't import colours to the top of the pallete ie where the sprite colours should go.

importing a .pcx file with all of my sprites on it  is just giving me white colours. on the pallete.

the manual says i should be able to import the JASC PSP .pal files, not the PCX .pal files, but no luck.  

1 why doesn't my jasc PSP  .pal file work?

with regards to the background colours:
assuming someone helps me figure out why i can't import sprite colours, i import a background with all of the colours in  it and the pallete will look like this.

LLLLLLLSSSSSSSSS
SSSSSSSSSSSSSXX
XXXXXXXXXXXXXXX
XXXXXXXXXXXXXXX
XXXXXBBBBBBBBBBB
BBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBB


2 do i then have to check the "room-dpendant" box for the background colours so that the pallete screen will now look like this?

LLLLLLLSSSSSSSSS
SSSSSSSSSSSSSXX
XXXXXXXXXXXXXXX
XXXXXXXXXXXXXXX
XXXXXXXXXXXXXXX
XXXXXXXXXXXXXXX
XXXXXXXXXXXXXXX
XXXXXXXXXXXXXXX

3  the most important question . . .
when i import colours from a pcx file, they are all white!  how can i fix this and what am i doing wrong??
I like having low self-esteem.  It makes me feel special.
   
taryuu?

Scorpiorus

#4
Quoteimporting a .pcx file with all of my sprites on it is just giving me white colours. on the pallete.
That's really strange. possible there is something wrong with the format. not sure though.

Quote1 why doesn't my jasc PSP .pal file work?
Yep, the manual says it should. I don't have PaintShopPro so I can't test it, sorry.

Quote2 do i then have to check the "room-dpendant" box for the background colours so that the pallete screen will now look like this?

LLLLLLLSSSSSSSSS
SSSSSSSSSSSSSXX
XXXXXXXXXXXXXXX
XXXXXXXXXXXXXXX
XXXXXXXXXXXXXXX
XXXXXXXXXXXXXXX
XXXXXXXXXXXXXXX
XXXXXXXXXXXXXXX
Yes, you do it that way since all un-"X" slots considered to be sprites ones. Or at least it's how it should look like finally. Then again if you want sprite slots to be placed in the begining of the palette you have to reorder them in PSP or whatever.

Quotewhen i import colours from a pcx file, they are all white! how can i fix this and what am i doing wrong??
I'm not sure here. As I said, what if you try to open that PCX in Photoshop or something apart from PSP and check the palette there. Would it be all white? Or...

EDIT:
Btw, you can workaround it as you did. Import background with all sprites drawn on. So slots 188-255 are used. Next, mark all other slots as room-dependent (except AGS standart slots of course). That's fine provided you will not be adding more sprite slots, because from now AGS are using the next map:

LLLLLSSSSSXXXX
XXXXXXXXXXXXXXX
XXXXXXXXXXXXXXX
XXXXXXXXXXSSSSS
SSSSSSSSSSSSSSS
SSSSSSSSSSSSSSS

X - slot 187

Thereby each background palette begins from slot 187 (downwards until S)
Just a quick workaround.... :P

taryuu

thanks for the help, using the sprite colours at the bottom seems to working now.  still no success with the normal method.  peculiar.
I like having low self-esteem.  It makes me feel special.
   
taryuu?

Scorpiorus

hmm, maybe that...

What number of slots did you use in the original PCX file? I suppose less than 43. Look at the palette in PSP. It's probably:

CCCCCCWWWWWWWW
WWWWWWWWWWWW
WWWWWWWWWWWW
WWWWWWWWWWWW
WWWWWWWWWWWW
WWWWWWWWWWWW


if it is, then the problem is evident. You need to shift original palette:

WWWWWCCCCCCWWW
WWWWWWWWWWWW
WWWWWWWWWWWW
WWWWWWWWWWWW
WWWWWWWWWWWW
WWWWWWWWWWWW


C has to be slot 42.
Next, import modified palette. (42-....)

~Cheers

taryuu

PSP won't let me open the .pal file, it's says it's an invalid type.  i can edit it tho but i don't think that's the same thing you're talking about it is it?
I like having low self-esteem.  It makes me feel special.
   
taryuu?

MrColossal

i don't quite understand the problem but have you tried my method of importing palettes?

i was never able to get the whole importing a PCX thing to work so i came up with this

i take it this is what scorpious mentioned but just making sure

http://www.sylpher.com/kafka/tutorials/palette.htm
"This must be a good time to live in, since Eric bothers to stay here at all"-CJ also: ACHTUNG FRANZ!

taryuu

collosal,

yeah pretty much like your method.  i put all of my backgrounds into one .pcx file, and imported it as a background.  that gave me all the background colours on my pallete.  and then i put all of my chracters onto a .pcx file and impoted that as a nother background.  that gave me all the colours i needed.  

the problem is that ags won't import the colours from the pallete screen. it imports the colours as white. and it won't import .pal files.  

however this way works, and as far as i can tell, you don't need to have the character colours at the top end of the pallete ie 35-80 or whatever.
I like having low self-esteem.  It makes me feel special.
   
taryuu?

Scorpiorus

#10
QuotePSP won't let me open the .pal file, it's says it's an invalid type. i can edit it tho but i don't think that's the same thing you're talking about it is it?
What I meant was to check your original palette in PSP (not a .pal file exported from AGS). There should be something like palette editor. If the palette appears to be like I described just shift all colors to the right.

EDIT: Though I don't know if PSP can shift palette remapping all colors accordingly. :P

~Cheers

taryuu

There is an editor for the pallete in PSP however it automatically decides the pallete order for you.  to edit the order of the pallete, i would have to manually change all of the slots one by one.   theorectically i'd have to do it that 256 times and then change all of the colours in my rooms and charactesrs.

if that's the only way you can get it to work, well to me, that's not full suppport of PSP .pal files.  that's limited support.

and about the .pcx files, it's probably giving me the same error because the pallete indexes are the same as the .pal file.  

I like having low self-esteem.  It makes me feel special.
   
taryuu?

Scorpiorus

QuoteThere is an editor for the pallete in PSP however it automatically decides the pallete order for you. to edit the order of the pallete, i would have to manually change all of the slots one by one. theorectically i'd have to do it that 256 times and then change all of the colours in my rooms and charactesrs.
That is something I was afraid of.
Then how about to move only the first 41 slots adding them to the end. Next, save it as pcx and import it as a background (without remapping) to obtain the desired palette. Will it be white then? If it won't then import sprites but check remapping colors option to be ticked so AGS will automatically remap all color to match the palette. I done something similar, in PS though. It worked.

About PCX palette: are you sure it's a 256-colored PCX you are importing? Because there is a difference: 16 colored PCX stores its palette in the begininng of the file whereas a 256-colored one adds it into the end. I didn't know whether AGS supports a 16-colored PCX.

taryuu

#13
yeah it'sa  256 colour .pcx, i didn't try it with 16 colour i don't think.  
anyway what you said does work. colossal and i figured out slightly different ways of doing the same thing.

i put all of my backgrounds into one .pcx file, and imported it as a background. that gave me all the background colours on my pallete.
then i put all of my chracters onto a .pcx file and impoted that as another background. that gave me all the colours i needed for my characters.

wheras colossal does the sprite dealie you were talking about.

http://www.sylpher.com/kafka/tutorials/palette.htm
I like having low self-esteem.  It makes me feel special.
   
taryuu?

Scorpiorus

oh, ok I see.


Were there something like a palette editor that can import different palette formats, convert one in other, remap colors etc. it would be really handy. I have an idea on making one... :P

~Cheers

taryuu_unplugged

thanks for effort man, i'll be the first to beta test that pallete prog if you ever make it. ^_^

Jodo Kast

Paint Shop Pro 8 works fine.  In PSP,  Open all your character files.  Copy and paste them into a purple background so all the characters are lined up (on a true-color image if you want)

We have all the character colors, so if you Decrease color depth to X colors, you can pick how many you want.  I pick something like 117 colors.  It decreases the color depth.  If I look at the palette, it's a 256-color image, but only with 117 colors mapped.

Click Image -> Palette -> Save Palette.  Pick PSPPalette file (the top one in PSP8).  Now rename the file from yourpalette.psppalette to just yourpalette.pal.

Let me know how it works.  Just import the new mapped colors in your unlocked AGS palette and your ready to go.

SMF spam blocked by CleanTalk