DeckerMMIV / FarmSim_Mod_SoilMod

Farming Simulator modification - SoilMod
25 stars 14 forks source link

Compost for use in Soil Mod and as a sellable product #72

Closed sootysax closed 8 years ago

sootysax commented 8 years ago

I'm wondering if there is any way to have compost_soil be available to sell as a product (using the compost soil mod) and to be available as a spray type for soil mod.. kind of a drag that you can't do both

DeckerMMIV commented 8 years ago

What is the conflict?

SoilMod does NOT register 'compost', 'compost_soil', 'compostSoild' as any of the fruit-, spray- or fill-type, but expects another mod to do so - that is; some other mod must register one of those names as at least a fill-type.

So maybe the other mod (or mods) which registers the compost, should be studied, to figure out why "you can't have your cake and eat it too."

Maybe it is something simple, like a lack of understanding how the fruit-, spray- & fill-type concept works in Farming Simulator, and what to register where. The 'multifruit' and 'additional fruit types' mods/scripts could be a source of the issue?

When registering a fruit-type (due to there being a foliage-sub-layer for it), it will also automatically register it as a fill-type. When registering a spray-type, it will also automatically register it as a fill-type. It should also be possible to register both a fruit-type and a spray-type with the same name.

sootysax commented 8 years ago

I'm not sure what the conflict is.. but when I load compost soil into the manure spreader and spread it on the field, the only thing I see is soil moisture (no compost texture), and there is no soil amendment when culivated or plowed.

https://gist.github.com/sootysax/fd9a98718a7e61368a2c

DeckerMMIV commented 8 years ago

According to your LOG.TXT, even though it seems that the fruit-type compost_soil is registered, then SoilMod's code did not detect a foliage-sub-layer with a name of one of these; compost, compost_soil or compostSolid_windrow.

Please check that you actually have a <FoliageSubLayer name="compost_soil" ... in your map I3D file.

And remember that the names are CaSe-sEnSiTiVe :wink:

sootysax commented 8 years ago

no, there is no compost_soil FoliageSubLayer in the id3...

Where can I find what the complete line of code should be? It was not part of the map prep instructions for SoilMod.

Shouldn't there be an 'fmc_compost_soil" line to define how soil mod works with compost as it does with all the other fertilizer types?

Or do you have a line of code I can insert from a map that you tested compost support on?

DeckerMMIV commented 8 years ago

Ok, so that explains it.

The instructions, for how to install a foliage-layer for 'Compost', should - in the same way as 'Chopped-straw' - be found elsewhere. I'm guessing there may be something to find on http://marhu.net, http://fs-uk.com or http://modhoster.com - and possibly other sites that I do not know.

SoilMod only has plugin-support for the 'Chopped-straw' and 'Compost' foliage-layers, and is not "responsible" for telling how to install those.

Jurkkis commented 8 years ago

My server is running Tunxdorf modcontest 2015 (v2.1) map and it has both ways of using compost working. Selling and spreading with manure preader as fertilizer works and there is texture too, although ugly one. Never ploughed it but atleast cultivating increased N &PK +1PK as it should. Just FYI something to look at as help to install the layer.

sootysax commented 8 years ago

do I need unique texture fileid, materialid and densitymapid numbers? or do they have to be the same as what is in the Tunxdorf map?

DeckerMMIV commented 8 years ago

@sootysax If you are putting the <FoliageSubLayer ... \> into an existing foliage-multi-layer, then you "only" have to increase the foliage-multi-layer's numChannels value, but keep its densityMapId. However I suspect that many people have absolutely no clue about the other required changes needed, when modifying an existing <FoliageMultiLayer .. > .. </FoliageMultiLayer> block. Like what the densityMapChannelOffset, numDensityMapChannels and numTypeIndexChannels values must be, as they have very specific meanings depending on the foliage-sub-layer's relation to the other layers within the foliage-multi-layer block.

So the "easiest" method, would be to follow the same process as when adding similar foliage-multi-layer blocks that other mods uses, like; choppedStraw or foliage-trees or any of the foliage-layers for the GMK mod. This implies unique id-reference-numbers for the files and materials.

sootysax commented 8 years ago

I added from the Tunxdorf map these lines into the map.id3 and existing sublayer and got the compost to show up and work when spread with the manure spreader... however, its not working like it should and I'm getting approximately these results instead: (pretty much it seems to treat compost_soil as manure)

plowing compost increases N x11, PK x2, pH no change cultivating compost increases N x6, PK x2

not sure what i did wrong.

here are the added lines - I added the FoliageSubLayer to one of the existing multilayers including fmc_manure, fmc_lime etc

https://gist.github.com/sootysax/28184ec9ab4e5d60dd16

DeckerMMIV commented 8 years ago

@sootysax You should NOT add the compost foliage-sub-layer to any of the SoilMod's foliage-layers. I recon that that Tunxdorf map have not done so.

The reasons:

So revert your changes, then create a new <FoliageMultiLayer> only for "compost", with all the assets that are required. Try to study the Tunxdorf map's compost layer, its "parent"-layer and all the different id-reference numbers; what <File> and <Material> they refer to.

sootysax commented 8 years ago

what should te desitymapchanneloffset be?

sootysax commented 8 years ago

I tested plowing compost on Tunxdorf.. yield is not exactly what is expected, but close enough..

Plowing is getting a +0.6pH, +5N and +2PK Cultivating is getting +1N, +1PK