Jump to content

victorwonder

Member
  • Posts

    4
  • Joined

  • Last visited

victorwonder's Achievements

  1. I have a problem I can't seem to solve I have this and it works -- my filename: <username>\Zomboid\mods\Extra\media\lua\server\Camping\mycamping.luarequire 'luautils'camping.addFuel = function(campfire, fuelAmt) -- original campfire.fuelAmt = campfire.fuelAmt + fuelAmt; camping.changeFireLvl(campfire); -- modification doExtra(campfire);endfunction doExtra(_campfire) local x = _campfire.fuelAmt; local p = getSpecificPlayer(0); p:Say(getAdvice(x));endfunction getAdvice(_xfuel) local x = _xfuel; local advice = "This campfire "; if (x < 60) then advice = advice .. "needs more fuel"; else advice = advice .. "should last for "; if (x < (3*60)) then advice = advice .. "a while"; else advice = advice .. "hours"; end end return advice;endHowever, when I add if not _campfire.isLit then p:Say("Time to start this fire!");endin my doExtra method, it doesn't work anymore. The original function I'm modifying is found in media\lua\server\Camping\camping.lua - line 233 I thought isLit was a property of campfire and stored a boolean value. I found that variable somewhere in the campfire.lua file. I'm just scavenging stuff from the zomboid files for my own use LOL Just adding my own simple stuff to it. Thought it'd be simple enough to add a few player-text messages in-game, seeing as the function doesn't do much LOL Please help! I'm still learning so don't use any big words LOL I originally wanted try creating an info tooltip for a campfire but untill I can figure that out, I'll settle for something simple I didn't like how adding fuel to the fire didn't give me any hints on how long the fire will burn so I started doing this
  2. I'm just learning and this seemed like a good practice for me so I tried it out and got it working Just used some placeholder images for the icons for testing. I based the Juice on the Pop item from the Base module.
  3. Hi! I'd like to customize this so the Cooking Skill is used instead of the custom trait "Eye To Food". I'd like the Cooking Skill to be at least Level 2. I don't like using traits in my Sandbox game LOL How would I go about doing so? This mod is really useful /edit @abreu20011 So I made my own Food Expiration Mod from scratch based on your mod and I got it working, yay! Still have to figure out how to retrieve the skill levels so I can use the Cooking skill for determining how much information a player should receive, ie. poor skill means you can see basic spoilage info while higher skilled means more detailed spoilage info. If someone could help me figure this out, it'd be great
×
×
  • Create New...