Plugin : Inst Group

Author:Rex.Rainbow

Download

Properties

Actions

Group

Action:Destroy all

  • Destroy all groups.

Action:Clean group

  • Clean group to empty.
    • Group ( string ) : Group name.

Action:Copy

  • Copy group to another group.
    • Source ( string ) : Group A.
    • Target ( string ) : Group result.

Action:Destroy group

  • Destroy group.
    • Group ( string ) : Group name.

Group: Add instances

Action:Add instances

  • Add instances into group.
    • Instances ( object ) : Instances to be added into group.
    • Group ( string ) : Group name.

Action:Add instances by UID

  • Add instances into group by UID.
    • UID ( number or string ) : The UID of instance to be added into group.
    • Group ( string ) : Group name.

Action:Clean & Add instances

  • Clean and Add instances into group.
    • Instances ( object ) : Instances to be set into group.
    • Group ( string ) : Group name.

Action:Clean & Add instance by UID

  • Clean and Add instances into group.
    • UID ( number or string ) : The UID of instance to be added into group.
    • Group ( string ) : Group name.

Group: JSON

Action:Load group

  • Load group from JSON string.
    • JSON string ( string ) : JSON string.
    • Group ( string ) : Group A.

Action:Load all

  • Load all groups from JSON string.
    • JSON string ( string ) : JSON string.

Group: Reomve instances

Action:Remove instances

  • Remove instances from group.
    • Instances ( object ) : Instances to be removed from group.
    • Group ( string ) : Group name.

Action:Remove instances by UID

  • Remove instances from group by UID.
    • UID ( number or string ) : The UID of instance to be removed from group.
    • Group ( string ) : Group name.

Group: Set operation

Action:A + B

  • Set group by Union operation.
    • A ( string ) : Group A.
    • B ( string ) : Group B.
    • Result ( string ) : Group result.

Action:A - B

  • Set group by complement operation.
    • A ( string ) : Group A.
    • B ( string ) : Group B.
    • Result ( string ) : Group result.

Action:A AND B

  • Set group by intersection operation.
    • A ( string ) : Group A.
    • B ( string ) : Group B.
    • Result ( string ) : Group result.

Instance

Action:Destroy instances

  • Destroy instances in group.
    • Group ( string ) : Group name.

List

Action:Reverse

  • Reverse group order.
    • Group ( string ) : Group name.

Action:Slice

  • Copy or pop group slice to another group.
    • Source ( string ) : Group A.
    • Start ( number ) : Start index.
    • End ( number ) : End index.
    • Target ( string ) : Group result.
    • Operation ( Combo ) : Copy or pop UID
      • Options : ["Copy","Pop"]

List: Push & Insert

Action:Push instances

  • Push instances into group.
    • Where ( Combo ) : Whether to insert at the beginning or the end of the group.
      • Options : ["back","front"]
    • Instances ( object ) : Instances to be added into group.
    • Group ( string ) : Group name.

Action:Push instance by UID

  • Push instances into group.
    • Where ( Combo ) : Whether to insert at the beginning or the end of the group.
      • Options : ["back","front"]
    • UID ( number or string ) : The UID of instance to be added into group.
    • Group ( string ) : Group name.

Action:Insert instances

  • Insert instances into group.
    • Instances ( object ) : Instances to be added into group.
    • Group ( string ) : Group name.
    • Index ( number ) : The zero-based index to insert to.

Action:Insert instance by UID

  • Insert instances into group.
    • UID ( number or string ) : The UID of instance to be added into group.
    • Group ( string ) : Group name.
    • Index ( number ) : The zero-based index to insert to.

List: Sort

Action:Shuffle

  • Shuffle group.
    • Group ( string ) : Group name.

Action:Sort by function

  • Sort group by function.
    • Group ( string ) : Group name.
    • Sorting function ( string ) : Sorting function of group

Action:Sort by UID

  • Sort group by UID.
    • Group ( string ) : Group name.
    • Order ( Combo ) : Order of UID.
      • Options : ["descending","ascending"]

List: Sort - Mapping function

Action:Sort by mapping

  • Sort group by the result of mapping function.
    • Group ( string ) : Group name.
    • Mapping ( string ) : Function name of mapping.
    • Order ( Combo ) : Order of mapping result.
      • Options : ["descending","ascending","logical descending","logical ascending"]

List: Sort function

Action:Set comparing result by number

  • Set comparing result. Used in callback of "Action: Sort group by function"
    • Result ( number ) : Comparing result. (-1) is (A < B), 0 is (A == B), 1 is (A > B)

Action:Set comparing result

  • Set comparing result. Used in callback of "Action: Sort group by function"
    • Result ( Combo ) : Result
      • Options : ["<","=",">"]

Mapping function

Action:Set mapping result

  • Set mapping result. Used under callback "Condition:On mapping"
    • Result ( number or string ) : Mapping result.

SOL - Mapping function

Action:Pop by mapping result

  • Get or pop one instance from group by the result of mapping function.
    • Group ( string ) : Group name.
    • Object ( object ) : Object for picking
    • Operation ( Combo ) : Keep or pop
      • Options : ["Keep","Pop"]
    • Mapping ( string ) : Function name of mapping.
    • Value type ( Combo ) : Minimum or maximim
      • Options : ["minimum","maximum"]

SOL: Group

Action:Pick instances

  • Pick instances from group.
    • Group ( string ) : Group name.
    • Object ( object ) : Object for picking
    • Operation ( Combo ) : Keep or pop UID
      • Options : ["Keep","Pop"]

SOL: List

Action:Pop one instance

  • Get or pop one instance from group.
    • Group ( string ) : Group name.
    • Index ( number ) : Pop index.
    • Object ( object ) : Object for picking
    • Operation ( Combo ) : Get or pop
      • Options : ["Get","Pop"]

Action:Pop random instance

  • Get or pop one random instance from group.
    • Group ( string ) : Group name.
    • Object ( object ) : Object for picking
    • Operation ( Combo ) : Get or pop
      • Options : ["Get","Pop"]

Setup

Action:Set random generator

  • Set random generator object.
    • Random generator ( object ) : Random generator object

Expressions

Group

Expression:InstCnt

  • Get item count of group.
    • Group ( string ) : Group name.

Expression:RandomIndex

  • Get random item index of a group.
    • Group ( string ) : Group name.

JSON

Expression:GroupToString

  • Transfer group to JSON string.
    • Group ( string ) : Group name.

Expression:AllToString

  • Transfer all groups to JSON string.

List

Expression:UID2Index

  • Get index by UID. Return (-1) if this UID is not in the group.
    • Group ( string ) : Group name.
    • UID ( number or string ) : The UID of instance.

Expression:Index2UID

  • Get UID by index. Return (-1) if index is not in the group.
    • Group ( string ) : Group name.
    • Index ( number ) : The index of group.

Expression:Pop

  • Pop UID by index. Index=-1 is the last one.
    • Group ( string ) : Group name.
    • Index ( number ) : Pop index.

Expression:FirstUID

  • Get first UID in a group. Return (-1) group is empty.
    • Group ( string ) : Group name.

Expression:LastUID

  • Get last UID in a group. Return (-1) group is empty.
    • Group ( string ) : Group name.

Expression:RandomIndex2UID

  • Get UID by random index. Return (-1) if index is not in the group.
    • Group ( string ) : Group name.

Expression:RandomPop

  • Pop UID by random index.
    • Group ( string ) : Group name.

List: For each

Expression:Item

  • Get UID in a group. Used in "Condition:For each UID".
    • Variable ( string ) : Variable name to store UID.

Expression:Index

  • Get index in a group. Used in "Condition:For each UID"
    • Variable ( string ) : Variable name to store UID.

List: Sort function

Expression:CmpUIDA

  • Get Instance UID A of sorting function. Used in "Action: Sort group by function"

Expression:CmpUIDB

  • Get Instance UID B of sorting function. Used in "Action: Sort group by function"

Mapping function

Expression:MapUID

  • Get Instance UID of mapping function. Used under callback "Condition:On mapping"

Private group

Expression:PrivateGroup

  • Get instance's private group name.
    • UID ( number or string ) : Group name.
    • Group ( string ) : Group name.

Conditions

Group

Condition:UID in group

  • Testing if UID is in a group.
    • UID ( number or string ) : The UID of instance to be tested.
    • Group ( string ) : Group name.

Condition:Empty

  • Testing if group is empty.
    • Group ( string ) : Group name.

Group: Set operation

Condition:Is a subset

  • Test if group is a subset of another group.
    • Subset ( string ) : Group name.
    • Main set ( string ) : Group name.

List

Condition:For each UID

  • Repeat the event for each UID in a group.
    • Variable ( string ) : Variable name to store UID.
    • Group ( string ) : Group name.

List: Sort

Condition:On sorting

  • Triggered when sorting by function.
    • Function ( string ) : Sorting function name.

Mapping function

Condition:On mapping

  • Triggered it to get mapping result.
    • Function ( string ) : Mapping function name.

SOL

Condition:Pick instances

  • Pick instances from group.
    • Group ( string ) : Group name.
    • Object ( object ) : Object for picking
    • Operation ( Combo ) : Keep or pop
      • Options : ["Keep","Pop"]

SOL - Mapping function

Condition:Pop by mapping result

  • Get or pop one instance from group by the result of mapping function.
    • Group ( string ) : Group name.
    • Object ( object ) : Object for picking
    • Operation ( Combo ) : Keep or pop
      • Options : ["Keep","Pop"]
    • Mapping ( string ) : Function name of mapping.
    • Value type ( Combo ) : Minimum or maximim
      • Options : ["minimum","maximum"]

SOL: List

Condition:Pop one instance

  • Get or pop one instance from group.
    • Group ( string ) : Group name.
    • Index ( number ) : Pop index.
    • Object ( object ) : Object for picking
    • Operation ( Combo ) : Get or pop
      • Options : ["Get","Pop"]

Condition:Pop random instance

  • Get or pop one random instance from group.
    • Group ( string ) : Group name.
    • Object ( object ) : Object for picking
    • Operation ( Combo ) : Get or pop
      • Options : ["Get","Pop"]