GeneralsGamePatch icon indicating copy to clipboard operation
GeneralsGamePatch copied to clipboard

Enhancement: More Player Colors & Infantry coloring change

Open toirehantaa opened this issue 8 months ago • 18 comments

Add more playable colors than 8 to the game.

Also change the Infantry coloring to match the actual player color rather than being the most saturated version of it, so Black becomes a playable color (it has white infantry units right now)

toirehantaa avatar Mar 03 '25 14:03 toirehantaa

Related Enhancement: Increase the Maximum Player Count TheSuperHackers/GeneralsGameCode#314

tintinhamans avatar Mar 03 '25 15:03 tintinhamans

actually, black is a broken color, using (0, 0, 0) will cause many issues, you need to set the black color to (1, 1, 1)

ghost avatar Mar 04 '25 10:03 ghost

Totally agree with more collors. I am not a dev, but i know its not a very easy task to do. I wish we could have a full color palette, bringing more choosing options to the players. However, if its not possible, adding a bit more colors would be nice. About the infantry coloring, what do you mean exactly? Please, be more specific.

MarcosV2020 avatar Mar 05 '25 15:03 MarcosV2020

Totally agree with more collors. I am not a dev, but i know its not a very easy task to do. I wish we could have a full color palette, bringing more choosing options to the players. However, if its not possible, adding a bit more colors would be nice. About the infantry coloring, what do you mean exactly? Please, be more specific.

  • About the difficulty of adding colors - it should be really easy, since it only is one file (multiplayer.ini) that needs to be changed. I am running my game with custom colors at this very moment as well. The problem only lies within the compatability with other game clients IF you have more or less than 8 colors. The slot numeration is somehow used to calculate which general you get when playing Random Army. That means that if everyone has a color picked from the slots 0-7, it will be compatible, but if there was someone who has a color outside of this range, or someone without the color extension picks a random color, and now has a different one on his machine than on yours, the numeric value behind these slots will be different and his final Army choice will differ from your point. If everyone had the same amount of colors, it wouldn't matter, as then nobody can be outside of anyone's range.

  • About the infantry colors - If you compare the color of an infanrty with the one of a vehicle, you can see that these are different. I guess for visibility reasons it was made so that the infantry has a more saturated hue , making those units easier to spot. This however means that it turns any infantry's color that is having the same R,G and B value into plain white. And since white is reserved for teamPlyrCivilian, that's a problem (actually making the civilian player grey would make white a playable color as well, which would be hella cool).

toirehantaa avatar Mar 05 '25 16:03 toirehantaa

Allowing completely free colour selection is maybe not the best idea due to the fact that it would then be possible for people to choose colours which are too similar to other players in the match.

tintinhamans avatar Mar 05 '25 17:03 tintinhamans

Allowing completely free colour selection is maybe not the best idea due to the fact that it would then be possible for people to choose colours which are too similar to other players in the match.

Yeah i thought about that too, it is really a problem, but we can fix it easily by putting complementary colors filter. That would allow only colors who are opposite or complementary to each other giving contrast to the eye and leaving many players wanting to try and cheat with that trick.

MarcosV2020 avatar Mar 05 '25 17:03 MarcosV2020

About the difficulty of adding colors - it should be really easy, since it only is one file (multiplayer.ini) that needs to be changed.

@toirehantaa Could this be modified? I mean, how difficult is it to do this? I'm not a dev, but from what I understand you said it would be easily solved if we changed the multiplayer.ini archives. Correct me if I'm wrong, but that would mean bringing a new patch to multiplayer. Now that we have the source code available this would be simpler, right?

MarcosV2020 avatar Mar 05 '25 17:03 MarcosV2020

Look at the code here, you can just add 'MultiplayerColor'-Blocks as you like. We would need to update generals.str for the tooltip (I think it was this file...?) as well so we don't have the 'MISSING: ' string problem. But technically we can just add these few lines for as many colors as we want in the multiplayer.ini file, update the other so we get the right name displayed, and that's it (?). Someone correct me here if it is actually more complex

MultiplayerColor ColorGold
  RGBColor = R:255 G:216 B:0
  RGBNightColor = R:255 G:216 B:0
  TooltipName = Color:Gold
End

