Scripting will be a longterm feature and the RSL2 API be written from scratch but it might be a good idea to test functions in RSL1 so only functions that have a known function are bound and documented.
[Shadows]
rfg.SetShadowResolutions (xxxx, xxxx, xxxx, xxxx): Shadow resolution for cascades from right to left with the 4th value being the cascade closest to the camera/player
rfg.Shadows.ShadowPercent: Good for changing the opacity/transparency/strength of shadows but you can't go too low or it disables shadows completely. Works well in conjunction with rfg.Shadows.ShadowMapFadePercent at 0.1
rfg.Shadows.CloudShadowScale: Changes the size of cloud shadows, higher values make the cloud shadows really small and unrealistic
rfg.Shadows.CloudShadowIntensityScale: Works like rfg.Shadows.ShadowMapFadePercent and rfg.Shadows.ShadowPercent and changes the opacity/transparency/strength of cloud shadows
rfg.ShadowMapMaxDist: Increases shadow distance but requires increasing shadow resolution in tandem or you will have very blocky shadows up close
rfg.Shadows.TerrainShadowMaxDist: Increases shadow distance but requires increasing shadow resolution in tandem or you will have very blocky shadows up close
rfg.Shadows.ShadowMapFadePercent: Effects the opacity/transparency/strength of shadows. I found a good value so they don't look completely black
rfg.Shadows.DropShadowPercent: Same as rfg.Shadows.ShadowPercent but for DropShadows which the community patch applies to all objects that were missing them
rfg.HumanFlags.CastsDropShadows = true: Broken but might be able to be bound to the player
rfg.Ssao.DepthFadeRange = SSAO draw distance, breaks SSAO at extreme values.
rfg.Ssao.Falloff = Editing this value from the default of 0.0 to even -0.1 or 0.1 results in a crash when you load a save
[Lighting]
rfg.Lighting.IndirectLightScale: These values change how much indirect light appears to bounce off the sky and surrounding terrain like a faked global illumination or specular effect . Setting these values to extreme values results in a overly specular washed out game
rfg.Lighting.IndirectLightAmount: These values change how much indirect light appears to bounce off the sky and surrounding terrain like a faked global illumination or specular effect. Setting these values to extreme values results in a overly specular washed out game
[Vehicles]
rfg.Vehicle.StreamLoadDistanceSqr: Causes error in lua console, might need to be bound to vehicles
rfg.Vehicle.StreamUnloadDistanceSqr: Causes error in lua console, might need to be bound to vehicles
[Bools]
rfg.Shadows.ShadowsEnabled = true/false
rfg.Shadows.CloudShadowEnabled = true/false
rfg.Hdr.Enable = true/false
rfg.Hdr.BloomNew = true/false
rfg.Hdr.BloomSuperSoft = true/false
rfg.Hdr.BloomSoft = true/false
rfg.Hdr.BloomAlternate = true/false
rfg.Misc.AlphaDistEnabled = true/false
rfg.Terrain.DetailMapEnable = true/false
rfg.Terrain.SpecularEnable = true/false
rfg.Terrain.MedLod = true/false
rfg.Terrain.UseNewRenderer = true/false
rfg.Lighting.SubstanceDiffuseScaleEnabled = true (might break game when false)
rfg.Lighting.GlassDirtEnabled = true/false
rfg.Lighting.GlassReflectionEnabled = true/false
rfg.Lighting.IndirectLightEnabled = true/false
rfg.Lighting.AmbientSpecularEnabled = true/false
[Terrain]
rfg.Terrain.DetailMapTiling = 1.3 Graphical artifacts when increased?
rfg.Terrain.DetailMapScale = 4.8 Graphical artifacts when increased?
rfg.Terrain.DetailMapBlend = 0.72` Graphical artifacts when increased?
[Biases, clamps, rhos, threshold and epsilon values]
rfg.Shadows.CloudShadowIntensityBias = -0.5
rfg.Ssao.Bias = 0.02
[Sun Shafts/Godrays]
rfg.SunShafts.ColorCurveBase = -4.0
rfg.SunShafts.ColorCurveExp = 1.60
rfg.SunShafts.ColorCurveShift = -0.02
rfg.SunShafts.CoronaAdaption = true/false
rfg.SunShafts.SunMask = true/false
rfg.SunShafts.Enabled = true/false
rfg.SunShafts.BlurRho = 0.75
rfg.SunShafts.SunSize = 300.0
rfg.SunShafts.Scale = Sets scale of sun shafts
rfg.SunShafts.Radius = Sets radius of sun shafts
rfg.SunShafts.BlurMultiplier = Sets blur of sun shafts
rfg.SunShafts.BaseLum =
rfg.SunShafts.LumStepScale =
rfg.SunShafts.UseHalfResSource = false : Increases resolution of sun shafts
[LOD]
rfg.Terrain.FadeStart = 11562
rfg.Terrain.FadeEnd = 11562
rfg.SetFarClip(xxxx)
rfg.SetHighLodFarClip(xxxx)
rfg.LodInfo.Dist: Doesn't seem to cause any errors or crashes
rfg.ObjectRenderDistance.ApparentDistance: Doesn't seem to cause any errors or crashes
[Misc]
rfg.Terrain.AnisotropyLevel: Pointless, you can turn it off in the game settings
rfg.Misc.FxaaEnabled : Disable FXAA
rfg.WorldZone.MaxSize = 2147483647 : Unknown
[Physics]
rfg.PhysicsSolver.Tau: Multiplying this value makes buildings stronger and when they break apart will leave much larger pieces
rfg.PhysicsSolver.Damping : Multiplying this value makes buildings stronger and when they break apart will leave much larger pieces
rfg.PhysicsSolver.FrictionTau : Multiplying this value makes buildings stronger and when they break apart will leave much larger pieces
rfg.PhysicsSolver.DampDivTau : Multiplying this value makes buildings stronger and when they break apart will leave much larger pieces
rfg.PhysicsSolver.TauDivDamp : Multiplying this value makes buildings stronger and when they break apart will leave much larger pieces
rfg.PhysicsSolver.DampDivFrictionTau : Multiplying this value makes buildings stronger and when they break apart will leave much larger pieces
[Gravity]
Vanilla = rfg.Vector:new(0.0, -9.8, 0.0)
rfg.SetGravity(Vanilla) : Changes gravity
[Teams]
rfg.HumanTeams.EDF : Change team to EDF
rfg.HumanTeams.Civilian : Change team to Civilian
rfg.HumanTeams.Guerrilla : Change team to Red Faction
[Disable Overheating for turrets and weapons]
for i=0, rfg.WeaponInfos:Length(), 1 do local Info = rfg.WeaponInfos[i] Info.OverheatPercentPerShot = 0 end
Scripting will be a longterm feature and the RSL2 API be written from scratch but it might be a good idea to test functions in RSL1 so only functions that have a known function are bound and documented.
[Shadows]
rfg.SetShadowResolutions (xxxx, xxxx, xxxx, xxxx)
: Shadow resolution for cascades from right to left with the 4th value being the cascade closest to the camera/playerrfg.Shadows.ShadowPercent
: Good for changing the opacity/transparency/strength of shadows but you can't go too low or it disables shadows completely. Works well in conjunction with rfg.Shadows.ShadowMapFadePercent at 0.1rfg.Shadows.CloudShadowScale
: Changes the size of cloud shadows, higher values make the cloud shadows really small and unrealisticrfg.Shadows.CloudShadowIntensityScale
: Works likerfg.Shadows.ShadowMapFadePercent
andrfg.Shadows.ShadowPercent
and changes the opacity/transparency/strength of cloud shadowsrfg.ShadowMapMaxDist
: Increases shadow distance but requires increasing shadow resolution in tandem or you will have very blocky shadows up closerfg.Shadows.TerrainShadowMaxDist
: Increases shadow distance but requires increasing shadow resolution in tandem or you will have very blocky shadows up closerfg.Shadows.ShadowMapFadePercent
: Effects the opacity/transparency/strength of shadows. I found a good value so they don't look completely blackrfg.Shadows.DropShadowPercent
: Same asrfg.Shadows.ShadowPercent
but forDropShadows
which the community patch applies to all objects that were missing themrfg.HumanFlags.CastsDropShadows = true
: Broken but might be able to be bound to the player[SSAO]
rfg.Ssao.Intensity
= SSAO intensityrfg.Ssao.ImagePlanePixelsPerMeterFactor
= SSAO resolutionrfg.Ssao.Radius
= SSAO radiusrfg.Ssao.DepthFadeRange
= SSAO draw distance, breaks SSAO at extreme values.rfg.Ssao.Falloff
= Editing this value from the default of 0.0 to even -0.1 or 0.1 results in a crash when you load a save[Lighting]
rfg.Lighting.IndirectLightScale
: These values change how much indirect light appears to bounce off the sky and surrounding terrain like a faked global illumination or specular effect . Setting these values to extreme values results in a overly specular washed out gamerfg.Lighting.IndirectLightAmount
: These values change how much indirect light appears to bounce off the sky and surrounding terrain like a faked global illumination or specular effect. Setting these values to extreme values results in a overly specular washed out game[Vehicles]
rfg.Vehicle.StreamLoadDistanceSqr
: Causes error in lua console, might need to be bound to vehiclesrfg.Vehicle.StreamUnloadDistanceSqr
: Causes error in lua console, might need to be bound to vehicles[Bools]
rfg.Shadows.ShadowsEnabled = true/false
rfg.Shadows.CloudShadowEnabled = true/false
rfg.Hdr.Enable = true/false
rfg.Hdr.BloomNew = true/false
rfg.Hdr.BloomSuperSoft = true/false
rfg.Hdr.BloomSoft = true/false
rfg.Hdr.BloomAlternate = true/false
rfg.Misc.AlphaDistEnabled = true/false
rfg.Terrain.DetailMapEnable = true/false
rfg.Terrain.SpecularEnable = true/false
rfg.Terrain.MedLod = true/false
rfg.Terrain.UseNewRenderer = true/false
rfg.Lighting.SubstanceDiffuseScaleEnabled = true
(might break game when false)rfg.Lighting.GlassDirtEnabled = true/false
rfg.Lighting.GlassReflectionEnabled = true/false
rfg.Lighting.IndirectLightEnabled = true/false
rfg.Lighting.AmbientSpecularEnabled = true/false
[Terrain]
rfg.Terrain.DetailMapTiling = 1.3
Graphical artifacts when increased?rfg.Terrain.DetailMapScale = 4.8
Graphical artifacts when increased?rfg.Terrain.DetailMapBlend
= 0.72` Graphical artifacts when increased?[Biases, clamps, rhos, threshold and epsilon values]
rfg.Shadows.CloudShadowIntensityBias = -0.5
rfg.Ssao.Bias = 0.02
[Sun Shafts/Godrays]
rfg.SunShafts.ColorCurveBase = -4.0
rfg.SunShafts.ColorCurveExp = 1.60
rfg.SunShafts.ColorCurveShift = -0.02
rfg.SunShafts.CoronaAdaption = true/false
rfg.SunShafts.SunMask = true/false
rfg.SunShafts.Enabled = true/false
rfg.SunShafts.BlurRho = 0.75
rfg.SunShafts.SunSize = 300.0
rfg.SunShafts.Scale =
Sets scale of sun shaftsrfg.SunShafts.Radius =
Sets radius of sun shaftsrfg.SunShafts.BlurMultiplier =
Sets blur of sun shaftsrfg.SunShafts.BaseLum =
rfg.SunShafts.LumStepScale =
rfg.SunShafts.UseHalfResSource = false
: Increases resolution of sun shafts[LOD]
rfg.Terrain.FadeStart = 11562
rfg.Terrain.FadeEnd = 11562
rfg.SetFarClip(xxxx)
rfg.SetHighLodFarClip(xxxx)
rfg.LodInfo.Dist
: Doesn't seem to cause any errors or crashesrfg.ObjectRenderDistance.ApparentDistance
: Doesn't seem to cause any errors or crashes[Misc]
rfg.Terrain.AnisotropyLevel
: Pointless, you can turn it off in the game settingsrfg.Misc.FxaaEnabled
: Disable FXAArfg.WorldZone.MaxSize = 2147483647
: Unknown[Physics]
rfg.PhysicsSolver.Tau
: Multiplying this value makes buildings stronger and when they break apart will leave much larger piecesrfg.PhysicsSolver.Damping
: Multiplying this value makes buildings stronger and when they break apart will leave much larger piecesrfg.PhysicsSolver.FrictionTau
: Multiplying this value makes buildings stronger and when they break apart will leave much larger piecesrfg.PhysicsSolver.DampDivTau
: Multiplying this value makes buildings stronger and when they break apart will leave much larger piecesrfg.PhysicsSolver.TauDivDamp
: Multiplying this value makes buildings stronger and when they break apart will leave much larger piecesrfg.PhysicsSolver.DampDivFrictionTau
: Multiplying this value makes buildings stronger and when they break apart will leave much larger pieces[Gravity]
Vanilla = rfg.Vector:new(0.0, -9.8, 0.0)
rfg.SetGravity(Vanilla)
: Changes gravity[Teams]
rfg.HumanTeams.EDF
: Change team to EDFrfg.HumanTeams.Civilian
: Change team to Civilianrfg.HumanTeams.Guerrilla
: Change team to Red Faction[Disable Overheating for turrets and weapons]
for i=0, rfg.WeaponInfos:Length(), 1 do local Info = rfg.WeaponInfos[i] Info.OverheatPercentPerShot = 0 end