GetModName - Game

From the CreationKit Wiki
Revision as of 01:03, 27 February 2013 by imported>Wafflesalot (Minor changes to grammar missed)
Jump to navigation Jump to search

SKSE Member of: Game Script

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

Syntax

string Function GetModName(int modIndex) native global

Parameter

  • modIndex = Number of the mod.

Return Value

Returns the name of the mod at the specified index.

Examples

int Numberofmods
String Nameofmod
String NameofAuth
String Description

Function PrintModlist()
	Numberofmods = Game.GetModCount() ;The number of active mods.
	while NumberofMods
		NumberofMods -= 1
		Nameofmod = Game.GetModName(NumberofMods) ;Gets Name of Mod eg. Skyrim.esm, Update.esm, Hearthfire.esm, etc.
		NameofAuth = Game.GetModAuthor(NumberofMods) ; If a Author is specified then it will return a name if not will be DEFAULT
		Description = Game.GetModDescription(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


Notes

  • This function, doesn't actually return the real name of the mod it returns the .esm or .esp in your load order. (eg. Skyrim.esm, Update.esm, Hearthfire.esm.)

See Also