Jump to content

Recommended Posts

Posted (edited)

I found for Fallout, example:

bool modInstalled = Game.IsPluginInstalled("SuperCoolWeapons.esp")

And now i have questions:

 

1. Can i check the same, but for skyrim?

2. how to check load order XX of the plugin? if this possible through papyrus ?

Edited by myav
Posted (edited)

You have brain, eyes, hands and google as search engine!

Skyrim wiki overview (make sure your browser has cookies enabled)
https://www.creationkit.com/index.php?title=Category:Scripting

You asked:
1. Can I check the same, but for skyrim?"
2. How to check load order XX of the plugin? If this possible through papyrus?

https://www.creationkit.com/index.php?title=GetModByName_-_Game

    Bool modInstalled = Game.IsPluginInstalled("SuperCoolWeapons.esp")

some convenience functions based on SKSE native functions

 

;----------------------------------------
Bool FUNCTION IsPluginInstalled(String s)
;----------------------------------------
IF (SKSE.GetVersion() <= 0.0)
    Debug.Trace("Error: SKSE not found! " +self)
    Return False    ; /1
ENDIF
;---------
    int i = Game.GetModByName(s)

;IF (i == 0)
;    Debug.Trace("Error: SKSE not found! " +self)
;    Return False
;ENDIF
;---------
IF (i == 255)    ; 0xFF
    Return False    ; /2    plugin not installed
ENDIF
;---------
    RETURN TRUE     ; /3    plugin was found at load order position "i"
ENDFUNCTION


;---------------------------------------
Int FUNCTION GetPluginPosition(String s)
;---------------------------------------
IF (SKSE.GetVersion() <= 0.0)
    Debug.Trace("Error: SKSE not found! " +self)
    RETURN -1
ENDIF
;---------
    int i = Game.GetModByName(s)

;IF (i == 0)
;    Debug.Trace("Error: SKSE not found! " +self)
;    RETURN -1
;ENDIF
;---------
    RETURN i    ; 255 plugin not installed, 0..254 plugin installed
ENDFUNCTION


;--------------------------------------
Int FUNCTION GetPluginDependency(Int i)
;--------------------------------------
IF (SKSE.GetVersion() <= 0.0)
    Debug.Trace("Error: SKSE not found! " +self)
    RETURN -1
ENDIF
;---------
    int i = Game.GetModDependencyCount(i)
    RETURN i    ; if ZERO no dependencies with other mods
ENDFUNCTION

 

 

    int i = GetPluginPosition("Skyrim.esm")
    int n = GetPluginDendency(i)
Edited by ReDragon2013
  • Recently Browsing   0 members

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