G_FindConfigstringIndex


(CoD4Fun) #1

hi,

i have this problem of limits of shaders when i use the remapshader command. have done a search and it lead me to a thread here in this forum, but it was not very helpful, no real answers in there. it only gave me a feeling of not beeing alone =D

looking at the code makes me desperate also. because i am not that advanced to understand it.

/*
================
G_FindConfigstringIndex

================
*/
int G_FindConfigstringIndex( const char *name, int start, int max, qboolean create ) {
	int		i;
	char	s[MAX_STRING_CHARS];

	if ( !name || !name[0] ) {
		return 0;
	}

	for ( i=1 ; i<max ; i++ ) {
		trap_GetConfigstring( start + i, s, sizeof( s ) );
		if ( !s[0] ) {
			break;
		}
		if ( !strcmp( s, name ) ) {
			return i;
		}
	}

	if ( !create ) {
		return 0;
	}

	if ( i == max ) {
		G_Error( "G_FindConfigstringIndex: overflow" );
	}

	trap_SetConfigstring( start + i, name );

	return i;
}

marked in red is what gives me that error :frowning:

so i have counted the amount of shaders in my map that i wanted to remap and everything works fine until i try to remap shader nr 27. so having 26 different shaders to be remapped seems to be the limit.

so i thought maybe there is a workaround, as it seems this limit is hardcoded. i can remember reading a tutorial about another technique of remashadering, ill try that out today and tell you if it helps.

only wanted to see if meanwhile someone solved that problem in a creative way. would be cool to share some experience here.

greetz

cod4fun


(CoD4Fun) #2

ok i just found this tutorial and it seems to be a workaround. the problem is: it doesnt seem to work for et.

http://q3map2.everyonelookbusy.net/shader_manual/apA.htm

http://www.map-craft.com/modules.php?name=DLtoTUT&op=TMCgetit&lid=313

did anybody ever got this to work ? seems those keys do not work in et.

and seemingly i use the word seem to often :smiley:


(CoD4Fun) #3

http://www.splashdamage.com/forums/showthread.php?t=4692&highlight=remapshader

read what tomtom says in there. im having the exact problem. there are two limits with the remapshader command. one is that 128 limit every flush, and the other one is that 32 different shaders to be remapped. this error probably occurs while the mapscript is loaded and as soon as it comes to a remapshader command, remapshadering the 32th command it will give you an error. thats my problem.

  1. a possible workaround is this tutorial:

http://q3map2.everyonelookbusy.net/shader_manual/apA.htm

but i didnt get it to work for et. is there anybody having the ability to modify q3map2 or whatever it depends to make these keys work ? id so appreciate it, as this 32 different shader limit is currently breaking my neck.

  1. explanations: what i found out is that remapping a pic will count as only one remapshader and will be put in somekind of queue. but if i remapshader a shader it will count two. is there any way to let it also count as one ? this would be all i need, as i am not much above that 32 limit.

so using in the mapscript this command

remapshader “path/to/pic” “path/to/pic2”

will count as one, while

remapshader “path/to/shader” “path/to/shader2”

will count as two.

so i am remapping 20 pics in my mapscript. these 20 pics must stay in, as i am realizing somekind of counter. now i have only 12 other remapshader commands for my disposal ASSUMING every shader i want to remap counts as one. so again, how can i get rid of that ? i would somehow need to create a shader which only counts as one.

  1. shaderworkaround: about creating that shader i thought about something like this:

shader
{

    basepic

add pic 1 on the layer

add pic 2 on the layer

}

thats pretty much how the shaders i use are looking. so the workaround i am searching for is not remapping that shader (but remapping the pics inside). this will count as one only. any shader experts here ?

  1. using other games and their possibilities on workaround 1): is there also another way of solving this by using other games ? like porting the map to another game, making the targetshadername and targetshadernewname method like explained in method 1 available, and then somehow portin it back ? never say never, but lol this f***s me so up i even want to rape it now :smiley:

  2. hack :confused: i would even go so far to use a hardcoded hack supplied in that mapfile, going into that memory space himself and raping that 32 shader number -.- pls if you know how its possible i will use it to make the count only go up to 64 different shaders, more i really dont need.

really desperate :frowning:


(CoD4Fun) #4

http://www.splashdamage.com/forums/showthread.php?t=4692&highlight=remapshader

