Jump to content

Watermelon Seeds - Implemented but appear as Cabbage?


Panda

Recommended Posts

Hi,

 

it's basically what the title says. I implemented Watermelon seeds but when I want to plant them they appear as Cabbage seeds...

 

I added the following files:

 

basicFarming.lua

 

elseif(planting.typeOfSeed == farmingText.watermelons) thenplanting = farming_vegetableconf.growWatermelon(planting, nextGrowing, updateNbOfGrow); 

 

farming_vegetableconf.lua

 

farming_vegetableconf.growWatermelon = function(planting, nextGrowing, updateNbOfGrow) . . . planting.waterNeeded = 90;

 

basically just changed that value and used default potato code for lines like this:

 

planting = growNext(planting, "tileThuztorFarming1_potato" .. nbOfGrow, "Young " .. planting.typeOfSeed, nextGrowing, farming_vegetableconf.props[planting.typeOfSeed].timeToGrow + water + diseaseLvl);

 

because I could not figure out what exactly "tileThuztorFarming1_potato" is...

 

Then I created this aswell:

 

-- Watermelons (take even longer than strawberry)farming_vegetableconf.props[farmingText.watermelons] = {};farming_vegetableconf.props[farmingText.watermelons].seedsRequired = 20;farming_vegetableconf.props[farmingText.watermelons].texture = "TileThuztorCabbageLettuce7Phase_0";farming_vegetableconf.props[farmingText.watermelons].waterLvl = 90;farming_vegetableconf.props[farmingText.watermelons].timeToGrow = ZombRand(72, 100);--~ farming_vegetableconf.props[farmingText.watermelons].timeToGrow = ZombRand(10,11);farming_vegetableconf.props[farmingText.watermelons].minVeg = 2;farming_vegetableconf.props[farmingText.watermelons].maxVeg = 4;farming_vegetableconf.props[farmingText.watermelons].minVegAutorized = 5;farming_vegetableconf.props[farmingText.watermelons].maxVegAutorized = 6;farming_vegetableconf.props[farmingText.watermelons].vegetableName = "Base.Watermelon";farming_vegetableconf.props[farmingText.watermelons].seedName = "farming.WatermelonSeed";farming_vegetableconf.props[farmingText.watermelons].seedPerVeg = 3;

 

I used the Cabbage textures here... But for testing I replaced them with carrot textures to see if this may cause the bug. That changed nothing, Watermelon Seeds are still recognized as Cabbage seeds when trying to plant them.

 

farming_text.lua

 

farmingText.watermelons = "Watermelons";

 

ISFarmingMenu.lua

 

ISFarmingMenu.watermelonSeed = {};

 

local watermelonOption = subMenu:addOption(farmingText.watermelons, worldobjects, ISFarmingMenu.onSeed, ISFarmingMenu.watermelonSeed, 20, farmingText.watermelons);ISFarmingMenu.canPlow(#ISFarmingMenu.watermelonSeed, farmingText.watermelons, watermelonOption);

 
Recipe in farming.txt looks like this:
 

  recipe Open Watermelon Seed Packet	{  	WatermelonBagSeed,  	  	Result:WatermelonSeed=50,  	Time:20.0,	}

 

Everything looks fine in game, the Watermelon Seeds spawn and can be opened (I of course modified SuburbsDistributions.lua and farming.txt / item.txt aswell) but like I said: When I want to place some seeds with only the watermelon seeds in my inventory I can just place cabbage seeds. The menu is fine, too. It shows the watermelon and the requirements and so on...

 

Please tell me what I did wrong / forgot :D!

 

Thanks!

Link to comment
Share on other sites

Oh god, it was so obvious...

 

I had this line in the FarmingMenu

table.insert(ISFarmingMenu.cabbageSeed, item);

I don't know why, probably because I copied the line before and then forgot to change it  :cry: .

 

Well, now everything looks fine, I just have to figure out now how I import the new code into the game without having to edit the actual official game files...

 

Oh, and I would probably need someone that could test the process of growing because I won't be able to wait ~200 days to see the plant fully grown...

Link to comment
Share on other sites

Yeah, thanks, luckily I figured that out myself shortly after I posted this :D. Everything works well so far. I am not really sure though if the "growth time" shown in game is really accurate... I reduced the value and the menu said "Time until next phase: 17 days". I waited for about 3 days and maybe on the fifth day my plant was fully grown and I could harvest my first melons...

 

200 days at first seemed a lot for me aswell but I orientated those values on the times of farming plants already in game and if strawberries take about 150 days to grow I think it is just fair that melons take a little longer. They are quite precious and it would become too easy if you could harvest them too fast.

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...