Page 2 of 4

Re: [FS17]Tutorial - Increasing numer of field directions

Posted: Wed Aug 16, 2017 3:41 am
by Kentolsson73
I´ve tried several times and followed the guide step-by-step but can´s get it to work. I try to load game it just goes back to title and shows this in the log: 

Error: C:/Users/.../mods/This_is_the_sample_mod_map_1/ModMap.lua:5: '=' expected near ' '
Error: mission class This_is_the_sample_mod_map_1.ModMap could not be found.

I´ve tried on several maps (all different edits of sample mod map) Cant get it right even on a clean new created mod map.
Hope someone can help me sort this out

Thanks

Re: [FS17]Tutorial - Increasing numer of field directions

Posted: Sun Sep 10, 2017 5:39 pm
by masseyharris
Kentolsson73 wrote:I´ve tried several times and followed the guide step-by-step but can´s get it to work. I try to load game it just goes back to title and shows this in the log: 

Error: C:/Users/.../mods/This_is_the_sample_mod_map_1/ModMap.lua:5: '=' expected near ' '
Error: mission class This_is_the_sample_mod_map_1.ModMap could not be found.

I´ve tried on several maps (all different edits of sample mod map) Cant get it right even on a clean new created mod map.
Hope someone can help me sort this out

Thanks
Did you solve this please? I just tried to add the extra field directions into my map and I get the same error
Error: C:/Users/.../mods/This_is_the_sample_mod_map_1/ModMap.lua:5: '=' expected near ' '

It's frustrating because I used this method successfully several month ago but now I get this error even though I'm sure I'm doing the same things.

@Stegei could you suggest what would give this error please?

Re: [FS17]Tutorial - Increasing numer of field directions

Posted: Sun Sep 10, 2017 5:50 pm
by böserlöwe
Open the ModMap.lua, see in Line 5
Copy this line here, so we san see whats the error.

Re: [FS17]Tutorial - Increasing numer of field directions

Posted: Sun Sep 10, 2017 6:10 pm
by masseyharris
böserlöwe wrote:Open the ModMap.lua, see in Line 5
Copy this line here, so we san see whats the error.
Thank you boserlowe.

Here's the first 8 lines. It's a direct copy paste from the tutorial so I'm confused, but I hope you can find an error for me:

ModMap = {}
local ModMap_mt = Class(ModMap, Mission00)

function ModMap:new(baseDirectory, customMt)
    local mt = customMt
    if mt == nil then
        mt = ModMap_mt
    end

Re: [FS17]Tutorial - Increasing numer of field directions

Posted: Sun Sep 10, 2017 6:37 pm
by böserlöwe
We dont need the copy of the tutorial, thats ok.
We need the Copy in your own map, that you have found in
C:/Users/.../mods/This_is_the_sample_mod_map_1/ModMap.lua

And whe this i others than the original, i will hope you know what to do. ;)

Re: [FS17]Tutorial - Increasing numer of field directions

Posted: Sun Sep 10, 2017 6:57 pm
by masseyharris
Yes, the above was copied directly from the ModMap.lua that I created and placed in the same location as my ModDesc.
I hope I have understood and that is what you mean, thanks for helping.

Here it is again, copied direct from the lua that I created:

ModMap = {}
local ModMap_mt = Class(ModMap, Mission00)

function ModMap:new(baseDirectory, customMt)
    local mt = customMt
    if mt == nil then
        mt = ModMap_mt
    end
    local self = ModMap:superClass():new(baseDirectory, mt)

Re: [FS17]Tutorial - Increasing numer of field directions

Posted: Mon Sep 11, 2017 12:10 am
by masseyharris
I fixed it, thanks anyway.
No idea where the error was, but after re creating the lua a few times it now works.

Re: [FS17]Tutorial - Increasing numer of field directions

