Im simply trying to create a snow plow function for the front of the train so it clear the tracks as it goes. When I add specializations to the modesc it fails.
I get errors like this
Error: Not all prerequisites of specialization 'dischargeable' in vehicle type 'FS22_DELTA.locomotive1' are fulfilled
and then the train will not load obviously. It doesn't seem to accept any specialization outside of the parent. Is tis even possible?
Possible to add specializations to Train?
7 posts
Page 1 of 1
Possible to add specializations to Train?
Last edited by dougw133 on Sat Feb 24, 2024 8:24 am, edited 2 times in total.
Re: Possible to add specializations to Train?
I think the specialization "dischargeable" requires "fillVolume" and possibly also "trailer" as a prerequisite. VehileType "trainTrailer" also has these, and "dischargeable" works there.
Re: Possible to add specializations to Train?
I've tried many combinations. Looking at examples it seems most mods or snow plows use leveler as the parent..however, locomotive has to be the parent when loading it in the modesc so I'm not sure if it can be done. If it can, I haven't found the right combination yet. My xml for the locomotive as well as the i3d have all the correct parts, nodes, and mapping with no errors. If I change the parent to leveler it breaks the train but loads the specialization correctly in game.
Re: Possible to add specializations to Train?
I would try it this way
Code: Select all
<vehicleTypes>
<type name="locomotiveLeveler" parent="locomotive" className="RailroadVehicle" filename="dataS/scripts/vehicles/RailroadVehicle.lua">
<specialization name="leveler" />
if required
<specialization name="fillVolume" />
<specialization name="dischargeable" />
<specialization name="trailer" />
</type>
</vehicleTypes>
Re: Possible to add specializations to Train?
Thank you for the help. No luck. Leveler in the specialization always results in the prerequisite error. The common xml code amongst snow removal equipment is like thisHaubi wrote: ↑Fri Feb 23, 2024 10:25 am I would try it this wayCode: Select all
<vehicleTypes> <type name="locomotiveLeveler" parent="locomotive" className="RailroadVehicle" filename="dataS/scripts/vehicles/RailroadVehicle.lua"> <specialization name="leveler" /> if required <specialization name="fillVolume" /> <specialization name="dischargeable" /> <specialization name="trailer" /> </type> </vehicleTypes>
Code: Select all
<leveler fillUnitIndex="1" maxFillLevelPerMS="25" ignoreFarmlandState="true">
<levelerNode node="levelerNode" width="2.8" zOffset="0" minDropWidth="2.5" maxDropWidth="3.2" minDropDirOffset="1" maxDropDirOffset="2" alignToWorldY="false"/>
<force node="jump320_main_component1" maxForce="30" direction="1" />
<pickUpDirection>1</pickUpDirection>
<effects>
<effectNode effectNode="effectMesh" effectClass="ShaderPlaneEffect" materialType="leveler" fadeTime="0.5" speed="10" />
<effectNode effectClass="SnowPlowMotionPathEffect" effectType="SNOW_PIECES" linkNode="snowEffectNode">
<motionPathEffect textureFilename="$data/vehicles/samasz/jump320/snowArray.dds" numRows="13" rowLength="27" minFade="0.15" />
<snowPlowEffect shaderPlane="effectMesh" minScale="1 0.44 0.53" maxScale="1 0.95 0.95" scrollSpeed="-5"/>
</effectNode>
<effectNode effectClass="SnowPlowMotionPathEffect" effectType="SNOW_DUST" linkNode="snowEffectNode">
<motionPathEffect textureFilename="$data/vehicles/samasz/jump320/snowArray.dds" numRows="13" rowLength="27" minFade="0.15" />
</effectNode>
</effects>
</leveler>
Re: Possible to add specializations to Train?
Alright. Getting somewhere finally.
Got it working and functioning. I am left with this error/warning to figure out
I used the selfPropelledLeveler parent and then added the locomotive specializations. This is what I did in the modesc:
Got it working and functioning. I am left with this error/warning to figure out
Code: Select all
Warning ("""locomotive04.xml): I3D file offers '2' objects, but '1' components have been loaded!
Code: Select all
<vehicleTypes>
<type name="locomotive1" parent="selfPropelledLeveler" className="RailroadVehicle" filename="$dataS/scripts/vehicles/RailroadVehicle.lua">
<specialization name="baseMaterial" />
<specialization name="wheels" />
<specialization name="splineVehicle" />
<specialization name="dynamicallyLoadedParts" />
<specialization name="ikChains" />
<specialization name="speedRotatingParts" />
<specialization name="animatedVehicle" />
<specialization name="dashboard" />
<specialization name="enterable" />
<specialization name="fillUnit" />
<specialization name="motorized" />
<specialization name="drivable" />
<specialization name="locomotive" />
<specialization name="lights" />
<specialization name="attacherJoints" />
<specialization name="cylindered" />
<specialization name="connectionHoses" />
<specialization name="honk" />
<specialization name="wipers" />
</type>
</vehicleTypes>
Re: Possible to add specializations to Train? SOLVED
And this error:
Was because I left a third camera in the scenegraph I was using...Duh.
EDIT: Not so fast.....Everything works perfectly in game. It loads up, no errors and functions. However, during testing I realized if i save a game, and then go to load it I get this error
EDIT 2: SOLVED
Alright, way less headache than it should have been and much simpler and sensible solution. It was bunkerSiloInteractor that leveler needed as a prerequisite. Here is the XML code that has me up and running error free.
Code: Select all
Warning ("""locomotive04.xml): I3D file offers '2' objects, but '1' components have been loaded!
EDIT: Not so fast.....Everything works perfectly in game. It loads up, no errors and functions. However, during testing I realized if i save a game, and then go to load it I get this error
and the game freezes on load. So close! I wonder if this will end being possible. Really, I just need to load the leveler specialization to the locomotive but cannot figure out what "Prerequisites" it's missing when it errors in that config.Error: Running LUA method 'loadSharedI3DFileAsyncFinished'.
dataS/scripts/vehicles/specializations/SplineVehicle.lua(242) : attempt to perform arithmetic on field 'splinePositionSpeed' (a nil value)
EDIT 2: SOLVED
Alright, way less headache than it should have been and much simpler and sensible solution. It was bunkerSiloInteractor that leveler needed as a prerequisite. Here is the XML code that has me up and running error free.
Code: Select all
<vehicleTypes>
<type name="locomotive1" parent="locomotive" className="RailroadVehicle" filename="$dataS/scripts/vehicles/RailroadVehicle.lua">
<specialization name="bunkerSiloInteractor" />
<specialization name="leveler" />
</type>
</vehicleTypes>
7 posts
Page 1 of 1