-
Notifications
You must be signed in to change notification settings - Fork 9
definitions.db
2767mr edited this page Mar 7, 2020
·
6 revisions
The file is broken down into two different sections: entries
and tree
.
This is a JSON object.
The keys are the same as the object/var you are referencing.
The value is in the format of:
-
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
- Only in
-
parent
:- Only in
type: member
- Path of target definition's parent
- Only in
-
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
- Only in
-
compiled
:- Only in
type: member
- Object that contains how to find the value in CC's code
- Only in
-
type
:-
fixed
:- unused
-
select
:- iterates all AST nodes and checks if the
from
condition is matched
- iterates all AST nodes and checks if the
-
-
pattern
:- if
type: select
it contains the child of the matched AST node that contains the target value
- if
-
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
name
is matched against
- The value
-
type
:- Either
dynamic
or not existent - Defines if value depends on other definitions
- Either
- Only in
Adding you own definition is not easy and requires some knowledge of programming and Javascript ASTs. If you still want to do it you can follow these steps:
- Find your definition in CC's source code
- For example if you want to add
cc.ig.events
to the definitions you have findig.pa
(v0.9.5-5)
- For example if you want to add
- Look for unique non-obfuscated codes/values/strings nearby or in the same block
- You can easily recognize non-obfuscated values by they meaningful(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
- Put it into CCDefedit.
This software simplifies finding, validating, and adding definitions.