[dismiss]
This wiki is a copy of the original Skyrim CK wiki created and maintained by the UESP.net. See CreationKit:Copy Notice for more info.
Difference between revisions of "GetModByName - Game"
Jump to navigation
Jump to search
imported>Egocarib m |
imported>Egocarib m |
||
Line 15: | Line 15: | ||
== Return Value == | == Return Value == | ||
Either the exact index of the | Either the exact index of the plugin in the current load order, or 255 if the plugin is not present. | ||
Line 23: | Line 23: | ||
TargetModIndex = Game.GetModByName("ChickenMod.esp") | TargetModIndex = Game.GetModByName("ChickenMod.esp") | ||
Debug.Trace("ChickenMod.esp is loaded at index number " + TargetModIndex + " in our load order.") | if TargetModIndex != 255 | ||
Debug.Trace("ChickenMod.esp is loaded at index number " + TargetModIndex + " in our load order.") | |||
else | |||
Debug.Trace("ChickenMod.esp is not presently loaded.") | |||
endif | |||
</source> | </source> | ||
Revision as of 02:13, 9 November 2013
SKSE Member of: Game Script
Returns the load order index of the target plugin. (This function requires SKSE)
Syntax
int Function GetModByName(string name) native global
Parameters
- name: The name of the target plugin as a filename string (e.g. "Dawnguard.esm")
Return Value
Either the exact index of the plugin in the current load order, or 255 if the plugin is not present.
Examples
Int TargetModIndex
TargetModIndex = Game.GetModByName("ChickenMod.esp")
if TargetModIndex != 255
Debug.Trace("ChickenMod.esp is loaded at index number " + TargetModIndex + " in our load order.")
else
Debug.Trace("ChickenMod.esp is not presently loaded.")
endif
Notes
Calling this function on a non-existent plugin will not result in any log output, and so it may be used strategically before calling something like GetFormFromFile() to avoid creating log errors.