Community Forum

foliage layer grass

Forum Overview >> Scripting

CategoryScripting
Created28.06.2015 09:31


Bilbo Beutlin (BBeutlin) 28.06.2015 09:31
I want to work on the grass layers ingame, removing or adding the foliage layer on grass texture partially.
My idea is using a direct planting sowing machine with the inbuilt defoliator, fruit preparer.

For removing:
Can I use for this concern the "SowingMachine.lua" code
SowingMachineAreaEvent.runLocally(workAreasSend, seedsFruitType, angle, self.useDirectPlanting)
if I set 'seedsFruitType' to "unknown" or nil?
Case not, which other method was possible by using the given 'workAreasSend' and 'angle' values?

For adding foliage layer on existing grass texture I've still no idea. What could be used here? The normal sowing machines work only on cultivated ground, not on grass texture.

Emil Drefers (Unknown) 29.06.2015 09:58
Hi,

if I get you right you want to directly plant wheat for example on an area which is currently covered by grass?

Well, I don't know if that makes much sense.
Normally you would first use a plough.
Afterwards maybe use a cultivator and finally the sowing machine.

You could write a custom event which does both, ploughing and seeding.


Cheers,
Emil

Bilbo Beutlin (BBeutlin) 29.06.2015 10:37
No - it's only about grass.
I want to 'sow' grass on a pure grass texture, which doesn't have a foliage layer yet.
And vice versa removing annoying grass foliage from grass textures, eg. for placing objects/buildings.

Emil Drefers (Unknown) 30.06.2015 07:18
Hi,

well, with the above mentioned procedure (first ploughing then sowing) you could sow grass whereever you want.

Removing grass foliage everywhere should be possible by using the existing CultivatorAreaEvent and setting the argument 'limitGrassDestructionToField' to false.
Please check:
http://ls-mods.de/scriptDocumentation.php?lua_file=vehicles/specializations/Cultivator
and
http://ls-mods.de/scriptDocumentation.php?lua_file=vehicles/specializations/CultivatorAreaEvent

Cheers,
Emil

Bilbo Beutlin (BBeutlin) 30.06.2015 11:11
aha - thanks. So the flag 'limitGrassDestructionToField' is responsible that cultivators don't work as in FS13 anymore?

"Ploughing then sowing"? There isn't a simplier method to 'sow' on grass texture directly? How about using an editor function to manipulate foliage layers?

Emil Drefers (Unknown) 30.06.2015 15:33
Hi,

yes the named flag prohibts the destruction of grass when being not in a field.

Nope, not all editor functions are available in the game.

Cheers,
Emil


Note: Log in to post. Create a new account here.