Post by seriousmods on Jan 18, 2015 23:48:25 GMT -6
Before I begin this attempt at a tutorial (which will take several days to complete), I want to say that the FS world has gotten a bad name, and rightly so, for its refusal to give credit to people in the trucksim community for their work as well as its sheer lack of skill in many areas.
My goal on this forum and elsewhere is to show that the FS world and the trucksim world can work together, but most of all, that the trucksim world has a lot to teach the FS world about modding. You guys on here are the standard of excellence for truck 3d models, and much of your freely released stuff is far better than similar models available for sale on sites like Turbosquid and elsewhere.
And at the same time, you guys have attention to detail gone extreme that allows you to make models far superior to most things made by any American/Canadian FS modder. There are some legendary modelers in the Western and Eastern European, but in the North American part of the community, skills and attention to detail can be lacking at times.
So my goal with this tutorial is to show you guys how to make a simple in-game of a Haulin/GTS/ETS2/Extreme Trucker mod into FS. It might be a totally different way of looking at things, but you guys know how to mod a bunch of games, so it shouldn't be that hard to learn a new one.
The reason I am focusing on FS 15 is because it is a much improved game over FS 2013, and scripting using default, error free scripts is much easier due to the sheer volume of default vehicles for this game. If you want to script a truck, Giants has provided a truck for us with a script that can work for any truck.
Part 1: The Programs You Need
To mod FS, you need:
- A 3d Modeling Program (Blender, 3DS Max, Maya are the only ones supported by Giants Software for final export
- The Giants Export Tool (Available for Blender, 3DS Max, and Maya from the Giants Developer Network (http://gdn.giants-software.com-->Downloads-->Exporter)
- Giants Editor 6.X.X (Newest Version Released, Also from GDN)
- Notepad++ (Used extensively for scripting, texture adjustments, and the like)
- Farming Simulator 15 (Available from Steam, Amazon, or Giants Software directly at farming-simulator.com
Part 2: How to Get the Model into FS
So you have a truck in Zmod, and you want to convert it to Farming Simulator. What do you do?
Well, as far as the Zmod export thing is concerned, Corby! How did you do your obj export for the MDE double drop?
I don't have Zmod, and I have relied on RBR-DUK to help me convert more models than either of us can count! A big shoutout to him for all of the help!
But if you have Zmod, Corby knows how to export an obj in a format that can be imported straight into Blender, Max, or Maya and exported with full textures.
Basically, once we get that bit of information to add to the post, all you guys will have to do is open your obj with Maya, Max, or Blender, and export with the Giants Export Tool.
The texturing you can do in Zmod!
Now if you guys want me to explain how to retexture a model in Blender like I've done with the stuff given to me by RBR-DUK, let me know, and I can add it in to the tutorial.
Otherwise, I'll continue with that bit of information missing for now, and add it in later.
Part 3: How a Mod Works in FS
So there are two key scripts to making a mod work in FS: The ModDesc (Below)
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<modDesc descVersion="21">
<author>Seriousmods</author>
<version>1.1</version>
<title>
<en>Peterbilt 388</en>
<de>Peterbilt 388</de>
</title>
<description>
<en>A truck for serious farmers</en>
<de>Ein LKW für ernsthafte Landwirte</de>
</description>
<iconFilename>store_Pete388.dds</iconFilename>
<multiplayer supported="true"/>
<storeItems>
<storeItem>
<name>
<de>Peterbilt 388</de>
<en>Peterbilt 388</en>
</name>
<rotation>0</rotation>
<image active="store_Pete388.dds" brand="brand_Peterbilt.dds"/>
<price>75000</price>
<dailyUpkeep>25</dailyUpkeep>
<xmlFilename>Peterbilt_388.xml</xmlFilename>
<brand>Peterbilt</brand>
<category>trucks</category>
<specs>
<power>550</power>
</specs>
</storeItem>
</storeItems>
</modDesc>
And the XML
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="tractor">
<annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>
<name>
<de>Peterbilt 388</de>
<en>Peterbilt 388</en>
</name>
<filename>Peterbilt_388.i3d</filename>
<size width="3.5" length="7"/>
<wheels autoRotateBackSpeed="0.75">
<wheel rotSpeed="1" restLoad="08.8" repr="0>0" forcePointRatio="0.2" driveNode="0>0" radius="0.515" width="0.42" initialCompression="50" suspTravel="0.2" spring="30" damper="20" maxLatStiffness="40" maxLatStiffnessLoad="3" mass="0.4" hasTyreTracks="true" tyreTrackAtlasIndex="4" tireType="street" />
<wheel rotSpeed="1" restLoad="08.8" repr="0>1" forcePointRatio="0.2" driveNode="0>1" radius="0.515" width="0.42" initialCompression="50" suspTravel="0.2" spring="30" damper="20" maxLatStiffness="40" maxLatStiffnessLoad="3" mass="0.4" hasTyreTracks="true" tyreTrackAtlasIndex="4" tireType="street" />
<wheel rotSpeed="0" restLoad="16.0" repr="0>2" forcePointRatio="0.3" radius="0.515" width="0.84" initialCompression="50" suspTravel="0.1" spring="85" damper="65" maxLatStiffness="60" maxLatStiffnessLoad="3" mass="0.8" hasTyreTracks="true" tyreTrackAtlasIndex="4" tireType="street" />
<wheel rotSpeed="0" restLoad="16.0" repr="0>3" forcePointRatio="0.3" radius="0.515" width="0.84" initialCompression="50" suspTravel="0.1" spring="85" damper="65" maxLatStiffness="60" maxLatStiffnessLoad="3" mass="0.8" hasTyreTracks="true" tyreTrackAtlasIndex="4" tireType="street" />
<wheel rotSpeed="0" restLoad="16.0" repr="0>4" forcePointRatio="0.3" radius="0.515" width="0.84" initialCompression="50" suspTravel="0.1" spring="85" damper="65" maxLatStiffness="60" maxLatStiffnessLoad="3" mass="0.8" hasTyreTracks="true" tyreTrackAtlasIndex="4" tireType="street" />
<wheel rotSpeed="0" restLoad="16.0" repr="0>5" forcePointRatio="0.3" radius="0.515" width="0.84" initialCompression="50" suspTravel="0.1" spring="85" damper="65" maxLatStiffness="60" maxLatStiffnessLoad="3" mass="0.8" hasTyreTracks="true" tyreTrackAtlasIndex="4" tireType="street" />
</wheels>
<ackermannSteering rotSpeed="50" rotMax="47" rotCenterWheel1="2" rotCenterWheel2="3" />
<differentials>
<differential torqueRatio="0.5" maxSpeedRatio="1.3" wheelIndex1="0" wheelIndex2="1" /> <!-- front left-right -->
<differential torqueRatio="0.5" maxSpeedRatio="1.4" wheelIndex1="2" wheelIndex2="3" /> <!-- back left-right -->
<differential torqueRatio="0.5" maxSpeedRatio="1.4" wheelIndex1="4" wheelIndex2="5" /> <!-- back left-right -->
<differential torqueRatio="0.5" maxSpeedRatio="1.2" differentialIndex1="0" differentialIndex2="1" /> <!-- front-back -->
<differential torqueRatio="0.5" maxSpeedRatio="1.2" differentialIndex1="2" differentialIndex2="3" /> <!-- front-back -->
</differentials>
<!--motor torqueScale="1.949" minRpm="1000" maxRpm="2200" maxBackwardSpeed="15" brakeForce="10" lowBrakeForceScale="0.22" lowBrakeForceSpeedLimit="1" minForwardGearRatio="13.5" maxForwardGearRatio="130" minBackwardGearRatio="50" maxBackwardGearRatio="130"-->
<motor torqueScale="5.075" minRpm="500" maxRpm="2100" maxBackwardSpeed="15" brakeForce="6" lowBrakeForceScale="0.22" lowBrakeForceSpeedLimit="1" minForwardGearRatio="8" maxForwardGearRatio="130" minBackwardGearRatio="50" maxBackwardGearRatio="130">
<torque normRpm="0.45" torque="0.5"/>
<torque normRpm="0.5" torque="0.6"/>
<torque normRpm="0.59" torque="0.7"/>
<torque normRpm="0.72" torque="1"/>
<torque normRpm="0.86" torque="0.88"/>
<torque normRpm="1" torque="0.7"/>
</motor>
<fuelCapacity>1325</fuelCapacity>
<fuelUsage>242</fuelUsage>
<cameras count="2">
<camera1 index="10|0" rotatable="true" rotateNode="10" limit="true" useWorldXZRotation="true" rotMinX="-1.4" rotMaxX="1" transMin="4.5" transMax="35">
</camera1>
<camera2 index="11" rotatable="true" limit="true" rotMinX="-1.1" rotMaxX="0.4" transMin="0" transMax="0" useMirror="true" isInside="true" />
</cameras>
<lights>
<light realLight="0>15|0|0" decoration="0>15|0|2" lightType="0"/>
<light realLight="0>15|0|1" lightType="0"/>
</lights>
<brakeLights>
<brakeLight index="0>15|1" />
</brakeLights>
<turnSignals>
<turnSignalLeft index="0>15|2|0" />
<turnSignalRight index="0>15|2|1" />
</turnSignals>
<reverseLights>
<reverseLight index="0>15|3" />
</reverseLights>
<indoorHud>
<speed animName="speedDisplay" />
<rpm animName="rpmDisplay" />
<fuel animName="fuelDisplay" />
</indoorHud>
<animations>
<animation name="speedDisplay">
<part node="0>18|1" startTime="0" endTime="1" startRot="0 0 0" endRot="0 0 -107" />
</animation>
<animation name="rpmDisplay">
<part node="0>18|0" startTime="0" endTime="1" startRot="0 0 0" endRot="0 0 -250" />
</animation>
<animation name="fuelDisplay">
<part node="0>18|2" startTime="0" endTime="1" startRot="0 0 0" endRot="0 0 -90" />
</animation>
</animations>
<enterReferenceNode index="0>"/>
<exitPoint index="0>8"/>
<attacherJoints>
<attacherJoint index="0>7" jointType="semitrailer" allowsJointLimitMovement="false" allowsLowering="false" maxRotLimit="12 175 12" enableCollision="true" />
</attacherJoints>
<steering index="0>12|0" indoorRotation="540" outdoorRotation="540" />
<characterNode index="0>13|0" cameraMinDistance="1.5" filename="$dataS2/character/player/player.i3d" characterMesh="1" characterGloves="2" characterSkin="0" spineNode="0|0" leftArmIKChainId="leftArm" spineRotation="180 0 100" >
<ikChains>
<ikChain id="rightFoot" target="0>13|1" targetOffset="0 0.1 0" alignToTarget="true" isDirtyOnLoad="true" >
<node index="0|1" />
<node index="0|1|0" minRx="0" maxRx="0" minRy="-30" maxRy="30" minRz="0" maxRz="90" />
<node index="0|1|0|0" minRx="0" maxRx="0" minRy="0" maxRy="0" minRz="-100" maxRz="-7" />
<node index="0|1|0|0|0" />
</ikChain>
<ikChain id="leftFoot" target="0>13|2" targetOffset="0 0.1 0" alignToTarget="true" isDirtyOnLoad="true">
<node index="0|2" />
<node index="0|2|0" minRx="0" maxRx="0" minRy="-30" maxRy="30" minRz="0" maxRz="90" />
<node index="0|2|0|0" minRx="0" maxRx="0" minRy="0" maxRy="0" minRz="-100" maxRz="-7" />
<node index="0|2|0|0|0" />
</ikChain>
<ikChain id="rightArm" target="0>14" targetOffset="0.025 0.066 0" alignToTarget="true" isDirtyOnLoad="true">
<node index="0|0|0|1" />
<node index="0|0|0|1|0" minRx="-20" maxRx="20" minRy="-20" maxRy="20" minRz="-80" maxRz="80" />
<node index="0|0|0|1|0|0" minRx="-10" maxRx="10" minRy="0" maxRy="0" minRz="7" maxRz="130" />
<node index="0|0|0|1|0|0|0" />
<rotationNode index="0|0|0|1|0|0|0|0" rotation="0 0 -60" />
<rotationNode index="0|0|0|1|0|0|0|0|0" rotation="0 0 -60" />
<rotationNode index="0|0|0|1|0|0|0|1" rotation="-90 20 -40" />
<rotationNode index="0|0|0|1|0|0|0|1|0" rotation="0 0 -40" />
</ikChain>
<ikChain id="leftArm" target="0>12|0|0" targetOffset="-0.025 0.066 0" alignToTarget="true" isDirtyOnLoad="true">
<node index="0|0|0|2" />
<node index="0|0|0|2|0" minRx="-20" maxRx="20" minRy="-20" maxRy="20" minRz="-80" maxRz="80" />
<node index="0|0|0|2|0|0" minRx="-10" maxRx="10" minRy="0" maxRy="0" minRz="7" maxRz="130" />
<node index="0|0|0|2|0|0|0" />
<rotationNode index="0|0|0|2|0|0|0|0" rotation="0 0 -60" />
<rotationNode index="0|0|0|2|0|0|0|0|0" rotation="0 0 -60" />
<rotationNode index="0|0|0|2|0|0|0|1" rotation="-90 20 -40" />
<rotationNode index="0|0|0|2|0|0|0|1|0" rotation="0 0 -40" />
</ikChain>
</ikChains>
</characterNode>
<aiTrafficCollisionTrigger index="0>9" />
<exhaustEffects>
<exhaustEffect index="0>16" filename="$data/vehicles/particleAnimations/shared/exhaust.i3d" minRpmColor="0.9 0.9 0.9 0.05" maxRpmColor="0.9 0.9 0.9 0.2" minRpmScale="0.2" maxRpmScale="0.5" forwardXRotations="-100 0 -50" forwardZRotations="330 0 -50" steerXRotations="0 0 0" steerZRotations="-100 0 200" />
<exhaustEffect index="0>17" filename="$data/vehicles/particleAnimations/shared/exhaust.i3d" minRpmColor="0.9 0.9 0.9 0.05" maxRpmColor="0.9 0.9 0.9 0.2" minRpmScale="0.2" maxRpmScale="0.5" forwardXRotations="-100 0 -50" forwardZRotations="330 0 -50" steerXRotations="0 0 0" steerZRotations="-100 0 200" />
</exhaustEffects>
<motorStartDuration>2500</motorStartDuration>
<attachSound file="$data/vehicles/shared/truck_attach.wav" pitchOffset="1" />
<motorStartSound file="$data/vehicles/steerable/man/man22S_start.wav" pitchOffset="1" volume="1" />
<motorSound file="$data/vehicles/steerable/man/man22S_idle.wav" pitchOffset="1" pitchScale="0.011" pitchMax="1.7" volume="1" radius="50" innerRadius="20" />
<motorSoundRun file="$data/vehicles/steerable/man/man22S_run.wav" pitchOffset="0.75" pitchScale="0.012" pitchMax="1.6" volume="0.85" />
<motorSoundRun2 file="$data/vehicles/shared/transmission22S.wav" pitchOffset="0.7" volume="0.1" pitchMax="1.65" volumeMax="1"/>
<motorStopSound file="$data/vehicles/steerable/man/man22S_stop.wav" pitchOffset="1" volume="1.5" />
<compressedAirSound file="$data/vehicles/shared/brakeBig.wav" pitchOffset="1" volume="1.25"/>
<compressionSound file="$data/vehicles/shared/brakeBig.wav" pitchOffset="1" volume="1.5"/>
<honkSound file="$data/vehicles/shared/hornBig.wav" volume="1" radius="70" innerRadius="10" />
<driveGroundParticleSystems>
<driveGroundParticleSystem node="0>" position="-0.901 0 -2.768" rotation="0 0 0" file="$data/vehicles/particleAnimations/shared/drivingParticleSystem.i3d" wheel="3"/>
<driveGroundParticleSystem node="0>" position="0.901 0 -2.768" rotation="0 0 0" file="$data/vehicles/particleAnimations/shared/drivingParticleSystem.i3d" wheel="4"/>
<driveGroundParticleSystem node="0>" position="-0.901 0 -3.94" rotation="0 0 0" file="$data/vehicles/particleAnimations/shared/drivingParticleSystem.i3d" wheel="5" />
<driveGroundParticleSystem node="0>" position="0.901 0 -3.94" rotation="0 0 0" file="$data/vehicles/particleAnimations/shared/drivingParticleSystem.i3d" wheel="6" />
<driveGroundParticleSystem node="0>" position="-1.057 0 2.815" rotation="0 0 0" file="$data/vehicles/particleAnimations/shared/drivingParticleSystem.i3d" wheel="1" />
<driveGroundParticleSystem node="0>" position="1.057 0 2.815" rotation="0 0 0" file="$data/vehicles/particleAnimations/shared/drivingParticleSystem.i3d" wheel="2" />
</driveGroundParticleSystems>
<components count="1">
<component1 centerOfMass="0 0.65 0" solverIterationCount="10" />
</components>
<schemaOverlay file="$dataS2/menu/schemas/vehicleSchema.png" fileSelected="$dataS2/menu/schemas/vehicleSchemaSelected.png" width="0.5" height="0.5" attacherJointPosition="0.5 0">
<attacherJoint position="1 0" rotation="0" invertX="false" />
</schemaOverlay>
</vehicle>
Now for starters, this probably looks really complicated, but in reality it isn't.
The moddesc has the same base across all FS mods with additional lines added for LUA scripts and whatnot, but for our purposes, what I have here is what you need.
Secondly, the XML file is basically a list of indexes, which are numbers given you in Giants Editor. When you open the i3d file of the Peterbilt 388 for FS 15, when you click on anything, that part has its own index.
The XML simply lays out which indexes do what, and once again, default scripts from your C drive files have everything you need to begin a basic in-game of a mod.
I'm going to stop here, but please post questions you have below, and I will answer them to the best of my knowledge.
I can't teach you guys to be legendary scripters, but you're already legendary modelers, and you'll become great in-gamers once you get this process down.