Inte Posted September 6, 2016 Posted September 6, 2016 Is there any way to grab the SkyUI version number in script? I've looked around somewhat, but I couldn't find anything. Crap, never mind.I found it here.http://www.loverslab.com/topic/55904-solved-understanding-skyui-version/
Hæretic Posted September 6, 2016 Posted September 6, 2016 This topic looks like it's about exactly your problem. Edit: Looks like you were a bit faster than me xD
Guest Posted September 6, 2016 Posted September 6, 2016 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
Inte Posted September 6, 2016 Author Posted September 6, 2016 @CPU, thanks for the reply. It seems that ReqSWFVersion is 0, always. I am using SkyUI 5.1, perhaps it has been changed for this version?
Inte Posted September 6, 2016 Author Posted September 6, 2016 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
Guest Posted September 6, 2016 Posted September 6, 2016 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.
Inte Posted September 7, 2016 Author Posted September 7, 2016 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.