Jump to content

cecilkorik

Member
  • Posts

    26
  • Joined

  • Last visited

Everything posted by cecilkorik

  1. Sorry for the broken links, it seems like Dropbox changed the way they do sharing of files. This is the last version I released, 0.4. Does this link work for you? I hope you can use some of the code in your version. Please consider it public domain at this point and continue it as you wish, with my blessing. PZ needs a good farming mod, or at least it did when I started working on this
  2. Honestly the horde spawning in the last update killed the game for me and I don't have any interest in playing anymore. Even setting them on ultra-low doesn't help, the only way I can play the game in a way that doesn't make me feel like I'm banging my head against a wall is by disabling zombies entirely and that's just no fun at all. As for the mod, not trying to sound whiny or anything but I just can't see any point in extended farming when you can't even live in one place long enough to harvest a crop anymore before getting overwhelmed by the horde. The devs stance seems to be that this is the way they like it and the way they always intended it, and the way it used to be was just a placeholder/accident. That leaves me little hope that it will change back. If you want to take over the mod, you have my approval and encouragement, but I doubt I'll be continuing it myself...
  3. Great suggestion! The default names use the game's text translation table in order to work in multiple languages, however mod support for multiple languages seems very sketchy. I do like this idea though, and I can certainly add a setting that allows you to put in custom names, although it won't work with multiple languages.
  4. It was very helpful! I didn't use your code exactly, because I needed to do it slightly differently now that you can set waterMins to be a number instead of a table. But it showed me where to make the changes. So it actually saved me a lot of time to look at your code. Thanks! Let me know if you run into any other issues, but like I said I've been playing around with it in my mod quite a bit now and I'm really happy with how its running. Especially now that I've got my custom sprites in (thanks for your helpful comment on that as well). It looks glorious to have an orchard of fruit frees! I made it take a long time to grow, several months of game time, but it's worth it in the end They all die eventually from disease though, which is why I need to look at disease next. Here is an example of an Apple tree props[name] = {};props[name].seedsRequired = 1; --number of seeds required to plantprops[name].waterLvl = 65; --minimum water required, only used for display purposes nowprops[name].waterMins = 65;props[name].waterMaxes = nil;props[name].minVeg = 3; --number harvestedprops[name].maxVeg = 4; --number harvestedprops[name].minVegAutorized = 5; --harvest at max skill?props[name].maxVegAutorized = 9; --harvest at max skill?props[name].vegetableName = "Base.Apple"; --this is the ID of the vegetable it provides when harvestedprops[name].seedName = "CecilFoodService.AppleSeed"; --this is the ID of the seed it provides when harvested (prefix required)props[name].seedTypeName = "AppleSeed"; --this is the ID of the seed used to grow it (no prefix)props[name].seedPackTypeName = nil; --leave this nil for now, I have future plans for itprops[name].seedPackSize = 50; --unused due to nil seedpackprops[name].maxGrow = 7; --number of growing phasesprops[name].plantName = "Apple Tree";props[name].regrowResetTo = 5;props[name].finalGrowResetTo = 5;props[name].growPhases = {-1, 0, 0, 0, -2, -2, 1};props[name].seedPerVeg = 0; --seeds received when harvestingprops[name].timeToGrowMin = {240, 240, 240, 62, 62, 62, 62}; --in hours per phaseprops[name].timeToGrowMax = {400, 400, 400, 82, 82, 82, 82}; --in hours per phase
  5. I'm putting version 0.4 up right now. Please check the main post. I am actually very happy with this version, I've done quite a bit of testing on it and am very happy with how it's working now. It has been quite stable for me, and I am now using it with my own WIP crops addon which includes trees and vines and so on. So now I'm confident it will fix the issues with regrow and finalGrow. I have regrowing trees working in my own mod now. Sorry it took so long, the real issue was actually quite unexpected and took a long time to find. There was apparently a whole different harvest function hidden away in the client UI code. It does almost the exact same things as the main harvest function, but it didn't have my modifications to it and didn't know about the new settings I added, so it went through and deleted the plants because it decided they were dead/harvested already even though I had removed that code from the main harvest function the other function still was able to delete the plant. A strange way to design the code, but now that I know about it and where it is, it should not pose any future trouble. I did find the issue you mentioned with the sprites, and they are now fixed as well. I also added some other modifications and minor bugfixes, and I included the changes to waterMins to allow a minimum water of 0 if you want to disable most of the water checking. Setting it to 0 or nil should work now and the plant will not instantly die and will not lose health. However there may still be issues with disease and higher change of disease. The one major improvement I was working on for this version is that you now have a choice of setting several fields to either a single value, or choosing individual values for each grow state using a table. For all of the following data fields -- timeToGrowMin, timeToGrowMax, waterMins, WaterMaxes -- You can now choose to set them to either a single number which applies to ALL grow levels. Or you can set them to a table like {10,20,30,40,50,60,70} (7 table entries for maxGrow=7). Each table entry corresponds to the same numbered grow level. So if that table was set to waterMaxes, you could only add 10 water when it was first planted, however once it grows a bit you could add 20 water, and then a bit later the max you could add would be 30. Note that the reverse is also true. You used to have to enter a whole table for waterMins/waterMaxes... now you can add just a single number if you want the same value for all grow levels. You could now just set waterMins = 0 instead of {0, 0, 0, 0, 0, 0, 0}. You should also be able to set waterMaxes = nil or waterMaxes to completely disable the watering mechanics, although I haven't tested the waterMax part of it yet. My next plan is to look into the diseases functions, and see if I can change them to make them more configurable. Now that we can have very long-life crops like trees, I expect diseases to become a serious problem. So if people would like to have disease-resistant crops or make one disease totally immune, but another disease very likely, or make it so it is easier or harder for diseases to spread throughout a certain crop, or things like that. That will be my next goal for the mod, to allow people to configure these disease settings on a crop-by-crop basis. I may also take a look at how crop health values are calculated.
  6. I've got it almost entirely fixed. In fact I've got a version here but I'm not going to put it up on the main post yet because I'm still working out a few issues with the waterMins. I know you had a patch that allowed waterMin = 0, but I am having some trouble with it and the plants still insta-die without water. You can try it out though. However it definitely fixes the issues with regrow/finalGrow. The issue was actually quite complicated but I don't have time to detail it right now. I'm still working on diagnosing the problem with the sprites as well. I will have a proper 0.4 release out shortly, but it's late and I'm tired of banging my head against it tonight.
  7. yes that's right, set it to nil if you're not using it. That will be a common trend in my code. I haven't yet had time to look into the other problems you reported, but I will... it sounds like there are a lot of problems with 0.3
  8. I am ridiculously busy at work and probably won't get a chance to look at this before the weekend at the earliest. I want to mention a few things and hopefully answer a few questions. The "reset to" is the state of growth progress it will go back to when that situation is detected, as in between 1 and 6 if you have maxGrow=6. It is NOT the same as the numbers you put into the "growPhases" table itself (which includes negatives for bloom and seedling, etc) If you put a negative number into regrow, it will probably crash or at least not work right, and the plant will probably die or just not grow at all. For the other problems you are having, I would recommend first trying to remove the old ModdableFarming (delete the ModdableFarming directory in mods) before re-installing version 0.3 from scratch. The new version changed many file names and it occurred to me that there may be conflicts if you still have the old 0.2 filenames in the directory as well. If you have made any changes to some of the files those will be deleted too, but you can try putting those changes into the new files also. If that works and it helps, let me know and I will include your changes in the next version! If none of those things help, you can try downloading the old 0.2 version and sticking to that for now, the download link for 0.2 is still available under the "Changelog" in the main post.
  9. I have released version 0.3 if you want it, check the main post of the thread. The main changes are that I've rewritten the mod, basically. It now no longer needs to override all the farming files. This should make it work better in IWBUMS mode and in future releases to PZ. It might also help it play a bit more nicely with other mods, if there are any other mods that change farming functionality. It was a lot of work to do this, but I think it will be worth it in the future and I wouldn't want to do a real "release" without this done. I don't think this fixes the problem with sprites though. Like I said, I am still having a lot of trouble understanding how sprites/texture packs/etc work. I find this part of PZ very confusing and I am sure I am doing something wrong but I can't figure out what. I've also added the function I talked about earlier to allow trees to grow continuously without dying. How this works: You must set "finalGrowResetTo" setting to the growth stage you wish to reset to when the plant reaches "end of life" (in other words, when it runs out of growth stages). This will make it loop through the last few growth stages forever, and it will never die of old age. It can still die of disease or lack of water though. Normally a plant goes rotten at the end of its growth stages if you do not harvest it. For example: Tree stage 1, 2, 3, 4, 5, 6, 7, <dead> However if you set "finalGrowResetTo" to 6, and the plant will grow like this: Tree stage 1, 2, 3, 4, 5, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7 ... (forever) Remember that "regrowResetTo" is also important, otherwise your plant will be destroyed when you harvest it the first time. For a tree this makes no sense. You will want to use both parameters together to get the desired effect. They can be set to different stages if you want. For example, if 6 and 7 are harvestable, but 4 and 5 are fully grown trees that have no fruits yet, you could try the following combinations of settings depending on your preference: regrowResetTo=4, finalGrowResetTo=6 -- when harvested, fruits disappear and take a long time to regrow, but when unharvested, they stay ready for harvest forever regrowResetTo=5, finalGrowResetTo=6 -- when harvested, fruits disappear and regrow quickly. when unharvested, they stay ready forever regrowResetTo=4, finalGrowResetTo=4 -- when harvested, fruits disappear and take a long time to regrow, and when left unharvested they will also disappear and take a long time to regrow (simulates fruits going rotten when unharvested) regrowResetTo=5, finalGrowResetTo=4 -- when harvested, fruits disappear and regrow quickly, and when left unharvested they will disappear and take a long time to regrow (extra penalty for not paying attention to your tree!) regrowResetTo=4, finalGrowResetTo=5 -- when harvested, fruits disappear and regrow slowly, but when left unharvested they will eventually disappear but regrow faster than if they were harvested (seems sensible, don't know if that's how it works in real life) regrowResetTo=6, finalGrowResetTo=4 -- cheat mode, infinitely harvestable, but if you forget to harvest for awhile, the fruits will disappear and need time to regrow regrowResetTo=6, finalGrowResetTo=6 -- total cheat mode, once fruits grow on the tree they are infinite and permanent. also lets you cheat infinite farming skill probably
  10. Good! I noticed you've been asking around about textures and stuff, have you managed to get custom sprites working at all? I am still stuck on that part myself. I've got the fruit trees working mechanically, but it looks pretty dumb when they're not actually trees lol
  11. Interesting! I will see if I can figure out why it's still dying. Unfortunately I've been busy with real life stuff recently, but I am still working on this. In fact recently I've been testing some new functionality with my own mod. I am trying to get fruit trees and vines working, which can regrow their products continuously without being removed when harvesting (like strawberries) but also without dying if left unharvested unless they've been severely neglected.
  12. I think the problem is... 30% of "0" minimum water level is still 0, so when you have 0 water level the plant will always die no matter what. I will look into whether it's possible to change this, but I don't want to change the functionality of the default farming very much if I can help it and unfortunately that's how the default farming is set up. Perhaps like you suggested initially it might be better to be able to set minimum water level to "nil" and disable all water checking that way. I think I like that option better and I will see if I can add that in the next version, but it will probably take some time.
  13. Good luck! If you continue to have trouble let me know and I might be able to take a look. I'm sloooowly starting to get more familiar with PZ modding now. I have never used lua before this lol
  14. That's probably something wrong either with his save game, or with his mod, or with how is mod is setting up the distributions tables. It is possible there is a typo or something somewhere in that sixth seed that makes it not show up. I have added 17 custom seeds to the item list and to the distributions tables in my mod and it's working fine for me. All 17 of the new seeds are available in my game, no problems at all. They all come in bags, and they can be planted and grow. Is he making sure to start a new game when he is looking for the #6th seed he has added? The distribution only happens when you create a new game, or when you move to a new area. If you add new seeds to an existing game, they will not start to show up until you move a looong way away from anywhere you've already been, as far as I can tell.
  15. Yeah that's quite possible... I am kind of a noob at sprites, like I said. All I know about it, is that it calls: getTexture(spritename-you-provide) to find the image. It's possible this function only looks in texture packs, I'm not clear on how it works precisely. I also am trying to figure out how to add custom sprites right now myself, I will let you know if I figure out how to do it.
  16. For the sprites: Please download the new version 0.2 I just put up, it should fix the sprites and a few other problems! For ttg: I think you're right that water and disease do have an effect. Possibly skill level and randomness may change the actual growth time as well. However I am very confident that time to grow is set in hours, not days. It is used as the minimum time, and then disease or lack of water can make it grow slower that normal. In your example, 7 hours times 7 growth stages = 7 x 7 = 49 hours of growth from seedling to fully mature. Slightly over 2 days. The additional 2 days you required before harvest on your plant were likely added by the water or disease functions. A perfectly watered, perfectly healthy plant should have been ready to harvest after 2 days and 1 hour, based on a ttg of 7. It is easier to see this by setting ttg to 1, since the plant will grow fully in only 7 hours (1 hour per phase) it doesn't have much time to get any disease or get unhealthy. You have to be really quick on giving it water first though, or else it will wilt almost instantly because it grows to the second phase so fast.
  17. It seems to be just a sprite-related issue... the plants *work* fine. You can still harvest them etc if you keep an eye on their info windows, but obviously we need to get the sprites working. I am trying to figure out why they're not updating but sprites very much confuse me (like I said I am not an artist, at all!) One thing I have discovered in my experiments is that the "time to grow" value is not actually in days... it is in hours, however, it represents the "time to grow" from one phase to the next, and there are 7 total growing phases, so the actual time to grow is 7 times the number of hours. I will clarify this in my instructions. I am of course still working on the mod -- in fact I have many ideas for things I plan to add in the future already, but testing takes time and work has been keeping me busy. Thanks for your continued interest!
  18. I assume you're still seeing Stack Traces in your logfile. Those aren't good and usually can show what is wrong, unfortunately if there's a lot of them there's no easy way to tell which ones are important and which ones aren't. If you can find some way to send me your whole console.txt I might be able to figure out what's going on. All I know is that it's working fine for me now, but obviously that's just one person... The whole point is to make sure it works for everybody!
  19. That looks like something is wrong in a different mod (it mentions crafthelper), or possibly in your PZ installation itself. I'd recommend disabling all other mods and see if farming works okay. If that doesn't fix it, use Steam's "Verify Integrity of Game Cache" option or at worst simply reinstall PZ. Are you using build31 or IWBUMS?
  20. So it looks like it is finding your seeds properly... Something else must have gone wrong if you tried to plant them and it still won't let you. Are there any "STACK TRACE" messages?
  21. That's very strange... if you still have your console.txt (found in your username\Zomboid directory, assuming you're on Windows) that keeps a logfile of the last time you ran the game. It should contain the debugging information I need, if you can upload it to a file sharing site or pastebin or something like that I will take a look and see if I can figure out what's going wrong. If you have run the game unmodded since then, please tediously repeat the steps of finding the seeds and trying to plant them in-game before sending me the console.txt, otherwise it won't contain the debugging info I need. Thanks for your help and your patience
  22. Thank you.And waiting for the new version. The new version is ready! It should fix the issues you were having. I've edited the links into the original post. As I mentioned, I also screwed up on the instructions a little bit, you will want to make the following changes to your mod: Add entry to "icons" table to display the icon in the info window: local icons = farming_vegetableconf.icons;icons['Bamboo'] = "Item_Bamboo";Add extra prop value to display the correct name: props["Bamboo"].plantName = "Bamboo";Fix the typo I did with sprite_dead and sprite_growing : (I originally spelled these lines as "sprites" instead of "sprite") local sprite_dead = farming_vegetableconf.sprite_dead;local sprite_growing = farming_vegetableconf.sprite_growing; I just wanted to make sure of this: You should be adding a lua file with the Bamboo settings to your own mod, you should not need to make any changes to PZ's code, or to ModdableFarming's code. It is designed to let you do everything you need to do from within your own mod's directory. See the ExampleEggplant mod I linked for a good layout, that might help make things clearer. In case the new version does not fix your problem with planting seeds, I have added some additional debugging information to the console which I will need to you look at for me. Let me know if you're still having problems and look for some text in the console that says "DEBUG: Found item BambooSeed that looked like it was supposed to be a seed", and tell me what it says after that.
  23. I don't think you've done anything wrong, but I have discovered a few bugs in the code and there are a few things I messed up in my instructions. I'm working on fixing both and should have a new version in a couple days at most.
  24. In theory... It should be as simple as adding a whatever.png file to your mod's "media" folder, then setting the sprite tables to "media/whatever.png" I haven't actually tried, but please let us know if it works for you! If that doesn't work you might need to meddle with pack files instead, not sure...
  25. Nice! Great to hear the positive comments. Knowing that you will find it useful definitely helps!
×
×
  • Create New...