Frustrations setting in

Post your scripting questions / solutions here

Moderator: Moderators

Faceball
Colour Sergeant
Posts: 83
Joined: Mon Dec 09, 2002 9:32 am

Frustrations setting in

Post by Faceball »

Why is it that just about everything i am trying doesn't seem to work.

I am complete with map(minus objectives cuz i couldn't get them to work)

so now i attempt to do the loading screen and have treid multiple ways following the tuts and even screen de-mystified.....or whatever its called step by step and it still doesn't work. All paths are correct from what i can tell. When i go to load my map i get the MOH image with the 3 soldiers standing while the map loads.

Is there anyone who knows anything about loading screens that is willing to give mine a look to see what i have done wrong for the bazzillionth time. And can tell me so i know what it is i am not doing? :(
Sputnik
Colour Sergeant
Posts: 85
Joined: Thu Jul 04, 2002 12:36 am
Location: V.A.

Post by Sputnik »

Ok.. This should explain it, it works every time.

For your loading screen you need three things:
  1. A 24-Bit Truevision Targa (.tga) with an alpha channel.
  2. A .shader file in the scripts folder.
  3. A .urc file in the ui folder.
  1. Using PSP 7: load up your image, right click the mask icon and click from image. Then click source opacity, and click OK. Next click Masks -> Save to Alpha Channel, and click OK until the dialogue boxes are gone. Place the image in root/textures/mohmenu/dmloading.
  2. Your .shader should look exactly like this if you created the image using the way described in step 1.
    SHADER

    picname // Should be the name of your picture
    {
    nomipmaps
    nopicmip
    cull none
    force32bit
    surfaceparm nolightmap
    {
    rgbgen global
    //alphagen global
    blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
    clampMap textures/mohmenu/dmloading/picname.tga // Path of the picture.
    }
    }


    [*The .urc should look like this:
    URC

    menu "dm/yourmapname" 640 481 NONE 0
    bgcolor 0 0 0 1
    borderstyle NONE
    bgfill 0 0 0 1
    fullscreen 1
    //vidmode 3
    //fadein 0.5
    virtualres 1
    postinclude ui/loadingbar.txt






    resource
    Label
    {
    name "Default"
    rect 248 0 256 256
    fgcolor 1.00 1.00 1.00 1.00
    bgcolor 0.50 0.50 0.50 0.00
    borderstyle "NONE"
    shader "paper"
    }
    resource
    Label
    {
    name "Default"
    rect 496 0 256 256
    fgcolor 1.00 1.00 1.00 1.00
    bgcolor 0.50 0.50 0.50 0.00
    borderstyle "NONE"
    shader "paper"
    }
    resource
    Label
    {
    name "Default"
    rect 496 248 256 256
    fgcolor 1.00 1.00 1.00 1.00
    bgcolor 0.50 0.50 0.50 0.00
    borderstyle "NONE"
    shader "paper"
    }
    resource
    Label
    {
    name "Default"
    rect 248 248 256 256
    fgcolor 1.00 1.00 1.00 1.00
    bgcolor 0.50 0.50 0.50 0.00
    borderstyle "NONE"
    shader "paper"
    }
    resource
    Label
    {
    name "Default"
    rect 0 248 256 256
    fgcolor 1.00 1.00 1.00 1.00
    bgcolor 0.50 0.50 0.50 0.00
    borderstyle "NONE"
    shader "paper"
    }
    resource
    Label
    {
    name "Default"
    rect 0 0 256 256
    fgcolor 1.00 1.00 1.00 1.00
    bgcolor 0.50 0.50 0.50 0.00
    borderstyle "NONE"
    shader "paper"
    }
    resource
    Label
    {
    name "Default"
    rect 0 0 640 480
    fgcolor 1.00 1.00 1.00 1.00
    bgcolor 0.50 0.50 0.50 0.00
    borderstyle "NONE"
    shader "shadow"
    }
    resource
    Label
    {
    name "Default"
    rect 0 0 640 480
    fgcolor 1.00 1.00 1.00 1.00
    bgcolor 0.50 0.50 0.50 0.00
    borderstyle "NONE"
    shader "wrinkles"
    }
    resource
    Label
    {
    name "Default"
    rect 80 32 480 368
    fgcolor 1.00 1.00 1.00 1.00
    bgcolor 1.00 1.00 1.00 0.00
    borderstyle "NONE"
    shader "white"
    }
    resource
    Label
    {
    name "Default"
    rect 80 32 480 368
    fgcolor 1.00 1.00 1.00 1.00
    bgcolor 1.00 1.00 1.00 0.00
    borderstyle "NONE"
    shader "sepiaoverlay"
    }
    resource
    Label
    {
    name "Default"
    rect 96 48 448 336
    fgcolor 1.00 1.00 1.00 1.00
    bgcolor 1.00 1.00 1.00 0.00
    borderstyle "NONE"
    shader "shadername"
    }
    resource
    Label
    {
    name "Default"
    rect 76 28 64 64
    fgcolor 1.00 1.00 1.00 1.00
    bgcolor 1.00 1.00 1.00 0.00
    borderstyle "NONE"
    shader "ul_corner"
    }
    resource
    Label
    {
    name "Default"
    rect 500 28 64 64
    fgcolor 1.00 1.00 1.00 1.00
    bgcolor 1.00 1.00 1.00 0.00
    borderstyle "NONE"
    shader "ur_corner"
    }
    resource
    Label
    {
    name "Default"
    rect 500 340 64 64
    fgcolor 1.00 1.00 1.00 1.00
    bgcolor 1.00 1.00 1.00 0.00
    borderstyle "NONE"
    shader "lr_corner"
    }
    resource
    Label
    {
    name "Default"
    rect 76 340 64 64
    fgcolor 1.00 1.00 1.00 1.00
    bgcolor 1.00 1.00 1.00 0.00
    borderstyle "NONE"
    shader "ll_corner"
    }
    resource
    Label
    {
    title "Title
    name "Default"
    rect 72 408 496 32
    fgcolor 1.00 1.00 1.00 1.00
    bgcolor 0.00 0.00 0.00 0.00
    borderstyle "RAISED"
    font facfont-20

    }
    end.


    Replace shadername and mapname appropriately.
Then zip it up, and it should work. I've made loading screens for people before, and I'm in the process of writing a tutorial.

If you STILL can't figure it out, [url=mailto:mohaa_sputnik@hotmail.com]email me[/url]
Image
Faceball
Colour Sergeant
Posts: 83
Joined: Mon Dec 09, 2002 9:32 am

Post by Faceball »

Wow...thx for the fast reply....Only thing i need to ask(still new with PSP7)
is what is the "mask"icon? i was browsing through all the features and don't see it.
Sputnik
Colour Sergeant
Posts: 85
Joined: Thu Jul 04, 2002 12:36 am
Location: V.A.

Post by Sputnik »

First you need to show the layer pallette which looks like a blue piece of paper on top of a red piece of paper, and the mask icon is in the layer pallette, and it looks like, well.. um.. a mask... make sure your right click it.
Image
Faceball
Colour Sergeant
Posts: 83
Joined: Mon Dec 09, 2002 9:32 am

Post by Faceball »

Okay i figured out how to create an Alpha channel(Alpha 1) When i go to save the document as a .tga it will not allow me to select the ALPHA CHANNELS option.....ONly selection is AS A COPY.

If i change it to a .psd file it will allows me the option of saving with an alpha channel.

I'm sooooooo freaking confused. Why wont it let me save the .tga with alpha channel?

I tried doing the demystified way again and when i right click on the red, blue or green, the pic changes to black and white and save as the red copy.....no alpha channel.

Grrrrrrrrrrrrr.

This is the only thing holding me back from releasing my map......HELP!!!!
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

You have to save the .tga as 32-bit if it has an alpha channel.
Image
panTera
Brigadier General
Posts: 573
Joined: Wed Jan 29, 2003 11:46 pm
Location: The Netherlands
Contact:

Post by panTera »

I thought I'd made it pretty clear, but perhaps I should have used some pictures. I might just add these to that "Loadingscreen De-mystified" post.

These are from Photoshop:

Image
In the Channels window, right click on one of the RGB channels. Choose Duplicate.

Image
Just click OK.

Image
The new channel is added. You're ready to save it as TGA.

Image

Image

Image
To see if it's okay, open the new TGA, and the channels should look like this.

I am 100% sure this works, so please read the tut carefully.

greets
Pan.
Sputnik
Colour Sergeant
Posts: 85
Joined: Thu Jul 04, 2002 12:36 am
Location: V.A.

Post by Sputnik »

I really don't think it matters whether or not its 32-Bit or 24-Bit, but thats besides the point. I think its a lot easier to do in Paintshop Pro
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

If you don't need transparency, use a jpg instead of tga! It's a true waste of memory / disk space, especially a 32-bits tga is. A 24-bit tga cannot contain an alpha channel.
Image
panTera
Brigadier General
Posts: 573
Joined: Wed Jan 29, 2003 11:46 pm
Location: The Netherlands
Contact:

Post by panTera »

well this comes from the Photoshop Help:

Targa format supports 24-bit RGB images (8 bits x 3 color channels) and 32-bit RGB images (8 bits x 3 color channels plus a single 8-bit alpha channel).

Sputnik, I do belief you when you say 24 bit might also work with a loadingscreen but just try to make a texture with an alpha selection (a transparent fence or whatever) and then save it as 24 bit. You'll loose the channel.

I know many people prefer PSP over Photoshop but that's up to you.

It's not just about transparency, but about the soft white overlay you'll get when using such channel (see the original loadingsccreens). If you don't want that effect, then use a jpg indeed.
Faceball
Colour Sergeant
Posts: 83
Joined: Mon Dec 09, 2002 9:32 am

Post by Faceball »

First, i'd like to again thank everyone for trying to help me out. I am going to post like Pantera to show you where i get huing up.

First i open PS7 and select my image from my screenshot folder in MOH.
(its already in .tga format.) I select the image (with allfiles) and open with PS7

Image


Next i goto image, image size and change image from 1024/768 to 512 /512 and to 72resolution, click okay and image shrinks to a smaller size.

Image

Then i right click on the blue channel, click ok, and it saves as blue copy.

***NOW HERES THE PROBLEM***

When i go to SAVE AS it doesnt let me choose the ALPHA channel as show below.

Image


Have i done something wrong to cause this? Is there an easier way with just posting the image in JPG format?[/img]
Innkeeper
Colonel
Posts: 475
Joined: Mon Nov 25, 2002 10:13 pm
Location: NC, USA (about 7.5 klicks from the capital dome)
Contact:

Post by Innkeeper »

The way I have managed to do this is to create a mask

Image

Image

Image

Then save 32 bit

But I suggest if you are not wanting any transparency, use JPEG.
Faceball
Colour Sergeant
Posts: 83
Joined: Mon Dec 09, 2002 9:32 am

Post by Faceball »

Innkeeper, when i go to the LAYERS option....the selection you showed i am not able to use becasue it is not highlighted. It's there but i can't use it.

Anybody else?
Faceball
Colour Sergeant
Posts: 83
Joined: Mon Dec 09, 2002 9:32 am

Post by Faceball »

Easy using the jpg format easier? how do you do it? right now i really don't care how it looks as long as it works.
Innkeeper
Colonel
Posts: 475
Joined: Mon Nov 25, 2002 10:13 pm
Location: NC, USA (about 7.5 klicks from the capital dome)
Contact:

Post by Innkeeper »

For some reason I find that I have to change the mode first to "Indexed color" first then back to RGB.

For jpeg, change your shader line in the .urc file to read as follows:

Code: Select all

   shader "textures/mohmenu/dmloading/yourpicname.jpg"
If you want to create a shader for it instead use this:

Code: Select all

   shader "yourshadername"
And your shader will look like this:

Code: Select all

yourshadername
{
   nomipmaps
   nopicmip
   cull none
   force32bit
   surfaceparm nolightmap
   {
      clampMap textures/mohmenu/dmloading/yourpicname.jpg
   }
}
Post Reply