read what tomtom says in there. im having the exact problem. there are two limits with the remapshader command. one is that 128 limit every flush, and the other one is that 32 different shaders to be remapped. this error probably occurs while the mapscript is loaded and as soon as it comes to a remapshader command, remapshadering the 32th command will give you an error. thats my problem.

  1. a possible workaround is this tutorial:

http://q3map2.everyonelookbusy.net/shader_manual/apA.htm

but i didnt get it to work for et. is there anybody having the ability to modify q3map2 or whatever depends to make these keys work ? id so appreciate it!!!

  1. explanations: what i found out is that remapping a pic will count as only one remapshader and will be put in somekind of queue, but if i remapshader a whole shader instead it will count as two, not as one like remapping a pic. so is there any way to let it only count as one ? the problem is: im not far above that 32 limit (reaching a number of 38). making a shader count as one would be a solution.

so using in the mapscript this command

remapshader "path/to/pic" "path/to/pic2"

will count as one, while

remapshader "path/to/shader" "path/to/shader2"

will count as two.

so i am remapping 20 pics in my mapscript. these 20 pics must stay in, as i am realizing somekind of counter. now i have only 12 other remapshader commands for my disposal ASSUMING every shader i want to remap counts as one. so again, how can i get rid of that ? i would somehow need to create a shader which only counts as one.

  1. shaderworkaround: about creating that shader i thought about something like this:

shader
{

    basepic

add pic 1 on the layer

add pic 2 on the layer

}

thats pretty much how the shaders i use are looking. so the workaround i am searching for is not remapping that shader (but remapping the pics inside). this will count as one only. any shader experts here ?

  1. using other games and their possibilities on workaround 1): is there also another way of solving this by using other games ? like porting the map to another game, making the targetshadername and targetshadernewname method like explained in method 1 available, and then somehow portin it back ? never say never, but lol this f***s me so up i even want to rape it now :smiley:

  2. creating a hack :confused: i would even go so far to use a hardcoded hack supplied in that mapfile, going into that memory space himself and raping that 32 shader number -.- pls if you know how its possible i will use it to make the count only go up to 64 different shaders, more i really dont need.

really desperate :frowning:


(ailmanki) #5

I would try making a big texture… e.g.

256x1024, in that texture you can have 4 different ones… each 256x256 with some creativity you can then have one remapshader to replace 4 textures…
another way would be to rotate brushes, and just use their 6 sides to change texture…


(CoD4Fun) #6

i am completely remapping the hud, thats the problem :frowning:

its raybans scoreboard system if you wanna know exactly. i am remapping

remapshader "gfx/2d/compass" "path/to/shader"

i first wanted to have 5 minutes, then i hit that limit and now want to have 3 minutes. i somehow have to reach that goal, otherwise i simply will leave that part of remapshadering.

shaders i use for remapping 3 minutes in the compass:

