Community Forum

Error in : GroundTypeManager.lua

Forum Overview >> Farming Simulator 19

CategoryFarming Simulator 19
Created08.01.2021 15:38


Jean-michel Mercanti (JMGaming_) 08.01.2021 15:38
Hello I have this kind of errors in my map :

C:/Users/buzs1/Documents/My Games/FarmingSimulator2019/mods/FS19_MontMiroir/maps/prefabs/FS19_SteelSilo_Placeable/FarmSilo.i3d (3.40 ms)
Error: Running LUA method 'update'.
dataS/scripts/misc/GroundTypeManager.lua(123) : attempt to index a nil value

C:/Users/buzs1/Documents/My Games/FarmingSimulator2019/mods/FS19_MontMiroir/maps/prefabs/FS19_AlpineCowsBarnPack/cow1.i3d (13.47 ms)
Error: Running LUA method 'update'.
dataS/scripts/misc/GroundTypeManager.lua(123) : attempt to index a nil value


data/placeables/animalHusbandry/husbandryChickenSmall.i3d (6.19 ms)
dataS2/character/crow/crow.i3d (9.28 ms)
Error: Running LUA method 'onPlacementRaycastHit'.
dataS/scripts/misc/GroundTypeManager.lua(123) : attempt to index a nil value


I saw in forum the reason is probavly i use a old map texture and/or density files.
Can you tell me How I can solve this problem ?

Thanks a lot.

Bilbo Beutlin (BBeutlin) 08.01.2021 16:01
A very common reason for this error is undefined farmland, maybe only a few missing pixels in farmland layer.

Can also occur if the ground collision maps are missing/faulty. Must be created separately by GE script.

Jean-michel Mercanti (JMGaming_) 08.01.2021 16:34
Thanks for your answers.

Farmland layer : I understand all pixel must have a farmland number ? Because in my map a lot of pixel haven't a farmland number.

And I do not not create ground collison maps with GE script.

I will try both solution to solve my problem !



Bilbo Beutlin (BBeutlin) 08.01.2021 16:54
Addendum:
After you have created the ground collision maps, rename the "*.i3d.plcColMap.grle" to "*.i3d.plcMap.grle".

Jean-michel Mercanti (JMGaming_) 08.01.2021 21:39
I remove a error by modify map.xml the GroupTypeMapping error is locate in this file :

<groundTypeMappings>

<!-- Base -->
<groundTypeMapping layer="ROUGHDIRT" type="dirt"/>
<!-- Standard -->
<groundTypeMapping layer="ASPHALT" type="asphalt"/>
<groundTypeMapping layer="GRAVEL" type="gravel"/>
<groundTypeMapping layer="GRASS" type="grass" paintableFoliageId="1"/>
<groundTypeMapping layer="GRASSROUGH" type="grassRough" paintableFoliageId="1"/>
<groundTypeMapping layer="SANDWET" type="sand"/>
<groundTypeMapping layer="ANIMALMUD" type="animalMud"/>
<groundTypeMapping layer="CONCRETE" type="concrete"/>
<groundTypeMapping layer="PLATE" type="plates"/>
<groundTypeMapping layer="CONCRETE" type="cobblestones"/>
<groundTypeMapping layer="CONCRETE" type="flagstones"/>

<!-- Special -->
<groundTypeMapping layer="FORESTLEAVES" type="forestGround"/>
<groundTypeMapping layer="MOUNTAINROCK" type="rock"/>

</groundTypeMappings>


The second error is still there :

C:/Users/buzs1/Documents/My Games/FarmingSimulator2019/mods/FS19_MontMiroir/maps/prefabs/FS19_AlpineCowsBarnPack/cow1.i3d (13.47 ms)
Error: Running LUA method 'update'.
dataS/scripts/misc/GroundTypeManager.lua(123) : attempt to index a nil value


Probably I imust add some lines, but I don't know what is missing ?


Bilbo Beutlin (BBeutlin) 09.01.2021 09:09
Did you check/fix the farmlands and ground collisions?

Else could be the embedded "FS19_AlpineCowsBarnPack" uses a groundType not defined in your map.xml.
Compare with the default files $data/maps/mapDE|US.xml

Jean-michel Mercanti (JMGaming_) 09.01.2021 11:26
Yes it's the solution. I use a groundType in my map not define.

The problem is in my map.i3d file that use a combined layer not define in map.xml file in groundTypeMapping section.
I add all layer mapping in map.xml and now the error disapear , and my map works well !!!

Thanks a lot for your help !


Jean-michel Mercanti (JMGaming_) 09.01.2021 11:37



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