Created on by FrenchDeath
Making a "rpg-like" looting chest
Hello , it's the first time i'm making a tutorial here (and on lua too) I was working on this for the last 2 day for my mod , an I didn't seen something similar for now So today i'll teach you how to make a chest you must open , and then you can obtain item or gold from it (or anything you want idc)
first off , you need to create you chest item in npc_item_custom.txt :
then your script in lua_datadriven/chest.lua
and finaly we create our kv file where we put all the item for each chest "scripts/kv/chest_result.kv"
Now you can easely make a chest for your rpg game :D If you want to make the chest loot on enemy death , look this another tutorial from Noya about an item drop system