· 9 years ago · Nov 02, 2016, 03:46 PM
1<Config DebugMode="false" WireframeMode="false">
2 <BugFixes
3 DPIIndependentCursorSize="-1"
4 FixSunkenMud="true"
5 >
6 <WheelmassBug
7 SuspensionFix="true"
8 TireDeformationFix="true"
9 MudSinkingFix="true"
10 MaxDeformationPressure="25e6"
11 />
12 </BugFixes>
13 <Camera
14 CabinCameraMaxAngle="-1"
15 DetachCameraFromSteering="true"
16 NoCabinCameraReset="true"
17 NoAutoZoom="true"
18 NoAdvancedAutoZoom="true"
19 NoAutoZoomOnStations="true"
20 RightSideCameraKey="160"
21 UncapZoom="true"
22 UncapX360Zoom="false"
23 />
24 <ExternalMinimap
25 EnableMinimap="false"
26 MinimapPositionX="-1280"
27 MinimapPositionY="0"
28 MinimapWidth="1280"
29 MinimapHeight="1024"
30 MinimapMarkerSize="16"
31 MinimapAdapter="1"
32 />
33 <Gameplay
34 AlternateDifflockDamage="false"
35 AlwaysShowDevMenu="false"
36 AlwaysAllowSpawnLocators="false"
37 HardcoreAutoLogs="false"
38 LegacyCloaks="false"
39 LoadPointsPerObjective="-1"
40 NoDamage="false"
41 UnlimitedFuel="false"
42 />
43 <Graphics
44 DisableDOF="true"
45 IncreaseTerrainLOD="false"
46 NoVisualDamage="true"
47 RenderDistanceIncrease="128"
48
49 AspectRatio="-1"
50 FOV="-1"
51 />
52 <HUD
53 HideHUD_SteamInfo="false"
54 HideHUD_3dUI="false"
55 />
56 <Misc
57 AllowCustomObjectsInMP="false"
58 DisableSuspensionDamage="false"
59 HavokBufferSize="5000000"
60 ShifterReleaseFix="false"
61 TrailerLoadFix="false"
62 />
63 <Modding
64 ExtraAddonProperties="true"
65 MapsCanOverrideCloakMesh="true"
66 OrientableShafts="true"
67 SupportCustomShafts="true"
68 SupportSkidSteering="true"
69 SupportAdditionalConstraints="true"
70 SupportSilentLinkedSteering="true"
71 SuspensionTunableInWheelsSets="true"
72 UnclampedXML="true"
73 UnclampedManualLoads="true"
74 UnpresetWheels="true"
75 WheelsetsCanRequireAddons="true"
76 />
77 <NewGameOptions
78 DisableCloaks="false"
79 ScrollableMapMenu="false"
80 SelectStartupAddons="false"
81 ShowLockedTrucksAtSelectionScreen="false"
82 />
83 <TimeCycle
84 FreezeTimeOfDayAt="-1"
85 GameDayDurationInRealSeconds="-1"
86 />
87 <Winch
88 BatteryPoweredWinch="true"
89 ReleaseWinchKey="88"
90 WinchRange="40"
91 />
92 <OtherDlls
93 LoadDll="SpintiresPlusPlugin.dll"
94 LoadDll="Plugin2.dll"
95 d3d9DllOverride=""
96 />
97</Config>
98
99<!--
100DebugMode: creates an additional window and displays some mod-related information including per-tire ground pressure.
101 It is recommended to play the game in windowed mode when using this option.
102 TWoW means Total Weight on Wheel, it doe not include the wheel's own weight.
103
104WireframeMode: displays 3d objects in wireframe mode. Objects with less than 3 polygons are still displayed in textured mode
105 or you wouldn't see anything (the game you see is a texture drawn on 2 triangles in front of your screen).
106 When this is enabled use F3 to switch to wireframe mode, and F2 to switch back to normal view.
107
108///////////////////////////////////////////////////////
109//////////////////// BUGFIXES SECTION////////////////////
110///////////////////////////////////////////////////////
111DPIIndependentCursorSize: prevents mouse cursor from disappearing when setting windows DPI to more than 100%.
112 You MUST set DPIIndependentCursorSize to a power of 2 ( 8, 16, 32, 64, 128, or 256... pixels).
113 At 100% DPI the game uses a 32 x 32 pixel cursor.
114 0 or negative values disable the feature.
115 Other values will make the cursor invisible.
116
117FixSunkenMud: fixes a bug where the mud randomly becomes invisible and your vehicle appear to float over the ground. If your enable
118 wireframe mode you'll notice that the visual representation the mud is below the ground.
119 WARNING: if you have saved your game while the mud was below ground the bugfix cannot restore it.
120
121///////////////////////////////////////////////////////
122////////////// WHEELMASS BUG SECTION //////////////////
123///////////////////////////////////////////////////////
124
125SuspensionFix: supports 2 new truck xml tokens: SuspensionStrength_Normalized and SuspensionDamping_Normalized.
126 If present they override SuspensionStrength and SuspensionDamping in a manner that makes suspension behavior
127 independent from wheel mass.
128 Typical order of magnitude: 5.0 for strength, 50 for damping.
129 To port an existing suspension use the formula: Normalized value=old value/(1/wheelmass + 1/parent frame mass)
130 If SuspensionFix is enabled but the truck does not have the *_Normalized tokens then your suspension still varies with wheelmass.
131 First component of the wheelmass bug fix.
132
133TireDeformationFix: make tire softness independent from wheel mass. Can also prevent light soft wheels under heavy load from
134 clipping through the ground.
135 Second component of the wheelmass bug fix.
136
137MudSinkingFix: completely changes the condition that determines whether you sink into the mud or not.
138 The old one made light wheels sink more than heavy ones, the new one is ground pressure based.
139 This affects how you sink under your own weight, not how fast your tires dig the ground when spinning/slipping.
140 Third component of the wheelmass bug fix.
141
142MaxDeformationPressure: defines what ground pressure would give the (presumed) highest possible mud deformation when using
143 the MudSinkingFix feature. Surface is not deformed if you apply less than MaxDeformationPressure/255 so you could also
144 see this as a difficulty setting.
145 Has no effect if MudSinkingFix is turned off.
146 Defaults to 25MPa (25e6)
147
148///////////////////////////////////////////////////////
149//////////////////// CAMERA SECTION////////////////////
150///////////////////////////////////////////////////////
151
152CabinCameraMaxAngle: how far you can turn the cabin camera left and right, by default the game allows for +/- 90 deg
153 Only applies to cabin camera for which IsHood="true" (if it's false you already have +/-180 angle)
154 Negative values disable the feature.
155
156DetachCameraFromSteering: prevents the camera from turning to point where your wheels are steering.
157
158NoCabinCameraReset: prevents cabin camera from automatically resetting forward when the truck is moving.
159
160NoAutoZoom: prevents automatic zoom reset after 64s.
161
162NoAdvancedAutoZoom: prevents autozooming when entering/leaving advanced mode
163
164NoAutoZoomOnStations: prevents automatic camera adjustments when stopping at a gas station, lumber yard, garage or objective.
165
166RightSideCameraKey: hold this key while pressing the 1 or 2 keys to see your truck from
167 the right side instead of the left.
168 You must enter the "decimal virtual key code" of the desired key.
169 Google "decimal virtual key code" if you don't know what it is. When you find a table where 88 corresponds to X and 160 to left shift you're at the right place.
170 Negative values disable the feature.
171
172UncapZoom: allows unlimited zooming/unzooming.
173 WARNING: zooming too much will make the camera flip and move away.
174
175UncapX360Zoom: identical to UncapZoom, but for $#!%@ X360 controller users.
176
177///////////////////////////////////////////////////////
178/////////////// EXTERNAL MINIMAP SECTION///////////////
179///////////////////////////////////////////////////////
180
181EnableMinimap: Enables a separate window that display a simple map of the current level along with nearby trucks.
182 This feature REQUIRES to have more monitors that what the game uses in fullscreen mode.
183
184MinimapPositionX, MinimapPositionY: coordinates of the minimap window on your desktop.
185 negative X are to the left of your main monitor.
186 Y=0 corresponds tot he top of your main monitor.
187
188MinimapWidth,MinimapHeight: size in pixels of the minimap window
189
190MinimapMarkerSize: size of the markers on the minimap.
191
192MinimapAdapter: which adapter you want to use to display the minimap if you have several GPU or monitors. One GPU plugged to 2 monitors
193 provides 2 adapaters. 2 GPUs plugged to one screen each also provide 2 adapters in total.
194 0 means default (and first) adapter. You must set this to a number different from %appdata%/spintires/config.xml/Config/System/Adapter
195 or the minimap will not work in fullscreen mode.
196 Since spintires uses adapter 0 by default, MinimapAdapter=0 will not work in fullscreen mode by default.
197 MinimapAdapter=1 uses your second adapter.
198
199///////////////////////////////////////////////////////
200///////////////// GAMEPLAY SECTION ////////////////////
201///////////////////////////////////////////////////////
202
203AlternateDifflockDamage: use an alternate method to calculate difflock stress.
204 Slightly more realistic that the default one since it's based on the difference of angular speed of your wheels, and a lot less forgiving.
205
206AlwaysShowDevMenu: shows the developer's menu (with options to spawn, reload, refill, vehicles) in all game modes.
207
208AlwaysAllowSpawnLocators: allows using spawn locators outside the proving grounds
209
210LegacyCloaks: changes what parts of the F1 minimap are revealed what several cloaks overlap.
211 With default cloaks everything around a cloak is revealed when you remove it, even it part are within the radius of action
212 of another cloak.
213 With legacy cloaks you have to remove ALL cloaks covering a spot to see it on the minimap.
214
215HardcoreAutoLogs: allow automatically loading logs at lumber yards in hardcore mode.
216
217LoadPointsPerObjective: the number of loadpoints needed to complete an objective.
218 Valid range: 0-127. Values 128 to 255 should also be possible but will cause glitches in the map.
219 Values past 255 are not supported.
220 -1 disables the feature
221
222NoDamage: self explanatory.
223
224UnlimitedFuel: self explanatory.
225
226///////////////////////////////////////////////////////
227////////////////// GRAPHICS SECTION ///////////////////
228///////////////////////////////////////////////////////
229
230DisableDOF: disables the depth of field feature (DoF blurs what is very close and very far from the camera).
231
232IncreaseTerrainLOD: slightly increase terrain LOD, particularly visible inside rivers.
233 But uses a lot of CPU power.
234
235NoVisualDamage: prevents visual representation of damage such as bumps and cracks on the chassis of the truck.
236 Your damage bar will still fill up and effects such as sparks, oil leak, smoke still trigger when your truck is damaged enough.
237
238RenderDistanceIncrease: increase mud rendering distance by this amount, also affect some other objects, causes severe LOD popping.
239 Default value: 0, Max 255, 0 disables the feature, values past 18 are pretty much meaningless due to an additional engine limitation.
240 FYI the default rendering distance is 6 units, it becomes 6+RenderDistanceIncrease.
241
242Aspect ratio: the ratio of your screen's width divided by its height. You've got to enter values like 1.33333 or 1.25, not 4:3 or 5:4.
243 default value: -1. Negative values disable the feature.
244
245FOV: the width in degrees of the field of view of the camera.
246 Valid range 1-359, default value: -1. Negative values disable the feature
247
248///////////////////////////////////////////////////////
249//////////////////// HUD SECTION //////////////////////
250///////////////////////////////////////////////////////
251
252HideHUD_SteamInfo: removes your steam account and avatar from the HUD.
253 WARNING: it also hides speed and AngVel from the Dev tools.
254
255HideHUD_3dUI: removes compass, shifter, and truckdata from the HUD.
256
257///////////////////////////////////////////////////////
258//////////////////// MISC SECTION /////////////////////
259///////////////////////////////////////////////////////
260
261AllowCustomObjectsInMP: prevents the "Game files differ from original package..." error when playing MP maps witch custom objects.
262
263DisableSuspensionDamage: disables damage received when driving at medium speed over rough terrain
264 and disables speed damage (damage received when driving very fast over any terrain, even perfectly flat).
265
266HavokBufferSize: The size in bytes of the buffer havok uses to store temporary data (such as collisions). Try increasing this if the game crashes
267 when spawning too many objects or when 2 vehicles approaches each other.
268 By default the game uses 500000.
269 0 disables the feature.
270
271ShifterReleaseFix: prevent the game from turning off cruise controls when you engage the auto gearbox.
272
273TrailerLoadFix: allows forcefully loading logs onto a trailer even if your truck is "incorrectly positioned".
274 The further you are from the correct position, the more likely you are to trigger an Havok explosion.
275
276///////////////////////////////////////////////////////
277////////////////// MODDING SECTION// //////////////////
278///////////////////////////////////////////////////////
279tldr: additional features that mods using SpintiresPlus may need/use.
280
281ExtraAddonProperties: Allows addons to modify more properties of your turck:
282 Damage sensation (snorkels):
283 Damage sensation defined in addons overwrites the one defined in the truck, coordinates are relative to the truck's frame (not the addon's).
284 WARNING for modders: only one snorkel can be active per truck at a given time. If you mount 2 snorkel addons on a truck, only the damage sensation
285 from the first one is taken in account. Please make your snorkels mutually exclusive.
286
287 Engine torque (turbocharger, secondary engines...):
288 Torque modifiers are expressed as a multiplier to engine torque. You can have several addons that modify torque, they are
289 multiplicatively combined.
290 Since any_value/0.0 = infinity, multiplying your engine torque by 0 cannot be undone when removing the addon.
291 An example is available in the example section.
292
293 Gearbox (gearbox addons):
294 Gearbox addons work like snorkels, with the same restriction of being unable to have 2 gearbox addons installed at
295 the same time.
296
297MapsCanOverrideCloakMesh: map makers can now include an additional xml file with their maps to change how cloaks will look like
298 on their maps
299 An example is available in the example section.
300
301OrientableShafts: Allows forcing the endpoints of shafts (BoneStart and BoneEnd) to be along a specific axis relative to the truck
302 rathen than being along truck X.
303 In the base game, shaft endpoints are automatically rotated so that they face each other. This is disabled for shafts that use
304 a custom orientation.
305 An example is available in the example section.
306
307SupportCustomShafts: Allows specifying custom models fro driveshafts in the <Shaft> nodes.
308 An example is available in the example section.
309
310SupportSkidSteering: supports the SkidSteeringMode XML token in Truck/Wheels/Wheel, which allows for tank-like steering.
311 SkidSteeringMode has 2 possible values:
312 -ForwardReverse, which makes wheels/tracks on one side go forward, and those on the other side go backward when you steer.
313 -ForwardBrake is like ForwardReverse but wheels/tracks are braked instead of going backward.
314 Both modes only differ when steering in 1st gear or reverse. At higher gears, brakes are used to steer anyway.
315
316 Information for DRIVERS:
317 -ForwardReverse only engages reverse mode in 1st and reverse gears, when you are steering as sharp as possible. In all other cases (small
318 deviations at any speed, sharp turns at high speed...) only the brakes are used for steering.
319 -All wheels of a side are "locked" at the same speed, always. This will not cause difflock damage. Admittedly, my locking system still has room for improvement...
320 -Difflocking obviously disables steering.
321 -AWD mode has no effect.
322 -Skid steering vehicles can stall an any gear if they don't have enough power to pull your stuff.
323
324 Information for MODDERS:
325 -All wheels using SkidSteeringMode are powered.
326 -Skid steering wheels are put in 2 groups: left-side group or right-side goup depending on if they have RightSide="true".
327 -If a vehicle has at least one wheel using SkidSteeringMode, then wheels not using skid steering are NOT powered.
328 -All wheels on a side are locked at the same PERIPHERAL speed, meaning that wheels of different sizes rolling on the same track are supported.
329 -Your vehicle will not work if all skid steering wheels are on the same side.
330 -Skid steering requires using a gearbox in STP format, which basically means that:
331 -you supply maximum ENGINE torque instead of wheel torque in the <Motor> section
332 -you supply total transmission ratio for each gear in the <Gear> section. Give a positive ratio for reverse gear.
333 -obviously this is not compatible with the base game's gearbox, so all non-skid steering wheels are not powered.
334 -STP uses the an engine map inspired by a Caterpillar C15, that means:
335 50% to full torque from 0 to 1000 RPM
336 full torque from 1000 to 1500RPM
337 full to 0 torque from 1500 to 3500RPM.
338 -MaxDeltaAngVel is repurposed as a fuel consumption multiplier.
339 -it is strongly recommended to set SteeringAngle to 0 on all wheels using SkidSteeringMode, or your wheels will use both steering modes at once.
340 Tip : keep in mind that skid steering requires a lot of torque! If you run into cases where your vehicle refuses to steer at high gears even on flat hard ground, add torque.
341 An example is available in the example section.
342
343SuspensionTunableInWheelsSets: supports tuning suspension and hardpoint offsets from inside the WheelsSets section
344 Consult the Example section for a list of available tokens.
345
346SupportAdditionalConstraints: supports 2 new constraints between physical bodies: PointToPlane, PointToPath.
347 PointToPlane:
348 Point to plane allows all rotations and blocks one translation.
349 Picture yourself a ball on a table: it can roll in any direction, you can push it parallely to the table but you
350 cannot ram it through the table (and in this case, you cannot lift it either).
351 You define a PointToPlane constraint by giving a vector perpendicular to the table (AxisLocal) and one point that belongs to the table (PivotOffset)
352 PointToPlane does NOT support motors, but should be breakable or malleable (not tested).
353 PointToPlane will trigger the error "Unsupported constraint type '14'". Ignore it.
354
355 PointToPath:
356 Locks the position of the child object on a path and allows all rotations. Typically used to keep track segments on a path looping
357 around the wheels.
358 PointToPath does NOT support motors, but should be breakable or malleable (not tested).
359 PointToPath will trigger the error "Unsupported constraint type '3'". Ignore it.
360 PointToPath has 3 modes:
361 -PositionOnly where the child body's origin is locked onto the path
362 -AlignXToPath where additionally the child object's X vector is forced to be along the path
363 -FullyConstrained to path, like X aligned but the child's Z vector also points in a direction of your choosing.
364 Upon creation, ST+ will display the coordinates of the child body relative to its parent in the debug console. You can use that
365 to build up your path.
366
367 Chain:
368 Allows all rotations and blocks all translations between a long chain of bodies (20+). While you could achieve a similar result by putting ragdoll
369 constraints between each element of the chain, the point of the Chain constaint is increased stability (ie: less Havokslposions and twitching).
370 For technical reasons (ex: the chain requires many bodies, but typical constrains only have 2) the Chain is build as a parasite inside
371 the PointToPlane and PointToPath constraints. Chain-specific attributes all start with "Chain_" .
372 Basically you create your PointTo*** constraint as usual, then add Chain_Mode="StartChain" to make its (child) body the first of the chain.
373 Same thing for the next body, but you add Chain_Mode="ContinueChain" inside the constraint.
374 For the last body, add Chain_Mode="EndChain", but there is a catch: when ending a chain, the chain constraint get created instead of
375 the PointTo*** one, so you have the create the last PointTo*** constraint again (but without Chain_Mode this time).
376 You cannot add bodies to 2 chains at the same time, you must start one chain, fill it up, end it, and THEN you can start another.
377 One body cannot be put twice in chain (ie: no looping chains).
378 Chains do not support BreakOffThreshold and MalleableStrength (use Chain_Stiffness instead).
379
380 Tip 1: if you're making tracks, don't forget that you need to constraint at least every other (1 out of 2) track element if you
381 use point to plane, or likely all elements if you use point to path.
382 Tip 2: if you're making tracks, the use of _templates is HIGHLY recommended.
383 Examples are available in the example section.
384
385 Additionally each STP constraint allows to override the "quality" of its bodies. Quality reflects the amount of CPU time havok will spend
386 in trying to prevent those objects from clipping through others.
387 You override quality by defining SetChildQuality or SetParentQuality in a constraint. Use those if you can't prevent clipping by increasing
388 the size of your cdt mesh.
389 Valid values are 0 to 8, where 8 is the most CPU expensive. Telekinesys's recommendations are:
390 0: for fixed bodies.
391 1: for moving objects with infinite mass
392 2: for debris objects
393 3: for debris objects with simplified collisions with fixed/landscape objects. Spintires uses this by default.
394 4: for moving bodies, which should not leave the world, but you rather prefer those objects to tunnel through the world than dropping frames because the engine.
395 5: for objects which you cannot afford to tunnel through the world at all.
396 6: for very fast objects (bullets).
397 7: custom, don't use.
398 8: for rigid body character controllers.
399
400SupportSilentLinkedSteering: allows using IsLinkedSteering=true without revving up the engine when steering.
401 An example is available in the example section.
402
403UnclampedXML: prevents the "Clamping node XXX value YYY (min/max is ZZZ)" error and allows any value for those settings.
404
405UnclampedManualLoads: prevents the "Clamping node XXX value YYY (min/max is ZZZ)" error on the ManualLoads paremeter.
406 Seperated from UnclampedXML because UnclampedManualLoads does NOT work on the editor, but UnclampedXML does.
407
408UnpresetWheels: supports 5 new wheel xml tokens:
409 - Mass_Numeric is the wheel's mass in kg
410 - Friction_Numeric is its friction coefficient, typically in the 0.0 to 2.0 range.
411 - SubstanceFriction_Numeric same as Friction_Numeric, but used when in the mud. Chained wheels have it at 1.8.
412 - Softness_Numeric ranges from 0.0 to 1.0, where 1 means hard tires.
413 - Havok_AllowedPenetrationDepth determines how deep a wheel can clip through other objects for the sake of resolving "impossible" constraints.
414 It has nothing to do with mud/water.
415 This setting should only be used by people familiar with Havok's inner workings. The game defaults this to radius/2, Havok recommends 5-20%
416 of the smallest length of the object.
417 If present the _Numeric tokens override the mass/softness/friction presets.
418 Keep in mind that the softness preset also sets RadiusDelta (difference between wheel radius and collision cylinder radius)
419 which is not overwritten by this mod.
420 An example is available in the example section.
421
422WheelsetsCanRequireAddons: Hides some wheelsets in the garage menu if you don't have the addons they require.
423 Removing an addon that is required for your current wheelset changes your wheels to default wheelset.
424 You cannot put RequiredAddons for the default wheelset.
425 WARNING: when exporting your mode to the workshop, RequiredAddons are NOT automatically converted to modstring codes. You'll
426 have to do the replacement manually.
427 An example is available in the example section.
428
429///////////////////////////////////////////////////////
430///////////////// NEW GAME SECTION ////////////////////
431///////////////////////////////////////////////////////
432
433DisableCloaks: self explanatory. Takes effect when starting a new map.
434
435ScrollableMapMenu: The map selection menu can now be scrolled with the mouse wheel
436 or the page up/down keys. There is no scrollbar but the menu properly reacts.
437
438SelectStartupAddons: Gives the ability to select what addons are mounted on your truck when you start a new game.
439 This takes the form of a new menu that appears at the loading screen.
440 Tip: you can type * in the search bars to see what addons are currently checked.
441 Addons of locked trucks can also be configured regardless of ShowLockedTrucksAtSelectionScreen's state.
442
443ShowLockedTrucksAtSelectionScreen: Locked trucks also appear in the startup truck selection list and can be customized.
444 Warning: there is no way to tell if a truck is locked or not at this screen.
445
446///////////////////////////////////////////////////////
447///////////////// TIME CYCLE SECTION //////////////////
448///////////////////////////////////////////////////////
449
450FreezeTimeOfDayAt: locks time of day at a specific hour.
451 Valid range: 0-24. For example 14.5 would lock time at 2h30 PM.
452 Negative values disable the feature.
453
454GameDayDurationInRealSeconds: the duration of a game day in real life seconds. This does NOT affect fuel consumption even
455 if it is expressed in liters per real life minute.
456 The original game uses 1 day = 2700s.
457 Negative values or 0 disable the feature.
458
459///////////////////////////////////////////////////////
460///////////////// WINCH SECTION ////////////////////
461///////////////////////////////////////////////////////
462BatteryPoweredWinch: replaces Power Take Off winches with battery powered winches.
463 It allows winching when the engine is not running (even if your car went belly up).
464
465ReleaseWinchKey: press this key to release the winch if one is currently attached.
466 You must enter the decimal virtual key code of the desired key.
467 Google "decimal virtual key code" if you don't know what it is. When you find a table where 88 corresponds to X and 160 to left shift you're at the right place.
468 Negative values disable the feature.
469
470WinchRange: the length in meters of your winch cable. Due to engine limitations you cannot go past 40m.
471 Default value is 14m.
472 Any negative value disables the feature.
473
474///////////////////////////////////////////////////////
475////////////// 3RD PARTY DLL SECTION //////////////////
476///////////////////////////////////////////////////////
477LoadDll: allows loading other 3rd party dlls/plugins at startup
478 Those dll's DllMain() will be executed before the game's code executes (at this stage it is still encrypted by steam)
479 They may additionally export an __stdcall void OnD3DCreate9(void) function that will be called before the game creates its
480 direct3d context (hint: it's a good time to patch the game's code).
481
482d3d9DllOverride: full path to a dll to load instead of windows\system32\d3d9.dll .
483 Try it if you are using an overlay/graphic enhancer/other hacks that do not work as a plugin.
484
485//////////////////////////////////////////////////////////////////////////
486////////////// XML Examples (this section is for modders) ////////////////
487//////////////////////////////////////////////////////////////////////////
488
489All new XML tokens are mentioned in at least one example.
490They are marked with a "//". Same goes for repurposed tokens.
491If it's not in the examples, it does not exist.
492All new tokens can be used in _templates and are compatible with inheritance (_parent files).
493
494----
495SuspensionFix:
496 example in classes/truck/kraz255.xml
497 section _templates/Wheel/RearWheel
498 <RearWheel
499 ConnectedToHandbrake="true"
500 DefaultWheelType="kraz_rear"
501 HardpointOffsetY="-0.244"
502 SuspensionMin="-0.4"
503 SuspensionStrength="0.02"
504 SuspensionStrength_Normalized="5" //Wheelmass independent suspension stiffness
505 SuspensionDamping_Normalized="50" //Wheelmass independent suspension damping
506 Torque="default"
507 />
508
509 Those tokens can also be added directly in Truck/Wheels/Wheel that way:
510 <Wheel _template="FrontWheel" HardpointX="3.8"
511 SuspensionStrength_Normalized="5" //Wheelmass independent suspension stiffness
512 SuspensionDamping_Normalized="50" //Wheelmass independent suspension damping
513 />
514----
515ExtraAddonProperties:
516 example in classes/trucks/kraz_protector.xml
517 <TruckAddon>
518 <TruckData>
519 ------------- damage sensation -----------
520 <Damage //New section, added for the sole purpose of containing sensation data.
521
522 //Those 2 will replace what is defined
523 SensationMin="(1.77; 3.00; -0.77)" //in truck.xml/Truck/TruckData/Damage/SensationMin or SensationMax
524 SensationMax="(2.72; 3.00; 0.77)" //You specify the absolute coordinates in the truck's referential
525 //of the water-damage sensing box.
526 />
527 --------------- Torque part --------------
528 <TruckMotorOverrides TorqueFactor="1.05" > //this addon will add 5% engine torque.
529
530 --------------- Gearbox part -------------
531 <ReverseGear
532 AngVel="0.2" //This addon will REPLACE the truck's gearbox
533 GearRatio="0.001" //Please provide both AngVel and GearRatio for compatibility with normal and
534 //skid steering vehicles.
535 //(if you don't, a default conversion factor of 157 will be used)
536 />
537 <HighGear AngVel="6.0" GearRatio="0.04" />
538 <Gear_1 AngVel="0.2" GearRatio="0.001" />
539 <Gear_2 AngVel="1" GearRatio="0.006"/>
540 <Gear_3 AngVel="2" GearRatio="0.013"/>
541
542 <Gear_5 AngVel="3" GearRatio="0.02"/> //Note that Gear_5 here will have NO EFFECT because Gear_4 is missing.
543 //Even if the base truck has a 5th gear.
544 </TruckMotorOverrides>
545 </TruckData>
546 ...
547 </TruckAddon>
548----
549OrientableShafts
550 example in classes/trucks/kraz_255.xml
551 section Truck/TruckData/
552
553 <Shafts>
554 ...
555 <Shaft
556 SocketPointA="Shaft4a"
557 SocketPointB="Shaft4b"
558 SocketAOrientation="(0;0;1)" //the shaft's endpoint on SocketPointA will point toward truck Z
559 SocketBOrientation="(0;1;0)" //the shaft's endpoint on SocketPointB will point toward truck Y
560 />
561 </Shafts>
562----
563SupportCustomShafts:
564 example in classes/trucks/kraz_255.xml
565 section Truck/TruckData/
566 <Shafts>
567 <Shaft SocketPointA="Shaft1a" SocketPointB="Shaft1b"
568 Mesh="env/My_shaft1" //custom shaft mesh
569 />
570 <Shaft SocketPointA="Shaft2a" SocketPointB="Shaft2b"
571 Mesh="env/My_shaft2" //another custom shaft mesh
572 />
573 <Shaft SocketPointA="Shaft3a" SocketPointB="Shaft3b"
574 Mesh="env/Invalid_mesh_*##%" //will use default shaft and log an error
575 />
576 <Shaft SocketPointA="Shaft4a" SocketPointB="Shaft4b" /> <-will use default shaft, no error displayed
577 </Shafts>
578----
579SuspensionTunableInWheelsSets:
580 example in classes/truck/kraz255.xml
581 section Truck/TruckData/WheelsSets
582 <WheelsSets>
583 <WheelsSet Title="TunedWheelSet">
584 <WheelType
585 Type="kraz_front_highway"
586 Wheels="0,1"
587
588 SuspensionStrength_Normalized="5.0" //Overwrites suspension stiffness and damping when
589 SuspensionDamping_Normalized="50.0" //using TunedWheelSet.
590 //This modification only applies to wheels 0 and 1 as defined in the Wheels token.
591
592 SuspensionMin_Offset="-.5" //This is ADDED to the default wheels' SuspensionMin
593
594 HardpointOffsetX="0" //X/Y/Z offsets are ADDED to offsets defined for the default
595 HardpointOffsetY="-.5" //wheels in Truck/Wheels/Wheel.
596 HardpointOffsetZ="-.5" //Z offset is also additively combined with Z offset from the wheel.xml.
597 />
598 <WheelType
599 Type="kraz_double_highway"
600 Wheels="2,3"
601
602 SuspensionStrength_Normalized=".05" //Same idea as above, but for wheels 2 and 3 this time...
603 SuspensionDamping_Normalized=".005" //
604 SuspensionMin_Offset="0" //
605 HardpointOffsetX="1.5" //
606 HardpointOffsetY="1" //
607 HardpointOffsetZ="0" //
608 />
609
610 Etc...
611
612 </WheelsSet>
613 </WheelsSets>
614----
615UnpresetWheels:
616 example in classes/wheels/kraz_front.xml
617 <TruckWheel
618 Friction="Offroad"
619 Friction_Numeric="2.0" //Gives excellent traction on road (ie: highway wheels)
620 SubstanceFriction_Numeric="0.1" //Gives very poor traction in the mud.
621 //Those 2 overwrite what Friction="Offroad" defined
622
623 Mass="Heavy"
624 Mass_Numeric="75.5" //Overwrites what Mass="Heavy" defined
625
626 Softness="Average"
627 Softness_Numeric="1.0" //Stiffest possible tire
628
629 Mesh="wheels/kraz_front"
630 Radius="0.6"
631 Tracks="offroad"
632 Width="0.52"
633
634 Havok_AllowedPenetrationDepth="0.06" //allow up to 6cm of clipping.
635 />
636----
637WheelsetsCanRequireAddons:
638 example in classes/truck/kraz255.xml
639 section Truck/TruckData/WheelsSets
640 <WheelsSets>
641 <WheelsSet
642 Title="highway_wheels"
643 RequiredAddons="kraz_protector,kraz_carriage" //The highway_wheels set will only appear in the garage menu if
644 //you have mounted kraz_protector and kraz_carriage on your truck.
645 //Note:" MyAddon" is a valid addon name that is different from "MyAddon"
646 >
647 <WheelType Type="kraz_front_highway" Wheels="0,1" />
648 <WheelType Type="kraz_double_highway" Wheels="2,3,4,5" />
649 </WheelsSet>
650 </WheelsSets>
651----
652SupportAdditionalConstraints
653 example in any classes/trucks/whatever.xml
654 section Truck/PhysicsModel (or actually any PhysicsModel section)
655
656 *** PointToPlane
657
658 <Constraint
659 ModelFrameParent="Chassis_cdt"
660 ModelFrameChild="TrackSegment_cdt"
661
662 Type="PointToPlane" //we want a PointToPlane constraint
663 AxisLocal="(0;0;1)" //we want to block translation along the chassis' z axis
664 PivotOffset="(0;0;-0.7)" //we want TrackSegment_cdt to stay at z=-0.7
665 />
666
667 *** PointToPath
668 <Constraint
669 ModelFrameParent="Chassis_cdt"
670 ModelFrameChild="TrackSegment_cdt"
671
672 Type="PointToPath" //we want a PointToPath constraint
673 Path_Mode="FullyConstrained" //PointToPath has 3 modes:
674 //1-PositionOnly: where it only makes sure the origin of the child body stays on the path.
675 //2-AlignXToPath: PositionOnly + the X vector of the child points along the path.
676 //3-FullyConstrained: AlignXToPath + the Z vector of the child points along NeverParallelDir
677
678 Loop="true" //specify that this path is looping, a line will link the first node
679 //and the last to close. DO NOT manually close the path
680 //by adding duplicate nodes (this is done automatically)
681
682 Node0="(-1.509;0.342;0)" //The coordinates of the first point of the path, relative to the parent's frame.
683 Node1="(1.572;0.301;0)" //Nodes are linked in a straight line from the previous node.
684 Node2="(1.701;0.155;0)" //There is NO LIMIT TO THE NUMBER OF NODES, the parser will just keep looking
685 Node3="(1.75;-0.09;0)" //for nodes until it doesn't find one.
686 Node4="(1.668;-0.299;0)" //PointToPath constrained bodies will start/spawn atttached to their closest position on
687 Node5="(0.681;-0.6;0)" //the path.(ie: no need to adjust the path's start position for every track segment)
688 Node6="(-1.136;-0.6;0)"
689 Node7="(-1.785;-0.183;0)"
690 Node8="(-1.757;0.174;0)"
691 Node8_Tolerance="0.1" //How far (in meters) we can deviate from the path between node 8 and the next (node 0).
692 //If NeverParallelDir is all 0 then the tolerance applies in any direction (ie: child elements must
693 //stay within a tube arround each path segment).
694 //If NeverParallelDir is set, then only deviations perpendicular to NeverParallelDir are allowed.
695 //For tracks, with NeverParallelDir along Z axis, child element will be able to deviate from path along
696 //X and Y (suspension dir...).
697 //The actual tolerance is linearily interpolated with the tolerance at the previous or next segment.
698
699 PivotOffset="(0;0;0)" //Convenience, same as adding those 3 values to each path node.
700 SmoothFactor="0.2" //Smooths the edges at each node. Valid range: 0 to 0.5. Smoothing creates a quadratic bezier curve
701 //starting at SmoothFactor ratio of the segment, and using one end as control point.
702
703 NeverParallelDir="(0;0;1)" //A vector that is never parallel to the path.
704 //This is used when Path_Mode="FullyConstrained" or when you use Node*_Tolerance.
705 //For tracks you typically want to use the truck's Z vector.
706 //Try to put a negative value if your tracks are upside down.
707
708 FrictionForceAlongPath="10" //Friction force, in Newtons, that resists movement along the path.
709 //This has nothing to do with a tank's grip on the ground.
710
711 SetChildQuality="4" //Raises the child body's quality. Depending on the size of your cdt it might be enough
712 //to prevent track segment from clipping through large rocks, other vehicles, woodpiles, etc...
713
714 SetParentQuality="3" //Same as SetChildQuality, but for the parent.
715 //Usually the chassis, being large and heavy it doesn't need a raise though.
716
717
718 />
719
720 *** Chain
721 <Constraint
722 ModelFrameParent="Chassis_cdt"
723 ModelFrameChild="TrackSegment1_cdt"
724
725 Type="PointToPlane"
726 AxisLocal="(0;0;1)" ------ until there we are just defining a typical PointToPlane constraint
727
728 Chain_Mode="StartChain" //create a new chain and add TrackSegment1_cdt as the first element
729 Chain_PreviousLinkToJointOffset="(-0.25;0;0)" //the distance between TrackSegment1_cdt's origin and the articulation between the
730 //next link and this one. Expressed in TrackSegment1_cdt's frame.
731 Chain_NextLinkToJointOffset="(0;0;0)" //the distance between the next link's origin and the articulation with this body.
732 //Expressed in next link's frame.
733
734 ------------------------- optonal parameters for advanced use only -------------------------
735 Chain_MaxErrorDistance="0.05" //If a body of a chain is further than that from where it should be, then havok will
736 //trigger a special anti-havoksplosion algorithm. Disabled by default. Expressed in meters.
737
738 Chain_CFM="0" //Not too sure about this one myself, so I'll just quote Telekinesys in this:
739 //"Constraint force mixing parameter. Value added to the diagonal of the constraint matrix.
740 //Should be zero or tiny, e.g. a fraction of HK_REAL_EPSILON. When this value is zero, then
741 //some chain configurations may result in a division by zero when solving."
742 //HK_REAL_EPSILON = 0.0000001192092896
743
744 Chain_Stiffness="0.1" //DO NOT use them unless you understand "Havok has a main solver, chains have their own solver,
745 Chain_Damping="0.1" //those are its tau and damping parameters".
746 />
747 <Constraint
748 ModelFrameParent="Chassis_cdt"
749 ModelFrameChild="TrackSegment2_cdt"
750
751 Type="PointToPlane"
752 AxisLocal="(0;0;1)" ------ until there we are just defining a typical PointToPlane constraint
753
754 Chain_Mode="ContinueChain" //adds TrackSegment2_cdt to the previous chain
755 Chain_PreviousLinkToJointOffset="(-0.25;0;0)" //
756 Chain_NextLinkToJointOffset="(0;0;0)" //
757 />
758 ... a couple ContinueChain later ...
759
760 <Constraint
761 ModelFrameParent="Chassis_cdt" -- in EndChain mode, ModelFrameParent is irrelevant, just make sure it exists to keep the game happy.
762 ModelFrameChild="TrackSegment99_cdt"
763
764 Type="PointToPlane" -- in EndChain mode, the base constraint's parameters are not even read
765
766 Chain_Mode="EndChain" //adds TrackSegment99_cdt to the previous chain, and terminate the chain
767 Chain_PreviousLinkToJointOffset="(-0.25;0;0)" //
768 Chain_NextLinkToJointOffset="(0;0;0)" //
769 />
770
771 <Constraint --and now you create the PointToPlane that wasn't created when we ended the chain above
772 ModelFrameParent="Chassis_cdt"
773 ModelFrameChild="TrackSegment99_cdt"
774
775 Type="PointToPlane"
776 AxisLocal="(0;0;1)"
777 />
778----
779SupportSilentLinkedSteering:
780 example in classes/trucks/kirovets700.xml
781 section Truck/ControlledConstraints
782 <ControlledConstraints>
783 <Constraint
784 Id="chassis_steer"
785 IsLinkedSteering="true"
786 TriggerEngineSound="false" //Driving this constraint will not cause engine sound
787 Name="ChassisSteer"
788 />
789 </ControlledConstraints>
790----
791SupportSkidSteering:
792 example in classes/trucks/uaz469.xml
793 section _templates/Wheel/UazWheel (also applies to Truck/Wheels/Wheel)
794 <UazWheel
795 DefaultWheelType="uaz"
796 HardpointOffsetY="-0.12"
797 SuspensionDamping="0.3"
798 SuspensionMin="-0.3"
799 SuspensionStrength="0.03"
800 SkidSteeringMode="ForwardBrake" //When turning left, left side wheels will brake,
801 //right side wheels will go forward.
802 //You can put "ForwardReverse" instead for classic tank steering.
803
804 SteeringAngle="0" <-Not needed, but recommended
805 />
806 ...
807 <Truck>
808 <TruckData>
809 <Motor
810 MaxDeltaAngVel="2.0" //twice the fuel consumption
811 Torque="1640" //the the max torque outside the engine
812 >
813 <ReverseGear AngVel="0.08" /> //total transmission ratios when this gear is selected
814 <HighGear AngVel="0.1" /> //wheel RPM = engine RPM * these numbers
815 <Gear AngVel="0.08" /> //If all goes well your wheels will spin at about
816 <Gear AngVel="0.09" /> //2100 RPM(219 angvel) * these numbers
817 <Gear AngVel="0.16" /> //
818 <Gear AngVel="0.25" /> //
819 </Motor>
820----
821MapsCanOverrideCloakMesh:
822 example in levels/level_coast.xml
823 <SpintiresPlusConfig
824 CloakMesh="trucks/kraz255" //next time you play coast, the cloaks will look like a rotating kraz
825 //chassis inside a black circle.
826 />
827-------------------------------------
828SpintiresPlus relies on a modified version of AntTweakBar http://anttweakbar.sourceforge.net/doc/ used under zlib license.
829
830SpintiresPlus and its source code are released under the terms of the MIT license:
831
832Copyright (c) 2016 Localhost
833
834Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
835associated documentation files (the "Software"), to deal in the Software without restriction,
836including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
837and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
838subject to the following conditions:
839
840-The above copyright notice and this permission notice shall be included in all copies or substantial
841 portions of the Software.
842
843THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
844LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
845IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
846WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
847SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
848-->