Jump to content

ModdableFarming


cecilkorik

Recommended Posts

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.

Well, the current problem is about the code of:

 "if plant.waterLvl <= 0 then 

basicFarming.dryThis(plant)

With this code, the plant will die if their water level reach or below 0, no matter what waterMin you have set.

Without this code, all the plants will need water no more. They will never be dry to die.

BTW, the health of a plant won't drop (or drop in a very slow pace?) even in a 0 water level. It actually rose up. But I choose a normal climate condition for the test; so there will be a rain every 3 or 4 days. I never see any plants' health drop below 45 in my test.

Link to comment
Share on other sites

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.

Just did 2 tests:

Test 1:

Very hot temperature + Very dry climate

Delete the

 "if plant.waterLvl <= 0 then 

basicFarming.dryThis(plant)code from the basicFarming.lua file.

Test subjects are pickles made by me (waterMin is 0) and carrots, both of these two plants has received 0 water for more than 4 days. And none of them died. And their health rose up from healthy to flourishing.

 

Test 2:

Very dry climate

Didn't delete  "if plant.waterLvl <= 0 then 

basicFarming.dryThis(plant)

Set the pickles' waterMin to nil. The plant remain 0 water level for the whole time. It died within 1 day.

 

BTW, plants' dead sprites didn't showed up.

Link to comment
Share on other sites

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.

I tried to add a condition to leave the plants which has zero waterMin out of the "waterlvl=0, then die"  test.

Which issomething like the following

function basicFarming.checkStat(plant)
if plant.state ~= "plow" and plant.nbOfGrow > 1 and farming_vegetableconf.props[plant.typeOfSeed].waterMins[1+plant.nbOfGrow] > 0 then
if plant.waterLvl <= 0 then
basicFarming.dryThis(plant)
 

 

 

But the result is that I cannot plow (dig) the land anymore.
So, is there anything I write wrong?
Link to comment
Share on other sites

 

function basicFarming.checkStat(plant)

local waterMin = farming_vegetableconf.props[plant.typeOfSeed].waterMins[1+plant.nbOfGrow];
if plant.state ~= "plow" and plant.nbOfGrow > 1 and waterMin > 0 then
if plant.waterLvl <= 0 then
basicFarming.dryThis(plant)
elseif plant.waterLvl > 100 then
plant.waterLvl = 100
end
if plant.health <= 0 then
basicFarming.dryThis(plant)
end
end
if plant.waterLvl < 0 then
plant.waterLvl = 0
end
if plant.health < 0 then
plant.health = 0
elseif plant.health > 100 then
plant.health = 100
end
end

 

farming_vegetableconf.calcWater = function(waterMin, waterLvl)

if waterLvl and waterMin > 0 then
-- 1 test, our water lvl is > of our waterMin, it's ok, your plant can grow !
if waterLvl >= waterMin then
return 0;

 

I changed the basicFarming.lua and farming_vegetableconf.lua files like the above. It looks it solves the zero waterMin problem.

In the test, I choosed two test subjects: Broccoli and Pickle  (made by me with 0 waterMin). Both of the two plants will receive 0 waters for the whole time.

Broccoli always died at around 110 hours, while pickle made to the harvest.

So, it is kind of solve my problem.

But, it is quite a long time for the plants to be dry, compare to the original time limit, which is within 24 hours. I haven't figure out what makes the delay of plants' death, yet.

 

BTW, there are something looks a little bit weird to me. The health of a plant will still go up even when their water level is 0. This phenomenon occurred in both modified moddable farming mod and the original moddable farming. I'm not sure whether it will happens to a clean PZ.   

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

great news. keep it up.
Link to comment
Share on other sites

  • 2 weeks later...

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.

Can't wait to see the regrowable fruit trees. :evil:

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

 

Well, sprites for growing stages are  good. But sprites for dead plants don't show up. 

:P regrowable plants? That sounds great.

Link to comment
Share on other sites

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

Is there any news about the next version?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

This is really great. I'll check it asap.

great work.

Link to comment
Share on other sites

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

Just tried the new feature, well...it wasn't going right.

Here is my codes:

 

props["Apples"] = {};

props["Apples"].finalGrowResetTo = 0;
props["Apples"].regrowResetTo = 0; --reset plant to earlier growPhase when harvesting, instead of destroying plant after harvest
props["Apples"].seedsRequired = 1; --number of seeds required to plant
props["Apples"].waterLvl = 65; --minimum water required, only used for display purposes now
props["Apples"].waterMins = {95, 85, 85, 85, 85, 75, 65};
props["Apples"].waterMaxes = {nil, nil, nil, nil, nil, nil, nil};
props["Apples"].timeToGrowMin = 5; --hours per growth phase
props["Apples"].timeToGrowMax = 6; --hours per growth phase
props["Apples"].minVeg = 6; --number of vegetables harvested
props["Apples"].maxVeg = 10; --number of vegetables harvested
props["Apples"].minVegAutorized = 5; --vegetables harvested at max skill?
props["Apples"].maxVegAutorized = 9; --vegetables harvested at max skill?
props["Apples"].vegetableName = "Base.Apple"; --ID of the vegetable it provides when harvested (prefix required)
props["Apples"].seedName = "AgricultureAdvanced.AppleTreeSapling"; --ID of the seed it provides when harvested (prefix required)
props["Apples"].seedTypeName = "AppleTreeSapling"; --ID of the seed used to grow it (no prefix)
props["Apples"].seedPackTypeName = nil; --leave this nil for now, I have future plans for it
props["Apples"].seedPackSize = 50; --unused due to nil seedpack
props["Apples"].seedPerVeg = 0; --seeds received when harvesting
props["Apples"].maxGrow = 7; --number of growing phases
props["Apples"].growPhases = {-1, -1, -1, 0, -2, -2, 1};
props["Apples"].plantName = "Apples"; --displayed name (no translations yet)

