I've started work on a mod that sets the player colours according to which team they are on, but I'm having trouble with it.
Before:
After:
As you can see I'm using warm and cool colours to differentiate teams. Pretend you are the blue team and notice how much 'warm' air is above your base ... it's totally obvious, and that is the value of the mod right there. The mod is actually way more complicated then that because it has a whole colour wheel and it dynamically chooses the 'best' colours based off the teams ... so it can handle other game formats like a 2v4v1v1 pretty well (eg: two reddish, 4 greenish, a yellow, a purple).
So it's mostly working besides a few tweaks, but I don't think it's usable in the end. The trouble is it needs to be a Sim mod because it uses SetArmyColor which is a Sim function. The color change gets recorded into the replay as well. Because SetArmyColor is considered a cheat I set up a SimCallback which allowed me to use it with cheats disabled. I am not sure if that is the only way of doing it since I am new to modding. The SimCallback call is also recorded into the replay. So what that means is if you use my team colours mod, the other players need to as well, you will be forcing them to see the new colours, and the replay will be unwatchable by people without the mod, and they will be forced to see the new colours as well. All of which sucks. I wanted this to be a UI choice for the user, just like the normal 'allegiance' colours button that we have at the moment (it makes you blue, your enemies red your allies green etc.) The only solution to this I can think of is to have this as a lobby setting that the host can press to change everyone's colours before the game starts - although that might annoy people, it is certainly less bad than my current situation. I had thought I could look at how 'allegiance' colours is coded but that seems to be in C++ land.
Can anyone help me?
- is SimCallback the correct way to do 'cheats' without cheats enabled?
- is there any way to change army colours without going through this SetArmyColor?
- is there any way to make it so my simcallback and setarmycolor calls are not recorded into the replay?
- is there anything else I can do to get this to work?
Thanks!