Jump to content
Sign in to follow this  
SWT_Janowich

Tutorial: How to add vehicles to the game (Config)

Recommended Posts

Good evening,

my name is SWT_Janowich and today, I'll bring you the world of ArmA II

just a little closer.

For me, its been close since Armed Assault: Combat Operations, so see me as your teacher rather than a stranger.

Also, tips and tricks are written in cursive font

Tip 1

Get a proper tool for your textures. Only in the gameworld it is an insult,

when they claim that your car has a Paintjob.

Necessary tools:

O2

TexView2

BinPbo (Or a similar .pbo tool like PBOView)

I think you get the picture. So lets go!

1: The model.

I want you to download that sample model.

http://www.mediafire.com/?jzytlzwmkdm

Got it? Now we can start.

The "End Result" folder is reference only, in case you don't get my explanation

and need to look at the proper way, the way how its done.

You could pbo it, put into the addon folder and would be able to play with it immediately.

But you start with the "Your Start" folder. First, take a breath and look

at whats inside:

Textures (With the extension of paa)

Sound (With the extension of wss)

The model (With the extension of p3d)

Things we have to add: A configuration file, a model cfg.

Configuration file

Make a new document with the editor and change the .txt extension with .cpp . Call the whole file config.cpp . Look at the reference file to see how its done.

Now we have a config file, but we have to write the config for the vehicle! Yes, if you've taken a look into the reference .cpp, you already know that there is a lot of variables and text inside but I'll help you to get through it.

We start with the basic definitions:

/ config.bin - 14:09:40 07/07/07, generated in 1.07 seconds

// Generated by unRap v1.05 by Kegetys

// Separate rootclasses: Disabled, Automatic comments: Enabled

#define true 1

#define false 0

#define private 0

#define protected 1

#define public 2

#define TEast 0

#define TWest 1

#define TGuerrila 2

#define TCivilian 3

#define TSideUnknown 4

#define TEnemy 5

#define TFriendly 6

#define TLogic 7

#define VSoft 0

#define VArmor 1

#define VAir 2

#define LockNo 0

#define LockCadet 1

#define LockYes 2

#define ReadAndWrite 0

#define ReadAndCreate 1

#define ReadOnly 2

#define ReadOnlyVerified 3

Just basic stuff and nothing serious. Just copy and paste it. But now we come to the interesting stuff.

Add this below:

class CfgPatches

{

class Your_Jeep

{

units[] = {"Your_Jeep"};

weapons[] = {};

requiredVersion = 1.0;

requiredAddons[] = {};

};

};

This is important. The class Your_Jeep tells the game, under what name your vehicle does appear. E.g. If you want to spawn your vehicle through the editor through scripts, that name is needed, as Your_Jeep is your vehicle classname.

Everything in the game has a classnames. Weapons (this addweapon "M16A2") And also vehicles. This is your classname.

Now add this below