gfx/2d/compass_al2ax2
{
	nocompress
	nomipmaps
	nopicmip
	{
		map gfx/2d/scoreboard/compass.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}	
	{
		map gfx/2d/scoreboard/allies2.jpg
		blendfunc add
	}
	{
		map gfx/2d/scoreboard/axis2.jpg
		blendfunc add
	}
}
gfx/2d/compass_al2ax1
{
	nocompress
	nomipmaps
	nopicmip
	{
		map gfx/2d/scoreboard/compass.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}	
	{
		map gfx/2d/scoreboard/allies2.jpg
		blendfunc add
	}
	{
		map gfx/2d/scoreboard/axis1.jpg
		blendfunc add
	}
}
gfx/2d/compass_al2ax0
{
	nocompress
	nomipmaps
	nopicmip
	{
		map gfx/2d/scoreboard/compass.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}	
	{
		map gfx/2d/scoreboard/allies2.jpg
		blendfunc add
	}
	{
		map gfx/2d/scoreboard/axis0.jpg
		blendfunc add
	}
}
gfx/2d/compass_al1ax2
{
	nocompress
	nomipmaps
	nopicmip
	{
		map gfx/2d/scoreboard/compass.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}	
	{
		map gfx/2d/scoreboard/allies1.jpg
		blendfunc add
	}
	{
		map gfx/2d/scoreboard/axis2.jpg
		blendfunc add
	}
}
gfx/2d/compass_al1ax1
{
	nocompress
	nomipmaps
	nopicmip
	{
		map gfx/2d/scoreboard/compass.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}	
	{
		map gfx/2d/scoreboard/allies1.jpg
		blendfunc add
	}
	{
		map gfx/2d/scoreboard/axis1.jpg
		blendfunc add
	}
}
gfx/2d/compass_al1ax0
{
	nocompress
	nomipmaps
	nopicmip
	{
		map gfx/2d/scoreboard/compass.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}	
	{
		map gfx/2d/scoreboard/allies1.jpg
		blendfunc add
	}
	{
		map gfx/2d/scoreboard/axis0.jpg
		blendfunc add
	}
}
gfx/2d/compass_al0ax2
{
	nocompress
	nomipmaps
	nopicmip
	{
		map gfx/2d/scoreboard/compass.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}	
	{
		map gfx/2d/scoreboard/allies0.jpg
		blendfunc add
	}
	{
		map gfx/2d/scoreboard/axis2.jpg
		blendfunc add
	}
}
gfx/2d/compass_al0ax1
{
	nocompress
	nomipmaps
	nopicmip
	{
		map gfx/2d/scoreboard/compass.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}	
	{
		map gfx/2d/scoreboard/allies0.jpg
		blendfunc add
	}
	{
		map gfx/2d/scoreboard/axis1.jpg
		blendfunc add
	}
}
gfx/2d/compass_al0ax0
{
	nocompress
	nomipmaps
	nopicmip
	{
		map gfx/2d/scoreboard/compass.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}	
	{
		map gfx/2d/scoreboard/allies0.jpg
		blendfunc add
	}
	{
		map gfx/2d/scoreboard/axis0.jpg
		blendfunc add
	}
}

the last three shaders i cant remap, because i hit that limit in that moment i try to remap them. so i have 20 + 9 shaders in my map. the last 9 count as two, so i am hitting exactly 38. now i need to reduce it. it gotta somehow work :confused:

take a look again at that shaders. if you have any idea on to achieve that goal you are my hero of tapirs :smiley: :stroggtapir:

i also have another shader method in mind, but i somehow cant find the right commands in the shadermanual for them. i could imagine a shader like this.


gfx/2d/compass_al0ax0
{
	nocompress
	nomipmaps
	nopicmip
	{
		map gfx/2d/scoreboard/compass.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}	
	
        implicit shader 1 with pic allies

        implicit shader 2 with pic axis
}

i also tried that on my own of course, but remapping that inner shaders, once i remapped the outer shaders simply has no affect.

thx for reading this.


(ailmanki) #7

ehrm … I wonder … I thought you can remap the same same shader over and over again as often you like… But you cannot remap more then a specific amount of different shaders.

so you should be able to remap the compass as often as you like… maybe you forgot to call remapshaderflush or something?
maybe I am wrong or missunderstood something… :confused:


(stealth6) #8

If you are just making a timer it’s actually do-able I think. Well the only thing I am not sure about is if you can layer images?
If you can then you can do this:

  • 10 images that signify the seconds 0-9
  • 6 images that signify the seconds 00-50
  • A few images to signify the minutes

Then you use the same kind of system used in the 2 prefabs I released (TDM / CTF)
This means you display 3 images on top of eachother

Minutes / seconds (tens) / seconds (ones)

Then if you know anything about programming it’s like 3 for loops when you have achieved 0-9 in the seconds (ones), you add 1 to the seconds (tens) untill that reaches 5 (59 seconds)
Then you add 1 to the minutes.

This way you only need 16 remaps for the seconds, and if you have 5 minutes 21 remaps total.
If you want to count down then you just do it backwards.
If you want to see an example (kinda) here are the prefabs:
TDM: http://www.wolfmap.de/details.php?file_id=3492
CTF: http://www.wolfmap.de/details.php?file_id=3489


(CoD4Fun) #9

sorry for the long text :slight_smile:

[QUOTE=ailmanki;226355]ehrm … I wonder … I thought you can remap the same same shader over and over again as often you like… But you cannot remap more then a specific amount of different shaders.

so you should be able to remap the compass as often as you like… maybe you forgot to call remapshaderflush or something?
maybe I am wrong or missunderstood something… :confused:[/QUOTE]

or maybe i misunderstood something. for my understanding what you say is all true. you can remap as often as you like, as long as you flush to not hit that 128 limit, and as long as you dont have 32 different shaders.

in my map i remap the compass as this:

