I am currently making a special harvester for harvesting onions on mod maps.
Due to the way the harvester works (it puts the onions on to the field behind itself and not into an internal tank), I am creating it as a mower.
A normal mower of cause cannot harvest onions, so I created a small lua script that allows me to add a fruitTypes.xml, which will be loaded in addition to the original file from the map. This allows me to add a new fruitTypeConverter that basically just converts from onions to onions.
I verified that the script is actually working and the new fruitTypeConverter gets loaded correctly. I also verified that the fruittype index and filltype index that the game gets from reading the file are correct.
In the xml file for my mod I have a mower section where I specified the name for the new fruitTypeConverter.
Unfortunately the mod does not work. It just doesn't harvest anything.
I verified that the problem is really the fruitTypeConverter by changing it to the default "MOWER", after which the mod works for cutting grass.
Why does it not work with my neww fruitTypeConverter?
Here is the fruitTypeConverter:
Code: Select all
<fruitTypeConverter name="ONIONHARVESTER">
<converter from="ONION" to="ONION" factor="1.0" windrowFactor="1.0" />
</fruitTypeConverter>
Code: Select all
<mower fruitTypeConverter="ONIONHARVESTER">
I just can't find any reason for this not working...