Jump to content

cecilkorik

Member
  • Content Count

    26
  • Joined

  • Last visited

About cecilkorik

  • Rank
    Member

Recent Profile Visitors

522 profile views
  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.
×
×
  • Create New...