Page 1 of 1

shader and mapscript

Posted: Mon Dec 16, 2002 7:51 am
by Hunter
Hi,
my map is nearly finished but a still have a few questions:

1) What is a shader?? How do I make that??
2) Can somebody give me an example of a TDM script ??

thx

Posted: Mon Dec 16, 2002 8:21 am
by mohaa_rox
To make a .shader file, use notepad or other word editing tools. Write your script, for example making a custom load screen:

yourmapname
{
nomipmaps
nopicmip
cull none
force32bit
surfaceparm nolightmap
{
map $whiteimage
}
{
clampMap textures/mohmenu/dmloading/yourmapname.tga
blendfunc gl_one_minus_src_alpha gl_src_alpha
}
}

Save it as yourmapname.shader. However, using notepad, the file will still appear as yourmapname.shader.txt (that's my computer, don't know about yours). Use a program to edit the file name from yourmapname.shader.txt to yourmapname.shader. I use ws_ftp (although for uploading files, it's useful for editing file names). You must take a screenshot (F12) and rename it to yourmapname.tga. Crop it to 512 by 512. I think I'll write a tutorial on custom load screens....

Posted: Mon Dec 16, 2002 5:25 pm
by Innkeeper
mohaa_rox wrote:Save it as yourmapname.shader. However, using notepad, the file will still appear as yourmapname.shader.txt (that's my computer, don't know about yours). Use a program to edit the file name from yourmapname.shader.txt to yourmapname.shader. I use ws_ftp (although for uploading files, it's useful for editing file names). You must take a screenshot (F12) and rename it to yourmapname.tga. Crop it to 512 by 512. I think I'll write a tutorial on custom load screens....
If you put double quotes around the file name, notepad will save it exactly as written and will not give it the extension .txt.

Image

shader

Posted: Tue Dec 17, 2002 1:39 am
by tltrude
Shaders are found in the scripts folder of pak0.pk3. They tell the game how to use textures in the map. So for example, if you have a rock texture on a brush, it will sound like rock when a player runs across it and chunks of rock will fly off when it is shot.

You only need to make shader files if you are adding new textures to the game, or adding an opening screen image--which is what mohaa_rox is talking about.

For your script example, just open any of the dm scripts like mohdm1.scr in pak5.pk3/maps/dm.

Posted: Tue Dec 17, 2002 4:27 am
by mohaa_rox
But my computer still displays yourmapname.shader.txt. I'm using Win 98, I think XP does that, but not Win 98.

Posted: Tue Dec 17, 2002 4:28 am
by mohaa_rox
Really? No wonder I couldn't do that. Thanks for the tip, Innkeeper.

Posted: Tue Dec 17, 2002 4:37 am
by Innkeeper
Hmmm.... I thought that worked in 95 & 98 as well... :oops: Sorry, its been a really long time since I have used either of those. My only other suggestion is to use a different editor. I have gotten to really like UltraEdit. You can set up syntax highlighting for file types that it doesn't already have. It greatly improves readability. Also it will save a file with any name you want without hassel. Check it out here: http://www.ultraedit.com/

Posted: Tue Dec 17, 2002 4:53 am
by mohaa_rox
Don't worry, I posted a wrong thing. I didn't see the "" in the screenshot. Anyway, I tried it, and it worked. So thanks for the tip, Innkeeper.

Posted: Mon Dec 23, 2002 12:17 am
by Guest
You know, I was using the same base script and my picture would never load so I pasted my map path and name in place of the "map $whileimage" and then it would load. Can THAT be explained????