Toggle menu
913
3.8K
30.2K
279.2K
Catglobe Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

GroupRule class

From Catglobe Wiki
Revision as of 10:32, 20 April 2026 by [email protected] (talk | contribs) (Created page with "{{CGscriptClass_Template|Name=<nowiki>GroupRule</nowiki>|Description=<nowiki>Represents a group builder rule (the targeting rule attached to a group).</nowiki>|InheritsFrom=Array|Methods={{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Save</nowiki>|Description=<nowiki>Save this group rule to the database</nowiki>}} {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetPercentTarget</nowiki>|Parameters= {{CGscriptParameters_Template|Type=int|Name=<nowiki>Ta...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

GroupRule


Represents a group builder rule (the targeting rule attached to a group).

Parent class

Inherits from Array

Methods

  • Empty Save() - Save this group rule to the database
  • Empty SetPercentTarget(int Target percentage "Percentage target (-1 for unlimited)") - Set a percentage target for this rule and save
  • Empty SetTarget(int Target "New target value (-1 for unlimited)") - Set a new absolute target for this rule and save
  • Empty SetTargetUnlimited() - Set this rule's target to unlimited and save
  • string ToString() - The string representation of the object.
  • object this[] { get; }(int index "Index") - Backward-compatible indexer
  • Empty this[] { get; }(int index "Index", object value "Value to set") - Backward-compatible indexer

Properties

  • number Average { get; } - Average of the objects in the Array object. Can only use if all the elements are of type Number
  • int Id { get; } - Primary-key id of the rule
  • bool IncludeDeleted { get; set; } - Whether deleted users are eligible
  • bool IncludeDisabled { get; set; } - Whether disabled users are eligible
  • number Max { get; } - Largest of all the objects in the Array object. Can only use if all the elements are of type Number
  • number Min { get; } - Smallest of all the objects in the Array object. Can only use if all the elements are of type Number
  • string Name { get; set; } - Display name of the rule
  • string ObjectTypeName { get; } - The name of the type of object.
  • number Sum { get; } - Sum of all the objects in the Array object. Can only use if all the elements are of type Number
  • int Target { get; set; } - Absolute target user count (-1 = unlimited)
  • number TargetPercentage { get; set; } - Target as a percentage of the parent rule (-1 = unlimited / not set)
  • TypeInformation TypeInformation { get; } - Get information about this class.
  • int UserCount { get; } - Actual number of users produced by this rule after the last rebuild

Static Methods

  • GroupRule GroupRule_getRuleById(int Group Rule id "Id of the group rule") - Get the existing group rule object by using group rule id
  • number GroupRule_getUserCount(int Group Rule id "Id of the group rule") - Return the actual number of users in a specified group builder rule