Posted: Thu Oct 26, 2017 2:29 am
by JimmytheGeek
Sorry for the necro on this post, but when I try this with a 16x map, the convert.cmd only recognizes 11 channels and not the twelfth. The resulting png has one too few channels and GE doesn't know what to do. Is there some adjustment I can make to the program to get this to work on 16x maps? I've used it on standard and 4x maps with no issue, but this is the first 16x I've tried. Below is the output from my scripting window, and the non-indexed triangle set warning is where I've added chopped straw and haven't run the map in-game yet:
GIANTS Engine Runtime 7.0.0 (14455) 64bit (Build Date: Apr 10 2017)
Copyright (c) 2008-2016, GIANTS Software GmbH (giants-software.com), All Rights Reserved.
Copyright (c) 2003-2016, Christian Ammann and Stefan Geiger, All Rights Reserved.
Application: GIANTS Editor 64bit 7.1.0
Main System
CPU: AMD Phenom(tm) II X4 955 Processor
Memory: 16369 MB
OS: Windows NT 10.0 64-bit
Physics System
Version: 5.9.5
Thread(s): 2
Sound System
Driver: OpenAL Software
Render System
Driver: OpenGL
Card Vendor: NVIDIA Corporation
Renderer: GeForce GTX 960/PCIe/SSE2
Version: 4.5.0 NVIDIA 378.66
Shader Version: 4.50 NVIDIA
Max. Texture Layers: 16
GL_AMD_depth_clamp_separate not supported
Started 2 threads for threadpool 'Render threadpool'
Hardware Profile
Level: High (forced)
View Distance Factor: 1.100000
Shadow Quality: 1.000000 Size: 2048 Filter-Size: 16
Shader Quality: 2
Skip Mipmaps: 0
LOD Distance Factor: 1.100000
Terrain LOD Distance Factor: 1.500000
Terrain Normal Mapping: Yes
Foliage View Distance Factor: 1.400000
Foliage Density: 0.500000
Volume Mesh Tessellation Factor: 0.850000
Tyre Tracks Segments Factor: 2.000000
Max. Number of Shadow Lights: 3
Max. Number of Lights: 512
Max. Number of Lights Per Cluster: 32
MSAA: 2
Check for updates (http://gdn.giants-software.com)
Warning: i3d contains non-binary indexed triangle sets: C:/Users/Jim/Documents/My Games/FarmingSimulator2017/CornBelt/CornBelt/maps/map01.i3d
Error: GDM file has wrong number of channels (11 should be 12)
Error: Can't load resource 'C:/Users/Jim/Documents/My Games/FarmingSimulator2017/CornBelt/CornBelt/maps/map01/cultivator_density.png'.
Error: Failed to load terrain detail layer 'terrainDetail'.
C:\Users\Jim\Documents\My Games\FarmingSimulator2017\CornBelt\CornBelt\maps\map01.i3d (9536.05) ms

Re: [FS17]Tutorial - Increasing numer of field directions

Posted: Thu Oct 26, 2017 12:54 pm
by masseyharris
I'm sorry I've never done a 4x map so I'm not sure, but in your map i3d, have you changed the numDensityMapChannels to 12( or 14) ?

I kept notes of how I did mine on a normal size map.

Change the line
<DetailLayer name="terrainDetail" numDensityMapChannels="11" ...
to
<DetailLayer name="terrainDetail" numDensityMapChannels="12" ... (for 16)
<DetailLayer name="terrainDetail" numDensityMapChannels="14" ... (for 32)

Also adjust the attribute on the same line as in the previous step
combinedValuesChannels="0 3 0;5 2 0;3 2 1"
to
combinedValuesChannels="0 3 0;5 3 0;3 2 1" (for 16)
combinedValuesChannels="0 3 0;5 5 0;3 2 1" (for 32)

Re: [FS17]Tutorial - Increasing numer of field directions

Posted: Mon Oct 30, 2017 3:49 pm
by wildberry
No errors in log, but the field shows parts of field running in random directions when sowing, plowing etc. Anyone any idea where I might check to fix this?

Re: [FS17]Tutorial - Increasing numer of field directions

Posted: Wed Nov 22, 2017 10:28 am
by Azfoor
Stegei wrote:This tutorial explains how to adjust your mod map to allow for a higher number of direction a field can be visualized with instead of the 45 degrees the game uses by default.
What numbers do I need to change to increase the number of angles? I want to do 32 angles.

Re: [FS17]Tutorial - Increasing numer of field directions

Posted: Wed Nov 22, 2017 11:03 am
by masseyharris
Azfoor wrote:
Stegei wrote:This tutorial explains how to adjust your mod map to allow for a higher number of direction a field can be visualized with instead of the 45 degrees the game uses by default.
What numbers do I need to change to increase the number of angles? I want to do 32 angles.
The numbers are in my post two posts above yours.

Also, in the modMap.lua, change the line

  local numAdditionalAngleChannels = 1;
to
local numAdditionalAngleChannels = 3;

and in groundshader.xml,
change
angle = ceil(angle*3-0.0001)/4*3.14159;
to
angle = ceil(angle*31-0.0001)/32*3.14159;

Re: [FS17]Tutorial - Increasing numer of field directions

Posted: Wed Nov 22, 2017 3:45 pm
by Azfoor
:mrgreen:
masseyharris wrote:
Azfoor wrote:
Stegei wrote:This tutorial explains how to adjust your mod map to allow for a higher number of direction a field can be visualized with instead of the 45 degrees the game uses by default.
What numbers do I need to change to increase the number of angles? I want to do 32 angles.
The numbers are in my post two posts above yours.

Also, in the modMap.lua, change the line

  local numAdditionalAngleChannels = 1;
to
local numAdditionalAngleChannels = 3;

and in groundshader.xml,
change
angle = ceil(angle*3-0.0001)/4*3.14159;
to
angle = ceil(angle*31-0.0001)/32*3.14159;
Oh I totalt overlooked that, sorry :blushnew: and thanks for the help, I'm gona try this tonight. I might come back if I have issues :mrgreen:

Re: [FS17]Tutorial - Increasing numer of field directions

Posted: Wed Nov 22, 2017 4:17 pm
by masseyharris
Azfoor wrote: Oh I totalt overlooked that, sorry :blushnew: and thanks for the help, I'm gona try this tonight. I might come back if I have issues :mrgreen:
I think that was all of it. I followed the instructions in Stegei's first post, then I looked at another map to see what numbers had been changed for 32 directions and made the changes I posted above. Good luck.

Re: [FS17]Tutorial - Increasing numer of field directions

Posted: Thu Nov 23, 2017 11:41 am
by Azfoor
masseyharris wrote:
Azfoor wrote: Oh I totalt overlooked that, sorry :blushnew: and thanks for the help, I'm gona try this tonight. I might come back if I have issues :mrgreen:
I think that was all of it. I followed the instructions in Stegei's first post, then I looked at another map to see what numbers had been changed for 32 directions and made the changes I posted above. Good luck.
The only question i have is how do i create a Lua file?

And i can not find the grundshader.xml....? Im trying to edit the old stream farm