Fliegl Autoload Logging Trailer.

Your forum for all discussions around Modding.
sebmoc
Posts: 26
Joined: Thu Feb 09, 2017 2:50 pm

Fliegl Autoload Logging Trailer.

Post by sebmoc »

I have a quick question but maybe the answer no so quick. I am looking for some help if possible from an experienced modder, as I am neither.

Fliegl Autoload Log Trailer. Giants editor scenegraph with the root of vehicle, (index path 0>), selected shows an additional collision but throughout the scenegraph there are no indexes for this collision. Could this extra collision be the Autoload Lua script?

Reason for asking is I am trying to increase width of same. Have literally spent a few days, many many hours working on this and widening the bed, dynamicMountTrigger and the collisions accordingly I am knocking out the autoload function. Trying to understand the coding of the lua file to adjust the range of the autoload accordingly of which I have had no luck and constant searches regarding editing the script is totally fruitless. The I noticed this extra collision and curious as to what it is.

I look forward to some much appreciated help with this as although I have loads of patients with trying to get things to work, I do not have the knowhow or expertise as yet. Picking up snippets here and there.

Every Day is a School Day. Even at 60+. :-?
User avatar
Azfoor
Posts: 635
Joined: Mon Jul 31, 2017 1:05 am
Location: Sweden

Re: Fliegl Autoload Logging Trailer.

Post by Azfoor »

When it comes to autoload log trailers I don't think you need to make any changes to the Lua if you are only making the bed wider, because the autoload drops the logs from a height so the logs should fall in to place anyway.
User avatar
fcelsa
Posts: 10
Joined: Tue May 02, 2017 4:52 pm
Location: Italy
Contact:

Re: Fliegl Autoload Logging Trailer.

Post by fcelsa »

I converted script from FS15 to FS17. Don't scale dynamicMountTrigger, or you have problems.

If you want experiment, and you want see how things work, you can enable debug at line 134 of AutoLoadWood.lua (if you work with my version) change false to true, and watch what happens.

here the piece of code involved.

Code: Select all

if false then
		for i = 1, 4 do
			local x,y,z = getWorldTranslation(self.woodTrigger[i])
			local nx, ny, nz = localDirectionToWorld(self.woodTrigger[i], 1, 0, 0)
			local yx, yy, yz = localDirectionToWorld(self.woodTrigger[i], 0, 1, 0)
			local zx, zy, zz = localDirectionToWorld(self.woodTrigger[i], 0, 0, 1)
			drawDebugLine(x,y,z, 1, 0, 0, x + nx, y + ny, z + nz, 1, 0, 0);
			drawDebugLine(x,y,z, 0, 1, 0, x + yx, y + yy, z + yz, 0, 1, 0);
			drawDebugLine(x,y,z, 0, 0, 1, x + zx, y + zy, z + zz, 0, 0, 1);
		end
		
		local x,y,z = getWorldTranslation(self.fillPoseNode)
		local nx, ny, nz = localDirectionToWorld(self.fillPoseNode, 1, 0, 0)
		local yx, yy, yz = localDirectionToWorld(self.fillPoseNode, 0, 1, 0)
		local zx, zy, zz = localDirectionToWorld(self.fillPoseNode, 0, 0, 1)
		drawDebugLine(x,y,z, 1, 0, 0, x + nx, y + ny, z + nz, 1, 0, 0);
		drawDebugLine(x,y,z, 0, 1, 0, x + yx, y + yy, z + yz, 0, 1, 0);
		drawDebugLine(x,y,z, 0, 0, 1, x + zx, y + zy, z + zz, 0, 0, 1);
		
		for i = 1, 2 do
			local x,y,z = getWorldTranslation(self.unloadPoseNode[i])
			local nx, ny, nz = localDirectionToWorld(self.unloadPoseNode[i], 1, 0, 0)
			local yx, yy, yz = localDirectionToWorld(self.unloadPoseNode[i], 0, 1, 0)
			local zx, zy, zz = localDirectionToWorld(self.unloadPoseNode[i], 0, 0, 1)
			drawDebugLine(x,y,z, 1, 0, 0, x + nx, y + ny, z + nz, 1, 0, 0);
			drawDebugLine(x,y,z, 0, 1, 0, x + yx, y + yy, z + yz, 0, 1, 0);
			drawDebugLine(x,y,z, 0, 0, 1, x + zx, y + zy, z + zz, 0, 0, 1);
		end
		
		if self.lastWoodShapes ~= nil and entityExists(self.lastWoodShapes) then
			local x,y,z = getWorldTranslation(self.lastWoodShapes)
			local nx, ny, nz = localDirectionToWorld(self.lastWoodShapes, 10, 0, 0)
			local yx, yy, yz = localDirectionToWorld(self.lastWoodShapes, 0, 10, 0)
			local zx, zy, zz = localDirectionToWorld(self.lastWoodShapes, 0, 0, 10)
			drawDebugLine(x,y,z, 1, 0, 0, x + nx, y + ny, z + nz, 1, 0, 0);
			drawDebugLine(x,y,z, 0, 1, 0, x + yx, y + yy, z + yz, 0, 1, 0);
			drawDebugLine(x,y,z, 0, 0, 1, x + zx, y + zy, z + zz, 0, 0, 1);
		end
	end
end;
fcelsa :: Team FSI Modding :: https://forum.farmingsimulatoritalia.com
sebmoc
Posts: 26
Joined: Thu Feb 09, 2017 2:50 pm

Re: Fliegl Autoload Logging Trailer.

Post by sebmoc »

Thank you very much for your replies. @fcelsa:- I was thinking of trying to contact you as it is your version I am trying to widen but did not wish to pester. Reason being, working with Big Hills Map I find driving along an incline or decline the original trailer (loaded) tends to tip. I have been playing with various ways of widening. Also, whilst here, any thoughts on the 'extra collision' not listed in scenegraph?
User avatar
fcelsa
Posts: 10
Joined: Tue May 02, 2017 4:52 pm
Location: Italy
Contact:

Re: Fliegl Autoload Logging Trailer.

Post by fcelsa »

In this thing dynamicMountTrigger not involved.
The problem with this script it's only one: to find shape (wood logs) on the ground it's created a parallelogram that not "copy" the level of ground, so sometimes it's hard to find all shape around. That it's all... This script he would need some new approach to better find all shape, maybe one of this days I will work on this.
fcelsa :: Team FSI Modding :: https://forum.farmingsimulatoritalia.com
Post Reply