Jump to content

SkyUI Question


Inte

Recommended Posts

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
Link to comment

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
Link to comment

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.

Link to comment

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.

Link to comment

Archived

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

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use