YesNoOk
avatar

New Problem (Read 1362 times)

Started by Aarikku, January 31, 2009, 08:56:41 pm
Share this topic:
New Problem
#1  January 31, 2009, 08:56:41 pm
  • *
I started over, using the kfm template. This time, I don't have any errors during the testing, but everything's glitchy beyond imagination. There's a pink box around all of my character's sprites, though none of them appear in Fighter Factory and the character blinks invisible constantly during the walking animation, though the walking animation is two sprites that appear fine in Fighter Factory, and the character is entirely invisible while standing, though again, it appears fine in Fighter Factory.

Could someone offer some advice? I'd appreciate it.
Re: New Problem
#2  January 31, 2009, 09:08:27 pm
  • ******
First things first, you may as well ignore Fighter Factory when you have a problem. It's just better to understand what's going on and then fix it yourself.

Speed palette course.
When Mugen looks at the sprites and the palette, it considers that the color #0 (in Paint Shop's .pal palette format) or #255 (in PhotoShop's .act palette format) (not sure about Fighter Factory) is transparent - it doesn't display anything associated with that color slot.
For the "pink box", it's an area that is associated with a color slot that isn't the correct one. Usually people use that pink, but it's not necessary, you can make it bright green or anything that you can easily recognize as long as you put that color in the right slot.
For the animation that blinks, a first guess would be that these sprites don't have the right palette. They have the right colors, so you don't see it, but if you try to look at their palette, these colors are not in the right color slots. So when Mugen tries to forcibly apply the regular palette on these sprites, it will go wrong.
With palettes, each pixel is associated with one of the available 256 color slots, on your current sprite the palette has these slots correctly filled, but when Mugen applies the "real" palette from the first sprite, these same slots become empty in the actual palette, so the pixels associated with these now-empty color slots will show up incorrectly.
The solution for that would be to take the sprite out, take the first sprite of the SFF, extract its palette (many image editing programs can do that), apply that palette on the faulty sprite (with the method "nearest color matching" or anything similarly named if you are offered the choice, you'll see it works if the color don't get fucked up on your sprite) and then reinsert the new corrected sprite into the SFF.
This solution should normally fix both of your problems at once, do that on all the sprites that have either of your problems.

I don't know how exactly Fighter Factory works, but I guess it shows up correctly in Fight Factory because it doesn't force the palette even when it's shared, it displays the palette of the sprite ? In that case you wouldn't see it because it's fine in the palette of the sprite, but it still would happen ingame when Mugen does apply the palette on the sprite.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Last Edit: February 01, 2009, 12:59:20 am by Byakko
Re: New Problem
#3  January 31, 2009, 09:10:46 pm
  • *
All right! That was informative. What I don't understand is why some sprites act differently than others if I imported them the same way. Since the transparency seems to be my main problem, would you recommend I make a new palette?
Re: New Problem
#4  January 31, 2009, 09:24:46 pm
  • ******
I edited my previous post with what should be the most straightforward solution.
You may have imported the sprites the same way, but they might not have been made the same way. If the sprites you imported didn't have the right palette right from the beginning, then it'll still show in Mugen. Simply, when you're getting all your sprites, they must have all the same palette right from the beginning before insertion in the SFF (this is for the character and any effect that you want to affect with the palette, it isn't necessary with stuff like dust effects and whatever, they can have their own palette - but this is getting a little further than you need to know right now so you don't have to mind that right now)
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Re: New Problem
#5  January 31, 2009, 09:27:14 pm
  • *
Okay, so I take a healthy sprite and a dead sprite, open the healthy sprite's palette (though it's the same as the dead one) and apply that to the dead one?

All the sprites were made the same way - I made them.
Re: New Problem
#6  January 31, 2009, 10:07:22 pm
  • ******
Should be. If it doesn't work... Post the sprites (normal and broken) so we can see what's wrong with it ?
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Re: New Problem
#7  January 31, 2009, 10:19:02 pm
  • *
Can do.

A good sprite in Fighter Factory. http://i277.photobucket.com/albums/kk73/TheFrogSage/Other/healthysprite.png

A bad sprite in Fighter Factory. http://i277.photobucket.com/albums/kk73/TheFrogSage/Other/badsprite.png

This only happened to one sprite. http://i277.photobucket.com/albums/kk73/TheFrogSage/Other/ohgodwhatdidido.png

A sprite that looked good in Fighter Factory, but fails in testing. http://i277.photobucket.com/albums/kk73/TheFrogSage/Other/thebox.png

