By making the following changes to the source code, it would enable OXP writers to produce different coloured space backgrounds in different systems either by editing the planetinfo.plist file in the 'Config' directory or by Javascript. I'm using the source code for version 1.76.1 but this can also be done in the Trunk. Firstly, open up the Universe.m file in the 'src\Core' directory and go to line 632 and replace the following code:
Code: Select all
[UNIVERSE setSkyColorRed:0.0f // back to black
green:0.0f
blue:0.0f
alpha:0.0f];
Code: Select all
NSDictionary *systeminfo = nil;
systeminfo = [self generateSystemData:system_seed];
skyClearColor[0] = [systeminfo oo_floatForKey:@"space_color_red" defaultValue:0.0];
skyClearColor[1] = [systeminfo oo_floatForKey:@"space_color_green" defaultValue:0.0];
skyClearColor[2] = [systeminfo oo_floatForKey:@"space_color_blue" defaultValue:0.0];
skyClearColor[3] = [systeminfo oo_floatForKey:@"space_color_alpha" defaultValue:0.0];
Code: Select all
[self setSkyColorRed:0.0f
green:0.0f
blue:0.0f
alpha:0.0f];
Code: Select all
skyClearColor[0] = [systeminfo oo_floatForKey:@"space_color_red" defaultValue:0.0];
skyClearColor[1] = [systeminfo oo_floatForKey:@"space_color_green" defaultValue:0.0];
skyClearColor[2] = [systeminfo oo_floatForKey:@"space_color_blue" defaultValue:0.0];
skyClearColor[3] = [systeminfo oo_floatForKey:@"space_color_alpha" defaultValue:0.0];
Code: Select all
skyClearColor[0] = 0.0;
skyClearColor[1] = 0.0;
skyClearColor[2] = 0.0;
skyClearColor[3] = 0.0;
Code: Select all
NSDictionary *systeminfo = nil;
systeminfo = [self generateSystemData:system_seed];
skyClearColor[0] = [systeminfo oo_floatForKey:@"space_color_red" defaultValue:0.0];
skyClearColor[1] = [systeminfo oo_floatForKey:@"space_color_green" defaultValue:0.0];
skyClearColor[2] = [systeminfo oo_floatForKey:@"space_color_blue" defaultValue:0.0];
skyClearColor[3] = [systeminfo oo_floatForKey:@"space_color_alpha" defaultValue:0.0];
Code: Select all
// Define space background color or set to black as default:
skyClearColor[0] = [systeminfo oo_floatForKey:@"space_color_red" defaultValue:0.0];
skyClearColor[1] = [systeminfo oo_floatForKey:@"space_color_green" defaultValue:0.0];
skyClearColor[2] = [systeminfo oo_floatForKey:@"space_color_blue" defaultValue:0.0];
skyClearColor[3] = [systeminfo oo_floatForKey:@"space_color_alpha" defaultValue:0.0];
Code: Select all
"0 7" =
{
space_color_blue = 0.2;
};
System.infoForSystem(galaxyNumber, player.ship.targetSystem).space_color_red = 0.2;
to make the next system you jump into red! The above code also ensures that even when launching from the station the colour is what you have defined it to be, and even if you go into the planet's atmosphere (which turns the background colour blue) and come back up again, it will revert to the colour defined in the planetinfo.plist file or by Javascript.