Hidden/Spoiler:
Sky File Parameters, Example Arguments, and Where They Belong
=========================================
In the SkyInfo() block:
Enable(1);
NearSceneRange(180.0, 250.0, 200.0, 270.0);
//FarSceneRange sometimes takes 1 or 2 arguments
FarSceneRange(160.000000, 400.0);
//FogColor can take RGB params or RGBA
FogColor(95,111,126);
FogRange(90.0, 450.0);
FogRamp(3);
ReflectionFogColor(57, 66, 68);
WorldFogRange(-1.7, -5.0);
AmbientColor(100, 100, 100);
//VehicleAmbientColor did nothing in BF1; not sure if it works in BF2
VehicleAmbientColor(80,80,80);
//These were found in BF1 SkyInfo blocks and may not work in BF2
TopDirectionalAmbientColor(140, 140, 150);
BottomDirectionalAmbientColor(70, 70, 70);
//I assume CharacterAmbientColor (ambient color for weapons + vehicles in BF1) takes RGB arguments
CharacterAmbientColor(r, g, b)
------------------------------------------
In the SunInfo() block:
Note: Doesn't add a sunflare to the sky, only manages some lighting
Angle(140.000005, -10.000011);
Color(120, 120, 120);
Texture("");
Degree(90.000011);
BackAngle(180.000022, 0.000000);
BackColor(128, 128, 128);
BackDegree(0.000000);
//These were found in BF1 SunInfo blocks and may not work in BF2
//ShadowColor is the color to SUBTRACT from the shadowed area, NOT the color of the shadow
//Ex. ShadowColor(0, 255, 255) will subtract all green and all blue from shadowed areas, meaning shadows will appear red
ShadowColor(255, 170, 100);
------------------------------------------
In the DomeInfo() block:
Texture("cor1_sky.tga");
Angle(-90.000000);
Ambient(255.000000, 255.000000, 255.000000);
TerrainColorDarkening();
Filter(1);
Threshold(50);
Intensity(50);
Softness(1);
SoftnessParam(60);
//TerrainBumpDetail("hoth_bump", 1.0, 0.3);
//I found TerrainBumpDetail in the Hoth sky file, but it was commented out. Probably deprecated - see TerrainBumpTexture
TerrainBumpTexture("kas2_bump", 1.0);
//Can have multiple DomeModel() subblocks
//Used for ex. Kamino's city
DomeModel()
{
Geometry("cor1_sky_dome");
Offset(100.0);
MovementScale(0.995)
//See Geonosis sky file for how to use rotationspeed and Effect params
rotationspeed(0.003, 0,1.0,0);
Effect("spa_sfx_skydomeexplosions", "hp_sky_1", 1.0);
}
LowResTerrain()
{
Texture("end1_lowresterrain");
PatchResolution(5);
TextureScale(19.0);
MaxDistance(1500);
DetailTexture("kas2_far_detail");
DetailTextureScale(0.5);
FogNear(400.0);
FogFar(800.0);
FogColor(80,80,80, 128);
}
//Stars are deprecated - they're now built into the skydome texture instead.
Stars()
{
RandomSeed(1);
TwinkleFactor(0.5);
TwinkleFrequency(0.1);
Color(255, 255, 255, 255);
EnableBottom(1);
NumStars(8000);
BrightStarPercent(70.0);
AlphaMin(15);
ColorSaturation(.75);
}
//These were found in BF1 DomeInfo blocks, and may not work in BF2
TerrainEnable(0);
------------------------------------------
In the FlatInfo() block:
Note: No idea what FlatInfo() does. Found it in Endor sky file
Height(0.000000, 0.000000);
Texture("");
Color(128, 128, 128, 255);
Modulate(0);
TextureSpeed(0.000000, 0.000000);
TileSize(100.000000);
------------------------------------------
In the SkyObject() block:
Note: you need a new SkyObject() block for every sky object
Geometry("rep_fly_assault_DOME");
NumObjects(2);
Height(200, 300);
VelocityZ(20, 50);
VelocityY(-10, 10);
Distance(1500);
InDirectionFactor(2);
Acceleration(0.0, 2.0, 0.0);
LifeTime(80.0)
------------------------------------------
Outside every other block:
EnvTexture("");
Note: BF1 files have a bunch more blocks, called things like WaterInfo(), MirrorInfo(), StarsInfo(), PuffInfo(), RainInfo(), SplatInfo("string")
These are all deprecated in BF2 and their functions (managing water, rain, etc.) are handled outside the sky file.
=========================================
In the SkyInfo() block:
Enable(1);
NearSceneRange(180.0, 250.0, 200.0, 270.0);
//FarSceneRange sometimes takes 1 or 2 arguments
FarSceneRange(160.000000, 400.0);
//FogColor can take RGB params or RGBA
FogColor(95,111,126);
FogRange(90.0, 450.0);
FogRamp(3);
ReflectionFogColor(57, 66, 68);
WorldFogRange(-1.7, -5.0);
AmbientColor(100, 100, 100);
//VehicleAmbientColor did nothing in BF1; not sure if it works in BF2
VehicleAmbientColor(80,80,80);
//These were found in BF1 SkyInfo blocks and may not work in BF2
TopDirectionalAmbientColor(140, 140, 150);
BottomDirectionalAmbientColor(70, 70, 70);
//I assume CharacterAmbientColor (ambient color for weapons + vehicles in BF1) takes RGB arguments
CharacterAmbientColor(r, g, b)
------------------------------------------
In the SunInfo() block:
Note: Doesn't add a sunflare to the sky, only manages some lighting
Angle(140.000005, -10.000011);
Color(120, 120, 120);
Texture("");
Degree(90.000011);
BackAngle(180.000022, 0.000000);
BackColor(128, 128, 128);
BackDegree(0.000000);
//These were found in BF1 SunInfo blocks and may not work in BF2
//ShadowColor is the color to SUBTRACT from the shadowed area, NOT the color of the shadow
//Ex. ShadowColor(0, 255, 255) will subtract all green and all blue from shadowed areas, meaning shadows will appear red
ShadowColor(255, 170, 100);
------------------------------------------
In the DomeInfo() block:
Texture("cor1_sky.tga");
Angle(-90.000000);
Ambient(255.000000, 255.000000, 255.000000);
TerrainColorDarkening();
Filter(1);
Threshold(50);
Intensity(50);
Softness(1);
SoftnessParam(60);
//TerrainBumpDetail("hoth_bump", 1.0, 0.3);
//I found TerrainBumpDetail in the Hoth sky file, but it was commented out. Probably deprecated - see TerrainBumpTexture
TerrainBumpTexture("kas2_bump", 1.0);
//Can have multiple DomeModel() subblocks
//Used for ex. Kamino's city
DomeModel()
{
Geometry("cor1_sky_dome");
Offset(100.0);
MovementScale(0.995)
//See Geonosis sky file for how to use rotationspeed and Effect params
rotationspeed(0.003, 0,1.0,0);
Effect("spa_sfx_skydomeexplosions", "hp_sky_1", 1.0);
}
LowResTerrain()
{
Texture("end1_lowresterrain");
PatchResolution(5);
TextureScale(19.0);
MaxDistance(1500);
DetailTexture("kas2_far_detail");
DetailTextureScale(0.5);
FogNear(400.0);
FogFar(800.0);
FogColor(80,80,80, 128);
}
//Stars are deprecated - they're now built into the skydome texture instead.
Stars()
{
RandomSeed(1);
TwinkleFactor(0.5);
TwinkleFrequency(0.1);
Color(255, 255, 255, 255);
EnableBottom(1);
NumStars(8000);
BrightStarPercent(70.0);
AlphaMin(15);
ColorSaturation(.75);
}
//These were found in BF1 DomeInfo blocks, and may not work in BF2
TerrainEnable(0);
------------------------------------------
In the FlatInfo() block:
Note: No idea what FlatInfo() does. Found it in Endor sky file
Height(0.000000, 0.000000);
Texture("");
Color(128, 128, 128, 255);
Modulate(0);
TextureSpeed(0.000000, 0.000000);
TileSize(100.000000);
------------------------------------------
In the SkyObject() block:
Note: you need a new SkyObject() block for every sky object
Geometry("rep_fly_assault_DOME");
NumObjects(2);
Height(200, 300);
VelocityZ(20, 50);
VelocityY(-10, 10);
Distance(1500);
InDirectionFactor(2);
Acceleration(0.0, 2.0, 0.0);
LifeTime(80.0)
------------------------------------------
Outside every other block:
EnvTexture("");
Note: BF1 files have a bunch more blocks, called things like WaterInfo(), MirrorInfo(), StarsInfo(), PuffInfo(), RainInfo(), SplatInfo("string")
These are all deprecated in BF2 and their functions (managing water, rain, etc.) are handled outside the sky file.