This is a SKSE plugin that adds following papyrus functions for creation kit script compiler to modify enb values on game events:
Code: Select all
int Function ENB_GetVersion() global native
int Function ENB_GetSDKVersion() global native
//file == "" (empty string) to access shader sections, file == "enbseries.ini" to access enbseries sections.
//get values
float Function ENB_GetFloat( string file, string section, string keyname ) global native
int Function ENB_GetInt( string file, string section, string keyname ) global native
bool Function ENB_GetBool( string file, string section, string keyname ) global native
float[] Function ENB_GetColorRGB( string file, string section, string keyname ) global native
float[] Function ENB_GetColorRGBA( string file, string section, string keyname ) global native
float[] Function ENB_GetVector3( string file, string section, string keyname ) global native
//set values
Function ENB_SetFloat( string file, string section, string keyname, float value) global native
Function ENB_SetInt( string file, string section, string keyname, int value) global native
Function ENB_SetBool( string file, string section, string keyname, bool value) global native
Function ENB_SetColorRGB( string file, string section, string keyname, float colorR, float colorG, float colorB) global native
Function ENB_SetColorRGBA( string file, string section, string keyname, float colorR, float colorG, float colorB, float colorA) global native
Function ENB_SetVector3( string file, string section, string keyname, float _x, float _y, float _z) global native
//set parameters in ini file under "\enbseries\profiles\filename.ini"
Function ENB_SetConfigFile( string filename) global native
Code: Select all
Scriptname testscript extends ObjectReference
{test}
import ENBscript
Message Property ENBtestMSG auto
Event OnActivate(ObjectReference akActionRef)
//set letterbox under [ENBEFFECT.FX] to 9.0 in shader window
ENB_SetFloat("", "ENBEFFECT.FX", "letterbox", 9.0 )
//load settings in "/enbseries/profiles/test.ini"
ENB_SetConfigFile("test.ini")
//get colorRGB "DirectLightingColorFilterDawn" under [ENVIRONMENT] in enbseries.ini
float[] color = new float[3]
color = ENB_GetColorRGB("enbseries.ini", "ENVIRONMENT", "DirectLightingColorFilterDawn")
//get single float "GammaCurve" under [COLORCORRECTION] in enbseries.ini.
float enbfloat = ENB_GetFloat("enbseries.ini", "COLORCORRECTION", "GammaCurve")
ENBtestMSG.show(enbfloat, color[0], color[1], color[2])
endEvent
"test.ini"
Code: Select all
[EFFECT.TXT]
CameraState=5
FOV=5.0
btest=true
[GLOBAL]
UseEffect=true
[ENBBLOOM.FX]
somecolor=0.77, 0.5, 0.3
somecolorRGBA=0.77, 0.5, 0.3, 0.0
somevector=0.34, 1.5, 2.2, v
someint=-4
somebool=false
===============================================
Fallout 4 :
with two additional functions:
Code: Select all
Function ENB_unSetConfigFile() global native ;revert back to the settings that are replaced by ENB_SetConfigFile
Function ENB_SetConfigFile_Interpolate( string file, float w) global native ;interpolate between current settings and config file by weight.
**Note
For config files to work properly, the UI widget names can not be start with space.
Add this line to enbeffectpostpass.fx for the profile saver to work.
Code: Select all
bool SaveProfile <string UIName="Save Current Profile"; > = {false};
Code: Select all
Scriptname ENBweatherTest extends Quest
import ENBscript
Weather Property CommonwealthRain auto
Event OnInit()
StartTimer(0.02)
EndEvent
Event OnTimer(int aiTimerID)
Weather Curr
If aiTimerID == 0
Curr = Weather.GetCurrentWeather()
float curTransition = Weather.GetCurrentWeatherTransition();
if Curr == CommonwealthRain
ENB_SetConfigFile_Interpolate("CommonwealthRain.ini", curTransition);
else
ENB_SetConfigFile_Interpolate("Default.ini", curTransition);
endif
StartTimer(0.02)
EndIf
EndEvent
History version: