Skip to content

Procedures

Kakrain edited this page Jun 14, 2026 · 3 revisions

Procedures (-> and ~>)

Function Description
A->SetField(field:string,value:any) for every record of A, sets that specific field with the value specified
A->SetFieldIfExist(field:string,value:any) same as SetField, but does nothing if the field does not exists.
A->SetText(f:lambda) modifies, every text of records of A with the specific lambda, a record can have multiple texts: text0, text1,..textn, all of them are processed
A->ForceSetField(field:string,value,type:string) same as setField, but if this field does not exists, the field is created with the type specified in "type"
A->DeleteRecords() Delete all records in group_record A
A->DeleteRecordsFromPatch() Delete all mention of records in the current patch (the patch does nothing to these records anymore)
A->DeleteEmptyRecordsFromPatch() Delete all mention of of records in the current patch that are empty anyways
A->DeleteFieldInPatch(field:string) Delete all mention of a specific field in all records in the current patch
A->EditExtraData(category:string, f_array:Array of lambdas, optional isValid:Array of labmdas) edit all arguments of the Extra Data in a specific category given array of lambdas f, ignoring the arguments that are not Valid, if isValid is provided
A->AddExtraData(B:record group, category:string, optional arguments:Array of Integers) add all records of B into all records in A as Extra Data in the specified category, with the specified arguments if provided otherwise [0,0,0]
A->ForceAddExtraData(B:record group,category:string,optional arguments:Array) Same as AddExtraData, but adds it anyways even if it is already added, this is specially needed when deleting an ExtraData
A->RemoveExtraData(B:record group,category:string) remove all records of B from Extra Data of A in the category specified
A~>SetFieldFromOther(B:record group, field:string, f:lambda) for every record A[i] set its corresponding value of the specified field given by f(B[i])

Fields & Types

Valid value types for ForceSetField:

bool
float
long
vec3
vec4
string
filename

-> Apply all-to-all (cross product)

allraces -> AddExtraData(hairs)

Every race gets every hair.


~> Apply one-to-one (paired lists)

someRaces ~> AddExtraData(oneHairEach)

❌ Error if input lists differ in size.

Clone this wiki locally