<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.splashdamage.com/index.php?action=history&amp;feed=atom&amp;title=Vehicle_Setup</id>
	<title>Vehicle Setup - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.splashdamage.com/index.php?action=history&amp;feed=atom&amp;title=Vehicle_Setup"/>
	<link rel="alternate" type="text/html" href="https://wiki.splashdamage.com/index.php?title=Vehicle_Setup&amp;action=history"/>
	<updated>2026-04-07T18:53:37Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.splashdamage.com/index.php?title=Vehicle_Setup&amp;diff=1469&amp;oldid=prev</id>
		<title>192.168.0.129 at 17:09, 15 October 2007</title>
		<link rel="alternate" type="text/html" href="https://wiki.splashdamage.com/index.php?title=Vehicle_Setup&amp;diff=1469&amp;oldid=prev"/>
		<updated>2007-10-15T17:09:16Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;You can set up breakable vehicles by defining models to be detached when they damaged or destroyed.&amp;lt;includeonly&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{main|Vehicle Setup}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Detachable Components =&lt;br /&gt;
&lt;br /&gt;
== Maya Setup ==&lt;br /&gt;
The model in Maya needs every detachable component as a separate object with a unique name. &lt;br /&gt;
&lt;br /&gt;
== Detachable Model ==&lt;br /&gt;
The detachable model should be exported to a static model (''lwo/obj/ase'') with relative orientation to the closest relevant joint. If the model is far away, problems may arise in game with the parts jittering around, to fix them try adding a closer joint.&lt;br /&gt;
&lt;br /&gt;
This model now needs a collision model, as an easy rule we can use a extruded pentagon deformed to roughly match the render model. If it gets too complicated the game will refuse to load it, if this happens try simplifying it.&lt;br /&gt;
&lt;br /&gt;
== Setup in Vehicle Script ==&lt;br /&gt;
&lt;br /&gt;
=== SimplePart Setup ===&lt;br /&gt;
A simple part needs to be set up in the vehicle script (''.vscript''). In ETQW, these scripts are kept in the ''base/vehicles'' folder. Here is an example, this is the right wing-mirror for the Armadillo:&lt;br /&gt;
&lt;br /&gt;
 simplePart {&lt;br /&gt;
 	&amp;quot;name&amp;quot;				&amp;quot;Right Mirror&amp;quot;&lt;br /&gt;
 	&amp;quot;surface1&amp;quot;			&amp;quot;m_right_mirror&amp;quot;&lt;br /&gt;
 	&amp;quot;surface2&amp;quot;			&amp;quot;s_right_mirror&amp;quot;&lt;br /&gt;
 	&amp;quot;joint&amp;quot;				&amp;quot;base&amp;quot;&lt;br /&gt;
 	&amp;quot;def_brokenPart&amp;quot;		&amp;quot;part_vehicle_badger_right_mirror&amp;quot;&lt;br /&gt;
 	&amp;quot;health&amp;quot; 			&amp;quot;10&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This definition should be placed within the main vehicle definition.&lt;br /&gt;
&lt;br /&gt;
* '''name''' is for your own reference.&lt;br /&gt;
* '''surface1''' is the first surface of the detachable model which the game detects being hit and hides, in this case it is a render model.&lt;br /&gt;
* '''surface2''' is the second surface the game hides. This is a simplified shadow model which has a different material to the render model and so has to be a separate object in maya. This section is unnecessary if there is no separate shadow model.&lt;br /&gt;
* '''joint''' is the joint the static model has been exported relative to.&lt;br /&gt;
* '''def_brokenPart''' is referencing the part setup shown below in the '''Part entityDef''' section.&lt;br /&gt;
* '''health''' is how much health the detachable component has (how much damage it can take before detaching). If this value is set to 0 the component will not detach until the vehicle's total health falls to zero and everything comes off in one go.&lt;br /&gt;
&lt;br /&gt;
=== Part entityDef ===&lt;br /&gt;
&lt;br /&gt;
The part entity defines more parameters of the detachable component, including the most important one, the static model it references.&lt;br /&gt;
&lt;br /&gt;
 entityDef part_vehicle_badger_right_mirror {&lt;br /&gt;
 	useTemplate templates/vehicles/destroyedParts &amp;lt;&lt;br /&gt;
 			&amp;quot;models/vehicles/edf_badger/parts/right_mirror.lwo&amp;quot;,&lt;br /&gt;
 			&amp;quot;0 -200 700&amp;quot;,&lt;br /&gt;
 			&amp;quot;0 0 2&amp;quot;,&lt;br /&gt;
 			&amp;quot;vehicles/misc/debris/glass_small&amp;quot;,&lt;br /&gt;
 			&amp;quot;0.1&amp;quot;&lt;br /&gt;
 		&amp;gt;&lt;br /&gt;
 	&amp;quot;climate_skin_key&amp;quot;				&amp;quot;badger&amp;quot;&lt;br /&gt;
 	&amp;quot;priority&amp;quot;					&amp;quot;0&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This is placed straight into the ''.vscript'', it is not enclosed in any other definitions.&lt;br /&gt;
&lt;br /&gt;
The first section of this is referencing a template. This template has the parameters, however the defaults are usually ok. &lt;br /&gt;
&lt;br /&gt;
 ModelParm,&lt;br /&gt;
 VelocityParm 		= &amp;quot;500 0 0&amp;quot;,&lt;br /&gt;
 AngularVelParm 		= &amp;quot;2 4 10&amp;quot;,&lt;br /&gt;
 SoundBounceParm		= &amp;quot;vehicles/misc/debris/metal_medium&amp;quot;,&lt;br /&gt;
 BouncynessParm 		= &amp;quot;0.25&amp;quot;,&lt;br /&gt;
 FrictionParm 		= &amp;quot;0.5&amp;quot;,&lt;br /&gt;
 DensityParm		= &amp;quot;0.01&amp;quot;,&lt;br /&gt;
 TrailParm 		= &amp;quot;effects/vehicles/generic_debris&amp;quot;,&lt;br /&gt;
 LifeTimeParm 		= &amp;quot;10&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
The ones you will want to change are the &amp;quot;ModelParm&amp;quot; (to be the static model you exported from Maya) and possibly the &amp;quot;SoundBounceParm&amp;quot; and the &amp;quot;TrailParm&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== General Tips ==&lt;br /&gt;
* Try to avoid making long, thin detachable components as the game has trouble handling them.&lt;br /&gt;
* Physics calculations are very expensive, try and keep the detachable components as simple and few as possible, particularly when (like in ETQW) there is the possibility of a sudden mass death where multiple vehicles could be instantly destroyed!&lt;br /&gt;
* If there are too many detachable components at once the game will remove them! You may end up with the game removing the larger ones.&lt;br /&gt;
* Collision models can cope with polygons with more than 3 sides. The game automatically treats co-planar triangles as one polygon. Less polygons in the collision models is much better!&lt;br /&gt;
* Components with 0 health will appear when the vehicle is totally destroyed, e.g. the vehicle's main hull or parts that cannot be shot off.&lt;br /&gt;
&lt;br /&gt;
[[Category:Art]][[Category:Models]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>192.168.0.129</name></author>
		
	</entry>
</feed>