SkyBox  0.8
Share items between Skyrim playthroughs
Static Public Member Functions | List of all members
vSS_API_Item Class Reference

Save and restore item data, including custom items. More...

Inheritance diagram for vSS_API_Item:
vSS_APIBase

Static Public Member Functions

String GetItemName (String asItemID)
 
Int GetItemJMap (String asItemID)
 
Int GetItemInfosForForm (Form akForm)
 
 SetItemInfosForForm (Form akForm, Int jItemInfoMap)
 
String AssignItemID (Int ajObjectInfo)
 
String SaveItem (Int ajObjectInfo, String asItemId="")
 
String SerializeObject (ObjectReference akObject)
 
String SerializeEquipment (ObjectReference akObject)
 
ObjectReference CreateObject (String asItemID)
 
ObjectReference CreateObjectFromJObj (Int ajObjectInfo)
 
ObjectReference CustomizeEquipment (String asItemID, ObjectReference akObject)
 
ObjectReference CustomizeObjectFromJObj (Int ajItemInfo, ObjectReference akObject)
 
ObjectReference CustomizeEquipmentFromJObj (Int ajItemInfo, ObjectReference akObject)
 
String SerializePotion (Form akItem)
 
Potion CreatePotionFromPotionData (Int jPotionData)
 
ObjectReference CreatePotion (String asItemID)
 
Form GetExistingObject (String asItemID)
 
String GetObjectID (ObjectReference akObject)
 
 SetObjectID (ObjectReference akObject, String asItemID)
 
 DebugTraceAPIItem (String sDebugString, Int iSeverity=0)
 
String GetFormIDString (Form kForm)
 

Additional Inherited Members

- Public Attributes inherited from vSS_APIBase
String META = ".Info"
 

Detailed Description

Save and restore item data, including custom items.

Member Function Documentation

String vSS_API_Item::AssignItemID ( Int  ajObjectInfo)
inlinestatic

Retrieve or create an ItemID for ajObjectInfo. If it has been serialized before, it will return its current itemID.

Parameters
ajObjectInfoAn ObjectInfo JObject.
Returns
The assigned ItemID.
ObjectReference vSS_API_Item::CreateObject ( String  asItemID)
inlinestatic

Recreate an item from scratch using its ItemID.

Parameters
asItemIDThe ItemID of the object to create.
Returns
The newly created ObjectReference, or None.
ObjectReference vSS_API_Item::CreateObjectFromJObj ( Int  ajObjectInfo)
inlinestatic

Recreate an item from scratch using an appropriate JContainers object.

Parameters
ajObjectInfoAn ObjectInfo JObject.
Returns
The newly created ObjectReference, or None.
ObjectReference vSS_API_Item::CreatePotion ( String  asItemID)
inlinestatic

Recreate a custom potion using the data from asItemID.

Parameters
asItemIDThe ItemID of the potion.
Returns
The newly created Potion.
Potion vSS_API_Item::CreatePotionFromPotionData ( Int  jPotionData)
inlinestatic

Create a custom potion using jPotionData.

Parameters
jPotionDataA PotionData JObject.
Returns
The newly created Potion.
ObjectReference vSS_API_Item::CustomizeEquipment ( String  asItemID,
ObjectReference  akObject 
)
inlinestatic

Apply the customization information from the JObject referenced by asItemID to akObject.

Parameters
asItemIDThe ItemID of the object to create.
akObjectThe ObjectReference to customize.
Returns
The customized ObjectReference.
ObjectReference vSS_API_Item::CustomizeEquipmentFromJObj ( Int  ajItemInfo,
ObjectReference  akObject 
)
inlinestatic

Apply the customization information from ajItemInfo to weapon or armor akObject.

Parameters
ajItemInfoAn ObjectInfo JObject.
akObjectThe ObjectReference to customize.
Returns
The newly customized ObjectReference.
ObjectReference vSS_API_Item::CustomizeObjectFromJObj ( Int  ajItemInfo,
ObjectReference  akObject 
)
inlinestatic

Apply the customization information from ajItemInfo to akObject.

Parameters
ajItemInfoAn ObjectInfo JObject.
akObjectThe ObjectReference to customize.
Returns
The newly customized ObjectReference.
vSS_API_Item::DebugTraceAPIItem ( String  sDebugString,
Int  iSeverity = 0 
)
inlinestatic

Wrapper for Debug.Trace that makes it easy to read in the log file.

Parameters
sDebugStringThe text to log.
iSeverity0 = Info, 1 = Warn, 2 = Error.
Form vSS_API_Item::GetExistingObject ( String  asItemID)
inlinestatic

Return an existing reference to the object in asItemID, if it exists.

Parameters
asItemIDThe ItemID to look up.
Returns
An existing Form, if it exists, otherwise None.
String vSS_API_Item::GetFormIDString ( Form  kForm)
inlinestatic

Return a nicely formatted FormID string.

Parameters
kFormForm to get the FormID of.
Returns
String containing the FormID.
Int vSS_API_Item::GetItemInfosForForm ( Form  akForm)
inlinestatic

Return a JMap of JItemInfos already saved for akForm.

Parameters
akFormA form.
Returns
A jItemInfoMap.
Int vSS_API_Item::GetItemJMap ( String  asItemID)
inlinestatic

Return the JMap object of the specified item.

Parameters
asItemIDThe UUID of the requested item.
Returns
The JMap ID or -2 if not found.
String vSS_API_Item::GetItemName ( String  asItemID)
inlinestatic

Return the name of the specified item.

Parameters
asItemIDThe UUID of the requested item.
Returns
The name of the item, or an empty string if not found.
String vSS_API_Item::GetObjectID ( ObjectReference  akObject)
inlinestatic

Return the ItemID for an ObjectReference, if one exists.

Parameters
akObjectThe ObjectReference to look up.
Returns
The ItemID of an already serialized Form, or an empty string.
String vSS_API_Item::SaveItem ( Int  ajObjectInfo,
String  asItemId = "" 
)
inlinestatic

Save an item in the registry based on the data in ajObjectInfo.

Parameters
ajObjectInfoAn ObjectInfo JObject.
asItemIdThe desired ItemID for the object.
Returns
The assigned ItemID.
String vSS_API_Item::SerializeEquipment ( ObjectReference  akObject)
inlinestatic

Serialize weapons and armor if it is customized.

Parameters
akObjectThe ObjectReference to serialize.
Returns
A string containing the JSON serialization of akObject.
String vSS_API_Item::SerializeObject ( ObjectReference  akObject)
inlinestatic

Serialize an objectReference if it is customized.

Parameters
akObjectThe ObjectReference to serialize.
Returns
A string containing the JSON serialization of akObject.
String vSS_API_Item::SerializePotion ( Form  akItem)
inlinestatic

Serialize a custom potion and return its new ItemID.

Parameters
akItemThe Potion or Poison to serialize.
Returns
A string containing the JSON serialization of akItem.
vSS_API_Item::SetItemInfosForForm ( Form  akForm,
Int  jItemInfoMap 
)
inlinestatic

Set or create an ItemInfoMap for akForm.

Parameters
akFormA form.
jItemInfoMapThe ItemInfoMap to set.
vSS_API_Item::SetObjectID ( ObjectReference  akObject,
String  asItemID 
)
inlinestatic

Set the ItemID for an ObjectReference, creating an ItemIDMap if one does not exist.

Parameters
akObjectThe target ObjectReference.
asItemIDThe ItemID to set.

The documentation for this class was generated from the following file: