Jump to content

[SOLVED] Understanding SkyUI version


Guest

Recommended Posts

Posted

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.

Posted

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
  • 8 months later...
Posted

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
  • 3 years later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...