Project Zomboid

Project Zomboid

Passive Jobs
 This topic has been pinned, so it's probably important
RJ_RayJay  [developer] 20 Feb, 2024 @ 4:58pm
How To Configure Custom jobs
Create a new mod and load it after this one. In your mod, create a .lua file under /media/lua/client/ with the following Lua code (make sure it has a unique name for the file) and then fill out the information as needed:

PassiveJobs.presets["Name Of Custom Job"] = { -- Make sure "Name Of Custom Job" is unique, if something breaks just add a random number to it at the end or something. effects = { animations = { -- Action animation to play after completing the job: completed = "AnimationName", -- Action animation to play during the job: during = "AnimationName" }, sounds = { -- Sound effect to play after completing the job: completed = "SoundName", -- Sound effect to play during the job: during = "SoundName", -- Minimum number for randomly playing the "during" sound: minDelay = 5, -- Maximum number for randomly playing the "during" sound: -- E.g. if min is 1 and max is 2, the delay will be between 1 and 2 seconds (randomly) maxDelay = 10 } }, items = { -- Item ID that must be equipped in your primary hand before doing the job: primary = "Base.ItemID", -- Item ID that must be equipped in your secondary hand before doing the job: secondary = "Base.ItemID", inventory = { -- List of Item IDs and quantities required in inventory before doing the job: ["Base.ItemID1"] = 1, ["Base.ItemID2"] = 1, ["Base.ItemID3"] = 1, }, worn = { -- List of Item IDs that must be worn before doing the job: "Base.ItemID1", "Base.ItemID2", "Base.ItemID3" }, give = { -- List of Item IDs and quantities rewarded to the player after completing the job: ["Base.ItemID1"] = 1, ["Base.ItemID2"] = 1, ["Base.ItemID3"] = 1 }, take = { -- List of Item IDs and quantities taken from the player after completing the job: ["Base.ItemID1"] = 1, ["Base.ItemID2"] = 1, ["Base.ItemID3"] = 1 } }, settings = { -- Delta duration of how long the job takes or something: -- Generally 460 = 10 seconds, scale as needed. duration = 13800, -- Delta delay of how long to wait between doing another job: -- Generally 460 = 10 seconds, scale as needed. postpone = 75 } }