[WIP] Plowing Started on March 17, 2015

Started by Igabod, March 17, 2015, 04:30:41 PM

Previous topic - Next topic

Igabod

I started a project which was meant purely as an edit for an existing mod for my own personal use, but I figured I'd upload it here to get input on how to improve it further. I may end up releasing this once it is at a point that I feel like all the kinks have been worked out.

Basically, I started out modifying the Tilled Soil mod. I wanted to make a sensible replacement for fertilizer pumps which would work to convert all the same terrains that the fert pump did into soil without the OP factor involved with those. I've got it working somewhat, but it feels a bit hacky to me. I had to overwrite the vanilla def for the Mud terrain type so that it can be built on. I've added a fairly high research requirement to be able to build the plowed soil as I'm calling it. I also added in a significant build time for each tile (about 8 or 9 times that of stone floors). And I have it temporarily requiring potatoes as a building material, though I plan on changing that into a new compost item when I get around to making a compost heap (will need some help with the best way to achieve that).

I'm asking for input on this mod of any kind you happen to think of. Please keep in mind that I'm not an expert C# programmer though so some suggestions won't be possible for me to do. If you happen to be willing to contribute a .dll file for inclusion in this mod then I would be grateful of course and would include a credit to you in the About.xml file as well as on the original post when this mod is released officially.

[attachment deleted due to age]

Haplo

I've thought about a compost item myself. In principle it shouldn't be too hard. Here are my thoughts about it:
-Build a simple building with 3 wood or such per square
-The building is a modified hopper (building_storage) which accepts all rottables
-The building checks rarely (250 Ticks) if there is an rottable item on its position.
-If there is: Item will be stored in internal memory
-Next Ticks only check if the item is still valid and if it's still at this position AND its rotting stage.
-Not valid anymore? back to item checking all 250 Ticks
-If it's rotting a defined time passes (10 days?) or if the items health is < 10 the following activates at once:
-> Building destroys itself + random chance: If the stack of items is >= 20 + 55 * Rand.Value the new ground will be rich soil, else normal soil; Or always rich soil, when it was normal soil to start with and the item stack was >= 20.
-> Alternate, if its max stack count is 1 (Corpses) it will always produce rich soil.

I'll provide the .dll code, when I find where my free time hides.. :(