class CfgModels {

class Car; // External class reference

class Your_Jeep : Car {

sectionsInherit = "";

sections[] = {"n1", "n2", "n3", "n4", "n5", "n6", "pruh", "light_brake", "pravy predni", "pravy dalsi", "pravy zadni", "pravy prostredni", "levy predni", "levy dalsi", "levy zadni", "levy prostredni", "L svetlo", "P svetlo", "clan"};

skeletonName = "Your_JeepBones";

class Animations {

class mainTurret {

type = "rotationY";

source = "mainTurret";

selection = "mainTurret";

axis = "OsaVeze";

memory = 1;

sourceAddress = "loop";

minValue = "rad -360";

maxValue = "rad 360";

angle0 = "rad -360";

angle1 = "rad 360";

};

class mainGun {

type = "rotationX";

source = "mainGun";

selection = "mainGun";

axis = "OsaHlavne";

memory = 1;

sourceAddress = "clamp";

minValue = "-rad 4";

maxValue = "rad 60";

angle0 = "-rad 4";

angle1 = "rad 60";

};

class Dvere1 {

type = "rotation";

source = "rpm";

selection = "dvere1";

axis = "osa_dvere1";

memory = 1;

//sourceAddress = "clamp";

minValue = 0;

maxValue = 0.1;

angle0 = 0;

angle1 = 0.58;

};

class Your_JeepFrontWheelR {

type = "rotationX";

source = "wheel";

selection = "pravy predni";

axis = "";

memory = 1;

sourceAddress = "loop";

minValue = 0;

maxValue = 1;

angle0 = 0;

angle1 = "rad -360";

};

class Your_JeepFrontWheelL : Your_JeepFrontWheelR {

selection = "levy predni";

};

class Your_Jeep2FrontWheelL : Your_JeepFrontWheelR {

selection = "levy dalsi";

};

class Your_Jeep2FrontWheelR : Your_JeepFrontWheelR {

selection = "pravy dalsi";

};

class Your_Jeep2RearWheelR : Your_JeepFrontWheelR {

selection = "pravy prostredni";

};

class Your_Jeep2RearWheelL : Your_JeepFrontWheelR {

selection = "levy prostredni";

};

class Your_JeepRearWheelR : Your_JeepFrontWheelR {

selection = "pravy zadni";

};

class Your_JeepRearWheelL : Your_JeepFrontWheelR {

selection = "levy zadni";

};

class Your_JeepFrontWheelRTurn {

type = "rotationY";

source = "drivingWheel";

selection = "pravy predni";

axis = "";

memory = 1;

sourceAddress = "clamp";

minValue = -1;

maxValue = 1;

angle0 = "rad 35";

angle1 = "rad -35";

};

class Your_JeepFrontWheelLTurn : Your_JeepFrontWheelRTurn {

selection = "levy predni";

};

class Your_Jeep2FrontWheelRTurn : Your_JeepFrontWheelRTurn {

selection = "pravy dalsi";

};

class Your_Jeep2FrontWheelLTurn : Your_JeepFrontWheelLTurn {

selection = "levy dalsi";

};

class Your_JeepDamperFrontWheelR {

type = "translationY";

source = "damper";

selection = "pravy predni";

axis = "";

memory = 1;

sourceAddress = "clamp";

minValue = 0;

maxValue = 1;

angle0 = 0;

angle1 = "35";

};

class Your_JeepDamperFrontWheelL : Your_JeepDamperFrontWheelR {

selection = "levy predni";

};

class Your_Jeep2DamperFrontWheelL : Your_JeepDamperFrontWheelR {

selection = "levy dalsi";

};

class Your_Jeep2DamperFrontWheelR : Your_JeepDamperFrontWheelR {

selection = "pravy dalsi";

};

class Your_Jeep2DamperRearWheelR : Your_JeepDamperFrontWheelR {

selection = "pravy prostredni";

};

class Your_Jeep2DamperRearWheelL : Your_JeepDamperFrontWheelR {

selection = "levy prostredni";

};

class Your_JeepDamperRearWheelR : Your_JeepDamperFrontWheelR {

selection = "pravy zadni";

};

class Your_JeepDamperRearWheelL : Your_JeepDamperFrontWheelR {

selection = "levy zadni";

};

class Your_JeepIndicatorSpeed {

type = "rotation";

source = "speed";

memory = 0;

selection = "ukaz_rychlo";

axis = "osa_rychlo";

angle0 = 0;

angle1 = "rad -240";

minValue = 0;

maxValue = 60;

};

class Your_JeepIndicatorRPM {

type = "rotation";

source = "rpm";

memory = 0;

selection = "ukaz_rpm";

axis = "osa_rpm";

angle0 = 0;

angle1 = "rad -270";

minValue = 0;

maxValue = 1.5;

};

class Your_JeepIndicatorFuel {

type = "rotation";

source = "fuel";

memory = 0;

selection = "ukaz_fuel";

axis = "osa_fuel";

angle0 = "0";

angle1 = "rad 270";

minValue = 0;

maxValue = 1;

};

class Your_JeepDrivingWheel {

type = "rotation";

source = "drivingWheel";

selection = "volant";

axis = "osavolantkon";

memory = 0;

angle0 = "rad 180";

angle1 = "rad -180";

minValue = -1;

maxValue = 1;

};

};

};

};

These are the animations in your vehicle. Some people say that it is not necessary to write in a .cpp file and its right, you can also approach the end without the written stuff above, but we'll do it like that.

More to animations later.

Tip 2

If you've changed the classname from Your_Jeep to e.g. My_Jeep, you have to replace every section where Your_Jeep is written with My_Jeep.

You should add this below:

class CfgVehicles