remapshader "path/to/compass" "path/to/shader1"

this goes all the way down until i hit that limit, remember, i already have 20 other remapshader commands in that buffer:

remapshader "path/to/compass" "path/to/shader1"
remapshader "path/to/compass" "path/to/shader2"
remapshader "path/to/compass" "path/to/shader3"
remapshader "path/to/compass" "path/to/shader4"
remapshader "path/to/compass" "path/to/shader5"
remapshader "path/to/compass" "path/to/shader6"

strangely now after i have reworked some pics in paintshop the overflow now gets reached by hitting shader6.

very strange. perhaps can someone explain me that buffer stuff and how it gets loaded and with what it gets loaded to hit that limit. the very very strange thing and what i dont understand is that when i remap the compass it will take two remapshaders away from my disposal. so having only that compass to remap i would hit that limit with 16 different shaders. tomtom already tried to explain that buffer stuff in this other thread, but i did not get smart from it :frowning:

remapping a single picture, .jpg or .tga, only tried .jpg but think its the same with .tga, will take away only 1 remapshader from me. this is what i dont understand about that buffer. it seems remapping shaders with more than one layer or pictures with an alpha channel will fíll that buffer up with more than 1. so how is that buffer working ? that compass .tga i am remapping, which is located in gfx/2d, i think that got an alpha channel, but i have no clue on how to create one nor do i see or somehow can judge if it got one. i am only judging from the shader. and in there it uses a command which is based on an alpha channel i think, so i think it exists. so will remapshadering that compass always take me away two ? i also tried i workaround on this if its true, see the reply to stealth.

would be cool actually if someone from sd could reply to that buffer stuff. how does it work ? do alpha channels have an influence ?

[QUOTE=stealth6;226374]If you are just making a timer it’s actually do-able I think. Well the only thing I am not sure about is if you can layer images?
If you can then you can do this:

  • 10 images that signify the seconds 0-9
  • 6 images that signify the seconds 00-50
  • A few images to signify the minutes

Then you use the same kind of system used in the 2 prefabs I released (TDM / CTF)
This means you display 3 images on top of eachother

Minutes / seconds (tens) / seconds (ones)

Then if you know anything about programming it’s like 3 for loops when you have achieved 0-9 in the seconds (ones), you add 1 to the seconds (tens) untill that reaches 5 (59 seconds)
Then you add 1 to the minutes.

This way you only need 16 remaps for the seconds, and if you have 5 minutes 21 remaps total.
If you want to count down then you just do it backwards.
If you want to see an example (kinda) here are the prefabs:
TDM: http://www.wolfmap.de/details.php?file_id=3492
CTF: http://www.wolfmap.de/details.php?file_id=3489[/QUOTE]

i took a look at your prefabs and i tried to do everything the same as you, but i fear that remapping the compass will always give me a count of two remapshaders and therefore reaching that 32 limit 2 times faster. somehow i really miss something i got the feeling. i tried a lot actually. i repainted in paintshopt the compass pics i want to remap, i saved them even in jpg, before trying it in tga…i also used your shader…i also rempashadered the compass first, with lets say shader x, and then tried to remap shader x with another shader, hoping that this somehow will give me a count of 1 additional different shader only. but it had no affect.

about layer. actually i am using layers above, well rayban uses them. take a look again at his shaders or do you mean something else. actually every shader in there gets puzzled out of 3 pics which all lay on top of each other. if you can tell me a method to remap the layers then my problem is probably solved. thats what i described actually in the shaderworkaround in one of my posts above. if i could create a shader inside a shader, and remap that inner shader, it would somehow be a possible solution. can some shader expert write me such a shader ?

and again sorry for that long text.

greetz

cod


(CoD4Fun) #10

by the way:

game_manager
{
	spawn
	{
		wait 200
		wm_axis_respawntime 1
		wm_allied_respawntime 1
		wm_set_round_timelimit 15
		wm_number_of_objectives 	2
		wm_set_defending_team 		0
						
		// If the round timer expires, the Axis have won, so set the current winning team
		// Set the round winner:  0 == AXIS, 1 == ALLIED
		wm_setwinner 0

		wait 500

		// Objectives
		// 1: Allied Flag
		// 2: Axis Flag

		wm_objective_status 1 0 0
		wm_objective_status 1 1 0
		wm_objective_status 2 0 0
		wm_objective_status 2 1 0


		//SCOREBOARD

		//Set up scoreboard on AL: 00 / AX: 00

		remapshader "textures/scoreboard/alscore0" "textures/scoreboard/alscore0"
		remapshader "textures/scoreboard/alscore00" "textures/scoreboard/alscore00"
		remapshader "textures/scoreboard/axscore0" "textures/scoreboard/axscore0"
		remapshader "textures/scoreboard/axscore00" "textures/scoreboard/axscore00"
		remapshaderflush
.
.
.

why do you use remapshader here ? remapping the shaders to themselves ? whats the meaning of it ?


(stealth6) #11

maybe idf you post a zip with you’re images here I can take a look.
And the remapping a shader to itself was just to initialize it. meaning let’s say for some reason it had screwed up, when the map restarts it will reset itself to 00 - 00


(CoD4Fun) #12

ok here is a file, including all what is neccessary: http://www.file-upload.net/download-2517472/test.pk3.html

that limit is a mystery for me. sometimes it stops at 28 shaders, sometimes at 24, but why ? it seems it loads also other stuff aswell. where are the coders of splash damage when i need them :frowning:

here the mapscript included in that file:

game_manager
{

	spawn
    	{
        	wait 500    
       
		wm_allied_respawntime 1
        	wm_axis_respawntime 1

        	wm_setwinner -1
   
        	wm_set_round_timelimit 10000
		
		remapshader "gfx/hud/ic_stamina" "textures/s_allies9"
		remapshader "gfx/hud/ic_stamina" "textures/s_allies8"
		remapshader "gfx/hud/ic_stamina" "textures/s_allies7"
		remapshader "gfx/hud/ic_stamina" "textures/s_allies6"
		remapshader "gfx/hud/ic_stamina" "textures/s_allies5"
		remapshader "gfx/hud/ic_stamina" "textures/s_allies4"
		remapshader "gfx/hud/ic_stamina" "textures/s_allies3"
		remapshader "gfx/hud/ic_stamina" "textures/s_allies2"
		remapshader "gfx/hud/ic_stamina" "textures/s_allies1"
		remapshader "gfx/hud/ic_stamina" "textures/s_allies0"

		remapshader "gfx/hud/ic_health" "textures/s_axis9"
		remapshader "gfx/hud/ic_health" "textures/s_axis8"
		remapshader "gfx/hud/ic_health" "textures/s_axis7"
		remapshader "gfx/hud/ic_health" "textures/s_axis6"
		remapshader "gfx/hud/ic_health" "textures/s_axis5"
		remapshader "gfx/hud/ic_health" "textures/s_axis4"
		remapshader "gfx/hud/ic_health" "textures/s_axis3"
		remapshader "gfx/hud/ic_health" "textures/s_axis2"
		remapshader "gfx/hud/ic_health" "textures/s_axis1"
		remapshader "gfx/hud/ic_health" "textures/s_axis0"

		remapshader "gfx/2d/compass" "textures/compass_al0ax0"
		remapshader "gfx/2d/compass" "textures/compass_al0ax1"
		remapshader "gfx/2d/compass" "textures/compass_al0ax2"
		remapshader "gfx/2d/compass" "textures/compass_al0ax3"
		remapshader "gfx/2d/compass" "textures/compass_al0ax4"

		remapshader "gfx/2d/compass" "textures/compass_al1ax0"
		remapshader "gfx/2d/compass" "textures/compass_al1ax1"
		remapshader "gfx/2d/compass" "textures/compass_al1ax2"
/*
		remapshader "gfx/2d/compass" "textures/compass_al1ax3"
		remapshader "gfx/2d/compass" "textures/compass_al1ax4"

		remapshader "gfx/2d/compass" "textures/compass_al2ax0"
		remapshader "gfx/2d/compass" "textures/compass_al2ax1"
		remapshader "gfx/2d/compass" "textures/compass_al2ax2"
		remapshader "gfx/2d/compass" "textures/compass_al2ax3"
		remapshader "gfx/2d/compass" "textures/compass_al2ax4"

		remapshader "gfx/2d/compass" "textures/compass_al3ax0"
		remapshader "gfx/2d/compass" "textures/compass_al3ax1"
		remapshader "gfx/2d/compass" "textures/compass_al3ax2"
		remapshader "gfx/2d/compass" "textures/compass_al3ax3"
		remapshader "gfx/2d/compass" "textures/compass_al3ax4"

		remapshader "gfx/2d/compass" "textures/compass_al4ax0"
		remapshader "gfx/2d/compass" "textures/compass_al4ax1"
		remapshader "gfx/2d/compass" "textures/compass_al4ax2"
		remapshader "gfx/2d/compass" "textures/compass_al4ax3"
		remapshader "gfx/2d/compass" "textures/compass_al4ax4"

		remapshader "gfx/2d/compass" "textures/compass_al5ax0"
		remapshader "gfx/2d/compass" "textures/compass_al5ax1"
		remapshader "gfx/2d/compass" "textures/compass_al5ax2"
		remapshader "gfx/2d/compass" "textures/compass_al5ax3"
		remapshader "gfx/2d/compass" "textures/compass_al5ax4"

		remapshader "gfx/2d/compass" "textures/compass_al6ax0"
		remapshader "gfx/2d/compass" "textures/compass_al6ax1"
		remapshader "gfx/2d/compass" "textures/compass_al6ax2"
		remapshader "gfx/2d/compass" "textures/compass_al6ax3"
		remapshader "gfx/2d/compass" "textures/compass_al6ax4"

		remapshader "gfx/2d/compass" "textures/compass_al7ax0"
		remapshader "gfx/2d/compass" "textures/compass_al7ax1"
		remapshader "gfx/2d/compass" "textures/compass_al7ax2"
		remapshader "gfx/2d/compass" "textures/compass_al7ax3"
		remapshader "gfx/2d/compass" "textures/compass_al7ax4"


*/
		
		remapshaderflush
    	}
}

for testing purposes i included everything i want to remap in the spawn block. of course i will not do this during game, only for testing.

i have commented out some stuff. as you see i have marked something in red. put that ‘/*’ one line below and it will give you that overflow. if i counted correct i have there only 28 different shaders, i though i can remap 32, as can be seen in the code. :frowning:


(CoD4Fun) #13

ok here is a file, including all what is neccessary: http://www.file-upload.net/download-2517472/test.pk3.html

that limit is a mystery for me. sometimes it stops at 28 shaders, sometimes at 24, but why ? it seems it loads also other stuff aswell. where are the coders of splash damage when i need them :frowning:

here the mapscript included in that file:

game_manager
{

	spawn
    	{
        	wait 500    
       
		wm_allied_respawntime 1
        	wm_axis_respawntime 1

        	wm_setwinner -1
   
        	wm_set_round_timelimit 10000
		
		remapshader "gfx/hud/ic_stamina" "textures/s_allies9"
		remapshader "gfx/hud/ic_stamina" "textures/s_allies8"
		remapshader "gfx/hud/ic_stamina" "textures/s_allies7"
		remapshader "gfx/hud/ic_stamina" "textures/s_allies6"
		remapshader "gfx/hud/ic_stamina" "textures/s_allies5"
		remapshader "gfx/hud/ic_stamina" "textures/s_allies4"
		remapshader "gfx/hud/ic_stamina" "textures/s_allies3"
		remapshader "gfx/hud/ic_stamina" "textures/s_allies2"
		remapshader "gfx/hud/ic_stamina" "textures/s_allies1"
		remapshader "gfx/hud/ic_stamina" "textures/s_allies0"

		remapshader "gfx/hud/ic_health" "textures/s_axis9"
		remapshader "gfx/hud/ic_health" "textures/s_axis8"
		remapshader "gfx/hud/ic_health" "textures/s_axis7"
		remapshader "gfx/hud/ic_health" "textures/s_axis6"
		remapshader "gfx/hud/ic_health" "textures/s_axis5"
		remapshader "gfx/hud/ic_health" "textures/s_axis4"
		remapshader "gfx/hud/ic_health" "textures/s_axis3"
		remapshader "gfx/hud/ic_health" "textures/s_axis2"
		remapshader "gfx/hud/ic_health" "textures/s_axis1"
		remapshader "gfx/hud/ic_health" "textures/s_axis0"

		remapshader "gfx/2d/compass" "textures/compass_al0ax0"
		remapshader "gfx/2d/compass" "textures/compass_al0ax1"
		remapshader "gfx/2d/compass" "textures/compass_al0ax2"
		remapshader "gfx/2d/compass" "textures/compass_al0ax3"
		remapshader "gfx/2d/compass" "textures/compass_al0ax4"

		remapshader "gfx/2d/compass" "textures/compass_al1ax0"
		remapshader "gfx/2d/compass" "textures/compass_al1ax1"
		remapshader "gfx/2d/compass" "textures/compass_al1ax2"
/*
		remapshader "gfx/2d/compass" "textures/compass_al1ax3"
		remapshader "gfx/2d/compass" "textures/compass_al1ax4"

		remapshader "gfx/2d/compass" "textures/compass_al2ax0"
		remapshader "gfx/2d/compass" "textures/compass_al2ax1"
		remapshader "gfx/2d/compass" "textures/compass_al2ax2"
		remapshader "gfx/2d/compass" "textures/compass_al2ax3"
		remapshader "gfx/2d/compass" "textures/compass_al2ax4"

		remapshader "gfx/2d/compass" "textures/compass_al3ax0"
		remapshader "gfx/2d/compass" "textures/compass_al3ax1"
		remapshader "gfx/2d/compass" "textures/compass_al3ax2"
		remapshader "gfx/2d/compass" "textures/compass_al3ax3"
		remapshader "gfx/2d/compass" "textures/compass_al3ax4"

		remapshader "gfx/2d/compass" "textures/compass_al4ax0"
		remapshader "gfx/2d/compass" "textures/compass_al4ax1"
		remapshader "gfx/2d/compass" "textures/compass_al4ax2"
		remapshader "gfx/2d/compass" "textures/compass_al4ax3"
		remapshader "gfx/2d/compass" "textures/compass_al4ax4"

		remapshader "gfx/2d/compass" "textures/compass_al5ax0"
		remapshader "gfx/2d/compass" "textures/compass_al5ax1"
		remapshader "gfx/2d/compass" "textures/compass_al5ax2"
		remapshader "gfx/2d/compass" "textures/compass_al5ax3"
		remapshader "gfx/2d/compass" "textures/compass_al5ax4"

		remapshader "gfx/2d/compass" "textures/compass_al6ax0"
		remapshader "gfx/2d/compass" "textures/compass_al6ax1"
		remapshader "gfx/2d/compass" "textures/compass_al6ax2"
		remapshader "gfx/2d/compass" "textures/compass_al6ax3"
		remapshader "gfx/2d/compass" "textures/compass_al6ax4"

		remapshader "gfx/2d/compass" "textures/compass_al7ax0"
		remapshader "gfx/2d/compass" "textures/compass_al7ax1"
		remapshader "gfx/2d/compass" "textures/compass_al7ax2"
		remapshader "gfx/2d/compass" "textures/compass_al7ax3"
		remapshader "gfx/2d/compass" "textures/compass_al7ax4"


*/
		
		remapshaderflush
    	}
}

