Page 1 of 1

More colors for campaign mode?

Posted: 07 Nov 2019, 01:17
by Kaillie
Is it possible to swap player/AI colors in campaign mode? Would love to play in black (which might need to switch nexus color), white, or other colors not available right now.

Re: More colors for campaign mode?

Posted: 09 Nov 2019, 06:59
by Berserk Cyborg
Yep. By using changePlayerColour() you can change the color of a player. You could mod the base rules.js starting here and that will forcibly set different colors for the player/AI.

Campaign player numbers are like so:

Code: Select all

0 - Human player
1 - New Paradigm
2 - The Collective
3 - Nexus
As for the color values, well, you'll have to experiment with values 0-10. I'm guessing values 1-3 probably correlate to yellow/grey/black.

Re: More colors for campaign mode?

Posted: 09 Nov 2019, 07:59
by Kaillie
Er I'm kinda lost, not a programmer here. Also do you mean "changePlayerColour(player, colour)" or "setPlayerColour", cause on the wiki it says the former. Do I just add on line 242 before "setCampaignNumber(1);", something like "changePlayerColour(0, 3)"?

Re: More colors for campaign mode?

Posted: 09 Nov 2019, 16:07
by Berserk Cyborg
Kaillie wrote: 09 Nov 2019, 07:59 Er I'm kinda lost, not a programmer here. Also do you mean "changePlayerColour(player, colour)" or "setPlayerColour", cause on the wiki it says the former. Do I just add on line 242 before "setCampaignNumber(1);", something like "changePlayerColour(0, 3)"?
:lol2: It's changePlayerColour(). Guess I wasn't paying that much attention to its name...

Adding changePlayerColour(0, 3) there will work, at least for Alpha campaign. If you want to only use one color throughout the entire campaign then you can put it outside of those if statements.

Here is a mod for version 3.3.0. It uses black for the player by default.

campaignColorMod.wz
(2.99 KiB) Downloaded 151 times