{

class Car;

class Your_Jeep : Car

{

selectionBackLights = "brzdove svetlo";

scope = public;

model = "\Your_Jeep\Your_Jeep.p3d";

Picture = "\Your_Jeep\Icon.paa";

Icon = "\Your_Jeep\Icon.paa";

mapSize = 8;

terrainCoef = 0.5;

displayName = "CJ6 Jeep";

side = TWest;

maxspeed = 40;

crew = "GUE_Soldier_Crew";

nameSound = "Jeep";

magazines[] = {"30rnd_9x19_MP5"};

armor = 50;

type = VArmor;

cost = 100000;

armorGlass = 0.5;

armorWheels = 0.05;

soundEngine[] = {"\Your_Jeep\engine.wss", db10, 0.7};

soundGetIn[] = {"\ca\wheeled\Data\Sound\Humvee_doors", db-20, 1};

soundGetOut[] = {"\ca\wheeled\Data\Sound\Humvee_doors", db-20, 1};

soundGear[] = {"\ca\wheeled\Data\Sound\shifter_v3", db-90, 1};

soundServo[] = {"\ca\wheeled\Data\Sound\servo3", db-40, 1.0};

typicalCargo[] = {"SoldierWB", "SoldierWB", "SoldierWAT", "SoldierWBOfficer"};

transportSoldier = 3;

canfloat = 0;

driverForceOptics = 0;

hasGunner = 0;

acceleration = 5;

accuracy=5.50

class Turrets {};

weapons[]={CarHorn};

driverOpticsModel = "\ca\Tracked\optika_tank_driver";

castDriverShadow = true;

driverIsCommander = true;

driverAction = "UAZ_Driver";

cargoAction[] = {"HMMWV_Cargo01", "HMMWV_Cargo01", "UAZ_Cargo01"};

canLock = LockNo;

unitInfoType = "UnitInfoSoldier";

class Library {libTextDesc = "Civilian Jeep, normally used by rebels.";};

class HitLFWheel {armor=0.38;material=-1;name="Levy predni tlumic";visual="Levy predni";passThrough=0;};

class HitRFWheel {armor=0.38;material=-1;name="Pravy predni tlumic";visual="Pravy predni";passThrough=0;};

class HitLBWheel {armor=0.38;material=-1;name="Levy zadni tlumic";visual="Levy zadni";passThrough=0;};

class HitRBWheel {armor=0.38;material=-1;name="Pravy zadni tlumic";visual="Pravy zadni";passThrough=0;};

damageHalf[] =

{

Your_Jeep\black.paa,

Your_Jeep\black.paa

};

damageFull[] =

{

Your_Jeep\black.paa,

Your_Jeep\black.paa

};

class Damage

{

tex[]={};

mat[]=

{

"ca\wheeled\data\detailmapy\uaz_other_metal.rvmat",

"ca\wheeled\data\detailmapy\uaz_other_metal.rvmat",

"ca\wheeled\data\detailmapy\uaz_other_metal_destruct.rvmat",

"ca\wheeled\data\detailmapy\uaz_mount.rvmat",

"ca\wheeled\data\detailmapy\uaz_mount.rvmat",

"ca\wheeled\data\detailmapy\uaz_mount_destruct.rvmat",

"ca\wheeled\data\detailmapy\uaz_main_metal.rvmat",

"ca\wheeled\data\detailmapy\uaz_main_metal.rvmat",

"ca\wheeled\data\detailmapy\uaz_main_metal_destruct.rvmat",

"ca\weapons\data\dshk.rvmat",

"ca\weapons\data\dshk.rvmat",

"ca\weapons\data\dshk_destruct.rvmat"

};

};

class UserActions

{

class OpenDoor // action to open the door

{

displayName="Open Tailgate"; // string that's displayed in the action menu

position="canopy"; // name of the 'action point'

radius=1.5; // how close the player has to be see this action

condition="this animationPhase ""MoveDoor"" < 0.5"; // check whether the door has moved already

statement="this animate[""MoveDoor"",1]"; // and if not, then start the animation

onlyforplayer = true; // requirement by ArmA - presumably defines if AI can/cannot open doors etc

};

class CloseDoor // action to close the door

{

displayName="Close Tailgate";

position="Canopy";

radius=1.5;

condition="this animationPhase ""MoveDoor"" < 0.5";

statement="this animate[""MoveDoor"",0]";

onlyforplayer = true;

};

};

// threat (VSoft, VArmor, VAir), how threatening vehicle is to unit types

threat[] = {1, 0.1, 0.4};

};

};

This is it. But also one of the most interesting parts.

Explanation of the parts:

selectionBackLights = "brzdove svetlo"; Tail lights. Where they're located in the model

