surfaceparm landmine, still can't plant mines?


(SteelRat) #1

Ok, so I released the Island map with a couple of small bugs and a big one.
Now that I am getting help testing the map again (after the fixes) I have this new problem that really confuses me:

I renamed the mapfile to Island2 to reflect the version change, I edited all the paths in the mapfile to point to the right directories as well as the shaders and all the required stuff but now when I load the map all works fine but the lighting on the players is very dark again (I use gridsize 128 128 64) and you can’t plant any mines although I edited my shaders to include the surfaceparm landmine on the terrain that I want this to be possible on, does anybody know what I have done wrong?

I also generated a new tracemap but no difference…

textures/island2/terrain_2
{
	 
	surfaceparm landmine
	surfaceparm grasssteps
	q3map_novertexshadows
	q3map_forcesunlight
	{
		map textures/temperate_sd/grass_path1.tga
		rgbGen vertex
		tcmod scale 0.150 0.150
	}
}


(SteelRat) #2

Big thanks to Loffy for pointing out that I forgot to add the shader to my shaderlist.txt
I should not map when I am tired :stuck_out_tongue:


(Jizaboz) #3

OK, now I have this problem too. I want landmine capabiliity over pretty much my whole map which is entirely terrain almost. I added surfacparm landmines and gravelsteps to the terrain script AND the script for the surface textures. Both of which ARE in my shaderlist.txt, so here’s my question… What am I missing here? Or, is surfaceparmlandmines and gravelsteps only supposed to be in the terrain shader or the texture shader? Can I even use gravelsteps? Maybe someone could save me a few build tests here… :smiley:


(DeAtHmAsTeR) #4

the surfaceparms go in the shader - it’s nothting to do with the script

please post your shader so we can see what’s wrong


(Victorianetza) #5

i am having the same problem… here’s my shader file

textures/islandsfull/terrain_0
{
	surfaceparm nolightmap
	surfaceparm landmine
	surfaceparm gravelsteps
	q3map_novertexshadows
	q3map_forcesunlight

	{
		map textures/desert_sd/sand_wave_desert.tga
		rgbGen vertex
		tcmod scale 0.500 0.500
	}
}

textures/islandsfull/terrain_1
{
	surfaceparm nolightmap
	surfaceparm landmine
	surfaceparm gravelsteps
	q3map_novertexshadows
	q3map_forcesunlight
	{
		map textures/desert_sd/grass_sand_flat.tga
		rgbGen vertex
		tcmod scale 0.500 0.500
	}
}

textures/islandsfull/terrain_2
{
	surfaceparm nolightmap
	q3map_novertexshadows
	q3map_forcesunlight
	{
		map textures/desert_sd/pavement_tris_sandy.tga
		rgbGen vertex
		tcmod scale 0.500 0.500
	}
}

textures/islandsfull/terrain_3
{
	surfaceparm nolightmap
	q3map_novertexshadows
	q3map_forcesunlight
	{
		map textures/desert_sd/sand_gravels_bright.tga
		rgbGen vertex
		tcmod scale 0.500 0.500
	}
}