The standing sprite in Fighter Factory, which doesn't appear in testing. http://i277.photobucket.com/albums/kk73/TheFrogSage/Other/standingFF.png

First three are full-screen.
Re: New Problem
#8  January 31, 2009, 10:26:38 pm
  • ******
I meant posting the sprites themselves - as the original pcx files. But right like that, I can see that you have two "pink" color slots in your palette. The ones that appear with the box around probably have their pink color associated with the wrong one.
Try replacing the pink in the middle by, say, black or green or whatever. Do that in the palette itself, then make sure the palette is applied to all the sprites. Then, see all the sprites that were affected : they are associated with the wrong slot. These pixels have to be associated with the pink in the lower right corner.

I don't use Fighter Factory, usually it seems like it's dealing with the palettes in an odd way. For example, do you actually use that many shades of red and black ?
Also, it might help too to post the very first sprite in the sff - instead of sprites 51, 55 etc. If all the sprites have a "shared" palette, they're all referring to the palette of that first sprite.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Re: New Problem
#9  January 31, 2009, 10:32:34 pm
  • *
They should've been the same pink, considering I used the same pink for all the backgrounds. Okay... sprites.

http://www.4shared.com/file/83458816/db59a318/pcxes.html

There's only about 64 now - I wanted to make sure this was gonna work before I started making every last one of 'em.
Re: New Problem
#10  January 31, 2009, 10:34:54 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
FF does things like that if you screw your sprites up in the first place. See it has some pallete functions, and you can make your original pallete with it, but it does so very very imperfectly and can cause some major headaches if you rely on it.

