List of sky file parameters (FAQ)

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

List of sky file parameters (FAQ)

Post by Fiodis »

I needed to look up something like the list of all known LUA functions, but for sky files. I couldn't find anything, in the documentation, FAQ thread, and Psychofred's board. So I took an hour or so and went through every stock BF2 sky file, and a few BF1 ones, to put together a list along with a little commentary. I thought others might be interested if they wanted to see a full range of all they could do with their sky file, and that it'd be nice to have them all in one place. Here it is:
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.
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: List of sky file parameters

Post by lucasfart »

Oooo. Thanks for this list! Makes stuff so much easier to change/find. We should do this with all the random little files...
ARCTroopaNate
Jedi
Jedi
Posts: 1161
Joined: Mon Mar 21, 2011 8:12 pm
Projects :: Star Wars Battlefront - Tides of War
Games I'm Playing :: SWBF2 RC EAW
xbox live or psn: I have ps4
Location: STALKER!
Contact:

Re: List of sky file parameters

Post by ARCTroopaNate »

Thanks for the list Fiodis! This will be VERY helpful! :D
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: List of sky file parameters (FAQ)

Post by Marth8880 »

Code: Select all

//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);
}
Just thought I'd point out that the Stars() block in the sky file isn't deprecated - I use it all the time and it's used in a ton of stock maps: all of the space maps, Coruscant, and Naboo to name most of them.
User avatar
edge123455
Private Second Class
Posts: 73
Joined: Wed May 18, 2011 7:07 pm
Projects :: Hoth Battlefield
xbox live or psn: No gamertag set

Re: List of sky file parameters (FAQ)

Post by edge123455 »

------------------------------------------

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);

------------------------------------------

This is used to create the shadows you see on the ground from the trees alternating from side to side to simulate wind blowing on branches and leaves.


And as a side note, I believe the "lowresterrain" has been deprecated from BF2.
Post Reply