It looks like I can harvest the apples in 30 or 40 hours. But it remains seeding phase, after 2 days.

And, the sprites for growing stages didn't show up, again. I used one of the original PZ sprites as my stage 1's sprites; so, it should not be the problem of the tileset definitions (which was a problem of my sprites for new buildings).

 

BTW, I set all my other plants' finalGrowResetTo figure to nil.

 

Any suggestions from your end?

Link to comment
Share on other sites

Second trail:

 

props["Apples"] = {};

props["Apples"].finalGrowResetTo = 4;
props["Apples"].regrowResetTo = 4; --reset plant to earlier growPhase when harvesting, instead of destroying plant after harvest
props["Apples"].seedsRequired = 1; --number of seeds required to plant
props["Apples"].waterLvl = 65; --minimum water required, only used for display purposes now
props["Apples"].waterMins = {95, 85, 85, 85, 85, 75, 65};
props["Apples"].waterMaxes = {nil, nil, nil, nil, nil, nil, nil};
props["Apples"].timeToGrowMin = 5; --hours per growth phase
props["Apples"].timeToGrowMax = 6; --hours per growth phase
props["Apples"].minVeg = 6; --number of vegetables harvested
props["Apples"].maxVeg = 10; --number of vegetables harvested
props["Apples"].minVegAutorized = 5; --vegetables harvested at max skill?
props["Apples"].maxVegAutorized = 9; --vegetables harvested at max skill?
props["Apples"].vegetableName = "Base.Apple"; --ID of the vegetable it provides when harvested (prefix required)
props["Apples"].seedName = "AgricultureAdvanced.AppleTreeSapling"; --ID of the seed it provides when harvested (prefix required)
props["Apples"].seedTypeName = "AppleTreeSapling"; --ID of the seed used to grow it (no prefix)
props["Apples"].seedPackTypeName = nil; --leave this nil for now, I have future plans for it
props["Apples"].seedPackSize = 50; --unused due to nil seedpack
props["Apples"].seedPerVeg = 0; --seeds received when harvesting
props["Apples"].maxGrow = 7; --number of growing phases
props["Apples"].growPhases = {-1, 0, 0, 0, 0, -2, 1};
props["Apples"].plantName = "Apples"; --displayed name (no translations yet)

The sprites problem is solved by adding new tile definition file (although it wasn't needed in the past editions).

But the regrow feature was not going too well. The plant will disappear after harvest or rotten.

So, here is my question:

What do the figures after "finalGrowResetTo" or "regrowResetTo" stand for? Are they meaning the Xth stage of growing or "seeding, young and harvest" stages?
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Ok,I'll read the post ,and then do some tests.

Good luck on your works.

Link to comment
Share on other sites

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.

btw,the modifications I did in the farming files are targeted to allow “plants”(dry meat,dry fruit and beehives in my mod)have 0 waterMin to survive without water. It was succeed in the past editions of moddabale farming.
Link to comment
Share on other sites

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.

I have set the “regrowResetTo” to 4,which should back to 4th phase of growing. But it didn't. My apple tree just disappear after harvest.

Btw,it's also wierd that I can harvest the apple tree when its condition is “rotten”.

Link to comment
Share on other sites

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.

should I write “nil” for other custom made plants which don't have regrow feature?
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

I set both of the “regrowTo” figure and “finalGrowresetTo” figure to 4. When the plant reached phase 7(seed-bearing),its info shows that its next phase is “ready to harvest”. It will disappear after harvest.

Or it will become rotten (the sprite will change to dead plants' sprites),if I don't collect the fruit at phase 7. But I can still harvest the fruit. After I harvest its fruit,the plants will be completely gone.

Link to comment
Share on other sites

 

props["Apples"] = {};
props["Apples"].finalGrowResetTo = 4;
props["Apples"].regrowResetTo = 4; --reset plant to earlier growPhase when harvesting, instead of destroying plant after harvest
props["Apples"].seedsRequired = 1; --number of seeds required to plant
props["Apples"].waterLvl = 65; --minimum water required, only used for display purposes now
props["Apples"].waterMins = {95, 85, 85, 85, 85, 75, 65};
props["Apples"].waterMaxes = {nil, nil, nil, nil, nil, nil, nil};
props["Apples"].timeToGrowMin = 5; --hours per growth phase
props["Apples"].timeToGrowMax = 6; --hours per growth phase
props["Apples"].minVeg = 6; --number of vegetables harvested
props["Apples"].maxVeg = 10; --number of vegetables harvested
props["Apples"].minVegAutorized = 5; --vegetables harvested at max skill?
props["Apples"].maxVegAutorized = 9; --vegetables harvested at max skill?
props["Apples"].vegetableName = "Base.Apple"; --ID of the vegetable it provides when harvested (prefix required)
props["Apples"].seedName = "AgricultureAdvanced.AppleTreeSapling"; --ID of the seed it provides when harvested (prefix required)
props["Apples"].seedTypeName = "AppleTreeSapling"; --ID of the seed used to grow it (no prefix)
props["Apples"].seedPackTypeName = nil; --leave this nil for now, I have future plans for it
props["Apples"].seedPackSize = 50; --unused due to nil seedpack
props["Apples"].seedPerVeg = 0; --seeds received when harvesting
props["Apples"].maxGrow = 7; --number of growing phases
props["Apples"].growPhases = {-1, -1, -2, -2, 0, -2, 2};
props["Apples"].plantName = "Apples"; --displayed name (no translations yet)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...