Community Forum

Problem with buyable bales

Forum Overview >> Farming Simulator 19

CategoryFarming Simulator 19
Created19.08.2019 20:19


Matthias Streitfellner (Steyrman) 19.08.2019 20:19
Hello,

I'm trying to create small buyable bales, that come out from this baler for example: https://forbidden-mods.de/filebase/file/7748-new-holland-bc5040hb/

But I have a problem to refer to the i3d file of the bale (in the directory of the mod):

2019-08-18 19:56 Error: i3d 'objects/baleSilage120.i3d' could not be found.
2019-08-18 19:56 Error: failed to load i3d file 'objects/baleSilage120.i3d'
2019-08-18 19:56 Warning (script): Unknown entity id 0 in method 'getChildAt'.
2019-08-18 19:56 LUA call stack:
2019-08-18 19:56 dataS/scripts/objects/Bale.lua (219) : getChildAt
2019-08-18 19:56 dataS/scripts/objects/Bale.lua (239) : createNode
2019-08-18 19:56 dataS/scripts/vehicles/specializations/BuyableBale.lua (115) : load
2019-08-18 19:56 dataS/scripts/vehicles/specializations/BuyableBale.lua (100) : loadBaleAtPosition
2019-08-18 19:56 dataS/scripts/vehicles/SpecializationUtil.lua (30)
2019-08-18 19:56 dataS/scripts/vehicles/Vehicle.lua (787) : raiseEvent
2019-08-18 19:56 dataS/scripts/i3d/I3DManager.lua (118) : asyncCallbackFunction
2019-08-18 19:56 Warning (script): 'link': Argument 1 has wrong type. Expected: Int. Actual: Nil
2019-08-18 19:56 ..\..\..\src\base\scripting\lua\LuaScriptSystem.cpp (882): expectedType == Value::VoidType || expectedType == Value::ClassType

It does not find it, but the path is correct. If I specify a standard bale from the data directory, it works just fine.
I also tried it with $moddir$, but this also fails.

Here is the <buyableBale> section in the xml of the buyable bale, where I specify the path to the i3d:

<buyableBale filename="objects/baleSilage120.i3d" isWrapped="true">
<offsets>
<offset amount="1" offset="0 0 0"/>
</offsets>
<balePositions>
<balePosition position="0 0.44 0.6" rotation="-90 0 0"/>
<balePosition position="0 0.44 0" rotation="-90 0 0"/>
<balePosition position="0 0.44 -0.6" rotation="-90 0 0"/>

<balePosition position="0 0.76 0.575" rotation="-90 0 0"/>
<balePosition position="0 0.76 0" rotation="-90 0 0"/>
<balePosition position="0 0.76 -0.575" rotation="-90 0 0"/>

<balePosition position="0 1.09 0.55" rotation="-90 0 0"/>
<balePosition position="0 1.09 0" rotation="-90 0 0"/>
<balePosition position="0 1.09 -0.55" rotation="-90 0 0"/>

<balePosition position="0 1.42 0.525" rotation="-90 0 0"/>
<balePosition position="0 1.42 0" rotation="-90 0 0"/>
<balePosition position="0 1.42 -0.525" rotation="-90 0 0"/>

<balePosition position="0 1.74 0.5" rotation="-90 0 0"/>
<balePosition position="0 1.74 0" rotation="-90 0 0"/>
<balePosition position="0 1.74 -0.5" rotation="-90 0 0"/>
</balePositions>
</buyableBale>

I would be greatly appreciated, if anyone could fix this problem.

Nolan Carl (nolangene) 20.08.2019 03:06
first their isn't a baleSilage120.i3d in the $data/objects path that would be what you would need to use. There is a directory for buyableBales at $data/objects/buyableBales there is a byableBale.i3d there. But would recommend you call with one of the xml files in that folder. I believe that you are wanting to load a bale locally. So you would need to utilize that path within your mod folder structure. Assuming your bale is in a folder called bale then the path should be bale/baleSilage120.i3d.

Matthias Streitfellner (Steyrman) 20.08.2019 17:49
I know, that the baleSilage120.i3d is not in the data directory. And yes, I want to load the bale locally within the directory of the mod. But it is very strange, that you can only load bales from $data and not anywhere else. It would be good to know a workaround to load custom bales within the mod directory.

The buyableBale.i3d is not a bale. It is a normal i3d file with components for the 'vehicle' that spawns bales after buying (there is just a plane in the i3d file). It uses the bales from the roundbales and squarebales directory that are also used from balers and wrappers. Loading this i3d file works just fine.

John Doe (dezza069) 21.08.2019 23:05
When I want to use custom bales, I've needed to type the full path to its i3d file in the custom baleTypes.xml (or whatever you've called it). That means when changing between Windoze and OS-X the path was needing to be manually edited.

We were told by the game developers on this forum that the bale path problem was to be fixed in one of the first patches to the game, but I'm not aware of this ever happening.


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