SKKmods Posted March 10, 2020 Share Posted March 10, 2020 I have just started to work with F4SE as it contains 2 exclusive functions I must punish myself with (GetAllMods & GetLooseMod). In 4,000 hours of Fallout4 I have never ever used F4SE so it is not baked into any of my hundreds of CLEAN (no mods no DLC) savegame libraries. When testing in those CLEAN savegames at various player states I am getting unpredictable results from the F4SE functions using exactly the same unit and system test scenarios/scripts. Sometimes the F4SE functions return expected results and other times no results. The F4SE dependent scripts are of course testing that F4SE is loaded before exposing the functions. So I am wondering if F4SE must be loaded when a new game VM initializes to deliver predictable results ... or something ? Link to comment Share on other sites More sharing options...
SKKmods Posted March 16, 2020 Author Share Posted March 16, 2020 Having cycled through add and remove F4SE from savegames several hundred times, as long as mods are only using the script functions and provide state detection to avoid calling those functions when unavailable (and are of course not using bound DLL injections) it's fine. My inconsistent issue results issue stemmed from a non robust or fault-tolerant F4SE detection method. This is the working industrial strength approach to switch F4SE dependent functions on and of in my scripts (called during OnPlayerLoadGame for state change);Bool bF4SEInstalled = FALSE Int ScriptVersionRelease = Utility.CallGlobalFunction( "F4SE", "GetScriptVersionRelease", New Var[0] ) as Int ;Non native If( ScriptVersionRelease > 0 ) ;scripts are installed Int VersionRelease = Utility.CallGlobalFunction( "F4SE", "GetVersionRelease", New Var[0] ) as Int ;error: Unbound native function "GetVersion" called If( VersionRelease == ScriptVersionRelease) bF4SEInstalled = TRUE EndIf EndIfAnd if your interested in a one click F4SE add & remove mechanism; Reveal hidden contents @echo off cls set SOURCEBIN="C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\f4se_0_06_20" set SOURCEPEX="C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\f4se_0_06_20\data\scripts" set TARGETBIN="C:\Program Files (x86)\Steam\steamapps\common\Fallout 4" set TARGETPEX="C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\data\scripts" if exist %TARGETBIN%\f4se_steam_loader.dll (goto F4SEDISABLE) else (goto F4SEENABLE) :F4SEENABLE echo. echo *********** echo Enable F4SE echo. copy %SOURCEBIN%\f4se_loader.exe %TARGETBIN% copy %SOURCEBIN%\f4se_1_10_163.dll %TARGETBIN% copy %SOURCEBIN%\f4se_steam_loader.dll %TARGETBIN% copy %SOURCEPEX%\*.pex %TARGETPEX% rem for /r %SOURCEPEX% %%G in (*.pex) do (copy %%G %TARGETPEX%) echo. echo boo F4SE Installed echo ****************** echo. goto END :F4SEDISABLE echo. echo ************* echo Disable F4SE echo. rem * del %TARGETBIN%\f4se_loader.exe ; do not delete as launcher shortcut falls over del %TARGETBIN%\f4se_1_10_163.dll del %TARGETBIN%\f4se_steam_loader.dll rem * specific files rather than source directory lookup incase some halfwit has been publishing hacked base game scripts del %TARGETPEX%\Actor.pex del %TARGETPEX%\ActorBase.pex del %TARGETPEX%\Armor.pex del %TARGETPEX%\ArmorAddon.pex del %TARGETPEX%\Cell.pex del %TARGETPEX%\Component.pex del %TARGETPEX%\ConstructibleObject.pex del %TARGETPEX%\DefaultObject.pex del %TARGETPEX%\EncounterZone.pex del %TARGETPEX%\EquipSlot.pex del %TARGETPEX%\F4SE.pex del %TARGETPEX%\FavoritesManager.pex del %TARGETPEX%\Form.pex del %TARGETPEX%\Game.pex del %TARGETPEX%\HeadPart.pex del %TARGETPEX%\Input.pex del %TARGETPEX%\InstanceData.pex del %TARGETPEX%\Location.pex del %TARGETPEX%\Math.pex del %TARGETPEX%\MatSwap.pex del %TARGETPEX%\MiscObject.pex del %TARGETPEX%\ObjectMod.pex del %TARGETPEX%\ObjectReference.pex del %TARGETPEX%\Perk.pex del %TARGETPEX%\ScriptObject.pex del %TARGETPEX%\UI.pex del %TARGETPEX%\Utility.pex del %TARGETPEX%\WaterType.pex del %TARGETPEX%\Weapon.pex echo. echo yay F4SE removed echo **************** echo. :END pause Link to comment Share on other sites More sharing options...
niston Posted March 16, 2020 Share Posted March 16, 2020 +1 Link to comment Share on other sites More sharing options...
Recommended Posts