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

Description

Wiki Description

Returns the name of the mod at the specified Index. (This function requires SKSE)

Documentation Comment

returns the name of the mod at the specified modIndex


Caveats

CK Wiki - Notes

  • This function can be a little misleading, it returns the .esm or .esp in your load order, eg. Skyrim.esm. A mod however could be named, for example "Fall of Saber" and have a esp called "Tigers.esp". This would return "Tigers.esp" and not "Fall of Saber".
  • This function does not appear to work for ESLs or light flagged ESPs as they all load in slot 254.

Parameters

intmodIndex


Examples

String Nameofmod

Function ModName()
    Nameofmod = Game.GetModName(0) ;Gets Name of Mod eg. Skyrim.esm, Update.esm, Hearthfire.esm, etc.(In this case it should return Skyrim.esm)
    Debug.Trace("The zeroth index contains " + NameofMod)    
EndFunction

Auto-Generated Example

int myInt__modIndex

string returnedValue = Game.GetModName(myInt__modIndex)

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.