Modding

## Basics

First, you will need to install a text editor or other program capable of reading and creating XML files. Atom and Notepad++ are two commonly used ones. Then, type the following. All of the other code for your mod goes between <init> and <init/>. Remember to use enter to separate lines, and use tab for all code between the two mod tags. Use tab twice for all code between the init tags..

```
<mod>

```

```
<name>Think of a name for your mod<name/>

```

```
<description>Describe your mod<description/>

```

```
<author>Who made the mod<author/>

```

```
<version>Mod version number<version/>

```

```
<init>

```

```
<init/>

```

```
<mod/>

```

To finish off your mod once you are done coding it, save the file under the name mod.xml. It is best to make a folder for it, so that if you make multiple mods, they don't accidentally overwrite each other. Then right-click on the mod.xml once it is in the folder, and click on send to and click on Compressed (Zipped) Folder. You cannot zip the folder that the XML file is in, you must zip the file itself. Name your Zip file whatever you want, most likely the name of the mod.

## Defining Objects and Items

Now that you know how to make a basic mod, lets get started with making your mod do something. Remember, all of this code goes between the init tags.

### Items

To define an item, you need to give it an ID. To do this, type <item id="your\_item\_id\_here"> This is different from the command. You can add things to the item, such as type, weight, sell price, and other variables. We'll start with the most basic type of item, a resource. Replace what you just typed with <item id="your\_item\_id\_here" type="resource">. To add weight and price, simply add weight ="10" (As an example) and cost ="700" (As an example). So, to recap, you can make a resource with 10 weight that sells for 700 coins by typing <item id="your\_item\_id\_here" type="resource" weight="10" cost="700">. The types of items are: food; resource; equipment; tool; potion; object; spellbook; blueprint.

### Objects

Objects are a lot more complicated. For them, you need to define the type of object. They also require many more animations and statistics to be put into them.

#### Enemies

Enemies are made in a similar way to vehicles, but they won't have their own type. They need multiple parameters and animations as well. You can extend enemies, similar to how you can extend vehicles. You can also make an enemy version of a vehicle using the same animation, but this is more complicated.

#### Trees

Trees are one of the most simple types. They need an animation, like everything else, and they also need drops and health.

#### NPCs

NPCs are extremely complex. If you want to make one, you should definitely extend one that already exists, and make the quests yourself. The easiest way to do this however, is to simply add quests to a pre-existing NPC and not bother with your own.

#### Other objects

The most simple type, other objects are generally not used in many places, except in the minigames. They don't need anything more than a basic definition and an animation.

## Guides

https://steamcommunity.com/sharedfiles/filedetails/?id=1570801575

https://corvblimey.github.io/aground-tutorial/first\_mod.html