Guest Posted January 1, 2016 Posted January 1, 2016 Hello, do anybody know how to query for the installed SkyUI version using Papyrus? The "getVersion()" that is available gives the version of your mod, and not the SkyUI one. And if you call parent.getVersion() you get the value 1 no matter what version is installed. Thanks.
Guest Posted January 1, 2016 Posted January 1, 2016 OK, found a solution. For the main SkyUI quest, there is a script file (that is NOT visible and it should NOT be visible) called ski_main. Inside this script there is a property called "ReqSWFVersion", that actually is a string with the version number of SkyUI. (Tested in version 4.0, 3.1, 5.0, and 5.1) Now, you cannot really get this property with ease. First because you DON"T WANT to put a hard reference to the SkyUI quest (DON"T DO THAT it is just a BAD idea.) But you can get the actual script instance using the SKSE functions. And you can access this property. Without put a bad reference to SkyUI. The problem is: how can I compile now my script? PapyrusCompiler is telling me that "ski_main" is unknown!!!! This is because this script is not, and should be NOT, provided. But you can create a fake script (only the .psc, then .pex is NOT required) that has the definition of the property (nothing else is required.) Like scriptName SKI_Main extends SKI_QuestBase String property ReqSWFVersion Auto
Guest Posted September 6, 2016 Posted September 6, 2016 Just an example script I am using now: ski_main skyUI = Game.getFormFromFile(0x814, "SkyUI.esp") as Ski_main int skyUIMaj = StringUtil.GetNthChar(skyUI.ReqSWFVersion, 0) as Int if skyUIMaj<5 ; Less than version 5 else ; at least version 5 endIf
aragonit Posted February 22, 2020 Posted February 22, 2020 I do have a file named SKI_Main.psc downloade from the GITHub of SkyUI. https://github.com/schlangster/skyui/blob/master/dist/Data/Scripts/Source/SKI_Main.psc But it is an interesting approach, to just chuck all stuff in the SKI_Main.psc ...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.