Jump to content

SkyUI Question


Inte

Recommended Posts

Posted

Arg. I was going to post a possible solution...

But both of you posted my finding. I am getting old...  ;)


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
Posted

@CPU, thanks for the reply. :blush:

It seems that ReqSWFVersion is 0, always. I am using SkyUI 5.1, perhaps it has been changed for this version?

Posted

Here is what I have so far.

 

The script extending ... well script.

ScriptName iDDeSkyUiMain Extends SKI_QuestBase

STRING Property ReqSWFVersion Auto Hidden
My function

Function CheckSkyVersion()
	String sVersion
	If (iDDeUtil.iDDeGotMod("CheckSkiVersion()", "SkyUI.esp"))
		iDDeSkyUiMain SkyUI = Game.GetFormFromFile(0x814, "SkyUI.esp") AS iDDeSkyUiMain
		iSkyVersion = StringUtil.GetNthChar(SkyUI.ReqSWFVersion,0) AS INT
		sVersion = SkyUI.ReqSWFVersion
	Else
		iSkyVersion = -1
	EndIf
	
		If (iSkyVersion < 5)
			Debug.MessageBox("Devious Devices - Equip:\nSkyUI is too old, or could not be found.\nAt least v5.10 is needed. " +sVersion)
		EndIf
EndFunction
Posted

Can I ask you what is: "iDDeSkyUiMain"?

It is not a file from SkyUI.

 

The correct file name has to be ski_main.psc

 

Be aware that if the name is different then you are just creating a new script and NOT referencing the correct SkyUI script instance.

Posted

I thought that the child script can be any name, as long as the parent has the correct name, no?
 
Child script - "any script name" I chose "iDDeSkyUiMain"
Parent script - "SKI_QuestBase" - the SkyUI mod script that is to be extended.

Archived

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

  • Recently Browsing   0 members

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