Announcement

Collapse
No announcement yet.

Makespr.exe

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Makespr.exe

    Could I get some help with makespr.exe please.

    I have completed 165 .tif files with 165 matching shadow files for a new sprite.

    After some initial difficulties I am getting makespr.exe to run but get the following error message.
    "Processing "GU20.txt"
    [Move..
    Error in Bitmap data. Pixel with no Associated Alpha"

    I checked GU..MA1.2.tif and resaved it and ran it again and it started then came back with the same error but "[Move....." was different, there were 5 ". " now instead of 2.

    Could someone explain the error messages you get with makespr.exe please? Do the "." relate to frame no's?

    I am using Paintshop pro to make the tif files. Could someone indicate the best settings for-
    a) magic wand, and
    b) color replacer.
    I think that may be where I made the mistakes. I noticed I had some near black pixels in my picture, ie 1,1,0 rather than 0,0,0. thats in the background.
    c) do pixels that close in colour in the picture cause any problems, ie shhould I aim for a bigger gap and whats the best way to do it?

    Thanks for any help.

  • #2
    You didnt created an alpha channel.

    Quoting Harlan Thompson's unit creation document:
    Harlan Thompson
    7. Now comes the tricky part of getting the alpha channel to work. Find the Layers window in Photoshop. Along the top of this window you should see three tabs, Layers, Channels and Paths. Click the Channels tab. You should see four channels for your graphic already: RGB, Red, Green and Blue. If you have any other channels, delete them.

    8. Select the pure black background behind your unit. To make sure you select every last pure black pixel, use the Select -> Color Range command. With the eyedropper, click on the black background, then click OK. Now use the Select -> Inverse command. You should now see every last pixel that is NOT pure black selected. If you see pixels that should be pure black but aren’t, fix that now, then repeat step 8 until you have it right.

    9. Now make the Alpha channel. With all the non-pure black pixels selected and the Channels tab open on the Layers window, click the “save selection as channel” button at the bottom of the Channels tab window. The icon on this button is a black box with a dashed circle inside it. When you click on this, a channel called Alpha 1 should appear in your Channels window.
    "Kill a man and you are a murder.
    Kill thousands and you are a conquer.
    Kill all and you are a God!"
    -Jean Rostand

    Comment


    • #3
      I used PaintshopPro and followed IW instructions.
      a) saving both the main picture outline to alpha channel before saving the whole to .tif and
      b) the shadow to alpha channel separately before saving the whole picture as a tif file.

      I used magic wand/invert selection to ensure I got the whole of the image (without background) and used color change to change the background or shadow where approp. When I rechecked, I saved to alpha and it came up with an outline and separate background called channel 1. When I resaved it I saved it over Channel 1. So as far as I know I have the alpha channels required for each frame, ie I have 165 .tif files for the main image and each has a matching alpha chanel, and 165 .tif files for the shadow and each has a matching alpha chanel.

      I thought I read somewhere that if you read the dots in the makespr report you can work out which frame has a problem, that is what I was alluding to in my request.

      However, now I know a bit about paintshop, I will re-read Harlans instructions and see if I missed a process. I have checked some frames and it SEEMS everything should be ok in that i cant find any non 0.0.0 pixels in the background or any 0.0.0 in the image, only an occassional 1.1.0 in the picture around the edges.

      Thanks for your help.

      Comment


      • #4
        However, just a thought, I did not give each alpha chanel a name, just let the computer name it channel 1 which i thought I read in some instructions.

        Comment


        • #5
          I have attached two files, MA1.1 and MS1.1 in case anyone can find the problem.
          Attached Files

          Comment


          • #6
            Actual no alpha channel needs a name you can't give something like this to an alpha channel in PSP4 the program for that Harlan's instructions are written.

            So Far I did not figured out what is wrong with the GU20MA.tif file. The GU20MA.tif is in the wrong format. All files needs to be in the *tif format, 24 bits uncompressed. The shaddow files is in a compressed type. Actual the only thing that is not quite correct with your alpha channels are that they are black/white only channels. For the shaddow file this is ok but not for the other file. The result of this is that you will see some terrible looking black edges around your units. So the edges of your alpha channels needs to be in grey tones. The alpha channels is there for controlling the transparency of each pixel if you have for a pixel a total black alpha channel then the pixel is not saved in the sprite, if it is total white then the pixel and only the pixel is saved in the sprite file. If the alpha channel is some grey then the according pixel is saved with tranparent information.

            -Martin
            Civ2 military advisor: "No complaints, Sir!"

            Comment


            • #7
              Thanks for the help Martin.

              Just checking, what you are suggesting is that I need less near black pixels around the edge of the main picture.

              How do you achieve this please?

              a) If I select the image, color change from 0.0.0 to 32.32.32 with a tolerance of say 25, will that do the trick?, or
              b) is there another way to do it when saving to alpha?

              This was my procedure.

              I am redoing CIV 3 flic files and this is what I did.

              Picked 10 -13 frames from the Flic animation, cropped to get the unit in the right place, then loaded the frames into PSP. Then frame by frame-
              1)I used colour replacer to change the pink to pure black in the CIV3 frames,
              2) then selected the red shadow, pasted as new frame, re-sized to 96X72, selected the background and painted it pure white,
              3) inverted to the shadow and painted in pure black, saved it to alpha while the shadow was still selected,
              4)then de selected, saved to file with the GU.. S .etc. tif prefix.
              5)Then went back to the main image where the shadow was still selected, painted it pure black, de selected, resized to 96X72,
              6) selected the black background with magic wand then saved to alpha,
              7) de selected then saved to file with GU..A .tif etc.

              Just confirming the objectives,
              a) background selected and saved to alpha with only 0,0,0, black colour in it
              b) picture frame saved as GU A with no pure black in any part, (should I make sure there are no near black as well?)
              c) shadow, selected saved to alpha with only 0,0,0, black colour in it
              d) shadow background, with only pure white, saved to GU S..tif.
              e) there must be no pure black in the picture and only pure black in the picture background. (should I remove near black pixels in the picture here?)
              f) there must be only pure black in the shadow and only pure white in the shadow background.

              Thanks for your help.

              Comment


              • #8
                Well it is late here in Berlin so the complete answer has to wait until tomorrow.

                An example unit sprite spipped with the sprite maker you should take a close look on the alpha channel and you will notice that the edges of the cow's alpha channel are neither black nor white but grey. I use the blur tool (I think this is the name for it in English) to make make the edges darker. Actual on the my good sprites I used much more of the transparent effect provided by the alpha channel then the cow example demonstrates.

                -Martin
                Civ2 military advisor: "No complaints, Sir!"

                Comment


                • #9
                  Hi Martin,

                  When I saved the PSP files I saved as .tif, uncompressed, RGB. I checked back, cant see where you get the 24 bit option in the save dialog box. Is it somewhere else?

                  Thanks for your help.

                  Comment


                  • #10
                    I have made some progress.

                    I found the main problem seems to be that my starting frame for each animation was 1 rather than 0, ie GU20MA1.1.tif instead of GU20MA1.0.tif. I asked in an email whether this could be the problem but got no response, so I assumed it was not the cause.

                    I took a punt and started a sample sprite with only 1 frame for each event and direction, all numbered 0 and ran makespr.exe and it started to create a sprite, occassionally hanging up on a frame where I had missed so all black pixels in the unit image or had forgot to invert properly for the background, but completed eventually.

                    I then tried it again, but this time adding a few frames at a time. The dots do relate to frames as it came back with messages when it could not find the next frame and the dots equalled the number of frames processed, less 1 for each "0" frame.

                    Eventually, I made the sprite and now I can see how to improve it. Mainly centering the units and my spearman is a little large.

                    However, there was one issue, when executing the makespr (remembering I had insterted 1 frame, numbered 0 for each event, move, attack, death with matching shadow file) requested all the movement frames, then requested 16 more victory frames for direction 4 then finished executing and produced the sprite.

                    I gather from this that the GU01.txt file provided in the download is not complete in the number of frames for each event. I had a quick look but was a bot overwhelmed.

                    I am not good at altering .txt files so can someone post a GU.txt file for a complete move, attack, victory sequence with 10 frames for movement/victory and 13 for attack.

                    As far as the sprite for the spearman goes, I should be able to clean it up fairly quickly and once I have a text file, make it available. I need to put a border around some frames as he is a bit big and a bit low down on the square, but otherwise seeks OK.

                    Thanks for help received and in advance for the .txt file.

                    Comment


                    • #11
                      Originally posted by stankarp
                      Hi Martin,

                      When I saved the PSP files I saved as .tif, uncompressed, RGB. I checked back, cant see where you get the 24 bit option in the save dialog box. Is it somewhere else?

                      Thanks for your help.
                      That is not in the save dialog box but if you save a *.tif file uncompressed then it is 16bit if it has an alpha channel then it is 24bit. I got this information from the image information in Paint Shop Pro 4.

                      The Immortal Wombat already posted such a file in one of the threads, I think the file I attached is it.

                      -Martin
                      Attached Files
                      Civ2 military advisor: "No complaints, Sir!"

                      Comment


                      • #12
                        I have downloaded the file but it appears to not have the full number of animation frames for it. eg, movement frames are 1 and attack frames are 4.

                        For some reason which I have no idea about, after I constructed my first sprite yesterday using 0 as the first frame number, which is the way both gu.txt files are deliverd, makespr started crashing when I executed.

                        I experimented and found out if I changed the first frame number in movement to 1 it would run. So I constructed a new sprite with more frames in it but when I run it in the game , the game crashes when I attack with it.

                        I wondered if it had to do with the line UNIT_SPRITE_ATTACK_IS_DIRECTIONAL 0.
                        I tried changing it to 1 and makespr wont finish executing , coming up with the error gu20.txt line 35:Expected Keyword UNIT_SPRITE_ATTACK not found. I go to line 35 and its there, UNIT_SPRITE_ATTACK 1 is there?

                        I cant work it out. After making my first sprite I added some new frames to my folder and started makespr and it just started crashing with the illegal operation message. If I removed the first movement frame it came up cant find GUMA201.0.tif, if I added any file named that including once which I know ran through makespr before, it crashed. If I change first movement frame to 1, I can run it but it isnt using the full number of frames and crashes when I attack with the unit in the game?

                        I thought I had it all sorted out yesterday now i havnt got an idea

                        Comment


                        • #13
                          I did some further experimenting and found if I renumbered everything away from 20 which is the number of the sprite I created, (in this case 2) I found I can run makespr.exe and create a sprite with either gu01.txt(the cow sprite text file) or with IW GU0002.txt.

                          It appears that either something was corrupted and wont let me continue to use the 20 number for a sprite or there is some mechanism that excludes the number once you have created a complete sprite. I have no idea.

                          However, neither GU01.txt or GU0002.txt are complete files. 01 has no attack sequence while 0002 uses only 1 frame for movement and 4 for attack and death. Whenever I try to change ANYTHING in the files I get error messages, and when I go the the line referred to, the missing thing is there, for eg line 35 errors say expected keword UNIT_SPRITE_ATTACK not found, I go there and there is the missing statement exactly as recorded in the error message. I tried moving it up or down a line and it made no difference. I tried to count the number of blank spaces and that doesnt work or cutting and pasting

                          I must be missing something ?

                          Can anyone help. I need a GU...txt file with 10 frames for movement and death and 12 for attack.

                          Comment


                          • #14
                            Another hint I can give you is that programmers start to count with zero. So if you first frame starts numbered with 0 then this is correct. And I think the sprite script should be named gu02.txt. Well if the sprite maker accepted the other file ok.

                            -Martin
                            Civ2 military advisor: "No complaints, Sir!"

                            Comment


                            • #15
                              Originally posted by stankarp
                              Can anyone help. I need a GU...txt file with 10 frames for movement and death and 12 for attack.
                              Sorry, I've been away for the weekend, and my webmail is all screwed up.

                              This script (GU20.txt) has 10 movement, 12 attack, 10 death frames, all starting from *.1 rather than *.0


                              Also, the line(s) you need in the file (I think) are "SPRITE_FIRST_FRAME 1" <-- you can change this 0 if your frames are numbered from *.0. You need one of these lines from the movement animation block, the attack animation block and the death animation block.
                              Concrete, Abstract, or Squoingy?
                              "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

                              Comment

                              Working...
                              X