Background for Skyrim SE

The JMap Script

    The JMap script is a part of Skyrim SE’s Papyrus scripting ecosystem. This script is not present in the vanilla game, but can be found in modded sources like JContainers (JContainers).

    For this script, the Papyrus index knows about:

    • 22 functions


    Inheritance Tree

    No indexed scripts extend this script.

    Properties

    No properties found.

      Events

        No events found.

      Functions

      • intfunctionobject()NativeGlobal

        creates new container object. returns container's identifier (unique integer number).

      • intfunctiongetInt(intobject, stringkey, intdefault=0)NativeGlobal

        Returns the value associated with the @key. If not, returns @default value

      • floatfunctiongetFlt(intobject, stringkey, floatdefault=0.0)NativeGlobal
      • stringfunctiongetStr(intobject, stringkey, stringdefault="")NativeGlobal
      • intfunctiongetObj(intobject, stringkey, intdefault=0)NativeGlobal
      • FormfunctiongetForm(intobject, stringkey, Formdefault=NONE)NativeGlobal
      • voidfunctionsetInt(intobject, stringkey, intvalue)NativeGlobal

        Inserts @key: @value pair. Replaces existing pair with the same @key

      • voidfunctionsetFlt(intobject, stringkey, floatvalue)NativeGlobal
      • voidfunctionsetStr(intobject, stringkey, stringvalue)NativeGlobal
      • voidfunctionsetObj(intobject, stringkey, intcontainer)NativeGlobal
      • voidfunctionsetForm(intobject, stringkey, Formvalue)NativeGlobal
      • boolfunctionhasKey(intobject, stringkey)NativeGlobal

        Returns true, if the container has @key: value pair

      • intfunctionvalueType(intobject, stringkey)NativeGlobal

        Returns type of the value associated with the @key.
        0 - no value, 1 - none, 2 - int, 3 - float, 4 - form, 5 - object, 6 - string

      • intfunctionallKeys(intobject)NativeGlobal

        Returns a new array containing all keys

      • string[]functionallKeysPArray(intobject)NativeGlobal
      • intfunctionallValues(intobject)NativeGlobal

        Returns a new array containing all values

      • boolfunctionremoveKey(intobject, stringkey)NativeGlobal

        Removes the pair from the container where the key equals to the @key

      • intfunctioncount(intobject)NativeGlobal

        Returns count of pairs in the conainer

      • voidfunctionclear(intobject)NativeGlobal

        Removes all pairs from the container

      • voidfunctionaddPairs(intobject, intsource, booloverrideDuplicates)NativeGlobal

        Inserts key-value pairs from the source container

      • stringfunctionnextKey(intobject, stringpreviousKey="", stringendKey="")NativeGlobal

        Simplifies iteration over container's contents.
        Accepts the @previousKey, returns the next key.
        If @previousKey == @endKey the function returns the first key.
        The function always returns so-called 'valid' keys (the ones != @endKey).
        The function returns @endKey ('invalid' key) only once to signal that iteration has reached its end.
        In most cases, if the map doesn't contain an invalid key ("" for JMap, None form-key for JFormMap)
        it's ok to omit the @endKey.

        Usage:

          string key = JMap.nextKey(map, previousKey="", endKey="")
          while key != ""
            <retrieve values here>
            key = JMap.nextKey(map, key, endKey="")
          endwhile
        
      • stringfunctiongetNthKey(intobject, intkeyIndex)NativeGlobal

        Retrieves N-th key. negative index accesses items from the end of container counting backwards.
        Worst complexity is O(n/2)

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