Difference between revisions of "GetModName - Game"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Wafflesalot
(Changed the example to a more simplified one and changed the notes slightly.)
imported>Wafflesalot
m (→‎Notes: Added Quotation marks.)
Line 28: Line 28:


== Notes ==
== 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 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".


== See Also ==
== See Also ==

Revision as of 04:08, 28 February 2013

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

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


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".

See Also