textures/islandsfull/terrain_0to1
{
	surfaceparm nolightmap
	q3map_novertexshadows
	q3map_forcesunlight
	{
		map textures/desert_sd/sand_wave_desert.tga
		rgbGen vertex
		alphaGen vertex
		tcmod scale 0.500 0.500
	}
	{
		map textures/desert_sd/grass_sand_flat.tga
		rgbGen vertex
		alphaGen vertex
		tcmod scale 0.500 0.500
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
}

textures/islandsfull/terrain_0to2
{
	surfaceparm nolightmap
	q3map_novertexshadows
	q3map_forcesunlight
	{
		map textures/desert_sd/sand_wave_desert.tga
		rgbGen vertex
		alphaGen vertex
		tcmod scale 0.500 0.500
	}
	{
		map textures/desert_sd/pavement_tris_sandy.tga
		rgbGen vertex
		alphaGen vertex
		tcmod scale 0.500 0.500
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
}

textures/islandsfull/terrain_0to3
{
	surfaceparm nolightmap
	q3map_novertexshadows
	q3map_forcesunlight
	{
		map textures/desert_sd/sand_wave_desert.tga
		rgbGen vertex
		alphaGen vertex
		tcmod scale 0.500 0.500
	}
	{
		map textures/desert_sd/sand_gravels_bright.tga
		rgbGen vertex
		alphaGen vertex
		tcmod scale 0.500 0.500
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
}

textures/islandsfull/terrain_1to2
{
	surfaceparm nolightmap
	q3map_novertexshadows
	q3map_forcesunlight
	{
		map textures/desert_sd/grass_sand_flat.tga
		rgbGen vertex
		alphaGen vertex
		tcmod scale 0.500 0.500
	}
	{
		map textures/desert_sd/pavement_tris_sandy.tga
		rgbGen vertex
		alphaGen vertex
		tcmod scale 0.500 0.500
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
}

textures/islandsfull/terrain_1to3
{
	surfaceparm nolightmap
	q3map_novertexshadows
	q3map_forcesunlight
	{
		map textures/desert_sd/grass_sand_flat.tga
		rgbGen vertex
		alphaGen vertex
		tcmod scale 0.500 0.500
	}
	{
		map textures/desert_sd/sand_gravels_bright.tga
		rgbGen vertex
		alphaGen vertex
		tcmod scale 0.500 0.500
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
}

textures/islandsfull/terrain_2to3
{
	surfaceparm nolightmap
	q3map_novertexshadows
	q3map_forcesunlight
	{
		map textures/desert_sd/pavement_tris_sandy.tga
		rgbGen vertex
		alphaGen vertex
		tcmod scale 0.500 0.500
	}
	{
		map textures/desert_sd/sand_gravels_bright.tga
		rgbGen vertex
		alphaGen vertex
		tcmod scale 0.500 0.500
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
}

textures/islandsfull/terrain.vertex
{
	surfaceparm nolightmap
	q3map_novertexshadows
	q3map_forcesunlight
	{
		map textures/desert_sd/sand_wave_desert.tga
		rgbGen vertex
		tcmod scale 0.500 0.500
	}
}
textures/islandfull/fog 
{ 
   qer_editorimage textures/sfx/fog_grey1.tga 
    
   surfaceparm nodraw 
   surfaceparm nonsolid 
   surfaceparm trans 
   surfaceparm fog 
    
   fogparms ( 0.09411 0.09803 0.12549 ) 4192 

}

help?


(DeAtHmAsTeR) #6

@Victorianetza

  1. Make sure the shader is in your shaderlist.txt

  2. Here is my shader that i edited when it was created by Easygen.
    It is pretty similar to yours - and mine works with snow steps and landmines.

textures/snowtrench/terrain_0
{
	surfaceparm nolightmap
        surfaceparm landmine 
        surfaceparm snowsteps
	q3map_novertexshadows
	q3map_forcesunlight
	{
		map textures/snow/s_dirt_m03i_2.jpg
		rgbGen vertex
		tcmod scale 0.250 0.250
	}
}

textures/snowtrench/terrain_1
{
	surfaceparm nolightmap
        surfaceparm landmine
        surfaceparm snowsteps
	q3map_novertexshadows
	q3map_forcesunlight
	{
		map textures/snow/s_cathedrale_c24b.jpg
		rgbGen vertex
		tcmod scale 0.250 0.250
	}
}

textures/snowtrench/terrain.vertex
{
	surfaceparm nolightmap
        surfaceparm landmine 
        surfaceparm snowsteps
	q3map_novertexshadows
	q3map_forcesunlight
	{
		map textures/snow/s_dirt_m03i_2.jpg
		rgbGen vertex
		tcmod scale 0.250 0.250
	}
}

Try changing parts of that, that apply to you and see if it works.

I am not the best at shaders ( meaning im crap), but i saw that you hadnt had a reply helping you.

The second part applies for Jizaboz too :slight_smile:


(Victorianetza) #7

i have islandfull in my shader’s list…? …


(Chruker) #8

Victorianetza >> Some your shaders don’t contain the landmine and gravelsteps parameter:
textures/islandsfull/terrain_2
textures/islandsfull/terrain_3
textures/islandsfull/terrain_0to1
textures/islandsfull/terrain_0to2
textures/islandsfull/terrain_0to3
textures/islandsfull/terrain_1to2
textures/islandsfull/terrain_1to3
textures/islandsfull/terrain_2to3


(Jizaboz) #9

Deathmaster: I meant shader. The texture shader (aside from the terrain shader)

Here’s my script. It is in shaderlist.txt (It has to be for the terrain to even display)

// mars.shader

textures/mars/terrain_base
{
nopicmips
q3map_lightmapaxis z
q3map_lightmapmergable
q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
}

textures/mars/terrain_0
{
q3map_baseshader textures/mars/terrain_base
qer_editorimage textures/mars/mars_dirt_01.tga
surfaceparm landmine
surfaceparm gravelsteps
{
map textures/mars/mars_dirt_01.tga
tcMod scale 12.25 12.25
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
}
}

textures/mars/terrain_1
{
q3map_baseshader textures/mars/terrain_base
qer_editorimage textures/mars/mars_dirt_03.tga
surfaceparm landmine
surfaceparm gravelsteps
{
map textures/mars/mars_dirt_03.tga
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
}
}

textures/mars/terrain_2
{
q3map_baseshader textures/mars/terrain_base
qer_editorimage textures/mars/mars_dirt_02.tga
surfaceparm landmine
surfaceparm gravelsteps
{
map textures/mars/mars_dirt_02.tga
tcMod scale 2.500 2.500
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
}
}

textures/mars/terrain_0to1
{
q3map_baseshader textures/mars/terrain_base
qer_editorimage textures/mars/mars_dirt_01.tga
surfaceparm landmine
surfaceparm gravelsteps
{
map textures/mars/mars_dirt_01.tga
tcMod scale 17.25 17.25
}
{
map textures/mars/mars_dirt_03.tga
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
alphaGen vertex
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
}
}

textures/mars/terrain_0to2
{
q3map_baseshader textures/mars/terrain_base
qer_editorimage textures/mars/mars_dirt_01.tga
surfaceparm landmine
surfaceparm gravelsteps
{
map textures/mars/mars_dirt_01.tga
tcMod scale 17.25 17.25
}
{
map textures/mars/mars_dirt_02.tga
tcMod scale 2.500 2.500
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
alphaGen vertex
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
}
}

textures/mars/terrain_1to2
{
q3map_baseshader textures/mars/terrain_base
qer_editorimage textures/mars/mars_dirt_03.tga
surfaceparm landmine
surfaceparm gravelsteps
{
map textures/mars/mars_dirt_03.tga
}
{
map textures/mars/mars_dirt_02.tga
tcMod scale 2.500 2.500
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
alphaGen vertex
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
}
}

… So it looks like I’ve got the general idea and I’m not missing a whole step here, but does the fact that it’s not included in the “base” part matter?


(Victorianetza) #10

it does not work… i added the landmine and gravel, and it still does not work … whatever, there wont be any mining in my map… :smiley:


(Chruker) #11

Victorianetza:
Do you have a tracemap for your map?

If you do try move it so the game can’t find it and see if that helps.

I was reading about them in the LDR and the alpha channel of the tracemap indicates ‘Map brushwork present “yes/no” mask. (Physical map space)’ I don’t know exactly what that means, but I’m thinking that even if the shader has the landmine parameter, the corresponding pixel in the tracemaps alpha channel should be white.

Ohh ohh, just got thinking: Have you recompiled the map after you changed the shader? If yes, have you tried making a raw compile? ‘raw’ meaning there isn’t a bsp file present.


(Chruker) #12

This is something from the dawn of time: http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&p=20085#20085

Read the post by sock and especially the one by Drakir after it.

[Edit] Just called sock for spock :wink:


(Victorianetza) #13
  1. i have a tracemap
  2. i dont make a raw compile…

hm… everything seems similar in my our map’s shaders, but the mines do not show here :stuck_out_tongue:


(Chruker) #14

Tracemap, ok.

Compiling: Did you just compile the map and tested? The landmine parameter has to be baked into the map, and that is done when you compile.


(DeAtHmAsTeR) #15

i dont think tracemap has anything to do with surfaceparms? isnt that just for Air Strikes e.t.c?

Read the post Chruker linked to, it’s where i found out how to do surface parms aswell

Btw - if your thinking that your not getting many posts it’s because the topic has been covered and solved many times.


(Jizaboz) #16

So um, can some one clarify… does the shader in my last post look correct? If so, I’ll post my shader file for the textures used in the terrain. Perhaps that’s the problem?


(Jizaboz) #17

Well, I hate to bump this ancient thread once again; about something many people here probably didn’t have a problem with and don’t care about… but here we go. The surfaceparm landmines and surfaceparm gravelsteps have been added to every part of BOTH my texture scripts AND the terrain scripts. (or SHADERs, for those who think I’m playing with the multiplayer script) I’ve set maxs and mins in worldspawn, but there is no real command map yet. Below are the exact copies of the scripts AFTER I compiled my last test. Someone, PLZ… tell me what I’m missing here or what I screwed up. The more I look at tutorials… the more frustrated I am because I see nothing wrong. Oh yeah, and I have version 2.5.12 of the compiler. Since I’ve been in situations like this before with developing stuff for RTCW, I figure it’s either one of the following stupid problems:

  1. I’ve missed a step with this COMPLETLY that needs to be done to make mines work.
  2. I screwed up my scripts/shaders (look below for that one) with something stupid.
  3. The compiler version just happens to be one that doesn’t do mines right.

Terrain shader:

// mars.shader

textures/mars/terrain_base
{
nopicmips
q3map_lightmapaxis z
q3map_lightmapmergable
q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
surfaceparm landmine
surfaceparm gravelsteps
}

textures/mars/terrain_0
{
q3map_baseshader textures/mars/terrain_base
qer_editorimage textures/mars/mars_dirt_01.tga
surfaceparm landmine
surfaceparm gravelsteps
{
map textures/mars/mars_dirt_01.tga
tcMod scale 12.25 12.25
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
}
}

textures/mars/terrain_1
{
q3map_baseshader textures/mars/terrain_base
qer_editorimage textures/mars/mars_dirt_03.tga
surfaceparm landmine
surfaceparm gravelsteps
{
map textures/mars/mars_dirt_03.tga
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
}
}

textures/mars/terrain_2
{
q3map_baseshader textures/mars/terrain_base
qer_editorimage textures/mars/mars_dirt_02.tga
surfaceparm landmine
surfaceparm gravelsteps
{
map textures/mars/mars_dirt_02.tga
tcMod scale 2.500 2.500
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
}
}

textures/mars/terrain_0to1
{
q3map_baseshader textures/mars/terrain_base
qer_editorimage textures/mars/mars_dirt_01.tga
surfaceparm landmine
surfaceparm gravelsteps
{
map textures/mars/mars_dirt_01.tga
tcMod scale 17.25 17.25
}
{
map textures/mars/mars_dirt_03.tga
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
alphaGen vertex
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
}
}

textures/mars/terrain_0to2
{
q3map_baseshader textures/mars/terrain_base
qer_editorimage textures/mars/mars_dirt_01.tga
surfaceparm landmine
surfaceparm gravelsteps
{
map textures/mars/mars_dirt_01.tga
tcMod scale 17.25 17.25
}
{
map textures/mars/mars_dirt_02.tga
tcMod scale 2.500 2.500
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
alphaGen vertex
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
}
}

textures/mars/terrain_1to2
{
q3map_baseshader textures/mars/terrain_base
qer_editorimage textures/mars/mars_dirt_03.tga
surfaceparm landmine
surfaceparm gravelsteps
{
map textures/mars/mars_dirt_03.tga
}
{
map textures/mars/mars_dirt_02.tga
tcMod scale 2.500 2.500
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
alphaGen vertex
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
}
}

The texture shader, for all custom textures used in the terrain:

// mars_surface.shader

textures/mars/mars_dirt_01
{

  qer_editorimage textures/mars/mars_dirt_01.tga
  surfaceparm gravelsteps 
  surfaceparm playerclip
  surfaceparm landmine
 
  	
  implicitMap -
  {
        textures/mars/mars_dirt_01.tga
  } 

}

textures/mars/mars_dirt_02
{

  qer_editorimage textures/mars/mars_dirt_02.tga
  surfaceparm gravelsteps 
  surfaceparm playerclip
  surfaceparm landmine
  implicitMap -
  {
        textures/mars/mars_dirt_02.tga
  } 

}

textures/mars/mars_dirt_03
{

  qer_editorimage textures/mars/mars_dirt_03.tga
  surfaceparm gravelsteps 
  surfaceparm playerclip
  surfaceparm landmine
  implicitMap -
  {
        textures/mars/mars_dirt_03.tga
  } 

}

OK, so there you have it. Once again, I’m very sorry to continue this outdated subject, but I and many others who visit SD seem to have severe problems understanding the minimal requirements for getting landmines to work over an entire custom terrain with all custom textures. I really wish I had more time to mess around with things and compile it over and over to see if it works, but I don’t with my killer work schedule. Someone plz cut the BS here…


(Chruker) #18

After you modified the shader did you do a recompile of the map? If not, then do it. The landmine parameter is one of those that require the map to be recompiled.


(Jizaboz) #19

Sorry to be a smart arse but… OF COURSE I re-compiled!!! hehe
So what’s up? Anyone know what’s wrong with it? I have no tracemap so that can’t be it.


(MadJack) #20

It’s probably not that but make sure the map uses that shader file… I"ve just had a similar problem and I found out that was the case. That’s what happen with file numbering. I was editing the wrong shader file … So you can imagine…

What you can try is to use a different ivector and see if that changes anything. If it doesn’t, then that might be the problem. If not, I’m stumped.