HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Importing Common.j

02-03-2008, 05:10 PM#1
Tastingo
Hey I've always wanted to make a custom player color, and changing the skin doesn't seem to fit it. Sure it'll change in world editor but not in the map. So I checked the common.j and got this line of code:
constant playercolor PLAYER_COLOR_RED = ConvertPlayerColor(0)
So if I were to make a custom skin color for lets say player 15, and I changed that code to:
constant playercolor PLAYER_COLOR_RED = ConvertPlayerColor(15)
Then import the common.j to replace the existing common.j would it work?

In case you got lost my objective is to get a custom player color, by changing the constant to player 15 and changing player 15's color to the custom player color.
02-03-2008, 05:26 PM#2
TaintedReality
Why wouldn't you just change Player 0's player color instead of trying to switch them around? I'm pretty sure that won't have any effect on the color of units in the game, but you would have to try it on your own to make sure.
02-03-2008, 05:46 PM#3
Tastingo
I would do it, but I'm not sure of the path. The reason I would change the skin of player 15 because it is the computer and not the main people in the game. I couldn't even really find a piece of code that set the 13+ their colors.
02-03-2008, 05:50 PM#4
TaintedReality
But you're setting Player 0's color the Player 15's color (supposedly). So why does it matter that 15 isn't a real player, if you're giving his color to a real player?
02-03-2008, 05:56 PM#5
Troll-Brain
i already tried to edit and import a custom common.j
you can't start the game
02-04-2008, 02:21 PM#6
Tastingo
Ah ok ty.
02-04-2008, 03:00 PM#7
Strilanc
I know for a fact you can import a custom common.j. That's how you enable the GetUnitGoldCost function.
02-04-2008, 03:07 PM#8
Troll-Brain
Quote:
Originally Posted by Strilanc
I know for a fact you can import a custom common.j. That's how you enable the GetUnitGoldCost function.
tell me how, i've never seen that, but just a system which recreate this function ...
02-04-2008, 06:05 PM#9
TaintedReality
I've also used a custom common.j before with no problems that I could tell.
02-04-2008, 06:58 PM#10
Troll-Brain
and what about now ?
i tried it, and even if in the map there is nothing (no widget,no triggers , ...) i got a compile error when i save, it's not a custom common.j but simply the common.j
and i use the path Scripts\common.j on the import manager
02-04-2008, 09:22 PM#11
Captain Griffen
Even if you could do that and get it to work, that wouldn't achieve anything. All that declaration does is provide a constant variable for any coders to refer to. It does NOT affect the game directly in any way, shape or form.
02-04-2008, 10:29 PM#12
Tastingo
Any idea where the custom skin gets replaced with the original color skin? Since something is preventing it from changing skins.
02-05-2008, 03:39 PM#13
Captain Griffen
Team colour is in the model.
02-05-2008, 03:52 PM#14
Tastingo
No I mean custom skinned player colors. If you change the red player color to lets say white or rainbow then it will show up as that color in the world editor. If you play the map on multiplayer the color goes back to red. So I think the script changes it, but im not sure which script and where.
02-05-2008, 04:01 PM#15
Captain Griffen
How do you change it? Tell me that I can help, maybe.