Community Forum

Adding Animated Tracks On Excavator

Forum Overview >> Scripting

CategoryScripting
Created17.09.2015 11:31


Fdr Logging (firstdayreviews) 17.09.2015 11:37
Hey, Im attempting to add Animated tracks from a Terratrac.lua onto my machine.

I have everything on my machine identical to the machine with working tracks but can't get em to spin.

Im thinking the problem is in the specailization section of the mod desc file but im not sure

when i look in the machine im trying to replicate it says the following

<specializations>

<specialization name="TerraTrac" className="TerraTrac" filename="Scripts/TerraTrac.lua"/>

</specializations>

<vehicleTypes>
<type name="machinename" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
<specialization name="workArea" />
<specialization name="motorized" />
<specialization name="animatedVehicle" />
<specialization name="steerable" />
<specialization name="drivable" />
<specialization name="cylindered" />
<specialization name="hirable" />
<specialization name="aiTractor" />
<specialization name="bunkerSiloCompacter" />
<specialization name="honk" />
<specialization name="mountable" />
<specialization name="fillable" />
<specialization name="shovel" />
<specialization name="foldable" />
<specialization name="mouseControlsVehicle" />
</type>

Now on my machine i've tried adding this exact code and changing the "machinename" to my machines name but still no luck.

My current vehicle type in the main XML is "woodHarvester" does this need to match the name on this mod desc vehicle name?


Sorry im so lost ive spent hours and dozens of combinations trying to get it to spin the tracks with no luck, any help would be fantastic.

Cheers



Fdr Logging (firstdayreviews) 17.09.2015 11:42
i'm basically looking for an explanation on how the specialization section relates to the main vehicle XML file in terms of adding outside .lua scripts such as this terratrack.lua for the tracks

Emil Drefers (Unknown) 17.09.2015 16:51
Hi,

if you have a look at the "vhicle.xml" file you will notice the veryf irst entry:
<vehicle type="cultivator">

The string for this attribute defines the vehicle type.
So, if you have defined a custom vehicle type in your "modDesc.xml" you could paste this type in this attribute.

In the end you don't need a custom script TerraTrac.lua to make your tracks move.
We do support that with a default script, the "Crawler" specialization.
But you would have to add this specialization to your custom vehicle type definition if none of the default vehicle types matches your requirements.

Pleas note: the "woodHarvester" vehicle type loads the "crawler" specialization by default!

Cheers,
Emil


Fdr Logging (firstdayreviews) 17.09.2015 20:18
hey! thanks for the fast response, I do currently have crawlers on my machine but they are just the scorpion tracks with the UV scroll, they are sorta out of place on my machine and don't scale correctly.

The terratrac.lua allows for the original animated individual tracks on the machine to rotate physically and thats what im trying to achieve.

Im going to test this suggestion im sure i can get it going, thanks for your help, I'll keep ya updated ;)

Fdr Logging (firstdayreviews) 17.09.2015 20:57
still having the same problem, When i try to add a custom Vehicle Type it tells me its unknown and won't load the machine

I basicly want to keep my machine a woodharvester but add the terratrac.lua as a specialization, do you just need to add the specialiazation section or do you have to define a custom Vehicle type in the Mod Desc in order to add the terratrac?

Fdr Logging (firstdayreviews) 17.09.2015 21:28
Got them turning Finally, Now i have one more problem, It says the Prerequisites for the Woodharvester are not all fullfilled in the log.

where can i find out what all the specialization prereqs are to put in the Mod Desc?

Emil Drefers (Unknown) 18.09.2015 07:57
Hi,

you can find a list of vehicleTypes in the first post if this thread:
http://forum.giants-software.com/viewtopic.php?f=827&t=69284

Cheers,
Emil

Fdr Logging (firstdayreviews) 18.09.2015 09:30
Emil you are my lord and savior haha my machines are all up and running thank you so much for your help :) :)

Fdr Logging (firstdayreviews) 18.09.2015 10:00


Fdr Logging (firstdayreviews) 18.09.2015 12:11



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