TES5Edit Scripting Functions
Work in progress: To become the future home of scriptiong functions for TES5Edit. Turulo from the Nexus communithy started this but it's hard to do a lot of work alone. If you make scripts for TES5Edit please contribute to this page.
Returns,Method,Param1,Param2,Param3,Param4,Description IwbElement,Add,container : IwbContainer,name : string,silent = true : boolean,,Implemented for main records etc. ,AddElement,container : IwbContainer,element : IwbElement,,, integer,AdditionalElementCount,container : IwbContainer,,,, ,AddMasterIfMissing,file : IwbFile,mastername : string,,, ,AddMessage,message : string,,,,Adds a message line into the TES5Edit output panel IwbFile,AddNewFile,,,,,Adds a new file and returns its reference IwbFile,AddRequiredElementMasters,aSourceElement : IwbElement,aTargetFile : IwbFile,aAsNew : boolean,,Add the elements master into the target file. ,Assigned,element : IwbElement,,,, boolean,CanContainFormIDs,element : IwbElement,,,, boolean,CanMoveDown,element : IwbElement,,,, boolean,CanMoveUp,element : IwbElement,,,, ,ChangeFormSignature,record : IwbMainRecord,signature : TwbSignature,,, boolean,Check,element : IwbElement,,,, IwbGroupRecord,ChildGroup,record : IwbMainRecord,,,, IwbMainRecord,ChildrenOf,group : IwbGroupRecord,,,, ,CleanMasters,file : IwbFile,,,, boolean,CompareExchangeFormID,mainrecord : IwbMainRecord,oldFormID : Cardinal,aNewFormID : Cardinal,, TConflictThis,ConflictAllForMainRecord,record : IwbMainRecord,,,,Gets the ConflictThis argument of the record by calling ConflictLevelForMainRecord (see ctXxxxx enums) TConflictThis,ConflictAllForNode,node : IwbElement,,,,Gets the ConflictAll argument of the record by calling ConflictLevelForMainRecord (see ctXxxxx enums) TConflictThis,ConflictThisForMainRecord,record : IwbMainRecord,,,,Gets the ConflictThis argument of the record by calling ConflictLevelForMainRecord (see ctXxxxx enums) TConflictThis,ConflictThisForNode,node : IwbElement,,,,Gets the ConflictAll argument of the record by calling ConflictLevelForMainRecord (see ctXxxxx enums) IwbMainRecord,ContainingMainRecord,element : IwbElement,,,, TwbDefType,DefType,element : IInterface,,,,returns the IwbElement::DefType (see dtXxxx enums) IwbElement,ElementAssign,container : IwbContainer,aInder : integer,[element : IwbElement],aOnlySK : boolean,Adds a new element to the container IwbElement,ElementByIndex,container : IwbContainer,index : integer,,,Gets an element in the container by index IwbElement,ElementByName,container : IwbContainer,name : string,,,Gets an element in the container by name IwbElement,ElementByPath,container : IwbContainer,path : string,,,Gets an element in the container by path IwbElement,ElementBySignature,container : IwbContainer,signature : string,,,Gets an element in the container by its signature integer,ElementCount,container : IwbContainer,,,,Returns the number of elements in a container boolean,ElementExists,container : IwbContainer,name : string,,,Checks if the name of the element already exist in the container TwbElementType,ElementType,element : IwbElement,,,,Returns the ElementType of the element boolean,Equals,element1 : IwbElement,element2 : IwbElement,,,Compares both elements by their ElementID IwbFile,FileByIndex,index : integer,,,,Gets the file at the specified index IwbFile,FileByLoadOrder,loadorder : integer,,,,Gets the file at the specified load order cardinal,FileFormIDtoLoadOrderFormID,file : IwbFile,formid : string/cardinal,,, IwbGroupRecord,FindChildGroup,group : IwbGroupRecord,aType : integer,aMainRecord : IwbMainRecord,, cardinal,FixedFormID,aMainRecord : IwbMainRecord,,,, cardinal,FormID,aMainRecord : IwbMainRecord,,,,Obtains the FormID of the record string,FullPath,element : IwbElement,,,, IwbContainer,GetContainer,element : IwbElement,,,,Gets the container of the element string,GetEditValue,element : IwbElement,,,,Gets the element's value represented as text string,GetElementEditValues,element : IwbElement,name : string,,,Gets the element's value represented as text variant,GetElementNativeValues,element : IwbElement,name : string,,,Gets the element's native value IwbFile,GetFile,element : IwbElement,,,,Gets the file that defines the element string,GetFileName,file : IwbFile,,,,Obtains the filename of the plugin file cardinal,GetFormVersion,mainrecord : IwbMainRecord,,,, boolean,GetIsDeleted,mainrecord : IwbMainRecord,,,,Indicates if the record has been deleted boolean,GetIsESM,file : IwbFile,,,,Indicates if the plugin is an ESM file boolean,GetIsInitiallyDisabled,mainrecord : IwbMainRecord,,,, boolean,GetIsPersistent,mainrecord : IwbMainRecord,,,, boolean,GetIsVisibleWhenDistant,mainrecord : IwbMainRecord,,,, cardinal,GetLoadOrder,file : IwbFile,,,,Gets the global load order of the file cardinal,GetLoadOrderFormID,mainrecord : IwbMainRecord,,,,Obtains the FormID with the current load order applied variant,GetNativeValue,element : IwbElement,,,,Gets the element's native value ,GroupBySignature,file : IwbFile,signature : string,,, cardinal,GroupLabel,group : IwbGroupRecord,,,, integer,GroupType,group : IwbGroupRecord,,,, boolean,HasGroup,file : IwbFile,signature : string,,, boolean,HasMaster,file : IwbFile,signature : string,,,Returns true if the file has a master file defined integer,Inc,value : integer,,,,Increments the value integer,IndexOf,container : IwbContainer,element : IwbElement,,,Gets the index of the element inside the collection ,InsertElement,container : IwbContainer,position : integer,element : IwbElement,,Inserts an existing element inside a collection by position boolean,IsEditable,element : IwbElement,,,, boolean,IsInjected,element : IwbElement,,,, boolean,IsMaster,record : IwbMainRecord,,,, boolean,IsWinningOverride,record : IwbMainRecord,,,, TConflictThis,JumpTo,record : IwbMainRecord,backward : boolean,,,Selects the specified record IwbElement,LastElement,container : IwbContainer,,,,Obtains the last element in the collection IwbElement,LinksTo,element : IwbElement,,,,Obtains the referenced element cardinal,LoadOrderFormIDtoFileFormID,file : IwbFile,aFormID : cardinal,,, IwbMainRecord,MainRecordByEditorID,group : IwbGroupRecord,,,,Does not work for every case because its inefficient IInterface,Master,record : IwbMainRecord,,,, IInterface,MasterByIndex,file : IwbFile,index : integer,,, cardinal,MasterCount,file : IwbFile,,,, IwbMainRecord,MasterOrSelf,record : IwbMainRecord,,,, ,MoveDown,element : IwbElement,,,,Moves the element down ,MoveUp,element : IwbElement,,,,Moves the element up ,Name,element : IwbElement,,,,Obtains the name of the element IwbMainRecord,OverrideByIndex,record : IwbMainRecord,index : integer,,, cardinal,OverrideCount,record : IwbMainRecord,,,, string,Path,element : IwbElement,,,, IwbMainRecord,RecordByEditorID,file : IwbFile,editorid : string,,, IwbMainRecord,RecordByFormID,file : IwbFile,formid : integer,aAllowInjected : boolean,, IwbMainRecord,RecordByIndex,file : IwbFile,index : integer,,, cardinal,RecordCount,file : IwbFile,,,, cardinal,ReferencedByCount,record : IwbMainRecord,,,, IwbMainRecord,ReferencedByIndex,record : IwbMainRecord,index : integer,,, ,Remove,element : IwbElement,,,, IwbElement,RemoveByIndex,container : IwbContainer,index : integer,aMarkModified : boolean,, IwbElement,RemoveElement,container : IwbContainer,element : IwbElement,,, boolean,RemoveNode,node : IwbElement,,,,Removes the node from the file ,ResourceCopy,container : IwbContainer,fileName : string,pathOut : string,containerIndex : integer, cardinal,ResourceCount,container : IwbContainer,aFileName : string,containers : TStrings,, boolean,ResourceExists,container : IwbContainer,aFileName : string,,, ,ResourceList,container : IwbContainer,aContainerName : string,containers : TStrings,, ,ReverseElements,container : IwbContainer,,,, ,SetEditValue,element : IwbElement,value : string,,,Sets the value of the element as string ,SetElementEditValues,container : IwbContainer,path : string,value : string,,Sets the value as a string of the element by its path ,SetElementNativeValues,container : IwbContainer,path : string,value : variant,,Sets the native value of the element by its path ,SetFormVersion,record : IwbMainRecord,version : integer,,, ,SetIsDeleted,record : IwbMainRecord,value : boolean,,, ,SetIsESM,file : IwbFile,value : boolean,,, ,SetIsInitiallyDisabled,record : IwbMainRecord,value : boolean,,, ,SetIsPersistent,record : IwbMainRecord,value : boolean,,, ,SetIsVisibleWhenDistant,record : IwbMainRecord,value : boolean,,, ,SetLoadOrderFormID,record : IwbMainRecord,loadOrderFormId : cardinal,,, ,SetNativeValue,element : IwbElement,value : variant,,,Sets the native value of the element string,ShortName,element : IwbElement,,,,Gets the short name of the element string,Signature,record : IwbMainRecord,,,, string,SortKey,element : IwbElement,aExtended: boolean,,, ,SortMasters,file : IwbFile,,,, IwbElement,wbCopyElementToFile,element : IwbElement,file : IwbFile,aAsNew : boolean,aDeepCopy : boolean IwbElement,wbCopyElementToRecord,element : IwbElement,aMainRecord : IwbMainRecord,aAsNew : boolean,aDeepCopy : boolean boolean,WinningOverride,record : IwbMainRecord,,,