<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.empiresmod.com/index.php?action=history&amp;feed=atom&amp;title=Talk%3AVehicleScripts</id>
	<title>Talk:VehicleScripts - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.empiresmod.com/index.php?action=history&amp;feed=atom&amp;title=Talk%3AVehicleScripts"/>
	<link rel="alternate" type="text/html" href="https://wiki.empiresmod.com/index.php?title=Talk:VehicleScripts&amp;action=history"/>
	<updated>2026-09-27T05:47:54Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.4</generator>
	<entry>
		<id>https://wiki.empiresmod.com/index.php?title=Talk:VehicleScripts&amp;diff=8575&amp;oldid=prev</id>
		<title>Thexa4: Created page with &quot;== Settable Properties == &lt;pre&gt; // parameters for the body object control of the vehicle struct vehicle_bodyparams_t { 	DECLARE_SIMPLE_DATADESC();  	Vector		massCenterOverride...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.empiresmod.com/index.php?title=Talk:VehicleScripts&amp;diff=8575&amp;oldid=prev"/>
		<updated>2017-03-02T20:15:39Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Settable Properties == &amp;lt;pre&amp;gt; // parameters for the body object control of the vehicle struct vehicle_bodyparams_t { 	DECLARE_SIMPLE_DATADESC();  	Vector		massCenterOverride...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Settable Properties ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// parameters for the body object control of the vehicle&lt;br /&gt;
struct vehicle_bodyparams_t&lt;br /&gt;
{&lt;br /&gt;
	DECLARE_SIMPLE_DATADESC();&lt;br /&gt;
&lt;br /&gt;
	Vector		massCenterOverride;		// leave at vec3_origin for no override&lt;br /&gt;
	float		massOverride;			// leave at 0 for no override&lt;br /&gt;
	float		addGravity;				// keeps car down&lt;br /&gt;
	float		tiltForce;				// keeps car down when not on flat ground&lt;br /&gt;
	float		tiltForceHeight;		// where the tilt force pulls relative to center of mass&lt;br /&gt;
	float		counterTorqueFactor;&lt;br /&gt;
	float		keepUprightTorque;&lt;br /&gt;
	float		maxAngularVelocity;		// clamp the car angular velocity separately from other objects to keep stable&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// wheel objects are created by vphysics, these are the parameters for those objects&lt;br /&gt;
// NOTE: They are paired, so only one set of parameters is necessary per axle&lt;br /&gt;
struct vehicle_wheelparams_t&lt;br /&gt;
{&lt;br /&gt;
	DECLARE_SIMPLE_DATADESC();&lt;br /&gt;
&lt;br /&gt;
	float		radius;&lt;br /&gt;
	float		mass;&lt;br /&gt;
	float		inertia;&lt;br /&gt;
	float		damping;		// usually 0&lt;br /&gt;
	float		rotdamping;		// usually 0&lt;br /&gt;
	float		frictionScale;	// 1.5 front, 1.8 rear&lt;br /&gt;
	int			materialIndex;&lt;br /&gt;
	int			brakeMaterialIndex;&lt;br /&gt;
	int			skidMaterialIndex;&lt;br /&gt;
	float		springAdditionalLength;	// 0 means the spring is at it&amp;#039;s rest length&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct vehicle_suspensionparams_t&lt;br /&gt;
{&lt;br /&gt;
	DECLARE_SIMPLE_DATADESC();&lt;br /&gt;
&lt;br /&gt;
	float		springConstant;&lt;br /&gt;
	float		springDamping;&lt;br /&gt;
	float		stabilizerConstant;&lt;br /&gt;
	float		springDampingCompression;&lt;br /&gt;
	float		maxBodyForce;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// NOTE: both raytrace and wheel data here because jetski uses both.&lt;br /&gt;
struct vehicle_axleparams_t&lt;br /&gt;
{&lt;br /&gt;
	DECLARE_SIMPLE_DATADESC();&lt;br /&gt;
&lt;br /&gt;
	Vector						offset;					// center of this axle in vehicle object space&lt;br /&gt;
	Vector						wheelOffset;			// offset to wheel (assume other wheel is symmetric at -wheelOffset) from axle center&lt;br /&gt;
	Vector						raytraceCenterOffset;	// offset to center of axle for the raytrace data.&lt;br /&gt;
	Vector						raytraceOffset;			// offset to raytrace for non-wheel (some wheeled) vehicles&lt;br /&gt;
	vehicle_wheelparams_t		wheels;&lt;br /&gt;
	vehicle_suspensionparams_t	suspension;&lt;br /&gt;
	float						torqueFactor;		// normalized to 1 across all axles &lt;br /&gt;
													// e.g. 0,1 for rear wheel drive - 0.5,0.5 for 4 wheel drive&lt;br /&gt;
	float						brakeFactor;		// normalized to 1 across all axles&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct vehicle_steeringparams_t&lt;br /&gt;
{&lt;br /&gt;
	DECLARE_SIMPLE_DATADESC();&lt;br /&gt;
&lt;br /&gt;
	float		degreesSlow;			// angle in degrees of steering at slow speed&lt;br /&gt;
	float		degreesFast;			// angle in degrees of steering at fast speed&lt;br /&gt;
	float		degreesBoost;			// angle in degrees of steering at fast speed&lt;br /&gt;
	float		steeringRateSlow;		// this is the speed the wheels are steered when the vehicle is slow&lt;br /&gt;
	float		steeringRateFast;		// this is the speed the wheels are steered when the vehicle is &amp;quot;fast&amp;quot;&lt;br /&gt;
	float		steeringRestRateSlow;	// this is the speed at which the wheels move toward their resting state (straight ahead) at slow speed&lt;br /&gt;
	float		steeringRestRateFast;	// this is the speed at which the wheels move toward their resting state (straight ahead) at fast speed&lt;br /&gt;
	float		speedSlow;				// this is the max speed of &amp;quot;slow&amp;quot;&lt;br /&gt;
	float		speedFast;				// this is the min speed of &amp;quot;fast&amp;quot;&lt;br /&gt;
	float		turnThrottleReduceSlow;		// this is the amount of throttle reduction to apply at the maximum steering angle&lt;br /&gt;
	float		turnThrottleReduceFast;		// this is the amount of throttle reduction to apply at the maximum steering angle&lt;br /&gt;
	float		brakeSteeringRateFactor;	// this scales the steering rate when the brake/handbrake is down&lt;br /&gt;
	float		throttleSteeringRestRateFactor;	// this scales the steering rest rate when the throttle is down&lt;br /&gt;
	float		powerSlideAccel;		// scale of speed to acceleration&lt;br /&gt;
	float		boostSteeringRestRateFactor;	// this scales the steering rest rate when boosting&lt;br /&gt;
	float		boostSteeringRateFactor;	// this scales the steering rest rate when boosting&lt;br /&gt;
	float		steeringExponent;		// this makes the steering response non-linear.  The steering function is linear, then raised to this power&lt;br /&gt;
&lt;br /&gt;
	bool		isSkidAllowed;			// true/false skid flag&lt;br /&gt;
	bool		dustCloud;				// flag for creating a dustcloud behind vehicle&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct vehicle_engineparams_t&lt;br /&gt;
{&lt;br /&gt;
	DECLARE_SIMPLE_DATADESC();&lt;br /&gt;
&lt;br /&gt;
	float		horsepower;&lt;br /&gt;
	float		maxSpeed;&lt;br /&gt;
	float		maxRevSpeed;&lt;br /&gt;
	float		maxRPM;					// redline RPM limit&lt;br /&gt;
	float		axleRatio;				// ratio of engine rev to axle rev&lt;br /&gt;
	float		throttleTime;			// time to reach full throttle in seconds&lt;br /&gt;
&lt;br /&gt;
	// transmission&lt;br /&gt;
	int			gearCount;				// gear count - max 10&lt;br /&gt;
	float		gearRatio[VEHICLE_MAX_GEAR_COUNT];	// ratio for each gear&lt;br /&gt;
&lt;br /&gt;
	// automatic transmission (simple auto-shifter - switches at fixed RPM limits)&lt;br /&gt;
	float		shiftUpRPM;				// max RPMs to switch to a higher gear&lt;br /&gt;
	float		shiftDownRPM;			// min RPMs to switch to a lower gear&lt;br /&gt;
	float		boostForce;&lt;br /&gt;
	float		boostDuration;&lt;br /&gt;
	float		boostDelay;&lt;br /&gt;
	float		boostMaxSpeed;&lt;br /&gt;
	float		autobrakeSpeedGain;&lt;br /&gt;
	float		autobrakeSpeedFactor;&lt;br /&gt;
	bool		torqueBoost;&lt;br /&gt;
	bool		isAutoTransmission;		// true for auto, false for manual&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct vehicleparams_t&lt;br /&gt;
{&lt;br /&gt;
	DECLARE_SIMPLE_DATADESC();&lt;br /&gt;
&lt;br /&gt;
	int							axleCount;&lt;br /&gt;
	int							wheelsPerAxle;&lt;br /&gt;
	vehicle_bodyparams_t		body;&lt;br /&gt;
	vehicle_axleparams_t		axles[VEHICLE_MAX_AXLE_COUNT];&lt;br /&gt;
	vehicle_engineparams_t		engine;&lt;br /&gt;
	vehicle_steeringparams_t	steering;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Thexa4</name></author>
	</entry>
</feed>