for testing purposes i included everything i want to remap in the spawn block. of course i will not do this during game, only for testing.

i have commented out some stuff. as you see i have marked something in red. put that ‘/*’ one line below and it will give you that overflow. if i counted correct i have there only 28 different shaders, i though i can remap 32, as can be seen in the code. :frowning:


(CoD4Fun) #14

ouch slapshimself

i think i know now how the buffer works. it counts every single shader which is appearing in that remapshader command. i thought it would only count the remapshader commands.

this way it makes sense.

but still i need to find a workaround. summarizing all i have written would simply mean that i somehow need to find a way to remap inner shaders, or single layers. something like this (already mentioned that in post above):

shader
{

basepic

inner shader for the allies

inner shader for the axis
}

then if i could remap the inner shaders, i would be able to forfill my goal.

btw: does etpro support more than the 32 shader limit ?

i hope i can somehow implement that timer. other workarounds also welcomed. everything that helps.

greetz

cod

edit: someone ever got that targetshadername targetshadernewname thingy to work ?


(stealth6) #15

well I haven’t had any time yet, but maybe I can explain a possible fix.

When you said you were using RayBans scoreboard I thought you were using a different one since he has released 2 :smiley:

In the old one he had redesigned the compass to have numbers on either side.
His newer version had the implementation as you describe it.
Anyway that explains why it is impossible for you atm :smiley:

The idea I had was that you take the current compass image, you cut out a square at the bottom, or bottom left, whatever suits your fancy.
And then in that square (or rectangle rather) you put the digital time.

Then if you work with layers it’s very do-able I think.