model = "\Your_Jeep\Your_Jeep.p3d"; Path to your model. If your folder is named like e.g. My_Jeep, you should replace the Your_Jeep of course

Picture = "\Your_Jeep\Icon.paa";Path to your picture which shows ingame when you commandeer the jeep as the squad leader. That small picture under F2, F3 etc.

Icon = "\Your_Jeep\Icon.paa";Your icon on the map, e.g. editor. If you place an object in the editor, you always notice a small image. This is it.

displayName = "CJ6 Jeep"; The way the people do "read" your jeep. For example in radio reports: "Enemy, CJ6 Jeep, 50 meters". You can change that name to whatever you want, since it is not dependant to any other variable.

side = TWest;What side your vehicle is siding with.

maxspeed = 40; Maximum speed in km/h. You are free to replace the number at will. Note: A maximum of 120 is possible.

crew = "GUE_Soldier_Crew"; The standard crew thats in the jeep when you pick the jeep in the editor. Its a CDF soldier in this case.

nameSound = "Jeep"; When your squadmembers report the vehicle via the radio, they are going to say (voice) "jeep". You can replace the jeep with tank, car, soldier for example. Note: Not everything works.

armor = 50;Armor values for your vehicle. Tanks mostly have over 100.

armorGlass = 0.5; Defines how armoured the glass is.

armorWheels = 0.05;Defines how armoured the wheels are.

soundEngine[] = {"\Your_Jeep\engine.wss", db10, 0.7}; Sound of your engine while driving)

transportSoldier = 3; How many soldiers can fit in your car

canfloat = 0;Your can replace the 0 with 1. If you do that, your vehicle is able to swim through rivers, lakes and seas.

driverForceOptics = 0; You can replace that with 1. If you do that, your driver will not be able to see the vehicle in first person view. Similar to the M1A1 you are about to witness these small 2d hatches.

hasGunner = 0;Pretty self explanatory

acceleration = 5;How fast your vehicle is going to accelerate. 5 is for 5 meters the second.

accuracy=5.50 How big your turning radius is.

class Turrets {};

castDriverShadow = true; You can replace it with false. Then your driver wont cast a shadow on the ground.

driverIsCommander = true; If false, your driver is not the commander/ leader of the vehicle

driverAction = "UAZ_Driver"; The animation the driver makes while sitting in the seat. In this case, the driver is going to imitate the UAZ driving animation.

cargoAction[] = {"HMMWV_Cargo01", "HMMWV_Cargo01", "UAZ_Cargo01"};Animation of the cargo.

canLock = LockNo; Defines if planes are able to lock on your vehicle with their missile launchers.

class Library {libTextDesc = "You can write something in here.";}In the armory, you can see the vehicles history in font. Change it at your will;

Its natural that you might make a few mistakes but you still have your reference config to look at.

Now we got to open O2.

Look at my carefully developed picture:

tut4xdg.jpg

It explains everything you need to know.

Since you now know the basics of O2, I can work in a way more professional

manner with you.

Basics: Delete polygons with the delete key on your keyboard. Beware: You have to select them with your mouse first!

LODS: Level of Detail. To gain a maximum performance, models degrade over distance. 0.000 is the closest lod, while 2.000 is a LoD far away, so you can delete polygons there.

View - Cargo: Defines how to display your vehicle in 1st person. You can delete things you would not see while being in first person like tires etc. to save polygons = gain more performance of the overall game.

Geometry: Should look similar to your model. Defines, where you can hit the vehicle with your gun.

Memory: Memories are the only things which last forever.

Selection: Select something on your model and click on New. Now always you press on that New, your previous selected selection is displayed.

For example, the Cylinder04 in my picture, once clicked on it, the tire turns red, as you make out.

_

To make wheels turn, you have to define that first, otherwise they are not going to turn.

Now select your right front tire, right click on Selection and click on new. Call it "pravy predni". Thats czech for "front right".

Repeat that process for all the tires.

Left front tire = "levy predni"

Right back tire= "pravy zadni"

left back tire = "pravy zadni"

You have to do that for all the resolutions!

The memory part is the next. Since it is too confusing, I've prepared that already.

Now I know that you have noticed that 2d cone over your vehicle. Do not delete it. When you start up ArmA II, a person instead of a cone displays! So the cone is a placeholder for a real person in ArmA II!

But you can move the cone and so you are able to let the person sit on another place like the hood or the bumper.

Thats all you need my friend. Now we only need the model cfg.

Model cfg

