remapshader bogus?


(callihn) #1

Trying to remap some shaders in a script and it appears to be completely bogus…

For example…

remapping a shader to nodraw still produces a surface that can be walked on but not seen.

remapping clipmissile to nodraw still produces a surface that can’t be shot through.

remapping a shader to a shader that is mapped to another texture (doesn’t really have a texture of it’s own) produces “shader image can not be found”.

From looking at all of the above it appears that remapshader doesn’t actually remap the shader, but instead is merely remapping the texture?

Thanks


(S14Y3R) #2

Correct, the surface of a brush is compiled into the bsp. So you can’t remap a shader from solid to non-solid. It basically changes the texture, but see-through grates or something with alphashadowing still counts as a shader.

remapping a shader to nodraw still produces a surface that can be walked on but not seen.

You can turn that brushwork into a script_mover and use:


setstate invisible
setstate default

…instead of remapshader.

remapping clipmissile to nodraw still produces a surface that can’t be shot through.
…same deal here.

remapping a shader to a shader that is mapped to another texture (doesn’t really have a texture of it’s own) produces “shader image can not be found”.
Make sure you always refer to the shader that is in the bsp first, even if it has been remapped to something else. That might cause that error, by refferring to the second “remapped” shader.

Make sense? :stuck_out_tongue: GL.


(callihn) #3

I don’t think that will work without the source though, will it?

Maybe using the create code in the script?

Thanks


(S14Y3R) #4

Not without the source I think, sorry. EtPro might have some functionality for deleting things, but those only work on etpro servers.


(Ragnar_40k) #5

When something has a “scriptname”-key assigned then you can delete it in the mapscript (scripts for lms gametype use this a lot). E.g. to remove the 2 wings of the backdoor on Battery you can use:

reardoor_right
{
	spawn
	{
		wait 400
		remove
	}
}

reardoor_left
{
	spawn
	{
		wait 400
		remove
	}
}

(callihn) #6

Sadly though, most brush work doesn’t and in this case I wouldn’t want it removed, I just need to take some clipmissile out and since remapshader is bogus, that’s not going to be possible. Assuming there ever is another version of ET, I would recommend that remapshader be fixed to do just that or renamed to remaptexture, since apparently that’s all it does, that would save some time and avoid any confusion on the issue. Additionally, mergeing some of the ETPro code would also be nice, for example, being able to create entities using script and being able to move them using script, obviously if brush work could be created as well that would be welcomed too. All of that would be swell indeed.

Thanks for the response.


(kamikazee) #7

It can’t be fixed unless the game engine is modified.

It does remap shaders because you would be able to remap eg. an animated shader.
Only the surface flags like ‘nonsolid’ are not changed, because those shader commands are only read at compile time.


(DerSaidin) #8

True, except I wouldn’t say that that change would be a “fix” :stuck_out_tongue:


(callihn) #9

DUH?

I would venture to guess that if you remapped an animated shader you would have the same animation with a different texture? In any case most shaders use surfaceparms and these obviously are not changed, so unless you can give an exact useful and working example I’m just not seeing where it’s useful in it’s current context.

Actually it would be much more useful than it is now, for example you could fit a map to a mod that might need some adjustment which as of today can’t be done without the source or a lot of work as decompiling almost if not always makes a real mess.


(kamikazee) #10

[quote=“callihn”]

I would venture to guess that if you remapped an animated shader you would have the same animation with a different texture? In any case most shaders use surfaceparms and these obviously are not change, so unless you can give an exact useful and working example I’m just not seeing where it’s useful in it’s current context.[/quote]If you want one big and useful example, open goldrush.script. The tank’s tracks are “animated” by switching the static shader for an animated one, and vice-versa.

Most maps featuring a tank copied it as well.


(callihn) #11

So, animation is not compiled in then I gather?


(kamikazee) #12

No, animation isn’t compiled in.

In general, global shader keywords are moved into the BSP at compile time while stage specific keywords can be modified at any time by remapshader.