• Content count

  • Joined

  • Last visited

About rez

  • Rank

Profile Information

  • Gender

Recent Profile Visitors

252 profile views
  1. Power, water, date and more

    One can shift time with NecroForge and CheatMenu, and can also enable electricity for a set of tiles, but there are no intended settings for admins to do without these mods. I'd like to have this possibility out of the box, approved and supported by dev team.
  2. Power, water, date and more

    I am not an admin, but I think these should be implemented in both SP and MP. As for additional day lengths, getting a field with a custom length is probably better than a long drop-down list. Also, changing day length in-game after game start can be useful.
  3. How to alter distribution of vanilla items?

    Try this structure: c:\Users\<username>\Zomboid\mods\<your_modname>\media\lua\server\Items\modified_distributions.lua
  4. How to alter distribution of vanilla items?

    You can alter the file itself, .\ProjectZomboid\media\lua\server\Items\Distributions.lua ...but that means every time it is changed by release you lose your customization. So make backups, often. Other way is to make a mod that alters several items distributions you are interested in. Example (adapted from better_canning mod): require 'Items/SuburbsDistributions' table.insert(SuburbsDistributions["burgerkitchen"]["counter"].items, "Base.Salt"); table.insert(SuburbsDistributions["burgerkitchen"]["counter"].items, 2); table.insert(SuburbsDistributions["burgerkitchen"]["counter"].items, "Base.Pepper"); table.insert(SuburbsDistributions["burgerkitchen"]["counter"].items, 2); You should note that it uses SuburbsDistributions, but that's no problem at the time. Other thing to pay attention to is to insert paired parameters: first is the item name, second is the weight (chance, not a carryweight). That's not pretty, but it works for me. Maybe devs could provide more elegant way.
  5. I would really love something that can compete with 3 vertical crates in storage space (65x3 for me) and allow me see my character between rows (i.e not being higher than PC). This idea can just make it happen I think.
  6. Alternative Unlocking Methods

    I think firearm/bombs solution should be implemented and unarmed melee should deal some damage to the door, so if you don't mind getting totally exhausted, that's your way. Something along 1dmg per kick with 0.05 endurance loss. So you can take out 2 doors before they take you out. I'm opposed to lockpicking as a trait/skill: too narrow usage. Using fire is more like burning the house, but maybe using propane torch may be an option? And usually you get into a house by... forcing open or breaking the nearest window. Or you can bring your friend the Sledgehammer for a piece of action next time you're in the neighborhood. Just saying. As long as breaking doors in your safehouse concern goes, ugh... but why? The doors that matter are the external ones, and you usually barricade them all the way anyway, so just build a log wall instead of the door and you're fine.
  7. Food Expiration Date

    I know that's a necroposting of sorts, but I have tweaked the mod a bit to my liking, and now it has a switch (in the lua file though) that allows to bypass the check for enabled trait so you can make use of it without starting a new game. Just set the variable this way in ExpirationFood\media\lua\client\tooltip.lua: -- settings block (changable) -- local need_trait = false; local display_seconds = true; I have also changed format of the output and made it more visually nice (at least I think so) with regard to margins and automatic sizes. Another change is that the bar now actually displays fractions instead of set levels, and coloring and detection with a trait now takes 'getDaysFresh' in consideration too. Without a trait you get just the general idea like it was previously. Oh, and I have removed additional information about food being 'rotten': you see that in red in the tip header already. I have nowhere to upload this and I don't even know how to do it, but if anyone is interested in trying it, I attach it to the post. I think it's pretty much stable, though some deeper rework than mine might be needed. It already feels like I have rewritten it more or less... I hope abreu20011 won't be mad at me, I have kept the original author in the source just in case. If changing others' mods violates TOS or anything else, I will remove my version.
  8. Based on Nick's nick and the only other comment he left yesterday, I am sure he meant this Marijuana mod by maska_zgz.
  9. Thank you! I was able to replace several functions, and I like your way of defining replacements first, then overriding them. In large mods these parts can even be separated to different files. This also works for replacing parts of already defined tables. Will mark this topic as resolved as I had no issues for a day now. Another thing I have found: modloader does not load files from './media/lua/', they have to be in a subdirectory 'client', 'server' or 'shared'. I wish that was reflected in documentation...
  10. Thank you. I have changed file name, and placed it in './media/lua' directory. The game is fine now, but the overrides don't work. I remember you saying that I have to load the function from the file after the game is started. Is there some preferred way of doing it? Is the way like this correct? Events.OnGameStart.Add(ISScavengeAction:perform()); I am afraid that this will trigger instant increase in a fatigue. While this is a minor thing (+0.01), this design may matter in case of a function that, say, contains code that heals player or repairs an item or does anything similar. Can I just ask Zomboid to reread mod contents after the game is started, without calling a function directly?
  11. I may have understood you incorrectly, but it seems like the file from mod actually overrides the file from the base game as a whole, so leaving only one function in the mod file broke the game. I have removed everything except those changed functions, and that broke everything up to a point where right click no longer even works. Reverted files back to as they were, everything works again. Maybe I am missing something, my new file basically contained the ship above (without derive line).
  12. First of all, I have everything working pretty much, so please don't think I want someone to do the work for me. I'm only a beginner in Lua, so please bear with me if I ask some stupid things or use incorrect terms. I have searched beforehand for a couple of days, but have to ask you anyway. So, I have a mod, that modifies 'media\lua\client\TimedActions\ISScavengeAction.lua' file. The mod is basically done by a copy of existing with a small change. Example: ISScavengeAction = ISBaseTimedAction:derive("ISScavengeAction") [.. snipped ..] function ISScavengeAction:perform() -- x5 increase from 20 actions to 100 per 'fatigue day' self.character:getStats():setFatigue(self.character:getStats():getFatigue() + 0.01) -- needed to remove from queue / start next. ISBaseTimedAction.perform(self) end As I understand, if I create and load another mod that has the same file overridden, the mods will be incompatible (because of how modloader works). Is there a way to do something similar to Java's 'extend' for the function? I presume that's what the 'derive' keyword is for. What's the best approach here? Remove everything standard except the changed functions and definitions from the mod and use 'derive'? Will everything work? Or is there something else I should know? Ideally I'd like to go as low as changing only 1 variable in a function so that cross-mod compatibility is the highest. Any advice from experience is welcome! Thank you.