Difference between revisions of "TES5Edit Scripting Functions"

no edit summary
imported>ThreeTen
imported>ThreeTen
Line 226: Line 226:
|- align="left" style="background-color: #EEEEEE"
|- align="left" style="background-color: #EEEEEE"
| scope="row" | <b>RemoveNode</b> || boolean || node : IwbElement  || Removes the node from the file.  Use this instead of Remove/RemoveElement to avoid errors when removing elements selected by and visible to the user.
| scope="row" | <b>RemoveNode</b> || boolean || node : IwbElement  || Removes the node from the file.  Use this instead of Remove/RemoveElement to avoid errors when removing elements selected by and visible to the user.
| scope="row" | <b>RemoveFilter</b> || || || Removes all Mod filters. (Equivalent to Right Click -> Remove Filter).  Useful for visually correcting the contents of a file that has had records/GRUPs removed via RemoveNode().
|- align="left" style="background-color: #F8F8F8"
|- align="left" style="background-color: #F8F8F8"
| scope="row" | <b>RemoveFilter</b> ||  ||  || Removes all Mod filters.  Useful for visually correcting the contents of a file that has had records/GRUPs removed via RemoveNode.
|- align="left" style="background-color: #EEEEEE"
| scope="row" | <b>ResourceCopy</b> ||  || container : IwbContainer , fileName : string , pathOut : string , containerIndex : integer  ||  
| scope="row" | <b>ResourceCopy</b> ||  || container : IwbContainer , fileName : string , pathOut : string , containerIndex : integer  ||  
|- align="left" style="background-color: #F8F8F8"
| scope="row" | <b>ResourceCount</b> || cardinal || container : IwbContainer , aFileName : string , containers : TStrings  ||
|- align="left" style="background-color: #EEEEEE"
|- align="left" style="background-color: #EEEEEE"
| scope="row" | <b>ResourceCount</b> || cardinal || container : IwbContainer , aFileName : string , containers : TStrings ||  
| scope="row" | <b>ResourceExists</b> || boolean || container : IwbContainer , aFileName : string  ||  
|- align="left" style="background-color: #F8F8F8"
|- align="left" style="background-color: #F8F8F8"
| scope="row" | <b>ResourceExists</b> || boolean || container : IwbContainer , aFileName : string  ||  
| scope="row" | <b>ResourceList</b> || || container : IwbContainer , aContainerName : string , containers : TStrings ||  
|- align="left" style="background-color: #EEEEEE"
|- align="left" style="background-color: #EEEEEE"
| scope="row" | <b>ResourceList</b> ||  || container : IwbContainer , aContainerName : string , containers : TStrings ||  
| scope="row" | <b>ReverseElements</b> ||  || container : IwbContainer  || Reverses the order of a list of elements in a container
|- align="left" style="background-color: #F8F8F8"
|- align="left" style="background-color: #F8F8F8"
| scope="row" | <b>ReverseElements</b> ||  || container : IwbContainer || Reverses the order of a list of elements in a container
| scope="row" | <b>SetEditValue</b> ||  || element : IwbElement , value : string || Sets the value of the element as string (you can set Form members by using their formID string as the second parameter of this function, e.g. '01A32FF8')
|- 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 (you can set Form members by using their formID string as the second parameter of this function, e.g. '01A32FF8')
| scope="row" | <b>SetElementEditValues</b> ||  || container : IwbContainer , path : string , value : string  || Sets the value as a string of the element by its path
|- align="left" style="background-color: #F8F8F8"
|- align="left" style="background-color: #F8F8F8"
| scope="row" | <b>SetElementEditValues</b> ||  || container : IwbContainer , path : string , value : string || Sets the value as a string of the element by its path
| scope="row" | <b>SetElementNativeValues</b> ||  || container : IwbContainer , path : string , value : variant || Sets the native value of the element by its path
|- align="left" style="background-color: #EEEEEE"
|- align="left" style="background-color: #EEEEEE"
| scope="row" | <b>SetElementNativeValues</b> ||  || container : IwbContainer , path : string , value : variant || Sets the native value of the element by its path
| scope="row" | <b>SetFormVersion</b> ||  || record : IwbMainRecord , version : integer ||  
|- align="left" style="background-color: #F8F8F8"
|- align="left" style="background-color: #F8F8F8"
| scope="row" | <b>SetFormVersion</b> ||  || record : IwbMainRecord , version : integer ||  
| scope="row" | <b>SetIsDeleted</b> ||  || record : IwbMainRecord , value : boolean || Enables/disables deleted flag for a record
|- align="left" style="background-color: #EEEEEE"
|- align="left" style="background-color: #EEEEEE"
| scope="row" | <b>SetIsDeleted</b> ||  || record : IwbMainRecord , value : boolean  || Enables/disables deleted flag for a record
| scope="row" | <b>SetIsESM</b> ||  || file : IwbFile , value : boolean  || Enables/disbles ESM flag for a file
|- align="left" style="background-color: #F8F8F8"
|- align="left" style="background-color: #F8F8F8"
| scope="row" | <b>SetIsESM</b> ||  || file : IwbFile , value : boolean  || Enables/disbles ESM flag for a file
| scope="row" | <b>SetIsInitiallyDisabled</b> ||  || record : IwbMainRecord , value : boolean  || Enables/disables the initially disabled flag for a record.
|- align="left" style="background-color: #EEEEEE"
|- align="left" style="background-color: #EEEEEE"
| scope="row" | <b>SetIsInitiallyDisabled</b> ||  || record : IwbMainRecord , value : boolean  || Enables/disables the initially disabled flag for a record.
| scope="row" | <b>SetIsPersistent</b> ||  || record : IwbMainRecord , value : boolean  || Enables/disables the persistent flag for a record.
|- align="left" style="background-color: #F8F8F8"
|- align="left" style="background-color: #F8F8F8"
| scope="row" | <b>SetIsPersistent</b> ||  || record : IwbMainRecord , value : boolean  || Enables/disables the persistent flag for a record.
| scope="row" | <b>SetIsVisibleWhenDistant</b> ||  || record : IwbMainRecord , value : boolean  || Enables/disables the visible when distant flag for a record.
|- align="left" style="background-color: #EEEEEE"
|- align="left" style="background-color: #EEEEEE"
| scope="row" | <b>SetIsVisibleWhenDistant</b> ||  || record : IwbMainRecord , value : boolean || Enables/disables the visible when distant flag for a record.
| scope="row" | <b>SetLoadOrderFormID</b> ||  || record : IwbMainRecord , loadOrderFormId : cardinal || Changes the 8-digit hexadecimal Form ID for a record
|- align="left" style="background-color: #F8F8F8"
|- align="left" style="background-color: #F8F8F8"
| scope="row" | <b>SetLoadOrderFormID</b> ||  || record : IwbMainRecord , loadOrderFormId : cardinal || Changes the 8-digit hexadecimal Form ID for a record
| scope="row" | <b>SetNativeValue</b> ||  || element : IwbElement , value : variant || Sets the native value of the element
|- 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>ShortName</b> || string || element : IwbElement  || Gets the short name of the element
|- align="left" style="background-color: #F8F8F8"
|- align="left" style="background-color: #F8F8F8"
| scope="row" | <b>ShortName</b> || string || element : IwbElement || Gets the short name of the element
| scope="row" | <b>Signature</b> || string || record : IwbMainRecord || Gets the signature of a record
|- align="left" style="background-color: #EEEEEE"
|- align="left" style="background-color: #EEEEEE"
| scope="row" | <b>Signature</b> || string || record : IwbMainRecord || Gets the signature of a record
| scope="row" | <b>SortKey</b> || string || element : IwbElement, aExtended: boolean || Outputs a string unique to the element entered.  This can be used for sorting elements or for comparing them.  E.g. You could compare the SortKey for two elements in records which override each other to see if they are different from each other.
|- align="left" style="background-color: #F8F8F8"
|- align="left" style="background-color: #F8F8F8"
| scope="row" | <b>SortKey</b> || string || element : IwbElement, aExtended: boolean || Outputs a string unique to the element entered.  This can be used for sorting elements or for comparing them.  E.g. You could compare the SortKey for two elements in records which override each other to see if they are different from each other.
| scope="row" | <b>SortMasters</b> || || file : IwbFile || Attempts to sort the masters for a file by their load order
|- align="left" style="background-color: #EEEEEE"
|- align="left" style="background-color: #EEEEEE"
| scope="row" | <b>SortMasters</b> || || file : IwbFile  || Attempts to sort the masters for a file by their load order
| scope="row" | <b>wbCopyElementToFile</b> || IwbElement || element : IwbElement , file : IwbFile , aAsNew : boolean , aDeepCopy : boolean || Copies an IwbMainRecord, IwbGroupRecord, or IwbContainer to the specified file.  The aAsNew boolean controls whether or not you're copying the record as an override record.
|- 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  || Copies an IwbMainRecord, IwbGroupRecord, or IwbContainer to the specified fileThe aAsNew boolean controls whether or not you're copying the record as an override record.
| scope="row" | <b>wbCopyElementToRecord</b> || IwbElement || element : IwbElement , aMainRecord : IwbMainRecord , aAsNew : boolean , aDeepCopy : boolean  || Copies an element to a recordE.g. the "conditions" element on a COBJ record, or a faction from an NPC_ record.
|- align="left" style="background-color: #EEEEEE"
|- align="left" style="background-color: #EEEEEE"
| scope="row" | <b>wbCopyElementToRecord</b> || IwbElement || element : IwbElement , aMainRecord : IwbMainRecord , aAsNew : boolean , aDeepCopy : boolean  || Copies an element to a record.  E.g. the "conditions" element on a COBJ record, or a faction from an NPC_ record.
|- align="left" style="background-color: #F8F8F8"
| scope="row" | <b>WinningOverride</b> || IwbMainRecord || record : IwbMainRecord  || Will return the winning override record
| scope="row" | <b>WinningOverride</b> || IwbMainRecord || record : IwbMainRecord  || Will return the winning override record
|}
|}
Anonymous user