Panda Posted September 1, 2013 Share Posted September 1, 2013 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 ! Thanks! Link to comment Share on other sites More sharing options...
Panda Posted September 1, 2013 Author Share Posted September 1, 2013 Oh god, it was so obvious... I had this line in the FarmingMenutable.insert(ISFarmingMenu.cabbageSeed, item);I don't know why, probably because I copied the line before and then forgot to change it . 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 More sharing options...
The_Real_Al Posted September 1, 2013 Share Posted September 1, 2013 200, huh? Sorry, can't help you there. I usually only last until the rolling pin wears out. But why don't you reduce the growth times to just a couple of days for testing? Link to comment Share on other sites More sharing options...
Panda Posted September 1, 2013 Author Share Posted September 1, 2013 Yeah, thanks, luckily I figured that out myself shortly after I posted this . 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now