Difference between revisions of "TES5Edit Scripting Functions"
Jump to navigation
Jump to search
→TES5Edit Scripting Functions: -- I added a bunch of descriptions, corrected one or two things
imported>Turulo |
imported>Mator (→TES5Edit Scripting Functions: -- I added a bunch of descriptions, corrected one or two things) |
||
Line 27: | Line 27: | ||
| scope="row" | <b>AdditionalElementCount</b> || integer || container : IwbContainer || | | scope="row" | <b>AdditionalElementCount</b> || integer || container : IwbContainer || | ||
|- align="left" style="background-color: #EEEEEE" | |- align="left" style="background-color: #EEEEEE" | ||
| scope="row" | <b>AddMasterIfMissing</b> || || file : IwbFile , mastername : string || | | scope="row" | <b>AddMasterIfMissing</b> || || file : IwbFile , mastername : string || Adds a master to a file by its filename if it isn't already a master for that file | ||
|- align="left" style="background-color: #F8F8F8" | |- align="left" style="background-color: #F8F8F8" | ||
| scope="row" | <b>AddMessage</b> || || message : string || Adds a message line into the TES5Edit output panel | | scope="row" | <b>AddMessage</b> || || message : string || Adds a message line into the TES5Edit output panel | ||
Line 35: | Line 35: | ||
| scope="row" | <b>AddRequiredElementMasters</b> || IwbFile || aSourceElement : IwbElement , aTargetFile : IwbFile , aAsNew : boolean || Add the element''s master into the target file. | | scope="row" | <b>AddRequiredElementMasters</b> || IwbFile || aSourceElement : IwbElement , aTargetFile : IwbFile , aAsNew : boolean || Add the element''s master into the target file. | ||
|- align="left" style="background-color: #EEEEEE" | |- align="left" style="background-color: #EEEEEE" | ||
| scope="row" | <b>Assigned</b> || || element : IwbElement || | | scope="row" | <b>Assigned</b> || || element : IwbElement || <!-- I'm fairly certain this is a general pascal function, not a TES5Edit function. It checks whether or not a variable is Assigned --> | ||
|- align="left" style="background-color: #F8F8F8" | |- align="left" style="background-color: #F8F8F8" | ||
| scope="row" | <b>CanContainFormIDs</b> || boolean || element : IwbElement || | | scope="row" | <b>CanContainFormIDs</b> || boolean || element : IwbElement || | ||
|- align="left" style="background-color: #EEEEEE" | |- align="left" style="background-color: #EEEEEE" | ||
| scope="row" | <b>CanMoveDown</b> || boolean || element : IwbElement || | | scope="row" | <b>CanMoveDown</b> || boolean || element : IwbElement || Checks if an element can by moved down a list to a higher index | ||
|- align="left" style="background-color: #F8F8F8" | |- align="left" style="background-color: #F8F8F8" | ||
| scope="row" | <b>CanMoveUp</b> || boolean || element : IwbElement || | | scope="row" | <b>CanMoveUp</b> || boolean || element : IwbElement || Checks if an element can be moved up a list to a lower index | ||
|- align="left" style="background-color: #EEEEEE" | |- align="left" style="background-color: #EEEEEE" | ||
| scope="row" | <b>ChangeFormSignature</b> || || record : IwbMainRecord , signature : TwbSignature || | | scope="row" | <b>ChangeFormSignature</b> || || record : IwbMainRecord , signature : TwbSignature || | ||
Line 97: | Line 97: | ||
| scope="row" | <b>FormID</b> || cardinal || aMainRecord : IwbMainRecord || Obtains the FormID of the record | | scope="row" | <b>FormID</b> || cardinal || aMainRecord : IwbMainRecord || Obtains the FormID of the record | ||
|- align="left" style="background-color: #F8F8F8" | |- align="left" style="background-color: #F8F8F8" | ||
| scope="row" | <b>FullPath</b> || string || element : IwbElement || | | scope="row" | <b>FullPath</b> || string || element : IwbElement || Gives the full path, all the way down to file, of the input element | ||
|- align="left" style="background-color: #EEEEEE" | |- align="left" style="background-color: #EEEEEE" | ||
| scope="row" | <b>GetContainer</b> || IwbContainer || element : IwbElement || Gets the container of the element | | scope="row" | <b>GetContainer</b> || IwbContainer || element : IwbElement || Gets the container of the element | ||
Line 129: | Line 129: | ||
| scope="row" | <b>GetNativeValue</b> || variant || element : IwbElement || Gets the element's native value | | scope="row" | <b>GetNativeValue</b> || variant || element : IwbElement || Gets the element's native value | ||
|- align="left" style="background-color: #F8F8F8" | |- align="left" style="background-color: #F8F8F8" | ||
| scope="row" | <b>GroupBySignature</b> || || file : IwbFile , signature : string || | | scope="row" | <b>GroupBySignature</b> || || file : IwbFile , signature : string || Selects a group in a file by its signature | ||
|- align="left" style="background-color: #EEEEEE" | |- align="left" style="background-color: #EEEEEE" | ||
| scope="row" | <b>GroupLabel</b> || cardinal || group : IwbGroupRecord || | | scope="row" | <b>GroupLabel</b> || cardinal || group : IwbGroupRecord || | ||
Line 135: | Line 135: | ||
| scope="row" | <b>GroupType</b> || integer || group : IwbGroupRecord || | | scope="row" | <b>GroupType</b> || integer || group : IwbGroupRecord || | ||
|- align="left" style="background-color: #EEEEEE" | |- align="left" style="background-color: #EEEEEE" | ||
| scope="row" | <b>HasGroup</b> || boolean || file : IwbFile , signature : string || | | scope="row" | <b>HasGroup</b> || boolean || file : IwbFile , signature : string || Checks if a file has a group by the group's signature | ||
|- align="left" style="background-color: #F8F8F8" | |- align="left" style="background-color: #F8F8F8" | ||
| scope="row" | <b>HasMaster</b> || boolean || file : IwbFile , signature : string || Returns true if the file has a master file defined | | scope="row" | <b>HasMaster</b> || boolean || file : IwbFile , signature : string || Returns true if the file has a master file defined | ||
Line 149: | Line 149: | ||
| scope="row" | <b>IsMaster</b> || boolean || record : IwbMainRecord || | | scope="row" | <b>IsMaster</b> || boolean || record : IwbMainRecord || | ||
|- align="left" style="background-color: #F8F8F8" | |- align="left" style="background-color: #F8F8F8" | ||
| scope="row" | <b>IsWinningOverride</b> || boolean || record : IwbMainRecord || | | scope="row" | <b>IsWinningOverride</b> || boolean || record : IwbMainRecord || Checks whether or not the record is the highest override loaded | ||
|- align="left" style="background-color: #EEEEEE" | |- align="left" style="background-color: #EEEEEE" | ||
| scope="row" | <b>JumpTo</b> || TConflictThis || record : IwbMainRecord , backward : boolean || Selects the specified record | | scope="row" | <b>JumpTo</b> || TConflictThis || record : IwbMainRecord , backward : boolean || Selects the specified record | ||
Line 159: | Line 159: | ||
| scope="row" | <b>LoadOrderFormIDtoFileFormID</b> || cardinal || file : IwbFile , aFormID : cardinal || | | scope="row" | <b>LoadOrderFormIDtoFileFormID</b> || cardinal || file : IwbFile , aFormID : cardinal || | ||
|- align="left" style="background-color: #EEEEEE" | |- align="left" style="background-color: #EEEEEE" | ||
| scope="row" | <b>MainRecordByEditorID</b> || IwbMainRecord || group : IwbGroupRecord || Does not work for every case because | | scope="row" | <b>MainRecordByEditorID</b> || IwbMainRecord || group : IwbGroupRecord || Does not work for every case because it's inefficient | ||
|- align="left" style="background-color: #F8F8F8" | |- align="left" style="background-color: #F8F8F8" | ||
| scope="row" | <b>Master</b> || IInterface || record : IwbMainRecord || | | scope="row" | <b>Master</b> || IInterface || record : IwbMainRecord || | ||
Line 175: | Line 175: | ||
| scope="row" | <b>Name</b> || || element : IwbElement || Obtains the name of the element | | scope="row" | <b>Name</b> || || element : IwbElement || Obtains the name of the element | ||
|- align="left" style="background-color: #EEEEEE" | |- align="left" style="background-color: #EEEEEE" | ||
| scope="row" | <b>OverrideByIndex</b> || IwbMainRecord || record : IwbMainRecord , index : integer || | | scope="row" | <b>OverrideByIndex</b> || IwbMainRecord || record : IwbMainRecord , index : integer || Gives the overriding record associated with the provided index | ||
|- align="left" style="background-color: #F8F8F8" | |- align="left" style="background-color: #F8F8F8" | ||
| scope="row" | <b>OverrideCount</b> || cardinal || record : IwbMainRecord || | | scope="row" | <b>OverrideCount</b> || cardinal || record : IwbMainRecord || Provides a value for the number of overrides there are for a given record | ||
|- align="left" style="background-color: #EEEEEE" | |- align="left" style="background-color: #EEEEEE" | ||
| scope="row" | <b>Path</b> || string || element : IwbElement || | | scope="row" | <b>Path</b> || string || element : IwbElement || | ||
Line 187: | Line 187: | ||
| scope="row" | <b>RecordByIndex</b> || IwbMainRecord || file : IwbFile , index : integer || | | scope="row" | <b>RecordByIndex</b> || IwbMainRecord || file : IwbFile , index : integer || | ||
|- align="left" style="background-color: #EEEEEE" | |- align="left" style="background-color: #EEEEEE" | ||
| scope="row" | <b>RecordCount</b> || cardinal || file : IwbFile || | | scope="row" | <b>RecordCount</b> || cardinal || file : IwbFile || Returns a value corresponding to the number of records in a file | ||
|- align="left" style="background-color: #F8F8F8" | |- align="left" style="background-color: #F8F8F8" | ||
| scope="row" | <b>ReferencedByCount</b> || cardinal || record : IwbMainRecord || | | scope="row" | <b>ReferencedByCount</b> || cardinal || record : IwbMainRecord || | ||
Line 193: | Line 193: | ||
| scope="row" | <b>ReferencedByIndex</b> || IwbMainRecord || record : IwbMainRecord , index : integer || | | scope="row" | <b>ReferencedByIndex</b> || IwbMainRecord || record : IwbMainRecord , index : integer || | ||
|- align="left" style="background-color: #F8F8F8" | |- align="left" style="background-color: #F8F8F8" | ||
| scope="row" | <b>Remove</b> || || element : IwbElement || | | scope="row" | <b>Remove</b> || || element : IwbElement || Removes an element | ||
|- align="left" style="background-color: #EEEEEE" | |- align="left" style="background-color: #EEEEEE" | ||
| scope="row" | <b>RemoveByIndex</b> || IwbElement || container : IwbContainer , index : integer , aMarkModified : boolean || | | scope="row" | <b>RemoveByIndex</b> || IwbElement || container : IwbContainer , index : integer , aMarkModified : boolean || | ||
Line 209: | Line 209: | ||
| scope="row" | <b>ResourceList</b> || || container : IwbContainer , aContainerName : string , containers : TStrings || | | scope="row" | <b>ResourceList</b> || || container : IwbContainer , aContainerName : string , containers : TStrings || | ||
|- align="left" style="background-color: #F8F8F8" | |- align="left" style="background-color: #F8F8F8" | ||
| scope="row" | <b>ReverseElements</b> || || container : IwbContainer || | | scope="row" | <b>ReverseElements</b> || || container : IwbContainer || Reverses the order of a list of elements in a container | ||
|- align="left" style="background-color: #EEEEEE" | |- align="left" style="background-color: #EEEEEE" | ||
| scope="row" | <b>SetEditValue</b> || || element : IwbElement , value : string || Sets the value of the element as string | | scope="row" | <b>SetEditValue</b> || || element : IwbElement , value : string || Sets the value of the element as string | ||
Line 219: | Line 219: | ||
| scope="row" | <b>SetFormVersion</b> || || record : IwbMainRecord , version : integer || | | scope="row" | <b>SetFormVersion</b> || || record : IwbMainRecord , version : integer || | ||
|- align="left" style="background-color: #EEEEEE" | |- align="left" style="background-color: #EEEEEE" | ||
| scope="row" | <b>SetIsDeleted</b> || || record : IwbMainRecord , value : boolean || | | scope="row" | <b>SetIsDeleted</b> || || record : IwbMainRecord , value : boolean || Enables/disables deleted flag for a record | ||
|- align="left" style="background-color: #F8F8F8" | |- align="left" style="background-color: #F8F8F8" | ||
| scope="row" | <b>SetIsESM</b> || || file : IwbFile , value : boolean || | | scope="row" | <b>SetIsESM</b> || || file : IwbFile , value : boolean || Enables/disbles ESM flag for a file | ||
|- align="left" style="background-color: #EEEEEE" | |- align="left" style="background-color: #EEEEEE" | ||
| scope="row" | <b>SetIsInitiallyDisabled</b> || || record : IwbMainRecord , value : boolean || | | scope="row" | <b>SetIsInitiallyDisabled</b> || || record : IwbMainRecord , value : boolean || | ||
Line 229: | Line 229: | ||
| scope="row" | <b>SetIsVisibleWhenDistant</b> || || record : IwbMainRecord , value : boolean || | | scope="row" | <b>SetIsVisibleWhenDistant</b> || || record : IwbMainRecord , value : boolean || | ||
|- align="left" style="background-color: #F8F8F8" | |- align="left" style="background-color: #F8F8F8" | ||
| scope="row" | <b>SetLoadOrderFormID</b> || || record : IwbMainRecord , loadOrderFormId : cardinal || | | scope="row" | <b>SetLoadOrderFormID</b> || || record : IwbMainRecord , loadOrderFormId : cardinal || Changes the 8-digit hexadecimal Form ID for a record | ||
|- align="left" style="background-color: #EEEEEE" | |- align="left" style="background-color: #EEEEEE" | ||
| scope="row" | <b>SetNativeValue</b> || || element : IwbElement , value : variant || Sets the native value of the element | | scope="row" | <b>SetNativeValue</b> || || element : IwbElement , value : variant || Sets the native value of the element | ||
Line 235: | Line 235: | ||
| scope="row" | <b>ShortName</b> || string || element : IwbElement || Gets the short name of the element | | scope="row" | <b>ShortName</b> || string || element : IwbElement || Gets the short name of the element | ||
|- align="left" style="background-color: #EEEEEE" | |- align="left" style="background-color: #EEEEEE" | ||
| scope="row" | <b>Signature</b> || string || record : IwbMainRecord || | | scope="row" | <b>Signature</b> || string || record : IwbMainRecord || Gets the signature of a record | ||
|- align="left" style="background-color: #F8F8F8" | |- align="left" style="background-color: #F8F8F8" | ||
| scope="row" | <b>SortKey</b> || string || element : IwbElement, aExtended: boolean || | | scope="row" | <b>SortKey</b> || string || element : IwbElement, aExtended: boolean || | ||
|- align="left" style="background-color: #EEEEEE" | |- align="left" style="background-color: #EEEEEE" | ||
| scope="row" | <b>SortMasters</b> || || file : IwbFile || | | scope="row" | <b>SortMasters</b> || || file : IwbFile || Attempts to sort the masters for a file by their load order | ||
|- align="left" style="background-color: #F8F8F8" | |- align="left" style="background-color: #F8F8F8" | ||
| scope="row" | <b>wbCopyElementToFile</b> || IwbElement || element : IwbElement , file : IwbFile , aAsNew : boolean , aDeepCopy : boolean || | | scope="row" | <b>wbCopyElementToFile</b> || IwbElement || element : IwbElement , file : IwbFile , aAsNew : boolean , aDeepCopy : boolean || | ||
Line 245: | Line 245: | ||
| scope="row" | <b>wbCopyElementToRecord</b> || IwbElement || element : IwbElement , aMainRecord : IwbMainRecord , aAsNew : boolean , aDeepCopy : boolean || | | scope="row" | <b>wbCopyElementToRecord</b> || IwbElement || element : IwbElement , aMainRecord : IwbMainRecord , aAsNew : boolean , aDeepCopy : boolean || | ||
|- align="left" style="background-color: #F8F8F8" | |- align="left" style="background-color: #F8F8F8" | ||
| scope="row" | <b>WinningOverride</b> || | | scope="row" | <b>WinningOverride</b> || IwbMainRecord || record : IwbMainRecord || Will return the winning override record | ||
|} | |} | ||