toirehantaa avatar Mar 05 '25 18:03 toirehantaa

Look at the code here, you can just add 'MultiplayerColor'-Blocks as you like. We would need to update generals.str for the tooltip (I think it was this file...?) as well so we don't have the 'MISSING: ' string problem. But technically we can just add these few lines for as many colors as we want in the multiplayer.ini file, update the other so we get the right name displayed, and that's it (?). Someone correct me here if it is actually more complex

MultiplayerColor ColorGold RGBColor = R:255 G:216 B:0 RGBNightColor = R:255 G:216 B:0 TooltipName = Color:Gold End

It seems to fit well on what we need.

MarcosV2020 avatar Mar 05 '25 18:03 MarcosV2020

Interestingly, if you add more team colors, something bizarre will happen to your team color in the Generals Challenge missions. Having max color slots of 8, 9, 12, 13, 18, 24 (tested having 24 max team colors) will make you use Color Slot 6 (Cyan by default) as your team color.

Nevermore2790 avatar Mar 08 '25 15:03 Nevermore2790

@Nevermore2790 Interestingly, if you add more team colors, something bizarre will happen to your team color in the Generals Challenge missions. Having max color slots of 8, 9, 12, 13, 18, 24 (tested having 24 max team colors) will make you use Color Slot 6 (Cyan by default) as your team color.

So, how we can fix this? The example below doesnt work well? (@toirehantaa suggestion)

MultiplayerColor ColorGold RGBColor = R:255 G:216 B:0 RGBNightColor = R:255 G:216 B:0 TooltipName = Color:Gold End

MarcosV2020 avatar Mar 08 '25 15:03 MarcosV2020

So, how we can fix this? The example below doesnt work well? (@toirehantaa suggestion)

what do you mean by "fix"? This was just additional information he gave.

Interestingly, if you add more team colors, something bizarre will happen to your team color in the Generals Challenge missions. Having max color slots of 8, 9, 12, 13, 18, 24 (tested having 24 max team colors) will make you use Color Slot 6 (Cyan by default) as your team color.

Also, what happens outside of this range you've given? I can hardly believe that the game magically enables you to choose your own color :P

toirehantaa avatar Mar 08 '25 17:03 toirehantaa

Also, what happens outside of this range you've given? I can hardly believe that the game magically enables you to choose your own color :P

Pretty sure the results are the same where the colors go nuts for the Generals Challenge missions.

So yeah, it's pretty much making you magically choose your team color. Bad news is, if the team color is also the team color of the enemy.

Nevermore2790 avatar Mar 08 '25 17:03 Nevermore2790

So yeah, it's pretty much making you magically choose your team color. Bad news is, if the team color is also the team color of the enemy.

That's a nice find. Will the game crash if the colors are identical?

toirehantaa avatar Mar 08 '25 18:03 toirehantaa

what do you mean by "fix"? This was just additional information he gave.

Again, im not a dev bro, so everything similar to this text box is a problem for me xD Im just trying to suggest some ideas about colors. I would be very happy if you guys add more colors to ZH.

MarcosV2020 avatar Mar 09 '25 14:03 MarcosV2020

That's a nice find. Will the game crash if the colors are identical?

I don't think it will crash the game. You'll just get some confusion on your minimap if that happens.

Nevermore2790 avatar Mar 11 '25 02:03 Nevermore2790

I don’t have any issues with the new colors, but you need to fix or apply a text border first. I assume the lighter colors are intentional by the devs since the player's color dictates the text messages too. However, darker colors are getting obscured by many things, including the fog of war—one of the main reasons why black is not an option in this game.

If you don’t plan to add a text border, you might want to copy the palette from the Contra X mod.

Image

AdrianeYves avatar Mar 14 '25 15:03 AdrianeYves

@AdrianeYves I don’t have any issues with the new colors, but you need to fix or apply a text border first. I assume the lighter colors are intentional by the devs since the player's color dictates the text messages too. However, darker colors are getting obscured by many things, including the fog of war—one of the main reasons why black is not an option in this game. If you don’t plan to add a text border, you might want to copy the palette from the Contra X mod. Image

Yeah, this is interesting! Not exactly what i was expecting but it will bring more collors for sure.

MarcosV2020 avatar Mar 15 '25 00:03 MarcosV2020