Item Configuration
Items for the pet's inventory can be edited in:
cdev_pets/public/config/items.lua
Item Structure
["baseball"] = {
label = "Baseball",
category = ECategoryInventoryPets.BALLS,
stack = true,
description = "A great option for playing with pets, especially dogs. They are simple, straightforward, and effective toys that can be used for playing fetch or rolling around the house or yard.",
metadata = {},
usable = true,
onUse = {
event = "cdev_pets:useBall",
data = {},
net = false,
close = true,
preventRestoreState = true,
}
},["baseball"]- Item id (will be used to spawn this item and saving on db)label- Item's display namecategory- Item's category for inventory filter, categories are:ECategoryInventoryPets.COLLAR- CollarECategoryInventoryPets.FUR- FurECategoryInventoryPets.LEASH- LeashECategoryInventoryPets.BOWL- BowlECategoryInventoryPets.CLOTHES- ClothesECategoryInventoryPets.BALLS- BallsECategoryInventoryPets.FOOD- FoodECategoryInventoryPets.DRINKS- Drinks
stack- Whether item stacksdescription- Item's display descriptionmetadata- Persistent data to be saved with the item on DBusable- Whether item can be right clicked to useonUse- Usage informationevent- Event triggered when usingdata- Data passed to eventnet- Determine if the event is networked or notclose- Close inventory on usepreventRestoreState- Prevent pet from restoring back to it's previous state, only used internally.
isPremiumPackage- Only used internally.
Adding custom bowls, beds and so on.
Adding custom assets to this pet script is fairly simple, simply copy an item entry from this file that matches the custom asset you're trying to add, edit the properties to your liking and you're set.
Adding Inventory Icons
Inventory icons can be changed/added in cdev_lib/nui/dist/pets/inventory . Make sure to name the icon to the item id and save format as png.
Last updated