Same as config.cpp. New file, name it model.cfg and paste that inside:

class CfgTextureToMaterial {

class BTRSide {

textures[] = {"Your_jeep\t\bok.paa"};

material = "#BTRSide";

};

class BTRFront {

textures[] = {"Your_jeep\t\pered.paa"};

material = "#BTRFront";

};

class BTRRest {

textures[] = {"Your_jeep\t\verh.paa"};

material = "#BTRRest";

};

class BTRBack {

textures[] = {"Your_jeep\t\zad.paa"};

material = "#BTRBack";

};

class BTRTurr {

textures[] = {"Your_jeep\t\camu.paa"};

material = "#BTRTurr";

};

class BTRK {

textures[] = {"Your_jeep\t\k1.paa"};

material = "#BTRK";

};

class BTRwhee {

textures[] = {"Your_jeep\t\brmdkolo.paa"};

material = "#BTRwhee";

};

};

class CfgMaterials {

class BTRSide {

ambient[] = {1.0, 1.0, 1.0, 1.0};

diffuse[] = {1.0, 1.0, 1.0, 1.0};

forcedDiffuse[] = {0.0, 0.0, 0.0, 0.0};

emmisive[] = {0.0, 0.0, 0.0, 1.0};

specular[] = {0.746, 0.746, 0.746, 1.0};

specularPower = 130.0;

PixelShaderID = "NormalMapSpecularDIMap";

VertexShaderID = "NormalMap";

class Stage1 {

texture = "Your_jeep\t\bok_nohq.pac";

uvSource = "tex";

class uvTransform {

aside[] = {1.0, 0.0, 0.0};

up[] = {0.0, 1.0, 0.0};

dir[] = {0.0, 0.0, 0.0};

pos[] = {0.0, 0.0, 0.0};

};

};

class Stage2 {

texture = "Your_jeep\t\bok_smdi.pac";

uvSource = "tex";

class uvTransform {

aside[] = {1.0, 0.0, 0.0};

up[] = {0.0, 1.0, 0.0};

dir[] = {0.0, 0.0, 0.0};

pos[] = {0.0, 0.0, 0.0};

};

};

};

class BTRFront {

ambient[] = {1.0, 1.0, 1.0, 1.0};

diffuse[] = {1.0, 1.0, 1.0, 1.0};

forcedDiffuse[] = {0.0, 0.0, 0.0, 0.0};

emmisive[] = {0.0, 0.0, 0.0, 1.0};

specular[] = {0.746, 0.746, 0.746, 1.0};

specularPower = 130.0;

PixelShaderID = "NormalMapSpecularDIMap";

VertexShaderID = "NormalMap";

class Stage1 {

texture = "Your_jeep\t\pered_nohq.pac";

uvSource = "tex";

class uvTransform {

aside[] = {1.0, 0.0, 0.0};

up[] = {0.0, 1.0, 0.0};

dir[] = {0.0, 0.0, 0.0};

pos[] = {0.0, 0.0, 0.0};

};

};

class Stage2 {

texture = "Your_jeep\t\pered_smdi.pac";

uvSource = "tex";

class uvTransform {

aside[] = {1.0, 0.0, 0.0};

up[] = {0.0, 1.0, 0.0};

dir[] = {0.0, 0.0, 0.0};

pos[] = {0.0, 0.0, 0.0};

};

};

};

class BTRRest {

ambient[] = {1.0, 1.0, 1.0, 1.0};

diffuse[] = {1.0, 1.0, 1.0, 1.0};

forcedDiffuse[] = {0.0, 0.0, 0.0, 0.0};

emmisive[] = {0.0, 0.0, 0.0, 1.0};

specular[] = {0.746, 0.746, 0.746, 1.0};

specularPower = 130.0;

PixelShaderID = "NormalMapSpecularDIMap";

VertexShaderID = "NormalMap";

class Stage1 {

texture = "Your_jeep\t\verh_nohq.pac";

uvSource = "tex";

class uvTransform {

aside[] = {1.0, 0.0, 0.0};

up[] = {0.0, 1.0, 0.0};

dir[] = {0.0, 0.0, 0.0};

pos[] = {0.0, 0.0, 0.0};

};

};

class Stage2 {

texture = "Your_jeep\t\verh_smdi.pac";

uvSource = "tex";

class uvTransform {

aside[] = {1.0, 0.0, 0.0};

up[] = {0.0, 1.0, 0.0};

dir[] = {0.0, 0.0, 0.0};

pos[] = {0.0, 0.0, 0.0};

};

};

};

class BTRBack {

ambient[] = {1.0, 1.0, 1.0, 1.0};

diffuse[] = {1.0, 1.0, 1.0, 1.0};

forcedDiffuse[] = {0.0, 0.0, 0.0, 0.0};

emmisive[] = {0.0, 0.0, 0.0, 1.0};

specular[] = {0.746, 0.746, 0.746, 1.0};

specularPower = 130.0;

PixelShaderID = "NormalMapSpecularDIMap";

VertexShaderID = "NormalMap";

class Stage1 {

texture = "Your_jeep\t\zad_nohq.pac";

uvSource = "tex";

class uvTransform {

aside[] = {1.0, 0.0, 0.0};

up[] = {0.0, 1.0, 0.0};

dir[] = {0.0, 0.0, 0.0};

pos[] = {0.0, 0.0, 0.0};

};

};

class Stage2 {

texture = "Your_jeep\t\zad_smdi.pac";

uvSource = "tex";

class uvTransform {

aside[] = {1.0, 0.0, 0.0};

up[] = {0.0, 1.0, 0.0};

dir[] = {0.0, 0.0, 0.0};

pos[] = {0.0, 0.0, 0.0};

};

};

};

class BTRTurr {

ambient[] = {1.0, 1.0, 1.0, 1.0};

diffuse[] = {1.0, 1.0, 1.0, 1.0};

forcedDiffuse[] = {0.0, 0.0, 0.0, 0.0};

emmisive[] = {0.0, 0.0, 0.0, 1.0};

specular[] = {0.746, 0.746, 0.746, 1.0};

specularPower = 130.0;

PixelShaderID = "NormalMapSpecularDIMap";

VertexShaderID = "NormalMap";

class Stage1 {

texture = "Your_jeep\t\basnia_nohq.pac";

uvSource = "tex";

class uvTransform {

aside[] = {1.0, 0.0, 0.0};

up[] = {0.0, 1.0, 0.0};

dir[] = {0.0, 0.0, 0.0};

pos[] = {0.0, 0.0, 0.0};

};

};

class Stage2 {

texture = "Your_jeep\t\basnia_smdi.pac";

uvSource = "tex";

class uvTransform {

aside[] = {1.0, 0.0, 0.0};

up[] = {0.0, 1.0, 0.0};

dir[] = {0.0, 0.0, 0.0};

pos[] = {0.0, 0.0, 0.0};

};

};

};

class BTRK {

ambient[] = {1.0, 1.0, 1.0, 1.0};

diffuse[] = {1.0, 1.0, 1.0, 1.0};

forcedDiffuse[] = {0.0, 0.0, 0.0, 0.0};

emmisive[] = {0.0, 0.0, 0.0, 1.0};

specular[] = {0.746, 0.746, 0.746, 1.0};

specularPower = 130.0;

PixelShaderID = "NormalMapSpecularDIMap";

VertexShaderID = "NormalMap";

class Stage1 {

texture = "Your_jeep\t\camu_nohq.pac";

uvSource = "tex";

class uvTransform {

aside[] = {1.0, 0.0, 0.0};

up[] = {0.0, 1.0, 0.0};

dir[] = {0.0, 0.0, 0.0};

pos[] = {0.0, 0.0, 0.0};

};

};

class Stage2 {

texture = "Your_jeep\t\camu_smdi.pac";

uvSource = "tex";

class uvTransform {

aside[] = {1.0, 0.0, 0.0};

up[] = {0.0, 1.0, 0.0};

dir[] = {0.0, 0.0, 0.0};

pos[] = {0.0, 0.0, 0.0};

};

};

};

class BTRwheel {

ambient[] = {1.0, 1.0, 1.0, 1.0};

diffuse[] = {1.0, 1.0, 1.0, 1.0};

forcedDiffuse[] = {0.0, 0.0, 0.0, 0.0};

emmisive[] = {0.0, 0.0, 0.0, 1.0};

specular[] = {0.746, 0.746, 0.746, 1.0};

specularPower = 130.0;

PixelShaderID = "NormalMapSpecularDIMap";

VertexShaderID = "NormalMap";

class Stage1 {

texture = "Your_jeep\t\brmdkolo_nohq.pac";

uvSource = "tex";

class uvTransform {

aside[] = {1.0, 0.0, 0.0};

up[] = {0.0, 1.0, 0.0};

dir[] = {0.0, 0.0, 0.0};

pos[] = {0.0, 0.0, 0.0};

};

};

class Stage2 {

texture = "Your_jeep\t\brmdkolo_smdi.pac";

uvSource = "tex";

class uvTransform {

aside[] = {1.0, 0.0, 0.0};

up[] = {0.0, 1.0, 0.0};

dir[] = {0.0, 0.0, 0.0};

pos[] = {0.0, 0.0, 0.0};

};

};

};

};

