Item Mod Creation

To create an item mod, you'll need to do the following things:

#### 1) Create an xml file with the item description

XML is a text markup format which the game can process. The basic item xml looks like this:

```
     <item>
       <id>samplemod:sample_item_unique_id_1</id>
       <name>samplemod:sample_item_unique_string_key_1</name>
       <drop_chance>50</drop_chance>
       <max_level>3</max_level>
       <sprite>sample_item_1.png</sprite>
       <recipe_items></recipe_items>
       <drop_table>samplemod:sample_drop_table</false> <!-- only necessary if you made your own supply box -->
       <is_drop_box>false</is_drop_box>
       <bonuses>
         <bonus>
           <type>boost_resource_production</type>
           <sub_type>fuel</sub_type>
           <amount>1</amount>
           <growth_per_level>3</growth_per_level>
         </bonus>
       </bonuses>
     </item>

```

Let's go through item parameters one by one:

* **id** - your unique item identifier. try to add your nickname:some\_item\_id to avoid collision with other mods. i.e. comrad\_gremlin:space\_biscuit - the id won't be displayed in game (you'll still see it in mod editor window), but it used for item crafting
* **name** - that's the item name. again, try to make it a unique string, you will be giving it a translation later on
* **drop\_chance -** the drop rating on which the item will drop from the supply boxes. if left to zero - the item will never drop. the higher number, the higher chance to drop. All current in-game basic items have 50 drop rating.
* **max\_level** - max item level to which it can be upgraded
* **sprite** - item sprite, taken from sprites folder
* **recipe\_items** - items that are needed to craft this item. you can leave it blank if item is uncraftable. If you want an item to be craftable - you need to set three ingredients (at least one of them must be different from the other ones). i.e.

```
         <recipe_items>
           <id>samplemod:sample_item_unique_id_1</id>
           <id>samplemod:sample_item_unique_id_1</id>
           <id>coldwild_space_milk</id>
         </recipe_items>

```

* In the case above, the new item will require two custom player items to be created. Existing lazy galaxy items can be used in recipes. Here is the list of crafting indexes that you can use:

1. coldwild\_space\_butter
2. coldwild\_space\_milk
3. coldwild\_space\_egg
4. coldwild\_space\_egg
5. coldwild\_space\_flour
6. coldwild\_space\_meat
7. coldwild\_berries
8. coldwild\_cheese
9. coldwild\_omelette
10. coldwild\_biscuit
11. coldwild\_crepe
12. coldwild\_crouton
13. coldwild\_crepe\_pockets
14. coldwild\_bread
15. coldwild\_sandwich
16. coldwild\_noodles
17. coldwild\_ramen
18. coldwild\_meat\_pie
19. coldwild\_egg\_casserole
20. coldwild\_cheese\_soup
21. coldwild\_advanced\_cheese\_soup
22. coldwild\_planetary\_cupcake
23. coldwild\_cheesecake
24. coldwild\_icecream
25. coldwild\_ice\_crepe
26. coldwild\_cake
27. coldwild\_milkshake

* **bonuses** is a list of bonuses, consisting of up to three <bonus> entries
* one bonus entry has the following parameters
* **type** - bonus type
* **sub\_type** - bonus subtype
* **amount** - percentage of how much the bonus gives
* **growth\_per\_level** - when you combine three similar items, what is the multiplier of this bonus in resulting item? for example, if you combine three level one items with bonus amount 2 and growth per level 4, you will get a resulting item with bonus amount 8. If you then combine three level 2 items with bonus amount 8, the new item will have bonus amount 32, etc, etc.

#### Bonus Types / Subtypes

Bonus Subtypes are dependant on bonus type. Here is the full list of current bonus types and subtypes:

#### 2) Put the item sprites into the sprites folder

For items to be displayed in the game properly, you need to put their images into sprites folder of your mod folder. For the previous item, the path would be my\_sample\_mod/sprites/sample\_item\_1.png

The image should be in png format, ideally in one of three sizes: 32x32, 64x64 or 128x128

#### 3) Add the language file with item names

For the game to show the real item names and not name\_ids, you need to add en.xml or ru.xml (or both) into the my\_sample\_mod/languages folder.

The file structure is quite simple:

```
     <lang>
         <line key="samplemod:sample_item_unique_string_key_1">Sample moded basic item</line>
         <line key="samplemod:sample_item_unique_string_key_2">Sample moded basic item</line>
         <line key="samplemod:sample_item_unique_string_key_3">Sample moded crafted item</line>
     </lang>

```

each line contains your item name and translation from it. To make it simpler:

```
     <line key="itemname">my item name in chosen language</line>

```

You can have as many lines as necessary in that file. (each item would need a line). It's not strictly necessary since these names can be written directly in your item.xml files, but it keeps it cleaner in case someone wants to translate the file to another language

#### 4) Your own item boxes

Starting from the release patch, the items can be placed in custom drop boxes that drop randomly instead of a normal one according to the drop\_chance parameter. Sample supply box code:

```
     <item>
       <id>samplemod:sample_supply_box_id_1</id>
       <name>samplemod:sample_supply_box_name_1</name>
       <drop_chance>10</drop_chance>
       <drop_table>samplemod:sample_drop_table2</drop_table>
       <is_drop_box>True</is_drop_box>
       <drops_from>samplemod:sample_drop_table</drops_from>
       <max_level>0</max_level>
       <sprite>supplybox2.png</sprite>
       <recipe_items>
       </recipe_items>
       <bonuses>
       </bonuses>
     </item>

```

As you can see, the only different from the normal item is that the item has is\_drop\_box set to true and then the unique drop\_table name (that should match in all next items). Note: default supply box drop rate is 50.

Starting from patch 1.0.1, If you want your supply box to drop from other supply box - you can add drops\_from tag and specify the drop\_table name.

As stated before, the remaining items (that you want to drop from that box) must have the same drop\_table parameter

Sample mod files can be downloaded here: coldwild.com/sample\_mod.zip