In the words of Top Gear / The Grand Tour’s Jeremy Clarkson “I’ll fix it, where’s the hammer”. Building a map from the ground up is at times a proposition of two steps forward, one step back. As long as that step back is not a step off a cliff then as they say “it’s all good”. With the step back having already been taken in the last post I thought this would be a good opportunity to talks about how I intend to tackle this problem.
So to recap, with my older save, which used v 126.96.36.199 of the additionalMapTypes script, the new crops were harvestable, showed up in the PDA, but would not show as options for the seeders. With the newer save, which uses v 188.8.131.52 of the script the new crop types could be selected in the seeder but any attempt to harvest them would essentially break the harvester. Normally I’d begin the bug hunt with the games log file but a review of the log didn’t reveal any errors so another approach would be needed.
A great place to start would be the support thread for the AdditionalMapTypes.lua, unfortunately marhu.net is predominantly a German speaking site, so I’ll table that option for now. The mod authors did include an English version of the instructions for implementing the script but they’re pretty basic, though there are some details that will be pertinent. More importantly they included an example of the changes to the modDesc.xml that need to be made to get the script to function correctly. The final piece of the puzzle from the mod authors is the AdditionalMapTypes.lua itself.
One sound approach would be to look at how someone else did it. By comparing my implementation to a working implementation it may be easier to see where I made my mistake. As a benchmark I’ll be looking at Stevie’s Pine Cove v184.108.40.206 one of the few maps that I know of to implement the AdditionalMapTypes.lua. Stevie noted that Pine Cove is using a default implantation of v 220.127.116.11 of the script. I don’t believe that the format used for the modDesc registrations have changed since v 18.104.22.168 so Stevie’s implementation should be a good reference.
There is one key difference between Stevie’s implantation and mine that may or may not be relevant. Stevie added two additional crops, oats and rye, while I added four, oats, rye, millet, and triticale. Adding more than two crop types means changing some additional parameters in the map.i3d so while comparing my implementation to Stevie’s might yield some clues simply copying and pasting his implantation into mine would only break my build further.
In my post ‘From the Ground Up’ I summarized the steps necessary to add additional crop types to an FS17 map but will do so again here to keep to give the reader some perspective on what’s going on.
Add the required texture, particle effect and cutter effect files to your map folder.
Edit the map.i3d file. It’s here that the additional crop types are added and linked to the texture and effects files that were added in the last step. Additional changes need to be made if more than two new crop types are added.
Create a new fruit_density.gdm. This step is only needed if more than 2 additional crops are being implemented.
Add the AddtionalMapTypes.lua to the map folder. This is the script that contains the code necessary to allow the new crops to work in game.
Modify the map.xml to let the game know where to look for the AddtionalMapTypes.lua and the supporting texture and effects files.
Edit the modDesc.xml to register the new crop types in game.
To recap I have two problems to solve, one why didn’t the seeder work in the old save, and two what’s gone wrong with the harvester in the new save. Pragmatically there’s no need to solve the first problem as it uses an older version of the script but I’d like to do so for a couple of reasons. First, I’d just like to know what went wrong and second I think it will be the easier problem to solve. Another advantage to fixing the first problem is that I can always fall back to the 22.214.171.124 version of the script while I continue to figure out what’s causing me issues in 126.96.36.199.
Given that there were no errors in the log and that I could add new crops by painting them in in the Giant Editor I don’t think the issue lies with the edits made to the map.i3d or the associated texture and effects files. Nor do I think that the issue is with the script itself, its far more likely that there is a mistake in one or more of the edits I made to the modDescription, which are essentially the parameters that pass optional settings to the script. Options like does the seeder know about this crop. The option that I’ll need to check is to ensure that the fruitTypeGroup variable includes the sowingmachine parameter. If not, then adding the parameter should fix the problem. If it is there than the issue is a bit more complex than I’m anticipating.
I’m still formulating a strategy for the harvester problem but something Stevie put in his Pine Crest notes may provide a potential clue; “I used the defaults on the 1007 map types install but found that if the oats won’t harvest straight away, try a short time after until it does. I’m pretty certain this is a 1007 glitch.”
I’ll post again after I’ve played around with all of this.