Jump to content

Furious_Monk

Member
  • Posts

    11
  • Joined

  • Last visited

Furious_Monk's Achievements

  1. you might be able to change the speed of rotting in winter in the seasons.lua file? I forget where that is, and I don't have my computer on me.
  2. Hey folks, Before posting my mod plan to the WIP section, I wanted to seek help from you knowledgable coders to see if there is any way I can know ahead of time what folders/files I will need to modify in order to fully accomplish what I am looking to do with my planned mod: Compostables. I think I have all the scripts under control, but what I need information about are the LUA files. It is difficult for me to determine from a given file what files it references, and what files reference it, so I cannot really create a list of all the files I will need to update. Is there any way for me to find that information? In addition, I am wondering if there is a way for me to make a lua file that only contains my mod, which will append itself properly to the vanilla lua files, or if I have to make all new files for the folders to hold my specific mod. I assume the latter, just judging by how many IS files there are. Anyway, sorry, I am sure this is all basic stuff that I just don't have the background in. I am a designer, not a programmer! I am going to try to break down the core concepts of my mod, so that someone with better knowledge of the file structure might be able to give me a list of files I will need, hopefully. Concept 1: Decomposition Concept 2: Compost Generation Concept 3: Compost Usage Concept 4: Mulch and Humus I realize this was a rather long post, but I thank you for reading this far! If anyone has an interest in helping me out with this, either through advice or even working on it with me, that would be great, and I would love a collaborator while I learn how to do this coding. Also, I will be working on new art for all of this, and will post a template for artists to use to make new objects and sprites once I know what I need to know in order to make one. Speaking of which, anyone know where I can find the art files in the Zomboid folders? THANKS!
  3. Hey blindcoder, I have it fixed to an extent now. The item now properly drains in 10 uses. It was due to something in related to the problem in this thread: http://theindiestone.com/forums/index.php/topic/17062-question-isfarminginfolua-le-not-defined-for-operand/ I believe my item is still getting it's weight reduced to .6 from 2 instantaneously on the first use. Shouldn't it go down to 1.8 lbs? I am not getting the bag to turn into an empty bag right now, but I think that is something I have to add to the original item.
  4. Hey Robert! Thanks for answering. Yes, you are correct. I was not ever defining a number var for plant.compost OR info.plant.compost in the ISFarmingInfo.lua file. I wound up hacking it with: --Hack to stop compost from being set to nil if plant.compost == nil then plant.compost = 0 end...in the basicFarming.lua function, but I haven't done anything for info.plant.compost. I think what you are suggesting (editing the ISPlant.lua) has already been done just by virtue of me copying every instance of the "fertilizer" stuff. I have a o.compost = 0 in the ISPlant:new function, an ISPlant:addCompost(amount) function, and a self.compost = modData.compost (and a call to reset modData for that result). I don't quite know how its working right now, but I am only able to see the information in the farming panel now AFTER I have composted the plant. It also calls an __lt error on that info.plant.compost if I don't compost it first. SO IN SHORT!!! Do you think it is just because I used it on plants that I had made in a game save from before I added the mod? If so... I feel like an idiot! I could have had this finished hours and hours ago hahahha.
  5. Hey there, Dumatoin. I believe you can change that by changing just two lines of code. 1. In your .../media/scripts folder, open the file called "farming.txt" with a text editor. 2. In the "recipes" section of that file (starting on line 585) you can see the two recipes: recipe Make Mildew Cure { GardeningSprayEmpty, Milk, Result:GardeningSprayMilk, Time:40.0, Category:Farming, NeedToBeLearn:true, } recipe Make Flies Cure { GardeningSprayEmpty, Water=3, Cigarettes=5, Result:GardeningSprayCigarettes, Time:40.0, Category:Farming, NeedToBeLearn:true, }3. Just change those "NeedToBeLearn:true," lines to "NeedToBeLearn:false,' and you should be good to go.
  6. Hey folks, just a strange issue happening here, hoping someone can point out what is wrong. module Base{ item Compost { Type = Drainable, DisplayName = Compost, Icon = Sandbag, Weight = 2.0, UseDelta = 0.1, UseWhileEquipped = false, }} Shouldn't that mean that the "Compost" item in my bag weighs 2 lbs. and disappears after 10 uses? Well when I use the item as intended, I wind up having no drain on the green "remaining" bar, but the weight of the item shifts to 0.6. What's going on? One last thing, how do I make this piece of code: item CompostEmpty { Type = Normal, DisplayName = Empty Composting Bag, Icon = SandbagEmpty, Weight = 0.001 } generate the Empty item when the Compost item actually does get depleted? Thanks!
  7. Well, I am not sure if this helps, but I have a different exception when I try to actually add Compost to a plant: Console Stack Trace: Here are the relevent code snippets, with lines that the console tagged in red: From: basicFarming.lua: Line 4 - if plant.compost < 5 then From: ISCompostAction.lua: Line 9 - basicFarming.compost(self.item, self.plant)
  8. I believe this is telling me that it's type is nil. so that must mean I am not giving it any initial value?
  9. Thanks for the fast reply, RoboMat! Er... it's an integer, isn't it? I wonder where that would be defined. lua seems to require no definitions! I mean, obviously it does, but I don't know where it is calling this information from. I am running exactly the same thing as that for the info.plant.fertilizer, so maybe you would know where THAT is getting defined? I went through all the files I could find to find any instance of fertilize being used, and I thought I got everything, but I guess I am missing a definition somewhere. Could it be related to the item usage? I have noticed that when I use my compost item, it does not "drain" as it should, but I figured I would address that problem later.
  10. Hey everyone, Sorry if this is too little info to help me on, but I have a question about a mod I am trying to get working that modifies different parts of the Farming folder's lua files in the Client and Server folders. It may help to know that I am trying to add a "Compost" action to plants, and I have done this by simply copying/changing any instance of the "Fertilizer" actions that I can find. I have had it working in various stages. At first, I somehow killed the farming info panel, and couldn't see any information about a plant. I got that fixed by commenting out my text coloring function: It was nice to see the panel back, but it still wasn't updating any kind of state on the plant's Compost level (which is drawn after "Fertilizer" in the info panel). I went through and did some fixes where I could with draw locations, and I was thinking I had it figured out, but alas, as long as that code section is uncommented, the console pings 100 exceptions per second, refering directly to the first line of the second if() statement: if(info.plant.compost <=2) then as well as this line called in the function ISFarmingInfo:render() up above: ISFarmingInfo.getCompostColor(self); Here is the Stack Trace: Specifically, I am wondering what that __le not defined for operand is refering to, as well as any advice you can give about what I might be doing wrong to cause the info panel to not work. In case you can't tell, I don't really know what I'm doing with anything too in depth with code, though lua seems to be easier for me to understand. It is hard to know where things are going wrong if you aren't writing the whole thing yourself. Any help would be much appreciated, and thank you!
×
×
  • Create New...