class CfgSkeletons {

class Car; // External class reference

class Your_jeepBones : Car {

isDiscrete = 1;

skeletonInherit = "";

skeletonBones[] = {"pravy predni", "", "pravy dalsi", "", "pravy zadni", "", "pravy prostredni", "", "levy predni", "", "levy dalsi", "", "levy zadni", "", "levy prostredni", "", "dvere1", "", "ukaz_fuel", "", "ukaz_rpm", "", "ukaz_rychlo", "", "volant", "", "mainTurret", "", "mainGun", "mainTurret"};

};

};

class CfgModels {

class Car; // External class reference

class Your_jeep : Car {

sectionsInherit = "";

sections[] = {"n1", "n2", "n3", "n4", "n5", "n6", "pruh", "light_brake", "pravy predni", "pravy dalsi", "pravy zadni", "pravy prostredni", "levy predni", "levy dalsi", "levy zadni", "levy prostredni", "L svetlo", "P svetlo", "clan"};

skeletonName = "Your_jeepBones";

class Animations {

class mainTurret {

type = "rotationY";

source = "mainTurret";

selection = "mainTurret";

axis = "OsaVeze";

memory = 1;

sourceAddress = "loop";

minValue = "rad -360";

maxValue = "rad 360";

angle0 = "rad -360";

angle1 = "rad 360";

};

class mainGun {

type = "rotationX";

source = "mainGun";

selection = "mainGun";

axis = "OsaHlavne";

memory = 1;

sourceAddress = "clamp";

minValue = "-rad 4";

maxValue = "rad 60";

angle0 = "-rad 4";

angle1 = "rad 60";

};

class Dvere1 {

type = "rotation";

source = "rpm";

selection = "dvere1";

axis = "osa_dvere1";

memory = 1;

//sourceAddress = "clamp";

minValue = 0;

maxValue = 0.1;

angle0 = 0;

angle1 = 0.58;

};

class Your_jeepFrontWheelR {

type = "rotationX";

source = "wheel";

selection = "pravy predni";

axis = "";

memory = 1;

sourceAddress = "loop";

minValue = 0;

maxValue = 1;

angle0 = 0;

angle1 = "rad -360";

};

class Your_jeepFrontWheelL : Your_jeepFrontWheelR {

selection = "levy predni";

};

class Your_jeep2FrontWheelL : Your_jeepFrontWheelR {

selection = "levy dalsi";

};

class Your_jeep2FrontWheelR : Your_jeepFrontWheelR {

selection = "pravy dalsi";

};

class Your_jeep2RearWheelR : Your_jeepFrontWheelR {

selection = "pravy prostredni";

};

class Your_jeep2RearWheelL : Your_jeepFrontWheelR {

selection = "levy prostredni";

};

class Your_jeepRearWheelR : Your_jeepFrontWheelR {

selection = "pravy zadni";

};

class Your_jeepRearWheelL : Your_jeepFrontWheelR {

selection = "levy zadni";

};

class Your_jeepFrontWheelRTurn {

type = "rotationY";

source = "drivingWheel";

selection = "pravy predni";

axis = "";

memory = 1;

sourceAddress = "clamp";

minValue = -1;

maxValue = 1;

angle0 = "rad 35";

angle1 = "rad -35";

};

class Your_jeepFrontWheelLTurn : Your_jeepFrontWheelRTurn {

selection = "levy predni";

};

class Your_jeep2FrontWheelRTurn : Your_jeepFrontWheelRTurn {

selection = "pravy dalsi";

};

class Your_jeep2FrontWheelLTurn : Your_jeepFrontWheelLTurn {

selection = "levy dalsi";

};

class Your_jeepDamperFrontWheelR {

type = "translationY";

source = "damper";

selection = "pravy predni";

axis = "";

memory = 1;

sourceAddress = "clamp";

minValue = 0;

maxValue = 1;

angle0 = 0;

angle1 = "35";

};

class Your_jeepDamperFrontWheelL : Your_jeepDamperFrontWheelR {

selection = "levy predni";

};

class Your_jeep2DamperFrontWheelL : Your_jeepDamperFrontWheelR {

selection = "levy dalsi";

};

class Your_jeep2DamperFrontWheelR : Your_jeepDamperFrontWheelR {

selection = "pravy dalsi";

};

class Your_jeep2DamperRearWheelR : Your_jeepDamperFrontWheelR {

selection = "pravy prostredni";

};

class Your_jeep2DamperRearWheelL : Your_jeepDamperFrontWheelR {

selection = "levy prostredni";

};

class Your_jeepDamperRearWheelR : Your_jeepDamperFrontWheelR {

selection = "pravy zadni";

};

class Your_jeepDamperRearWheelL : Your_jeepDamperFrontWheelR {

selection = "levy zadni";

};

class Your_jeepIndicatorSpeed {

type = "rotation";

source = "speed";

memory = 0;

selection = "ukaz_rychlo";

axis = "osa_rychlo";

angle0 = 0;

angle1 = "rad -240";

minValue = 0;

maxValue = 60;

};

class Your_jeepIndicatorRPM {

type = "rotation";

source = "rpm";

memory = 0;

selection = "ukaz_rpm";

axis = "osa_rpm";

angle0 = 0;

angle1 = "rad -270";

minValue = 0;

maxValue = 1.5;

};

class Your_jeepIndicatorFuel {

type = "rotation";

source = "fuel";

memory = 0;

selection = "ukaz_fuel";

axis = "osa_fuel";

angle0 = "0";

angle1 = "rad 270";

minValue = 0;

maxValue = 1;

};

class Your_jeepDrivingWheel {

type = "rotation";

source = "drivingWheel";

selection = "volant";

axis = "osavolantkon";

memory = 0;

angle0 = "rad 180";

angle1 = "rad -180";

minValue = -1;

maxValue = 1;

};

};

};

};

