Crediting points for Shanes Bomb

More
20 years 5 months ago #10359 by Second Chance
The 3 numbers in sequence are Red, Green, Blue. The values are from 0.0 to 1.0. The 3 seperate entries must be for different components of the text. Right now you can see the first 3 entries (Blue Team) all have 1.0 in the last number place (Blue), that makes pure Blue. The next 3 entries (Red Team) all have 1.0 in the first number place (Red), making it pure Red. Lower numbers mean darker colors (remove white), higher numbers mean lighter colors (add white). Since both Red and Blue each have their respective values at maximum, what you have to do is add white overall. For Blue Team, increase the Red and Green values evenly to add white to the Blue. For the Red Team, increase the Green and Blue values evenly to add white to the Red. Increasing any of the numbers unevenly will tint the whole thing to that color. So for Blue Team, increasing the Green value more than the Red value will begin to give you a lighter blue-green color like Aqua.

You are now a master of Additive Color Theory, and can command the colors to do your bidding! :)

Good point about using the Red and Blue instead of the SW "team colors." So just follow what I said above and you can keep the Red and Blue and just make them a little lighter. Try something like this:

//set item's colours to blue
GUI.SetWindowStateColours(entry,
0.25, 0.25, 1.0,
0.25, 0.25, 1.0,
0.25, 0.25, 1.0);

// set item's colours to red
GUI.SetWindowStateColours(entry,
1.0, 0.25, 0.25,
1.0, 0.25, 0.25,
1.0, 0.25, 0.25);

0.25 might be way too much (or way too little), but you get the idea.

mailto:second_chance@cox.net
The Ultimate Guide To Modding: I-War 2 - Edge Of Chaos (on hold during SW MP mod)
cartoons.sev.com.au/index.php?catid=4
.

Please Log in or Create an account to join the conversation.

More
20 years 5 months ago #10580 by MajorTom
The final Versions with the red and blue text lightened up a bit:



Oops thats in German ;)

Here's the same score in english with a different ship in the background

For the imps:



It depends a lot on your own monitor settings how the colors are displayed too.





Iwar2 Multiplayer Fan Site

Please Log in or Create an account to join the conversation.

More
20 years 5 months ago #10599 by Roi Danton
Looks nice, also the difference in the color isn't so obviously.

Well, with Buda5GUI package you don't need to know that detailed about the colors respectivly you needn't to use it.
Buda5GUI supports the Standard 16-colour VGA palette (I made the colours with a pantone palette as pattern), 4 metallic (looks better than the standard) and three additional colours.

Also special hover effects are included.

For more information and download see this thread in this forum .

Also if you want me to update the GUI a little bit in the next version say it to me. I'll try to get this done besides my study and work.

~Buda5 Designer & Scripter
buda5.firstones.com


~Buda5 Designer & Scripter
buda5.firstones.com

Please Log in or Create an account to join the conversation.

More
20 years 5 months ago #10604 by MajorTom

Originally posted by Roi Danton



Also if you want me to update the GUI a little bit in the next version say it to me. I'll try to get this done besides my study and work.


~Buda5 Designer & Scripter
buda5.firstones.com


Well, now that you mention it ;)
To allow for CUVs and Bombers to have a more appropriate score,
it would be nice to have two more window splitters next to the "Died" box. One titled "Repairs" and one titled "Bomb Hits"

Unfortunatly, iMultiplay only records the scores for kills, points and deaths, So we'll have to make our own CUV/Bomber scores. The problem is, to get the information to each client. (because globals on the server are not automatically propagated to clients).


The easiest solution I can think of is:
We could create and set a string Global for each of the CUVs and Bombers on the server and store them in a global list. (A cuv will get minus (-) points and a bomber will get (+)points.)
The global string would be made by a String.Join using the players name joined to the String.ToInt value of the players points and joined to a String.ToInt value of the length of the value (i.e. the number of charachters )


Then add the following to case 16: in ServerOnUserMessage()

if (iMultiplay.IsGameEnded)
{
for j=0; j=<List.ItemCount (cuv_and bomber_globals_list); ++j;
{
global_name=List.GetNth(cuv_and bomber_globals_list, j);

clientShipList=iMultiplay.ServerPlayerList();
for (i=0;i<List.ItemCount(clientShipList);++i)
{
clientSim=Sim.Cast(List.GetNth(clientShipList, i));
iMultiplay.ServerSendUserMessage( 185, clientSim, none, global_name );

}

}
imultiplay.SendScores ();
}
else imultiplay.SendScores ();
break;

That way if the player calls the ingame score screen, during the game he just gets the normal imultiplay score.
But if the game is ended, the global lists will be propogated, one by one to the clients, so the score screen can show the repairs and bomb hits, using the method below

case 185: on the client would create a global.Int, for each of the strings it recieves, like this:

Remove and read the rightmost charachter of the string to get the length of the points value. Then remove that number of charachters from the string, and convert them to an Int value (that is the players points). The remaining string would be the name of the player and be used as the name of a Global.Int, that in turn, gets the players points value

Now we get to the GUI part:

The Gui will only have to check each name to see if there is a Global.Int with the same name. If so it can put the points in the global.Int in the players "repairs" or "bomb hits" box (if they are - points it was a cuv and you multiply *-1)
If there is no global.int with the players name on it he would just get a "--" in those boxes.

What do you think?

An alternative could be:
if you look at ServerOnUpdateScores() in the MP script I sent you, you might be able to use a dummy score entry for this. (Like is used there for the team points) But, you would need a dummy score entry for each Cuv or bomber pilot.
That would mess up the way the current score screen reads the points for each player, so, you would have to re-do the whole Score screen (I think)?



Iwar2 Multiplayer Fan Site

Please Log in or Create an account to join the conversation.

More
20 years 5 months ago #10614 by Roi Danton

Originally posted by MajorTom

it would be nice to have two more window splitters next to the "Died" box. One titled "Repairs" and one titled "Bomb Hits"

For this the other splitters have to be thinner b/c the statistic already reached the border of the WideShadyBar.

I think the way you mentioned is good enough (after reading your post several times and rewriting my post several times I think I got what you want to do ;)):

1) Saving the CUV/Bomber pilots name in a String
2) Naming the Players CUV/Bomber Points Int like the player name
3) Saving the players CUV/Bomber Points in the String
4) After mission ends, reading out the Points stored in the String with the help of the determined Value length and update the Players CUV/Bomber Points Int (so that on the clients the points appears as well)
5) In GUI: comparing the Players Name and Players CUV/Bomber Points Int. If
a) no int: "--"
b) - int: CUV (repairs) window = int*(-1)
c) + int: Bomber (bomb hits) window = int

Honestly I'm a little bit confused and not sure if I understood you right.

~Buda5 Designer & Scripter
buda5.firstones.com


~Buda5 Designer & Scripter
buda5.firstones.com

Please Log in or Create an account to join the conversation.

More
20 years 5 months ago #10617 by MajorTom
:D :D
Yes! You understood right! But...

For this the other splitters have to be thinner b/c the statistic already reached the border of the WideShadyBar.


Oops, I didn't check the width of the shady bar.
What about this? We could put 3 new splitters in a separate block next to the "team - results" block.
They would be "Functional Stats" "Repairs" and "Bomb Hits".

The "Functional Stats" splitter would contain the name of the player in the red or blue color. The "Repairs" and "Bomb Hits" splitters would have the respective cuv points or bomb points (also in the red or blue color).


Then we could use the "alternative" and have the ServerOnUpdateScores() in the MP script, make dummy entries for each Cuv or Bomber pilot in the game.
They would start with "Stats" followed by the players name so you could recognize them as special cases in ScoreScreenTeam ();

That way, while reading in the "dummyscore" points for the team points you could also read and formate the "functional Stats" block.

I think that is the better solution?

We can, of course, change the ServerOnUpdateScores function so it only provides the functional stats, if (iMultiplay.GameIsEnded).
That way, it won't slow down the score transfers when players call for scores via the IngameScoreScreenTeam().

(I'll do a quick pog example for making the dummyscore stats a bit later)

Note:
If we have a game with 12 players (6 on each team) there wouldn't be enough room to put a second row of splitters (with the functional stats) below the first row of splitters.











Iwar2 Multiplayer Fan Site

Please Log in or Create an account to join the conversation.