Closed quadural closed 10 years ago
I'm all for it. It looks like a fun little tractor, so why not make it worthwile...
All the other implements / trailer are too heavy or too big for this tractor. And so, by allowing it to tow the starting trailer (or also a bale trailer), we would double its "usefulness" in-game ;)
Uhm, is it possible you forgot to upload the mr_tractor_visualWheels_t
vehicleType?
highly possible ;) fixed
so, do you think this is possible to enhance the "attacherJoint" so that we are able to configure a new "attacherJoint" for a tractor ?
in such case, we have to be able to add the attacherJoint itself (trailer or trailerLow - nothing else) and then, add the missing "schemaOverlay.attacherJoint" value
Edit : don't know if this is worth
Possible: yes. I think I would do it like the addtional wheels. With an additional group
parameter that determines if it goes into the <attacherJoints>
or <trailerAttacherJoints>
section:
<additionalAttacherJoints>
<attacherJoint group="attacherJoints" index="0>3" type="trailerLow" />
</additionalAttacherJoints>
problem = we need to set the maxRotLimit, ptoOutputNode, ptoFilename and then, regarding the "schemaOverlay", the sorting is quite "complex". And so, we have to be able to specify where to insert the new "attacherJoint" line.
The additional parameters shouldn't be a problem. Concerning the sorting / schema overlay:
As far as I know, schemaOverlays are always sorted the same way that attacherJoints are sorted: attacherJoints
first, then trailerAttacherJoints
.
So as an example: we add an additional attacherJoint to the <attacherJoints>
group. If there are already two, then our new one will be the third one. So, in the schemaOverlays section, I move every overlay that's after the second one line down, and then add our attacherJoint.
If it's a trailerAttacherJoint, we just add it to the end. The only additional thing we need to know is if it's in the front or in the rear, so we can set position
and invertX
accordingly.
do you really want to handle everything by script for this "occasionnal" requirement ? it might be useful only for this farmall...
just let us specify the "invertX and position" by ourselves, no need to complexify the script.
Well the invertX / position would be the least complicated part of all that :)
my though : since we only want to be able to add a "trailer attacher joint - low or normal -, please allow us to add a new "trailerAttacherJoint" (after the existing ones), and so, no need to worry about the "overlay" position => last one. It would be very useful to be able to display a list of all the "trailerAttacherJoint" when the debug flag is set to true. (so that we would be able to copy the data from an existing joint)
Alright so here's how it works: I'm not using an <additionalAttacherJoints>
section, but instead you can just add it to the regular <trailerAttacherJoints>
section. I've also added the debug prints you asked for. Commit is https://github.com/JakobTischler/MoreRealisticDLCs/commit/e8fc4fb6cd7a2dccd87a8aa1625c39b9a67a7b3f.
verhicleData xml:
<trailerAttacherJoints>
<trailerAttacherJoint maxRotLimit="60 90 60" />
<trailerAttacherJoint maxRotLimit="60 90 60" index="0>8" low="false" ptoOutputNode="0>13" ptoFilename="$data/vehicles/steerable/powerTakeoff.i3d" schemaOverlayPosition="1 0" schemaOverlayInvertX="false" schemaOverlayIndex="2" />
</trailerAttacherJoints>
The schemaOverlayIndex has to be set!
debug prints:
trailerAttacherJoints: 0
index="0>8", low="true", ptoOutputNode="0>13", ptoFilename="$data/vehicles/steerable/powerTakeoff.i3d"
set parameter "vehicle.trailerAttacherJoints.trailerAttacherJoint(0)#maxRotLimit" (type str) to "60 90 60"
trailerAttacherJoints: 1 (additional)
index="nil", low="nil", ptoOutputNode="nil", ptoFilename="nil"
set parameter "vehicle.trailerAttacherJoints.trailerAttacherJoint(1)#maxRotLimit" (type str) to "60 90 60"
set parameter "vehicle.trailerAttacherJoints.trailerAttacherJoint(1)#index" (type str) to "0>8"
set parameter "vehicle.trailerAttacherJoints.trailerAttacherJoint(1)#low" (type bool) to "false"
set parameter "vehicle.trailerAttacherJoints.trailerAttacherJoint(1)#ptoOutputNode" (type str) to "0>13"
set parameter "vehicle.trailerAttacherJoints.trailerAttacherJoint(1)#ptoFilename" (type str) to "$data/vehicles/steerable/powerTakeoff.i3d"
set parameter "vehicle.schemaOverlay.attacherJoint(2)#position" (type str) to "1 0"
set parameter "vehicle.schemaOverlay.attacherJoint(2)#rotation" (type int) to "0"
set parameter "vehicle.schemaOverlay.attacherJoint(2)#invertX" (type bool) to "false"
need a fix = near line 451 should be invertX = getXMLBool near line 1009 should be if tajData.schemaOverlay.position and tajData.schemaOverlay.invertX~=nil then
then, it works as intended
the farmall H has only got a "low" trailer attacher joint. And so, we can't use it with the small krone emsland trailer. Is this tractor only here to attach the "crappy" D1 seeder ?
It would be better to add a "trailer" attacher joint (same node than the "trailerLow") as I did for the kramer KL200.
And so, there would be a reason to keep it when starting a new game (seeding and moving the trailer from the field to the farm since the first field is really close to the farm yard)