New on-screen scoreboard for ctf maps.


(RayBan) #1

I have created an on-screen scoreboard that sits in the lower areas of the standard compass.
as of right now, it can go from 0 to 8 for either team, even though it could go a lot
higher depending on how much effort a map maker wants to put into the scripting and
adding of new shaders/textures for it.

it can be a pain to setup, but is easily understood. it uses remapshader/flush to ajust
the scores. i will post a test map of it in use when i finish some details for it.

here’s a screen of how it looks ingame.

EDIT: small 4 flag ctf map called ctf_scoreboard1, the map is in the pk3 also to see how
to setup a similar ctf map.
http://rapidshare.de/files/33417899/ctf_scoreboard1.pk3.html


(Roeltje) #2

Inspired by my scoreboard? :slight_smile:


(RayBan) #3

actually… havent seen it… have a link to a post?


(iwound) #4

Best idea since sliced bread . good work.


(RayBan) #5

@Roeltje
i just downloaded and tried your map out, it looks pretty good… i like the way you have the obj icon changed to a flag.
i see your remapping textures, i havent tried that yet… im going to give it a shot and see how that works.


(Roeltje) #6

Okay nice :slight_smile: good luck :slight_smile:


(Flippy) #7

are these commandmap_markers?
will they work on ALL command maps if you have multiple command maps?
if so you’re my hero
:clap:

probably not though :frowning:

EDIT oh i just realised to remapshader the whole compass… cool, that might work :smiley:


(RayBan) #8

i tried to remap a texture, but it wont remap in a stage, and thats whats needed for the compass scoreboard, so it has to remain a longwinded
approach, although… its not really that long and it does the job for an on-screen scoreboard.


(Flippy) #9

hmm i didnt understand that :stuck_out_tongue: (was it aimed at me?)

anyway, i decided to edit this to use with my DOM (double domination map). I want it to show the score (0 to 2) AND the state of both point A and B (blank, red or blue).

I didnt realise how much i had to change for this to work but im pushing on with it :stuck_out_tongue:

ofcourse i needed to create the extra textures for the A and B places (upper right and left corners) and i needed to rewrite the whole shader file… (you need all combinations with the score AND the domination points… lol, my shader is long :P)
and now im working to edit the script

ofcourse its not very different to adjust the score, as both A and B will go into blank when a point has been scored… but when A or B is captured i need to go to a hell of alot of trouble to see which score it is atm and which score to draw…

anyway… i hope its ok that i use your idea for this?


(RayBan) #10

yes, run with it. im hoping ppl can get some use out of it. i’ll be using something like it for my baserace map to keep track of how many crates left to capture.


(Roeltje) #11

‘your’ baserace map? :stuck_out_tongue: u gonna make a new one? or edit the existing?


(Flippy) #12

no roeltje, he’s working on another map that resembles baserace (but is different)

anyway… this kind of scripting makes you wish ET mapscripting a painfull death…

it would have been done in like 5 mins if you could do

if (a_state == blue ; b_state == red ; ax_score == 1 ; al_score == 0) {remapshader blabla}

but no… the most common thing in almost all languages (if, then etc) is not possible in ET :clap:


(Roeltje) #13

yup… and we all hate that :stuck_out_tongue:


(Jaquboss) #14

very nice design


(Flippy) #15

FFS! :angry:

i just finally finished my script but now the map doesn’t load anymore…:

G_FindConfigStringIndex: overflow

i don’t know what it means (searching found nothing) but i guess it has to do with having about 300 “trigger_if_equal” thingies :stuck_out_tongue:

This is what i found on google:


00062 G_FindConfigstringIndex
00063 
00064 ================
00065 */
00066 static int G_FindConfigstringIndex( const char *name, int start, int max, qboolean create ) {
00067         int             i;
00068         char    s[MAX_STRING_CHARS];
00069 
00070         if ( !name || !name[0] ) {
00071                 return 0;
00072         }
00073 
00074         for ( i=1 ; i<max ; i++ ) {
00075                 trap_GetConfigstring( start + i, s, sizeof( s ) );
00076                 if ( !s[0] ) {
00077                         break;
00078                 }
00079                 if ( !strcmp( s, name ) ) {
00080                         return i;
00081                 }
00082         }
00083 
00084         if ( !create ) {
00085                 return 0;
00086         }
00087 
00088         if ( i == max ) {
00089                 G_Error( "G_FindConfigstringIndex: overflow" );
00090         }
00091 
00092         trap_SetConfigstring( start + i, name );
00093 
00094         return i;
00095 }

So it has something to do with MAX_STRING_CHARS ?

I found that MAX_STRING_CHARS = 1024

but i have no idea what max_string_chars is…


(Flippy) #16

and just for those interested, here’s my script:

http://www.fragland.org/nick/dom_script.txt


(nUllSkillZ) #17

How often do you remap a shader?


(Flippy) #18

ermm… i havent counted it in detail but i guess something like 120 times :smiley:

i do remember reading you couldn’t do more than 16 remapshaders, but rayban’s map uses 26 remapshaders aswell… ?


(kamikazee) #19

That is false information.
It doesn’t matter how many times you call the remapshader statement, what matters is how much different source shaders you’re modifying.

ETPro lowers this even to 14 as it uses 2 source shaders for the HUD.


(Flippy) #20

and source shaders… are those the ones you change or the ones you change to ?

if its the latter, there are “a few” to much… (about 60 i guess lol :\ )

im trying to fix this problem… but i dont think its possible :frowning:

instead of having only the score things, i have also the A and B state… they are all in the same shader so you have to have one shader for each combination possible… which adds up quickly

so is there any way of making the compass_astate-red_bstate_blue (for example) independend of the compass_al2_ax1 shader?