PDA

View Full Version : Scoreboard images minimize



Loveboy
26th January 2014, 18:53
Hello Guys!
I want to minimize two flags on the scoreboard (X size)

I don't know how to do this, one of the script from cod2 set the size of the flags.

On the script _scoreboard.gsc:



init()
{
precacheShader("mpflag_spectator");

switch(game["allies"])
{
case "american":
precacheShader("mpflag_american");
setcvar("g_TeamName_Allies", &"MPUI_AMERICAN");
setcvar("g_TeamColor_Allies", ".25 .75 .25");
setcvar("g_ScoresBanner_Allies", "mpflag_american");
break;

case "british":
precacheShader("mpflag_british");
setcvar("g_TeamName_Allies", &"MPUI_BRITISH");
setcvar("g_TeamColor_Allies", ".25 .25 .75");
setcvar("g_ScoresBanner_Allies", "mpflag_british");
break;

default:
assert(game["allies"] == "russian");
precacheShader("mpflag_russian");
setcvar("g_TeamName_Allies", &"MPUI_RUSSIAN");
setcvar("g_TeamColor_Allies", ".75 .25 .25");
setcvar("g_ScoresBanner_Allies", "mpflag_russian");
break;
}

assert(game["axis"] == "german");
precacheShader("mpflag_german");
setcvar("g_TeamName_Axis", &"MPUI_GERMAN");
setcvar("g_TeamColor_Axis", ".6 .6 .6");
setcvar("g_ScoresBanner_Axis", "mpflag_german");
}


you can see there as example setcvar("g_ScoresBanner_Allies", "mpflag_russian");

I don't know how to change the size of the flag, here is a picture

615

Tally
26th January 2014, 19:17
Most of the scoreboard is hard coded in the engine. I don't think you can change the size value for the dvar g_ScoresBanner_[team]. If you search the game for all dvars with the name "scoresBanner" none relate to size (just teams - allies, axis, spectator, and none). To me that means the dvar is not accessable via script.

What I would do with this is remove the default score banner altogether, and create my own hud element, and position it where you want it to be relative to the rest of the scoreboard. Just call the hud element as a level element in the gametype files on both endRound() and endMap() as soon as the scoreboard pops up.

FYI - the eXtreme+ mod does away with the default scoreboard altogether and creates its own one, to show stuff like who was the best player, who had the highest rank, etc. If the default scoreboard wont let you mod it how you want it to be modded, I would personally go down that route and make my own. It's a fair bit of work, but it shouldn't take longer than a day or 2.

Loveboy
26th January 2014, 19:40
Thank you Tally, before I want to make my own scoreboard, I try to remake the images. I saw the default images of the flags, and I try to scale the images to the size of default flags. I saw that the default flag images have the background black, so the images are not full only with the flag.

It's look so:
616

So on the black color on this picture is alpah (invisible).

PatmanSan
26th January 2014, 19:53
Maybe cg_scoreboardBannerHeight can help

Loveboy
26th January 2014, 20:01
No sorry, I tried this already too :)

(so this things I already tried)


cg_scoreboardBannerHeight
cg_scoreboardItemHeight
cg_scoreboardScrollStep

Tally
26th January 2014, 20:04
That's incorrect. You are confusing the mod's end-of-game statsboard and the game's scoreboard. The mod does not touch the scoreboard at all.
It would be great if we could add a column to the scoreboard, but - as you said - it's hard coded.

Actually, I am not confusing anything. I never said eXtreme+ touches the default scoreboard. I said it creates its own one. Which you just confirmed.

PatmanSan
26th January 2014, 20:09
cg_scoreboardBannerHeight works fine, but you have to set it on the players (setclientcvar); not on server (setcvar).

Tally
26th January 2014, 20:10
No sorry, I tried this already too :)

(so this things I already tried)


cg_scoreboardBannerHeight
cg_scoreboardItemHeight
cg_scoreboardScrollStep


I played around with the dvar and gave it its max size, which is 100. See the attachment for an example of what it does to the banner image.

NB: it is a client dvar, so you will have to force it on all players.

Personally, I don't like what it does to the layout of the scoreboard. It looks ugly. I would go for the hud element placed over the scoreboard. Just set the hud element foreground to "true", and it will overlap the scoreboard background.

Loveboy
26th January 2014, 20:12
You are right PatmanSan, cg_scoreboardBannerHeight does work, but that is not what I want to change. I does change the Height of the score banner (Y size).

Tally
26th January 2014, 20:15
You are right PatmanSan, cg_scoreboardBannerHeight does work, but that is not what I want to change. I does change the Height of the score banner (Y size).

Why don't you give us a mock-up of what you want the images to look like on the scoreboard? Just take a screenshot, and in something like Photoshop CS2 (which is free from Adobe right now - the full version!), overlay your images and save the file as a .JPG. Then, attach the image so we can see it. Then we can advise you how to do it.

Loveboy
27th January 2014, 17:06
My result as I said I make the flag picture in a picture

618