How to add a custom item to the Adventure Pack - SattesKrokodil/Adventure-Pack GitHub Wiki

This tutorial was created by panbanan.

In this tutorial, I'll show you how I manage to add a unique weapon item for the Adventure Pack with custom sprite. This may need a different approach for armours since the data pack uses reskin option to render them.

What you need to know/have before starting.

  1. Knowledge of the file structure of the kubejs data pack - where is what and how to open .jar files.
  2. Text editors and know a bit hot to use them to open .js and .json files. I was using notepad++ and KomodoEdit
  3. The art you want to use.
  4. Some spare time.

My approach was to use existing code from existing items to avoid writing code with incorrect syntax. Remember to create a copy of your files before you start editing anything and when using existing files - work on a copy, not on original files. Always save the files you have added before continue to next step.

@Discalaimer@ I'm not responsible for anything regards this tutorial. You are doing it for your own risk. Do backups.

To add an item to the AP go to the kubejs folder. If you are using CurseForge launcher it will be in C:\Users"username"\Twitch\Minecraft\Instances[FABRIC] Adventure Pack directory.

Highlighted folders are what we are interested in. Let's start from adding the art/sprite - in this example, it is a weapon. Go to assets\mmorpg. In this folder, we are adding our texture sprite (must be divisible by 8 e.g. 64x64 pixels)

Folders that you saw here need to be created in the same way as the file structure looks like inside of the Age of Exile mod. To check it open the Age_of_Exile.jar inside the AP mods folder using a program like WinZip/WinRar. Next, we need to add the file location Json to the folders "models". To open Jsons I'm using the KomodEdit but you can use whatever you fancy.

Make quadruple check if the directories you've created are matching the directories from AoE mod. Next step is to add the item details for AoE mod to use. Go to kubejs\data\mmorpg folder.

Our item is unique type so, we go to unique_gears and we're adding the .json file for the weapon.

Now you are probably $%$%^#$%#$^^&^% ?? What is this?! Yes, it looks weird at the first glance but it is pretty straight forward.

  • "id": "name_of_you_item", <- here you typing the name of your item, the best practice is to keep the same name for id's names file names to avoid errors
  • "gear_type": " ", <- here you need to specify what base gear type will your unique item derives from, these are basic information about the item. We will look into it later.
  • "item_id": "mmorpg:uniques/weapon/item_name" <- here is the directory for the compatible_items so if you make normal item it will be more like: "mmorpg:weapon/wand/item_name" we will look at it next.
  • "unique_stats": [ { } ], <- this section is for the extra stats that unique items will apart from the basic stats. For the AoE balance purpose, we should try to add no more than 3. "type" is mostly "flat", and "stat": is what we will need to dig out somewhere else. Rest of it is just values ranges for the stats.

Now we are heading to kubejs\data\mmorpg\compatible_items\mmorpg\uniques\weapon

Here you are specifying details and direction for the AoE mod so it will understand where to look for the item.

  • "item_type": "base_gear_type", <-here you choosing what type of base gear the unique item is using. If you are adding your own base gear it should be the same as there. (This can be in the case where you want to have different ranges for base stats on your then anything in the mod right now)
  • "item_id": "mmorpg:uniques/weapon/item_name" <- this is the location of the item - if you want to override other mods items like MCDW you need to change this path. e.g. "mcdw:item_name",
  • "id": "mmorpg:uniques/weapon/item_name", <- this is the path of this json file. (don't ask me why idk lol)
  • "chance_to_become_unique": 100.0, <- because we are declaring an unique item we need to have it to 100.0 for non uniques this value is 0.5,
  • "unique_id": "item_name" <- id of the item in which "item_type" is changing into. In our example "scepter4" is changing into "banana_staff".

Now we need to edit the Lang file for the pack.

This file may be overwhelming. This is the translation for how the game will display the file to the user. You need to scroll down to about the final 10% and search for

"_comment": " [CATEGORY]: CUSTOM UNIQUE ITEMS NAMES",

"mmorpg.unique_gear.item_name.name": "Item Name",
"item.mmorpg.uniques.weapon.item_name": "Item Name",

Where "item_name" is the same name of your item you've been using before. Also, you need to add a description for your item.

"_comment": " [CATEGORY]: CUSTOM UNIQUE ITEMS - DESCRIPTIONS",

"mmorpg.unique_gear.item_name.desc":"Description content",

The final step is to inform the pack to register the item. Go to kubejs\startup_script open the script.js with the text editor like notepad++ (I recommend)

Uncomment the "event.create...." line and change the "example_item" in brackets to our file directory "mmorpg:uniques/weapon/item_name" and in second bracket type the "Item Name". It should look like in the example below for banana_staff.

This method of adding items was only tested for the Adventure Pack for fabric and all of above must be added to both client and server-side to work in multiplayer. For any questions ask on AP Discord or DM me. @panbanan