Far better to do the pallete in photoshop or whatever. Apply it to all your sprites there (so you know you've done so) then load them into FF under the correct format. FF does have a batch convertor for pcx files as well. For that matter it has batch apply pallete too, but many people don't twig to that.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: New Problem
#11  January 31, 2009, 10:36:24 pm
  • *
How do I make a palette in Photoshop? ...That sounds like something in one of the FAQ's; I'll go read those.
Re: New Problem
#12  January 31, 2009, 10:41:00 pm
  • ******
Quote
They should've been the same pink, considering I used the same pink for all the backgrounds.
The thing is, currently you have sprites that are displayed with a pink background. That can only be because that background isn't associated with the correct color slot (the last one), because that slot will be considered as transparent by Mugen no matter what.
Now, seeing that you have a second "pink" in your palette, it can only mean that those that display the box have that area associated with that other pink. It's a simple deduction - it's the only way you can have what you have, so that has to be the reason.
From there, you can only conclude that Fight Factory messed up something. All you have to do is remove that other pink, and then check the sprites that had it wrong to make sure they use the right pink again.

Personnally, I would suggest Paint Shop Pro over PhotoShop ; if you save the palette in .pal format, you can just open it with a text editor and reorganize the colors from there. A simple look lets you understand how it works - otherwise, feel free to ask. Once that's done and you have a clean palette, you have Mugen tools available to turn a .pal to a .act useable with Mugen - called pal2act. It can be used in conjunction with one of the other Mugen tools - pcxclean, it allows you to forcibly apply a palette to all your sprites at once, once you have a clean palette it automatically applies the palette and associate all your colors with the correct color slot in the palette. Here too, feel free to ask how to use it when you get there.
I believe those tools are available at RandomSelect.
So in order, the steps would be to
-get a clean palette with an external tool (I personnally suggest Paint Shop Pro in conjunction with a text editor if you have it), with only the right colors once and the background color (pink) in the correct slot, only once as well
-get the tools, pal2act (only needed if you used Paint Shop Pro, PhotoShop already gives a .act file) and pcxclean
-ask how to use them.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Last Edit: January 31, 2009, 10:48:34 pm by Byakko
Re: New Problem
#13  January 31, 2009, 10:43:48 pm
  • *
Actually, I may be able to explain that second pink. You see, when I used Fighter Factory's palette maker, it made a base palette out of every colour available in one of my sample sprites. It didn't take up the whole box, so instead of replacing the Background Box, I just copied the pink colour and put it into that box, leaving the original. ...Actually, could that be the source of my problems?
Re: New Problem
#14  January 31, 2009, 10:57:29 pm
  • ******
Yeah, most likely, since the sprites where the area was associated with the wrong pink were left as such since it was still there :P
Well, that's for the pink. I still suggest one clean palette (it seems like the FF palette has too many doubled colors, or do you have that many shades ?) and apply that palette to all sprites once and for all (with pcxclean if you can) so you'll be absolutely sure nothing's wrong.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Re: New Problem
#15  January 31, 2009, 11:14:45 pm
  • *
No... that can't be. I imported all the sprites at the same time. If one exploded, they should all explode.
Re: New Problem
#16  January 31, 2009, 11:15:34 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
No, not if they all have a slightly different pallete at the time of entry. Also, they may be shared or linked to a really broken sprite. Hence why each sprite should share the exact same pallete setup.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: New Problem
#17  January 31, 2009, 11:16:49 pm
  • *
I don't really understand much of what you two have been advising me, but it seems like the problem's in the palette and thus I will try redoing that part and get back to you.

EDIT: I have done so, and the broken sprites seem to possess their own palette. Changing it turns them into the horrifically disfigured sprites (a la picture #3).  --;
Last Edit: January 31, 2009, 11:30:48 pm by Aarikku
Re: New Problem
#18  January 31, 2009, 11:48:47 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Hence you need to follow what was written above. You create 1 pallete that works correctly. You save it. You apply it to all your sprites. All character sprites should share the same pallete.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: New Problem
#19  January 31, 2009, 11:50:42 pm
  • *
I did try.

Whoa, Byakko edited. Okay, I'll try opening the .act files in Notepad, and try and find pcxclean.
Re: New Problem
#20  January 31, 2009, 11:56:43 pm
  • ******
Quote
Whoa, Byakko edited.
Yeah, sorry, I do that a lot when I think of more stuff to say :P
Not the act file with notepad, I don't think it works, only PSP's .pal files. Well, if you have a totally clean .act file, it's already good, the "opening with text editor" is only to edit the palette until you have a clean one, it's just that it's a little easier to edit it. If you already have it totally clean, it's good. PCXClean is the important part, it helps you load the unique palette onto all your sprites so you're absolutely sure they're all the same. That's the part you're missing.

What PCXClean does, more specifically, is :
-take every single pixel one by one
-if it is of a color that is present in your palette, associate the pixel with that color clot in the palette (it must be the exact same color in RGB value)
-if it's a color that isn't in your palette (e.g. green, or even a slightly different shade of red that shouldn't be here) then it associates it with your background color - making that pixel transparent in Mugen.
So when you load the sprite in Mugen, you'll immediately see the result : if all sprites work, it's fine, and if a sprite shows up with holes in it, it means that sprite had the wrong colors.
The method also makes sure that you only have one "red" and so if your palette is totally clean. Before, if you had a sprite with a pink that wasn't the right one, you wouldn't notice it and it would still be associated with the wrong pink. With this replacement, it will force that pink to be associated with your unique pink in the clean palette.

Again, when I say a clean palette, it's each color only once, and only the color that you actually have on your sprites. No green slot, no unneeded color, and only one pink slot. That's the important part.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Last Edit: February 01, 2009, 12:04:29 am by Byakko
Re: New Problem
#21  January 31, 2009, 11:58:43 pm
  • *
Read that wrong. Ah well.

I downloaded Pal2Act, Pcxclean and Pcxpal... all of which were made for DOS and don't work. Are there Windows versions anywhere? (Good ol' Murphey's Law. No wonder I never get anything done.)
Re: New Problem
#22  February 01, 2009, 12:10:32 am
  • ******
PCXClean works, you just have to know it once ; here's how.

Put PCXClean in one given work folder. In that same folder, put your clean palette. In that same folder, put another folder that contains all of your sprites (you probably want to make a backup of them in case anything goes wrong).
Make your command line in a text file.
On the command line : I use
Code:
pcxclean -c -y -t folderwithallsprites\*.pcx yourcleanpalette.act
This will apply yourcleanpalette.act onto all the pcx files contained in the folderwithallsprites folder, replace the files without confirmation, and crop them. It's the most straightforward as long as you did make a backup of your sprites beforehand.

Save that text file with just that line in it. Rename the text file into pcxclean.bat, removing the .txt extension. So far, pcxclean, the .bat file, the palette and the folder with the sprites must all be together.
Now, you can double-click the .bat file and PCXClean will execute the command. Then you can check your sprites to see if any of them have weird stuff in it (holes, turned blank...) if you're sure the new palette is actually clean, it means those sprites had problems. Take the original back, and tweak the colors to fix it - do that on each sprite that went wrong one by one. Then, apply pcxclean again to make sure.

If you have pcxpal, it can be used (in the same fashion as above, with the command line in a .bat file) to extract the palette from a pcx as a .pal file. That's when you can edit it with a text editor to modify it by hand. pal2act is only when you have a .pal file, to turn it back into a .act file (also used with a .bat file). After all that, comes pcxclean.

By the way, I often edit my posts, so when I just posted a reply, you probably want to wait a little to make sure I'm not right in the middle of adding a wall of text of additional information :P
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Last Edit: February 01, 2009, 12:18:47 am by Byakko
Re: New Problem
#23  February 01, 2009, 12:17:50 am
  • *
Well, I now have a few yellow boxes. ...Quite a number of yellow boxes, actually. And the colour white is gone, but I'm gonna assume the yellow boxes were unimportant sprites and carry on as if everything's fine.

...I thought I was good with computers until I started this. Good God, how are there so many MUGEN downloads?
Re: New Problem
#24  February 01, 2009, 12:20:39 am
  • ******
Not to worry, it's something you learn once and then you can do it with anything :P it's just copy-paste between all of your work - you have one command line for each tool, but the same for all of your work.

... If you don't actually have any yellow in your sprites, you probably want to clean it, it'll save you some trouble for later. That's where you can use pcxpal to get the .pal file, edit it with notepad, find the yellow colors (it's a list of RGB values, just try these RGB values in any image editor and find the ones that are yellow) and replace them with "0 0 0" (black).

'K, should be good.
||
V
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Last Edit: February 01, 2009, 12:23:58 am by Byakko
Re: New Problem
#25  February 01, 2009, 12:23:07 am
  • *
The yellow boxes, as it turns out, were there originally somehow. Apparently those weren't the good sprites.

*Tries pcxclean with old sprites*

They don't look any different. I think I might have something, though I'll probably have to reimport all the sprites, thus losing the placement of the axis on each one. Still, it'll be something.
Re: New Problem
#26  February 01, 2009, 12:33:26 am
  • *
He is now entirely invisible. The sprites all look healthy in Factory, but all of them use the colour white, which isn't in the new palette, which makes me fear I did something wrong.
Re: New Problem
#27  February 01, 2009, 12:34:37 am
  • ******
:S post one of your new pcx file ? A corrupted one. I'll have a look under paint shop pro.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Re: New Problem
#28  February 01, 2009, 12:35:50 am
  • *
I'm gonna try one thing first - I think instead of importing the pcx-cleaned sprites, I imported the originals. So if the ones that were actually cleaned still mess something up (as they inevitably will), I'll post a pcx.

EDIT: From what I can tell, it worked! Now I can begin the animations. Thanks for all your help. Couldn't have done it without you.
Re: New Problem
#29  February 01, 2009, 12:41:21 am
  • ******
By the way... I checked your original sprites, the one you posted earlier here
They should've been the same pink, considering I used the same pink for all the backgrounds. Okay... sprites.

http://www.4shared.com/file/83458816/db59a318/pcxes.html

There's only about 64 now - I wanted to make sure this was gonna work before I started making every last one of 'em.

........ They don't have any palette. They're full 24 bit 16 million colors, not 8 bit - 256 colors with a palette. Of course, that will never give you anything good in Mugen :P I tried "decrease color depth" to 256 colors on one sprite and it gave me a palette with barely 24 colors.
If your attempt doesn't give anything, I'll probably just go ahead and make a clean palette with these original sprites.
It worked ? Congratulations :P consider the above to be just for the information, to let you know exactly why all this started. Good luck with the rest.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Re: New Problem
#30  February 01, 2009, 12:42:41 am
  • *
Hey, Fighter Factory said it can use Bitmaps. ...So I gave it Bitmaps. As I said, though, this latest attempt has yielded actual results. A few more days of agonizing confusion and I could have a real character.  ;D

EDIT: Will do. Mental note: USE PCXes.
Re: New Problem
#31  February 01, 2009, 12:45:46 am
  • ******
Yeah, that's another weird thing from FF : Mugen shouldn't use bitmaps and just won't work with non 8 bit paletted sprites, I have no idea why FF's makers considered it a good idea to allow BMPs without making sure they were 8 bit. I'm not even sure any sort of BMP works at all in Mugen...
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Re: New Problem
#32  February 01, 2009, 02:26:01 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
FF does an autoconvert on them. I've been telling people off for doing, and suggesting to do that. Far too easy to stuff up.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: New Problem
#33  February 01, 2009, 04:16:51 am
  • *
You can recommend "ALSee Photo Editor" instead. Worked great for me.
Re: New Problem
#34  February 05, 2009, 04:39:48 pm
  • ******
  • [E]
    • Mexico

  • Online
Irfanview does a good job at batch converting withouth screwing the palette.