Stormchild wrote:Shape files have colours specified in the model itself. There is probably a way to tint them depending on the owner of the unit, but its more complex than simply altering the colour of a sprite rendering, especially as a model may have more than one colour and we need to keep these distinct when team-colouring.
Given that I do not have access to the source code (hopefully I will be able to spend $45 soonish), the only suggestions that I can make come from playing with shape files (by hand, I might add). In the shape file, there is a section where colors are defined. Each color is defined on one line, with the following format:
where c is a number from 0 to n-1 (where there are n colors used) which will be used to assign colors to vertices, and r, g, and b are numbers from 0 to 255 assigning a red, green, and blue value to each color. Would it be possible to simply add a fifth column, which controls team coloring? For instance, make it a boolean: 0 means that the color is to remain constant, regardless of team, and 1 means that it is to change depending upon team. Then the color can be altered in the same way that DG sprites are altered.
Alternatively, there must be some method for coloring units in the Multiwinia code, given that many units (such as ants) can change color, depending on team, but the shape files in Multiwinia seem to be identical to the shape files in Darwinia. How hard would it be to extract that method?