# MOD Development Tutorial

MOD Introduction: MOD is divided into "configuration file" and "modification file" directories. The configuration file mainly displays information such as the MOD name and author and the MOD modification file directory.&#x20;

**MOD placement directory:**

```
PC: {GameDir}\Mesozoic Dawn_Data\StreamingAssets\Mods\
Android: {SdcardDir}\Android\data\com.nextindie.mesozoicdawn\files\Mods\
```

**MOD file path directory description: Please place the file strictly according to the following directory, otherwise a read error will occur.**

{% code title="MOD Directory Structure" lineNumbers="true" %}

```lua
/Mods/ -- MOD root directory
/Mods/DemoMod/ -- MOD directory
/Mods/DemoMod/CharacterAsset/ -- Character data configuration file directory
/Mods/DemoMod/SkinsAsset/ -- Character skin graphic texture directory
```

{% endcode %}

**MOD configuration file: The configuration file suffix is ​​".mod", and the configuration parameters are as follows**

{% code title="MOD Configuration File Information" %}

```lua
ModConfig = {
             Name = "Demo", --MOD name, used for system representation and display to players (*Note: Please keep this name consistent with the file name)
             Author = "Gamer", --MOD author, used to show to players
             Path = "DemoMod/", --MOD file path
	     Version = "0.0.1", --MOD version, used to distinguish MOD versions
             SupportedVersion = "0.6.*" --Game versions supported by MOD (* means no restrictions)
}
```

{% endcode %}

<pre class="language-lua" data-title="Character value MOD configuration:"><code class="lang-lua">--The following configuration character numerical information (*The following items cannot be deleted)
CharacterAsset = {
          name = "Allosaurus", --Character name
          enable = true, --Whether to enable the character
          jump = false, --Whether to allow jumping (if there is no matching animation, enabling will result in an error)
          race = "allo", --Character race tag (*required, this value is unique)
          ropoda = 0, --Nest type (range: -1~2, -1-None | 0-Theropod | 1-Sauropod | 2-Ornithischian)
          ropode = 0, --Egg type (range: -1~2, -1-None | 0-Theropod | 1-Sauropod | 2-Ornithischian)
<strong>          volume = 2, --Character size (range: 0~5, light~super)
</strong>          rank = 7, --Character level (range: 0~12, S1~SS)
          branch = 3, --Character subject (range: 0~25)
          habit = 0, --Character living habits (range: 0~5; 0-terrestrial animals | 1-water-loving (crocodiles, spinosaurs) | 2-marine reptiles | 3-aquatic animals (fish) | 4-amphibians (frogs) | 5-flying animals)
          type = 0, --Character type (range: 0~5; 0-carnivorous dragon | 1-herbivorous dragon | 2-aquatic creatures | 3-arthropods | 4-mammals | 5-flying creatures)
          taste = 0, --Character diet type (range: 0~3; 0-carnivorous | 1-flowers and plants | 2-leaves | 3-omnivorous)
          spawn = 0, --Character reproduction method (range: 0~3; 0-oviparous | 1-viviparous)
          health = 76503.0, --health value
          hunger = 42227.0, --hunger value
          water = 3128.0, --water
          oxygen = 474.0, --oxygen
          stamina = 100.0, --attack stamina
          attack = 2802.0, --damage
          defend = 779.0, --defense
          restore = 266.0, --recovery
          consume = 100.0, --cruise time
          weight = 3600.0, --weight
          speed = 27.01, --walking speed
          swim = 13.5, --swimming speed
          flying = 0.0, --flying speed
          runSpeed ​​= 54.01, --running speed
          turnSpeed ​​= 0.61, --turning speed
          growtime = 1560.0, --time required to grow to adult size
          ovumtime = 1080.0, --time for eggs to form in the body
          hatching = 2210.0, --time for eggs to hatch and mature
          safe = 1800.0, --default safety protection time
          skill = "LifeDrain,3;", --EX skill carried by default (format: gene name, level;)
          gene = "", --gene carried by default
}

--The following character skill configuration numerical information (if the character does not have a corresponding attack method, the modification is invalid)
CharacterSkill = {

      --Modify attack method 1
      attack1 = {
          Race        = "allo", --The race you want to modify (*required)
          AttackOrder = 1, --attack method sequence number (for example: mouth 1 in the game, fill in 1 here)
          AttackType = 0, --attack method, only used to display to the player (0-mouth | 1-tail | 2-trampling | 3-hand swing | 4-body | 5-head | 6-leg)
          DamageMode = 1, --attack type (0-single damage | 1-range damage | 2-charged damage (charged requires animation, otherwise invalid))
          Area = null, --Available attack area (null - unlimited | 0-land | 1-shallow water | 2-deep water | 3-sky)
          Modify = 1, --damage modifier = damage * modifier (1-no modification | 0.8-damage reduced by 20% | 1.2-Damage increased by 20%)
          UseStamina = 0, --Consume stamina, percentage value (0-Use system default | 0.01-Each attack consumes 1% | 0.5-Each attack consumes 50%)
          TriggerSkill = "Scars,2;", --Attack binding skill (format: gene name, level;)
      },

      --Modify attack method 2
      attack2 = {
          Race        = "allo", --The race you want to modify (*required)
<strong>          AttackOrder = 2, --Attack method sequence number (for example, modify mouth 2 in the game, fill in 2 here)
</strong>          AttackType = 0, --Attack method, only used to display to players (0-Mouth | 1-Tail | 2-Trampling | 3-Hand throw | 4-Body | 5-Head | 6-Legs)
          DamageMode = 0, --Attack type (0-Single damage | 1-Range damage | 2-Charge damage (Charge needs to be bound to animation, otherwise it is invalid))
          Area = null, --Available attack area (null - Unrestricted | 0-Land | 1-Shallow Water | 2-Deep Water | 3-Sky)
          Modify = 1, --Damage Modification = Damage * Modification (1-No Modification | 0.8-Damage Reduced by 20% | 1.2-Damage Increased by 20%)
          UseStamina = 0, --Consumption of Stamina, percentage value (0-Use System Default | 0.01-Each attack consumes 1% | 0.5-Each attack consumes 50%)
          TriggerSkill = "Blood,2;", --Attack Binding Skill (Format: Gene Name, Level;)
     }
}
    
--The following character skin configuration numerical information
CharacterSkin = {
            Race    = "allo",  --The race of the skin (*required)
	    Name    = "Crooked mouth", --Skin Name
	    Path    = "SkinsAsset/Crooked mouth.png",  --The file path where the skin is located
}
</code></pre>
