DEX files are used to store cutscenes and scripted events. They're found in the episode/ folder, specifically the files starting with e (episode/e0001, episode/e0046, etc). They're closely related to DEP files, which control the triggers for cutscenes/scripted events. For each DEX file, there's a matching DEP file with the same name, minus the e.
Carbonizer exports DEX files as .dex files, which are written in a custom language. If you use Notepad++, you can install this custom syntax highlighting file for it in Language > User Defined Language > Define your language... > Import.... From then on, it'll show up in the Language menu for you to use.
A DEX file is split up into a number of events. Each event is simply a list of commands that run in order, from start to end. Each event also has an ID number, stored in the matching DEP file.
Events are the building blocks that make up cutscenes. They can be as short as a single command, or as long as an entire cutscene. Cutscenes are usually made up of more than one event though, because an event always plays from start to finish. If a cutscene has a dialogue choice, or a different line of dialogue depending on a condition, it needs to be broken up into multiple events, for each possible case.
An example of this is fossil battles. When a Fighter challenges you to a battle, there are 5 different events involved:
There are many different commands, each one having an ID number and a list of arguments. Each command does something unique, like showing a line of dialogue, moving a character, or triggering a battle.
| Argument type | Description |
|---|---|
| Either or |
| An angle. is facing right and is facing down |
| A line of dialogue |
| An animated effect that pops up on an entity, like "haha" or "ugh" |
| An entity |
| A fixed-point number, which can have a fractional component |
| See Flags |
| A particular fossil (see Fossils) |
| A number of frames |
| An image |
| A whole number |
| An area of the world, like a room or digsite |
| An animated motion an entity can make, like spinning around or falling over |
| A music track |
| A sound effect, like a chime or ding |
| An argument whose type is unknown |
| This is techncally two arguments, but they make a pair together, like coordinates (for example, ) |
| A vivosaur |
| 1 | |
|---|---|
Show example![]() | |
| 2 | |
Show example![]() | |
| 3 | |
| 4 | |
| Used to wipe data for dialogue answers, and possibly mark events as having not played? i'm not sure what the difference is between this and set false (or set 0). | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| The map files define a bunch of 'regions' where an entity can spawn at. For example, the place you stand in the Fossil Stadium lobby after successfully leveling up is one such region. | |
| 9 | |
| 10 | |
| 14 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 26 | |
| Each episode file is enabled or disabled individually. When a new save is created, only episode 1 is enabled, and it has to enable whatever other files it wants to run. | |
| 27 | |
| 32 | |
Show example![]() | |
| 33 | |
Show example![]() | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 43 | |
| 44 | |
| Probably something related to moving or turning the entity. | |
| 45 | |
| 47 | |
| 50 | |
| 51 | |
| Causes the player to control a different entity!!! Normally this is used during cutscenes to move the camera's focus without moving Hunter, but it still works when not in a cutscene >:) | |
| 55 | |
Show example![]() | |
| 56 | |
Simply does nothing for a number of frames. Fossil Fighters runs at 60fps, so delay delays for one second. | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 70 | |
| 71 | |
| 72 | |
| 75 | |
| 80 | |
| 82 | |
| The entity waits a random number of frames within a given range, then walks to a random position within a certain distance of their 'home', which is just wherever they were when this command was executed. | |
| 86 | |
| This is used for Denture Sharks and BB Bandits. They'll start chasing the player when they're within the detection range, but won't run farther than a certain distance before turning back. After they give up on chasing the player, they have a cooldown before they'll start chasing again. | |
| 90 | |
| 91 | |
| 97 | |
| 99 | |
| 100 | |
| 102 | |
| 103 | |
| 104 | |
| 106 | |
| 107 | |
| Fossil rocks given by this command have their names shown in the case. A message is shown to the player that they have recieved a new fossil rock. | |
| 108 | |
| Fossil rocks given by this command are called "New Fossil Rock" in the case. | |
| 112 | |
| 113 | |
| 114 | |
| Each entity actually has two models: one for the head, and one for the body. Each model can have multiple variants, like the player character's different outfits, or Dr. Diggins's caveperson outfit. | |
| 115 | |
| 117 | |
| 118 | |
| This starts whatever the default music is for the current room/area. | |
| 119 | |
| 124 | |
| 125 | |
| 128 | |
| 129 | |
| 131 | |
| 134 | |
| 135 | |
| 136 | |
| 137 | |
| 138 | |
| 142 | |
| Allows quitting out of the dialog without changing the player's name. | |
| 143 | |
| Requires the player to submit a non-blank name to exit the dialog. | |
| 144 | |
Show example![]() | |
| 145 | |
| 150 | |
| 153 | |
| 154 | |
| 155 | |
| 156 | |
| 157 | |
| 159 | |
| 180 | |
Command 181 enables the sonar, but its argument is optional, which carbonizer doesn't support yet, so it's considered 'unknown' for now. | |
| 190 | |
| 191 | |
| 194 | |
| 200 | |
| 201 | |
| 202 | |
| 203 | |
| 206 | |
| 71 | |
|---|---|
| 107 | |