This defines the animations of the vehicle.

Got that, good, now you noly need to pbo your vehicle! Get a pbo tool like PBOView or bin.pbo and press on "pbo it!". You have to pbo the addon root folder (e.g. Your_Car). After that, you can add the file to the addon folder.

Good job, because now you have easily included your first vehicle to ArmA II on your own.

Good job, and next time, I am going to show you how to add brick walls to the game.

Edited by SWT_Janowich

Share this post


Link to post
Share on other sites

Nice, but I want to see those brick walls.

Share this post


Link to post
Share on other sites

Ok. Will try this one to see if I can get vehicles in-game. :)

Thanks!

Share this post


Link to post
Share on other sites

Hey Takko!

THANKS (again) for your work in the PM. :) I've opted to ask some questions here, in case others can learn from them, too. If you'd rather do this via PM, just let me know.

I noticed you have the cfgModels section in the config.bin? Or did it do that automatically when you pbo'd it? I thought it needed to be separate for some reason?

(And thanks again.) :)

Share this post


Link to post
Share on other sites

That is because of the bin.pbo compressing pbo effect. I'm going to send you a link to the clean the folder now.

Share this post


Link to post
Share on other sites

Thanks for this, i've always wanted to attempt my own addons :)

Share this post


Link to post
Share on other sites

S*** man were you been with this when i need it heheh

i am strugguling learning UV mapping new skins on models (like vehicles details) want to learn that badly i've seen simple example on wall model and i get how it suppose to work however, details on vehicles brain freeze

can you do tutorial on that but only little bit complex vehicle

thanks

SRat

Share this post


Link to post
Share on other sites

In regards to the picture where it says "if enabled, your textures will show up (maybe)". The textures have to be in .TGA format, and they will appear in the O2 window. If the textures are .PAA they will not.

Share this post


Link to post
Share on other sites
maxspeed = 40; Maximum speed in km/h. You are free to replace the number at will. Note: A maximum of 120 is possible.

can the speed max be increased for wheeled vehicles? say to 400 km/h? We have delayed finishing a custom mission due to missing this capability.

The 'stuntman' is grounded. :j:

Share this post


Link to post
Share on other sites

The 120 is hardcoded, you cant reach higher speeds through the config.

Through some smart scripting you could give the speed you want to your stuntman.

Share this post


Link to post
Share on other sites

if you go to page 1. someone has added his tutorial to there website. It is available there bud.

Share this post


Link to post
Share on other sites

How to add the add-on car into the ALICE module(Ambient Civilian Vehicle)so the game will spawn the car by itself

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×