Skip to content
ac2pic edited this page Sep 17, 2018 · 6 revisions

Definition layout

  • type:
    • object:
      • contains other definitions
    • member:
      • contains the definition of a single var
  • name:
    • The name that will be used to reference this object/var
  • members:
    • Only in type: object
    • Array of definitions
  • parent:
    • Only in type: member
    • Path of target definition's parent
  • refType:
    • Only in type: member
    • var:
      • Static link; will not be updated if original gets changed
    • ref:
      • Dynamic link; a function that returns the current value
    • raw:
      • Raw value; does not actually reference code
  • compiled:
    • Only in type: member
    • Object that contains how to find the value in CC's code

compiled layout

  • type:
    • fixed:
      • unused
    • select:
      • iterates all AST nodes and checks if the from condition is matched
  • pattern:
    • if type: select it contains the child of the matched AST node that contains the target value
  • from:
    • Only in type: select
    • contains a condition that every AST node is matched against
    • type:
      • The type of the node as defined in the AST
    • values:
      • Array of subconditions
      • name:
        • The child of the current AST node which value is compared
      • value:
        • The value nameis matched against
      • type:
        • Either dynamic or not existant
        • Defines if value depends on other definitions

Adding you own definition

Adding you own definition is not easy and requires some knowledge of programming and Javascript ASTs (Abstract Syntax Trees). If you still want to do it you can follow these steps:

  1. Find your definition in CC's source code
    • For example if you want to add cc.ig.eventsto the defintions you have find ig.pa (v0.9.5-5)
  2. Look for unique non-obfuscated codes/values/strings nearby or in the same block
    • You can easily recognice non-obfuscated values by they meaningfulnes (aGh is not, SET_TELEPORT_TIME is)
    • Strings are always non-obfuscated
    • You can use CTRL + f to check their uniqueness
    • In this example I chose CHANGE_PLAYER_HP
  3. Put it into CCDefedit.
    This software simplifies finding, validating, and adding definitions.
Clone this wiki locally