Background for Skyrim SE
Member of the Game script
intfunctionGetLightModCount()NativeGlobal

Description

Wiki Description

Returns the number of light mods currently active. (This function requires SKSE)

Documentation Comment

light mod functions


Caveats

CK Wiki - Notes

  • By the number of mods, it refers to the number of plugins with the ESL flag set in the load order, as mods can have multiple .esps or .esms the number that is returned can be higher than actual mods.

Examples

int Numberoflightmods
String Nameofmod
String NameofAuth
String Description

Function PrintModlist()
    Numberoflightmods = Game.GetLightModCount() ;The number of active mods.
    while NumberofMods
        Numberoflightmods -= 1
        Nameofmod = Game.GetLightModName(NumberofMods) ;Gets Name of Mod eg. Skyrim.esm, Update.esm, Hearthfire.esm, etc.
        NameofAuth = Game.GetLightModAuthor(NumberofMods) ; If a Author is specified then it will return a name if not will be blank
        Description = Game.GetLightModDescription(NumberofMods) ;If a Description is available then it will be shown otherwise will be blank
        Debug.Trace(NumberofMods + "th index contains " + NameofMod)
        Debug.Trace("Author: " + NameofAuth)
        Debug.Trace("Description: " + Description)
    EndWhile
EndFunction

Auto-Generated Example

int returnedValue = Game.GetLightModCount()

Related Pages


Additional References

View this function’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.