File Syntax
File Naming
The type of a file is detected based on its prefix: an item will be named item_item_name
, and a vehicle vehicle_vehicle_name
.
Here are all the file types recognized by DynamX (you can add more via the addon system):
Object | Prefix | Documentation |
---|---|---|
PackInfo | pack_info.dynx | Mandatory file in every pack: configuration |
Item | item_ | Example below and complete configuration |
Armor | armor_ | Configuration - Armors |
Block | block_ | Configuration - Blocks and Props |
Prop | prop_ | Configuration - Blocks and Props |
Vehicle | vehicle_ | Configuration - Vehicles |
Trailer | trailer_ | Configuration - Vehicles |
Boat | boat_ | Configuration - Vehicles |
Helicopter | helicopter_ | Configuration - Vehicles |
- Properties:
Simple properties are defined on a single line with the schema keyword: value
, for example, Description: This is a description
. One property per line at most!
- Sub-properties:
Sub-properties define the properties of a specific element of an object, such as the steering wheel of a car. The syntax is as follows:
SubProperty {
keyword1: value1
keyword2: value2
// etc.
}
You will see examples in the following sections of the documentation...
Warning
Be cautious, the opening curly brace {
must be immediately after the sub-property name, on the same line! Similarly, the closing curly brace }
must be on its own line.
- Comments:
You can comment out a line by adding //
at the beginning of that line.
You can also include multi-line comments by starting with /*
and ending with */
.
Warning
/*
should be placed at the beginning of a line, and */
at the end.
Additionally, if a comment starts within curly braces, it must end within those same curly braces (and vice versa).
Examples:
Name: This works
/* Comment
SubProperty {
keyword1: value1
keyword2: value2
// etc.
}
End of comment */
Name: This also works
SubProperty {
/* Comment
keyword1: value1
keyword2: value2
End of comment */
keyword3: value3
}
Name: This doesn't work
SubProperty {
/* Comment
keyword1: value1
keyword2: value2
}
End of comment */
Modifying a Property In-Game
To more easily configure your objects, you can reload their properties while the game is running by using the command /dynamx reload_config
(this will reload the packs for you, the server you are connected to, and all other players), or by using the dedicated button in the debug menu (this will only reload the packs in your game, not on the server you are connected to).
This will reload most properties (except for model names, for example) and allows you to fix minor errors (highlighted in orange in the error report in the main menu/chat). Starting from DynamX version 4.0.0, you no longer need to reposition props or vehicles (unless you modify their physical properties like mass or suspension)!
To reload models and their textures, you can use the button in the debug menu.
Example: Adding Items
To add an item, create a file item_your_item.dynx
in your pack and specify the following:
Name: In-Game Item Name
Description: Item lore
Model: obj/item_name/model_name.obj
Info
The translation of the item name is automatically created using the value of "Name."
For more information on configuring an item, please refer to this link.