Jump to content
Sign in to follow this  
rip31st

I need config.cpp & model.cfg help

Recommended Posts

I'm currently making this WWII LMC(3) type landing craft:

lcm311.jpg

lcm313.jpg

lcm310.jpg

lcm37.jpg

The first problem I'm having with it as you can see the .50 cal M2's once it's late evening display that they are constantly firing when they are not.

Second problem: Can't get turrets to move...they fire, but won't move.

Third problem:  Gunner's positions are both named "S" in action menu when you go to move from drivers, cargo or other gunner's position.

Fourth problem:  I HAVE ABSOLUTELY NO CLUE WHAT I'M DOING...HELP!!!!  

I took the config.cpp and model.cfg as a template and hacked it together somewhat using my p3d model to get it into the game...haha.  Ya I know what you're thinking...NOOB! right.  Anyway.  I've looked and looked around, searched tons of sites and I really haven't found anything out there that will help me in my quest, so I'm asking here.  I've seen some mutiple turret examples out there that just don't make sense to me.  So is there anybody out there that can help me tweak this config.cpp and model.cfg?

Here's what I want to do:

1. Create my own class.  Right now if you plop this into the game it shows up under the "ship" class and replaces one of the RHIB's. I would like to call my class "rip31st".  I don't want any other vehicles in my class, just this one.  Right now there's four total as you will see in the config.cpp below.

2. Get both turrets to work and rotate.  I'm trying to figure this out and I've been racking my head on the wall  banghead.gif  doing it.  I just don't see where stuff lines up in the config.cpp and model.cfg to make it all happen.  I'm probably missing some minor overlooked detail.

3. Get the gunner's names right.  As stated about they come out as "S" in game.  ie. "get into "S" " position.  You can clearly see in my config.cpp they are named left and right gunners.

4.  Fix the look of the M2's firing all the time.  This only happens when it's dawn, dusk or night.  Doesn't happen duing the day.  

config.cpp ( or as I call it...headache.cpp  wink_o.gif  ):

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class CfgPatches

{

class CAWater

{

units[] =

{

"Zodiac","RHIB","rip31st_lcm3","PBX"

};

weapons[] = {};

requiredVersion = 0.10;

requiredAddons[] = {"CAData","CACharacters","CAWeapons","CA_Anims_Char"};

};

};

#define mag_xx(a,b) class _xx_##a {magazine = a; count = b;}

#define weap_xx(a,b) class _xx_##a {weapon = a; count = b;}

#define DefaultWestMagazines(x) \

class TransportMagazines \

{ \

mag_xx(30Rnd_556x45_Stanag,30*x); \

mag_xx(200Rnd_556x45_M249,5*x); \

mag_xx(HandGrenadeTimed,10*x); \

mag_xx(5Rnd_762x51_M24,10*x); \

mag_xx(15rnd_9x19_M9,15*x); \

mag_xx(M136,3*x); \

mag_xx(1Rnd_HE_M203,3*x); \

};

#define DefaultEastMagazines(x) \

class TransportMagazines \

{ \

mag_xx(30Rnd_545x39_AK,30*x); \

mag_xx(100Rnd_762x54_PK,5*x); \

mag_xx(8Rnd_9x18_Makarov,20*x); \

mag_xx(HandGrenade,10*x); \

mag_xx(10Rnd_762x54_SVD,10*x); \

mag_xx(PG7VR,3*x); \

mag_xx(1Rnd_HE_GP25,3*x); \

};

#define DefaultGuerMagazines(x) \

class TransportMagazines \

{ \

mag_xx(30Rnd_556x45_Stanag,30*x); \

mag_xx(30Rnd_9x19_MP5,15*x); \

mag_xx(HandGrenade,10*x); \

mag_xx(100Rnd_762x51_M240,5*x); \

mag_xx(15rnd_9x19_M9,15*x); \

mag_xx(M136,3*x); \

mag_xx(1Rnd_HE_M203,3*x); \

};

#include "basicDefines.hpp"

#include "CrewAnimations.hpp"

class CfgVehicles

{

class AllVehicles;

class Ship: AllVehicles

{

unitInfoType=UnitInfoCar; //By default no hud information

class HitEngine {armor=1.2;material=60;name="motor";visual="motor";passThrough=1;}

class NewTurret;

class Turrets;

nameSound = "boat";

enableGPS = false;

class MarkerLights

{

class RedStill

{

name = "cerveny pozicni";

color[] = {1.0, 0.1, 0.1, 1};

ambient[] = {0.1, 0.01, 0.01, 1};

brightness = 0.01;

blinking = false;

};

class GreenStill

{

name = "zeleny pozicni";

color[] = {0.1, 1.0, 0.1, 1};

ambient[] = {0.01, 0.1, 0.01, 1};

brightness = 0.01;

blinking = false;

};

class WhiteStill

{

name = "bily pozicni";

color[] = {1.0, 1.0, 1.0, 1};

ambient[] = {0.1, 0.1, 0.1, 1};

brightness = 0.01;

blinking = false;

};

};

precision=10;

};

class Boat: Ship

{

// boats are quite able to maneuver precisely and brake fast

precision=6;

brakeDistance=20;

};

class RHIB: Boat

{

scope=2;

displayName=$STR_DN_RHIB;

accuracy=0.50;

crew = SoldierWB;

side=TWest;

model="\ca\water\rhib";

picture="\ca\water\data\ico\rhib_CA.paa";

Icon="\Ca\water\Data\map_ico\icomap_RHIB_CA.paa";

mapSize = 8;

unitInfoType=UnitInfoShip;

soundEngine[] = {\ca\Water\Data\Sound\RHIB_1, db18, 0.8};

soundEnviron[] = {\ca\Water\Data\Sound\Water_v5, db-45, 1.0};

driverAction = RHIB_Driver;

cargoAction[] = {RHIB_Cargo};

hasGunner = true;

castDriverShadow=true;

castCargoShadow=true;

gunnerHasFlares = false;

maxSpeed=60;

enableGPS = true;

transportSoldier = 10;

typicalCargo[]={SoldierWB,SoldierWAT};

supplyRadius = 3;

class Exhausts

{

class Exhaust1

{

position = "vyfuk start";

direction = "vyfuk konec";

effect = "";

};

};

DefaultWestMagazines(1)

cost=10000;

armor=30;

class AnimationSources

{

class belt_rotation

{

source="reload";

weapon="M2";

};

};

class Turrets: Turrets

{

class MainTurret: NewTurret

{

class HitTurret {armor=0.8;material=60;name="vez";visual="vez";passThrough=1;};

class HitGun {armor=0.6;material=60;name="zbran";visual="zbran";passThrough=1;};

body = "MainTurret";

gun = "MainGun";

animationSourceBody = "mainTurret";

animationSourceGun = "mainGun";

gunnerAction = RHIB_Gunner;

ejectDeadGunner = true;

outGunnerMayFire = 1;

inGunnerMayFire = 0;

minElev=-25; maxElev=+60; initElev=5;

minTurn=-135; maxTurn=135; initTurn=0;

soundServo[]={,db-40,1.0};

gunBeg = "usti hlavne"; //gunBeg = endpoint of the gun

gunEnd = "konec hlavne"; //gunEnd = chamber of the gun

weapons[]={M2};

magazines[]={100Rnd_127x99_M2,100Rnd_127x99_M2,100Rnd_127x99_M2};

gunnerName = $STR_POSITION_RIGHTGUNNER;

gunnerOpticsModel = "\ca\weapons\optika_empty";

gunnerForceOptics = 0;

startEngine = 0;

class ViewOptics

{

initAngleX=0; minAngleX=-30; maxAngleX=+30;

initAngleY=0; minAngleY=-100; maxAngleY=+100;

initFov=0.42; minFov=0.22; maxFov=0.64;

};

class ViewGunner

{

initAngleX=5; minAngleX=-30; maxAngleX=+30;

initAngleY=0; minAngleY=0; maxAngleY=0;

initFov=0.42; minFov=0.22; maxFov=0.95;

};

};

};

class Library

{

  libTextDesc = $STR_LIB_RHIB;

};

extCameraPosition[]={0,4.0,-14.0};

class Damage

{

tex[]={};

mat[]={

"ca\water\data\rhib.rvmat",

"ca\water\data\rhib.rvmat",

"ca\water\data\rhib_destruct.rvmat",

"ca\water\data\rhib_dash.rvmat",

"ca\water\data\rhib_dash.rvmat",

"ca\water\data\rhib_dash_destruct.rvmat"

};

};

};

class rip31st_lcm3: RHIB

{

displayName="WW2 LCM(3) Landing Craft";

model="\rip31st_lcm3\rip31st_lcm3";

transportSoldier = 62;

class Turrets: Turrets

{

class MainTurret: MainTurret {};

class BackTurret: MainTurret

{

body = "Turret_2";

gun = "Gun_2";

animationSourceBody = "Turret_2";

animationSourceGun = "Gun_2";

animationSourceHatch = "";

selectionFireAnim = "zasleh_1";

proxyIndex = 2;

gunnerName = $STR_POSITION_LEFTGUNNER;

commanding = -2;

gunnerOpticsModel = "\ca\weapons\optika_empty";

minElev=-50; maxElev=+25; initElev=-5;

minTurn=120; maxTurn=240; initTurn=180;

weapons[]={M2};

magazines[]={100Rnd_127x99_M2,100Rnd_127x99_M2,100Rnd_127x99_M2};

gunBeg = "usti hlavne_1"; //gunBeg = endpoint of the gun

gunEnd = "konec hlavne_1"; //gunEnd = chamber of the gun

primaryGunner = 0;

primary = 0;

memoryPointGun = "kulas_1";

memoryPointGunnerOptics= "gunnerview_1";

};

};

class Damage

{

tex[]={};

mat[]={

"ca\water\data\rhib.rvmat",

"ca\water\data\rhib.rvmat",

"ca\water\data\rhib_destruct.rvmat",

"ca\water\data\rhib_dash.rvmat",

"ca\water\data\rhib_dash.rvmat",

"ca\water\data\rhib_dash_destruct.rvmat"

};

};

};

class Zodiac: Boat

{

scope=2;

side = 1;

displayName=$STR_DN_ZODIAC;

accuracy=0.50;

crew = SoldierWB;

model="\ca\water\zodiac";

picture="\ca\water\data\ico\zodiac_CA.paa";

Icon="\Ca\water\Data\map_ico\icomap_rubber_CA.paa";

mapSize = 6;

soundEngine[] = {\ca\Water\Data\Sound\Zodiac_engine_v1, db10, 1.0};

soundEnviron[] = {\ca\Water\Data\Sound\Water_v5_best, db-45, 0.95};

driverAction = Zodiac_Driver;

cargoAction[] = {Zodiac_Cargo01,Zodiac_Cargo02,Zodiac_Cargo03,Zodiac_Cargo04};

castDriverShadow=true;

castCargoShadow=true;

ejectDeadCargo = true;

ejectDeadDriver = true;

hasGunner = 0;

class Turrets {};

maxSpeed=60;

transportSoldier = 4;

typicalCargo[]={SoldierWB,SoldierWAT};

class Exhausts

{

class Exhaust1

{

position = "vyfuk start";

direction = "vyfuk konec";

effect = "";

};

};

supplyRadius = 2;

class DestructionEffects

{};

DefaultWestMagazines(1)

cost=10000;

armor=20;

class Library

{

  libTextDesc = $STR_LIB_ZODIAC;

};

// quite small, no need to have camera very far

extCameraPosition[]={0,1.5,-4.0};

class Damage

{

tex[]={};

mat[]={

"ca\water\data\zodiac_engine.rvmat",

"ca\water\data\zodiac_engine.rvmat",

"ca\water\data\zodiac_engine_destruct.rvmat",

"ca\water\data\zodiac_guma.rvmat",

"ca\water\data\zodiac_guma.rvmat",

"ca\water\data\zodiac_guma_destruct.rvmat",

"ca\water\data\zodiac_gumb.rvmat",

"ca\water\data\zodiac_gumb.rvmat",

"ca\water\data\zodiac_gumb_destruct.rvmat",

"ca\water\data\zodiac_trup.rvmat",

"ca\water\data\zodiac_trup.rvmat",

"ca\water\data\zodiac_trup_destruct.rvmat"

};

};

};

class Zodiac2: Zodiac

{

displayName=$STR_DN_ZODIAC_RACS;

side = 2;

crew = SoldierGB;

typicalCargo[]={SoldierGB,SoldierGAT};

};

class PBX: Zodiac

{

displayName=$STR_DN_BOAT;

model="\ca\water\PBX";

picture="\ca\water\data\ico\pbx_CA.paa";

Icon="\Ca\water\Data\map_ico\icomap_rubber_CA.paa";

mapSize = 6;

scope=2;

transportSoldier = 3;

typicalCargo[]={SoldierEB,SoldierEAT};

driverAction = PBX_Driver;

cargoAction[] = {PBX_Cargo01,PBX_Cargo02,PBX_Cargo03};

side=TEast;

maxSpeed=65;

crew = SoldierEB;

DefaultEastMagazines(1)

class Library

{

  libTextDesc = $STR_LIB_BOAT;

};

extCameraPosition[]={0,4.0,-14.0};

class Damage

{

tex[]={};

mat[]={

"ca\water\data\pbx_engine.rvmat",

"ca\water\data\pbx_engine.rvmat",

"ca\water\data\pbx_engine_destruct.rvmat",

"ca\water\data\pbx_01.rvmat",

"ca\water\data\pbx_01.rvmat",

"ca\water\data\pbx_01_destruct.rvmat",

"ca\water\data\pbx_02.rvmat",

"ca\water\data\pbx_02.rvmat",

"ca\water\data\pbx_02_destruct.rvmat"

};

};

};

};

class CfgNonAIVehicles

{

class ProxyFlag;

class ProxyFlag_Auto: ProxyFlag {model = "\ca\water\flag_auto";}

class ProxyFlag_Alone: ProxyFlag {model = "\ca\water\flag_alone";}

class ProxyFlag_Alone_Big: ProxyFlag {model = "\ca\water\flag_alone_big";}

};

and the model.cfg:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class CfgSkeletons

{

class Vehicle;

class Ship: Vehicle

{

skeletonInherit="Vehicle";

skeletonBones[]=

{

"otocvez",

"",

"otochlaven",

"otocvez",

"volant",

"",

"radar",

""

};

};

class Rhib: Ship

{

skeletonInherit="Ship";

skeletonBones[]=

{

"kompas",

"",

"fuel",

"",

"hodinova",

"",

"minutova",

"",

"mph",

"",

"rpm",

"",

"rpm2",

"",

"ammo_box",

"OtocHlaven",

"ammo_belt",

"OtocHlaven"

};

};

class rip31st_lcm3: Ship

{

skeletonInherit="Rhib";

skeletonBones[]=

{

"otocvez_1",

"",

"otochlaven_1",

"otocvez_1"

};

};

class Zodiac: Ship

{

skeletonInherit="Ship";

skeletonBones[]=

{

"vrtule",

"volant"

};

};

};

class Rotation;

class CfgModels

{

class Default;

class Ship: Default

{

sectionsInherit="Vehicle";

sections[]=

{

"zadni svetlo",

"motor",

"zbran",

"vez"

};

skeletonName="Ship";

class Animations

{

class Radar

{

type="rotation";

source="time";

selection="radar";

axis="osa radaru";

minValue=0;

maxValue=12.500000;

sourceAddress="loop";

angle0=0;

angle1="rad 360";

};

class DrivingWheel

{

type="rotation";

source="drivingWheel";

selection="volant";

begin="osaVolantZac";

end="osaVolantKon";

memory="false";

minValue=-1;

maxValue=1;

angle0=2;

angle1=-2;

};

};

};

class Zodiac: Ship

{

skeletonName="Zodiac";

class Animations

{

class vrtule: Rotation

{

type="rotation";

source="rotor";

selection="vrtule";

axis="osa vrtule";

sourceAddress="loop";

angle0=0.000000;

angle1=62.831852;

};

};

};

class PBX: Zodiac

{

};

class RHIB: Ship

{

skeletonName="rhib";

class Animations: Animations

{

class MainTurret

{

type="rotationY";

source="mainTurret";

selection="OtocVez";

axis="OsaVeze";

animPeriod=0;

minValue="rad -360";

maxValue="rad +360";

angle0="rad -360";

angle1="rad +360";

};

class MainGun: MainTurret

{

type="rotationX";

source="mainGun";

selection="OtocHlaven";

axis="OsaHlavne";

};

class IndicatorCompass: Rotation

{

source="direction";

selection="kompas";

axis="osa_kompas";

memory=0;

minValue=-3.141590;

maxValue=3.141590;

angle0=-3.141593;

angle1=3.141593;

};

class fuel: Rotation

{

source="fuel";

selection="fuel";

axis="osa_fuel";

memory=0;

angle0=2.007129;

angle1=0.000000;

};

class hodinova: Rotation

{

source="clockHour";

selection="hodinova";

axis="osa_time";

memory=0;

angle0=0.000000;

angle1=6.283185;

};

class minutova: Rotation

{

source="clockMinute";

selection="minutova";

axis="osa_time";

memory=0;

angle0=0.000000;

angle1=6.283185;

};

class mph: Rotation

{

source="speed";

selection="mph";

axis="osa_mph";

memory=0;

angle0=0.000000;

angle1=4.712389;

};

class rpm: Rotation

{

source="rpm";

selection="rpm";

axis="osa_rpm";

memory=0;

angle0=0.000000;

angle1=4.712389;

};

class rpm2: rpm

{

selection="rpm2";

axis="osa_rpm2";

memory=0;

};

class DrivingWheel: DrivingWheel

{

angle0=-2.000147;

angle1=2.000147;

};

class ammo_belt_rotation

{

type="rotationZ";

source="belt_rotation";

selection="ammo_belt";

axis="ammo_belt_axis";

memory=1;

sourceAddress="loop";

minValue=0.000000;

maxValue=0.010000;

angle0=0.000000;

angle1=-0.209440;

};

};

};

class rip31st_lcm3: RHIB

{

sectionsInherit="Ship";

sections[]=

{

"zasleh_1"

};

skeletonName="Ship2Turrets";

class Animations: Animations

{

class Turret_2: MainTurret

{

source="Turret_2";

selection="OtocVez_1";

axis="OsaVeze_1";

};

class Gun_2: MainGun

{

source="Gun_2";

selection="OtocHlaven_1";

axis="OsaHlavne_1";

};

};

};

};

So fire away  pistols.gif   I'm open for constructive critisism.  

And as always I'm thankful for all the help I get from the code gurus  notworthy.gif

thx!

Share this post


Link to post
Share on other sites

Will need to know the named sections of your model before can even start

eg

- What the main part of the MGs called (normally something like OtocHlaven1 and OtocHlaven2)

- What are the swivel base of the MGs called (normally something like OtocVez1 and OtocVez2)

- What is the "flash" section of your MGs called

Share this post


Link to post
Share on other sites

Let's see I've got this in the memory LOD:

rightgunner:

gunnerview(self explanatory)

konec hlavne (beginning of barrel where the bullets start from)

usti hlavne (end of barrel wher bullets travel out)

ammo_belt_axis(self explanatory)

nabojnicestart(I think where the spent shells exit the chamber)

nabojniceend (I think where shells get ejected to)

OsaHlavne( I think this is the left and right axis on the weapon

that allow it to pivot up and down)

osaveze( I think this is the top and bottom axis centered just

below the weapon that allow it to pivot right and left)

OtocHlaven( combination of gunnerview,usti hlavne,konec hlavne,nabojnicestart & nabojniceend ) - not sure what this does.

OtocVez (combination of OtocHlaven and OsaHlavne) -not sure what this does

Leftgunner:

Just append a _1 to the end of all named selections.

ei. gunnerview_1

etc...

In the 0.000 LOD I've got Zasleh and Zasleh_1 for the gunflashes.

BTW in my 0.000 LOD both guns have the same names for the named selections...Is that a problem?

ei. both ammo boxes on both guns are named ammo_box

Share this post


Link to post
Share on other sites
BTW in my 0.000 LOD both guns have the same names for the named selections...Is that a problem?

No, but thats the bit I was more interested in, not the Memory LOD

Are the parts of the gun named OtocHlaven and OtocHlaven_1 and OtocVez and OtocVez_1 ?

Share this post


Link to post
Share on other sites

Yes they are named like that. They are different in both the 0.000 and memory LOD

Share this post


Link to post
Share on other sites

Ok, well first off your model.cfg HAS to be a lot simpler.

And because you are generally using BIS default turret definitions, it can be even simpler.

Try this and see of the turrets start moving;

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class CfgSkeletons

{

class Ship2Turrets;

class MyShipX: Ship2Turrets

{

isDiscrete=1;

skeletonInherit="Rhib";

skeletonBones[]=

{

"otocvez_1",

"",

"otochlaven_1",

"otocvez_1"

};

};

};

class CfgModels

{

class RHIB_gunboat;

class MyShip: RHIB_gunboat

{

sectionsInherit="Ship";

sections[]=

{

"zasleh_1"

};

skeletonName="MyShipX";

class Animations: Animations

{

class Turret_2: MainTurret

{

source="Turret_2";

selection="OtocVez_1";

axis="OsaVeze_1";

};

class Gun_2: MainGun

{

source="Gun_2";

selection="OtocHlaven_1";

axis="OsaHlavne_1";

};

};

};

};

Share this post


Link to post
Share on other sites

Nope, no dice! I just want to pull my hair out! LOL

Hey btw I saw you're active cargo deal.  That's totally cool!  I will be looking forward to using it on this ship!

does something on my model have to be named gun_1 or gun_2? or turret_1 or turret_2?

Share this post


Link to post
Share on other sites
Nope, no dice! I just want to pull my hair out! LOL

Hey btw I saw you're active cargo deal.  That's totally cool!  I will be looking forward to using it on this ship!

does something on my model have to be named gun_1 or gun_2? or turret_1 or turret_2?

No, I dont believe so.

Sorry, not sure the answer here, this is not a 5 minute process, it took me weeks to get my own turrets working.

Share this post


Link to post
Share on other sites

Well to get it to work I had to make my boat a sub-class of it's own like the 2 turret RHIB is a sub-class that inherhits the bones of the plane jane RHIB with the single 50 cal on the front. Then the guns started moving although in first person view the left gun's barrel doesn't follow the weapons cursor. I think that's probably my error with the naming of the moving parts. Now I've got to figure out how to condense it all and make it my own class.

Here's what I got:

config.cpp

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class CfgPatches

{

class CAWater

{

units[] =

{

"Zodiac","rip31st_lcm","rip31st_lcm3","PBX"

};

weapons[] = {};

requiredVersion = 0.10;

requiredAddons[] = {"CAData","CACharacters","CAWeapons","CA_Anims_Char"};

};

};

#define mag_xx(a,b) class _xx_##a {magazine = a; count = b;}

#define weap_xx(a,b) class _xx_##a {weapon = a; count = b;}

#define DefaultWestMagazines(x) \

class TransportMagazines \

{ \

mag_xx(30Rnd_556x45_Stanag,30*x); \

mag_xx(200Rnd_556x45_M249,5*x); \

mag_xx(HandGrenadeTimed,10*x); \

mag_xx(5Rnd_762x51_M24,10*x); \

mag_xx(15rnd_9x19_M9,15*x); \

mag_xx(M136,3*x); \

mag_xx(1Rnd_HE_M203,3*x); \

};

#define DefaultEastMagazines(x) \

class TransportMagazines \

{ \

mag_xx(30Rnd_545x39_AK,30*x); \

mag_xx(100Rnd_762x54_PK,5*x); \

mag_xx(8Rnd_9x18_Makarov,20*x); \

mag_xx(HandGrenade,10*x); \

mag_xx(10Rnd_762x54_SVD,10*x); \

mag_xx(PG7VR,3*x); \

mag_xx(1Rnd_HE_GP25,3*x); \

};

#define DefaultGuerMagazines(x) \

class TransportMagazines \

{ \

mag_xx(30Rnd_556x45_Stanag,30*x); \

mag_xx(30Rnd_9x19_MP5,15*x); \

mag_xx(HandGrenade,10*x); \

mag_xx(100Rnd_762x51_M240,5*x); \

mag_xx(15rnd_9x19_M9,15*x); \

mag_xx(M136,3*x); \

mag_xx(1Rnd_HE_M203,3*x); \

};

#include "basicDefines.hpp"

#include "CrewAnimations.hpp"

class CfgVehicles

{

class AllVehicles;

class Ship: AllVehicles

{

unitInfoType=UnitInfoCar; //By default no hud information

class HitEngine {armor=1.2;material=60;name="motor";visual="motor";passThrough=1;}

class NewTurret;

class Turrets;

nameSound = "boat";

enableGPS = false;

class MarkerLights

{

class RedStill

{

name = "cerveny pozicni";

color[] = {1.0, 0.1, 0.1, 1};

ambient[] = {0.1, 0.01, 0.01, 1};

brightness = 0.01;

blinking = false;

};

class GreenStill

{

name = "zeleny pozicni";

color[] = {0.1, 1.0, 0.1, 1};

ambient[] = {0.01, 0.1, 0.01, 1};

brightness = 0.01;

blinking = false;

};

class WhiteStill

{

name = "bily pozicni";

color[] = {1.0, 1.0, 1.0, 1};

ambient[] = {0.1, 0.1, 0.1, 1};

brightness = 0.01;

blinking = false;

};

};

precision=10;

};

class Boat: Ship

{

// boats are quite able to maneuver precisely and brake fast

precision=6;

brakeDistance=20;

};

class rip31st_lcm: Boat

{

scope=2;

displayName=$STR_DN_rip31st_lcm;

accuracy=0.50;

crew = SoldierWB;

side=TWest;

model="\rip31st_lcm3\rip31st_lcm3";

mapSize = 8;

unitInfoType=UnitInfoShip;

soundEngine[] = {\ca\Water\Data\Sound\RHIB_1, db18, 0.8};

soundEnviron[] = {\ca\Water\Data\Sound\Water_v5, db-45, 1.0};

driverAction = RHIB_Driver;

cargoAction[] = {RHIB_Cargo};

hasGunner = true;

castDriverShadow=true;

castCargoShadow=true;

gunnerHasFlares = false;

maxSpeed=60;

enableGPS = true;

transportSoldier = 62;

typicalCargo[]={SoldierWB,SoldierWAT};

supplyRadius = 3;

class Exhausts

{

class Exhaust1

{

position = "vyfuk start";

direction = "vyfuk konec";

effect = "";

};

};

DefaultWestMagazines(1)

cost=10000;

armor=30;

class AnimationSources

{

class belt_rotation

{

source="reload";

weapon="M2";

};

};

class Turrets: Turrets

{

class MainTurret: NewTurret

{

class HitTurret {armor=0.8;material=60;name="vez";visual="vez";passThrough=1;};

class HitGun {armor=0.6;material=60;name="zbran";visual="zbran";passThrough=1;};

body = "MainTurret";

gun = "MainGun";

animationSourceBody = "mainTurret";

animationSourceGun = "mainGun";

gunnerAction = RHIB_Gunner;

ejectDeadGunner = true;

outGunnerMayFire = 1;

inGunnerMayFire = 0;

minElev=-25; maxElev=+60; initElev=5;

minTurn=-135; maxTurn=135; initTurn=0;

soundServo[]={,db-40,1.0};

gunBeg = "usti hlavne"; //gunBeg = endpoint of the gun

gunEnd = "konec hlavne"; //gunEnd = chamber of the gun

weapons[]={M2};

magazines[]={100Rnd_127x99_M2,100Rnd_127x99_M2,100Rnd_127x99_M2};

gunnerName = RIGHT GUNNER;

gunnerOpticsModel = "\ca\weapons\optika_empty";

gunnerForceOptics = 0;

startEngine = 0;

class ViewOptics

{

initAngleX=0; minAngleX=-30; maxAngleX=+30;

initAngleY=0; minAngleY=-100; maxAngleY=+100;

initFov=0.42; minFov=0.22; maxFov=0.64;

};

class ViewGunner

{

initAngleX=5; minAngleX=-30; maxAngleX=+30;

initAngleY=0; minAngleY=0; maxAngleY=0;

initFov=0.42; minFov=0.22; maxFov=0.95;

};

};

};

class Library

{

libTextDesc = $STR_LIB_RHIB;

};

extCameraPosition[]={0,4.0,-14.0};

class Damage

{

tex[]={};

mat[]={

"ca\water\data\RHIB.rvmat",

"ca\water\data\RHIB.rvmat",

"ca\water\data\RHIB_destruct.rvmat",

"ca\water\data\RHIB_dash.rvmat",

"ca\water\data\RHIB_dash.rvmat",

"ca\water\data\RHIB_dash_destruct.rvmat"

};

};

};

class rip31st_lcm3: rip31st_lcm

{

displayName="WW2 LCM(3) Landing Craft";

model="\rip31st_lcm3\rip31st_lcm3";

maxspeed=60;

transportSoldier = 62;

class Turrets: Turrets

{

class MainTurret: MainTurret {};

class BackTurret: MainTurret

{

body = "Turret_2";

gun = "Gun_2";

animationSourceBody = "Turret_2";

animationSourceGun = "Gun_2";

animationSourceHatch = "";

selectionFireAnim = "zasleh_1";

proxyIndex = 2;

gunnerName = LEFT GUNNER;

commanding = -2;

gunnerOpticsModel = "\ca\weapons\optika_empty";

minElev=-25; maxElev=+60; initElev=5;

minTurn=-135; maxTurn=135; initTurn=0;

weapons[]={M2};

magazines[]={100Rnd_127x99_M2,100Rnd_127x99_M2,100Rnd_127x99_M2};

gunBeg = "usti hlavne_1"; //gunBeg = endpoint of the gun

gunEnd = "konec hlavne_1"; //gunEnd = chamber of the gun

primaryGunner = 0;

primary = 0;

memoryPointGun = "kulas_1";

memoryPointGunnerOptics= "gunnerview_1";

};

};

class Damage

{

tex[]={};

mat[]={

"ca\water\data\RHIB.rvmat",

"ca\water\data\RHIB.rvmat",

"ca\water\data\RHIB_destruct.rvmat",

"ca\water\data\RHIB_dash.rvmat",

"ca\water\data\RHIB_dash.rvmat",

"ca\water\data\RHIB_dash_destruct.rvmat"

};

};

};

class Zodiac: Boat

{

scope=2;

side = 1;

displayName=$STR_DN_ZODIAC;

accuracy=0.50;

crew = SoldierWB;

model="\ca\water\zodiac";

picture="\ca\water\data\ico\zodiac_CA.paa";

Icon="\Ca\water\Data\map_ico\icomap_rubber_CA.paa";

mapSize = 6;

soundEngine[] = {\ca\Water\Data\Sound\Zodiac_engine_v1, db10, 1.0};

soundEnviron[] = {\ca\Water\Data\Sound\Water_v5_best, db-45, 0.95};

driverAction = Zodiac_Driver;

cargoAction[] = {Zodiac_Cargo01,Zodiac_Cargo02,Zodiac_Cargo03,Zodiac_Cargo04};

castDriverShadow=true;

castCargoShadow=true;

ejectDeadCargo = true;

ejectDeadDriver = true;

hasGunner = 0;

class Turrets {};

maxSpeed=60;

transportSoldier = 4;

typicalCargo[]={SoldierWB,SoldierWAT};

class Exhausts

{

class Exhaust1

{

position = "vyfuk start";

direction = "vyfuk konec";

effect = "";

};

};

supplyRadius = 2;

class DestructionEffects

{};

DefaultWestMagazines(1)

cost=10000;

armor=20;

class Library

{

libTextDesc = $STR_LIB_ZODIAC;

};

// quite small, no need to have camera very far

extCameraPosition[]={0,1.5,-4.0};

class Damage

{

tex[]={};

mat[]={

"ca\water\data\zodiac_engine.rvmat",

"ca\water\data\zodiac_engine.rvmat",

"ca\water\data\zodiac_engine_destruct.rvmat",

"ca\water\data\zodiac_guma.rvmat",

"ca\water\data\zodiac_guma.rvmat",

"ca\water\data\zodiac_guma_destruct.rvmat",

"ca\water\data\zodiac_gumb.rvmat",

"ca\water\data\zodiac_gumb.rvmat",

"ca\water\data\zodiac_gumb_destruct.rvmat",

"ca\water\data\zodiac_trup.rvmat",

"ca\water\data\zodiac_trup.rvmat",

"ca\water\data\zodiac_trup_destruct.rvmat"

};

};

};

class Zodiac2: Zodiac

{

displayName=$STR_DN_ZODIAC_RACS;

side = 2;

crew = SoldierGB;

typicalCargo[]={SoldierGB,SoldierGAT};

};

class PBX: Zodiac

{

displayName=$STR_DN_BOAT;

model="\ca\water\PBX";

picture="\ca\water\data\ico\pbx_CA.paa";

Icon="\Ca\water\Data\map_ico\icomap_rubber_CA.paa";

mapSize = 6;

scope=2;

transportSoldier = 3;

typicalCargo[]={SoldierEB,SoldierEAT};

driverAction = PBX_Driver;

cargoAction[] = {PBX_Cargo01,PBX_Cargo02,PBX_Cargo03};

side=TEast;

maxSpeed=65;

crew = SoldierEB;

DefaultEastMagazines(1)

class Library

{

libTextDesc = $STR_LIB_BOAT;

};

extCameraPosition[]={0,4.0,-14.0};

class Damage

{

tex[]={};

mat[]={

"ca\water\data\pbx_engine.rvmat",

"ca\water\data\pbx_engine.rvmat",

"ca\water\data\pbx_engine_destruct.rvmat",

"ca\water\data\pbx_01.rvmat",

"ca\water\data\pbx_01.rvmat",

"ca\water\data\pbx_01_destruct.rvmat",

"ca\water\data\pbx_02.rvmat",

"ca\water\data\pbx_02.rvmat",

"ca\water\data\pbx_02_destruct.rvmat"

};

};

};

};

class CfgNonAIVehicles

{

class ProxyFlag;

class ProxyFlag_Auto: ProxyFlag {model = "\ca\water\flag_auto";}

class ProxyFlag_Alone: ProxyFlag {model = "\ca\water\flag_alone";}

class ProxyFlag_Alone_Big: ProxyFlag {model = "\ca\water\flag_alone_big";}

};

model.cfg

class CfgSkeletons

{

class Vehicle;

class Ship: Vehicle

{

skeletonInherit="Vehicle";

skeletonBones[]=

{

"otocvez",

"",

"otochlaven",

"otocvez",

"volant",

"",

"radar",

""

};

};

class rip31st_lcm: Ship

{

skeletonInherit="Ship";

skeletonBones[]=

{

"kompas",

"",

"fuel",

"",

"hodinova",

"",

"minutova",

"",

"mph",

"",

"rpm",

"",

"rpm2",

"",

"ammo_box",

"OtocHlaven",

"ammo_belt",

"OtocHlaven"

};

};

class rip31st_lcm3: Ship

{

skeletonInherit="rip31st_lcm";

skeletonBones[]=

{

"otocvez_1",

"",

"otochlaven_1",

"otocvez_1"

};

};

class Zodiac: Ship

{

skeletonInherit="Ship";

skeletonBones[]=

{

"vrtule",

"volant"

};

};

};

class Rotation;

class CfgModels

{

class Default;

class Ship: Default

{

sectionsInherit="Vehicle";

sections[]=

{

"zadni svetlo",

"motor",

"zbran",

"vez"

};

skeletonName="Ship";

class Animations

{

class Radar

{

type="rotation";

source="time";

selection="radar";

axis="osa radaru";

minValue=0;

maxValue=12.500000;

sourceAddress="loop";

angle0=0;

angle1="rad 360";

};

class DrivingWheel

{

type="rotation";

source="drivingWheel";

selection="volant";

begin="osaVolantZac";

end="osaVolantKon";

memory="false";

minValue=-1;

maxValue=1;

angle0=2;

angle1=-2;

};

};

};

class Zodiac: Ship

{

skeletonName="Zodiac";

class Animations

{

class vrtule: Rotation

{

type="rotation";

source="rotor";

selection="vrtule";

axis="osa vrtule";

sourceAddress="loop";

angle0=0.000000;

angle1=62.831852;

};

};

};

class PBX: Zodiac

{

};

class rip31st_lcm: Ship

{

skeletonName="rip31st_lcm";

class Animations: Animations

{

class MainTurret

{

type="rotationY";

source="mainTurret";

selection="OtocVez";

axis="OsaVeze";

animPeriod=0;

minValue="rad -360";

maxValue="rad +360";

angle0="rad -360";

angle1="rad +360";

};

class MainGun: MainTurret

{

type="rotationX";

source="mainGun";

selection="OtocHlaven";

axis="OsaHlavne";

};

class IndicatorCompass: Rotation

{

source="direction";

selection="kompas";

axis="osa_kompas";

memory=0;

minValue=-3.141590;

maxValue=3.141590;

angle0=-3.141593;

angle1=3.141593;

};

class fuel: Rotation

{

source="fuel";

selection="fuel";

axis="osa_fuel";

memory=0;

angle0=2.007129;

angle1=0.000000;

};

class hodinova: Rotation

{

source="clockHour";

selection="hodinova";

axis="osa_time";

memory=0;

angle0=0.000000;

angle1=6.283185;

};

class minutova: Rotation

{

source="clockMinute";

selection="minutova";

axis="osa_time";

memory=0;

angle0=0.000000;

angle1=6.283185;

};

class mph: Rotation

{

source="speed";

selection="mph";

axis="osa_mph";

memory=0;

angle0=0.000000;

angle1=4.712389;

};

class rpm: Rotation

{

source="rpm";

selection="rpm";

axis="osa_rpm";

memory=0;

angle0=0.000000;

angle1=4.712389;

};

class rpm2: rpm

{

selection="rpm2";

axis="osa_rpm2";

memory=0;

};

class DrivingWheel: DrivingWheel

{

angle0=-2.000147;

angle1=2.000147;

};

class ammo_belt_rotation

{

type="rotationZ";

source="belt_rotation";

selection="ammo_belt";

axis="ammo_belt_axis";

memory=1;

sourceAddress="loop";

minValue=0.000000;

maxValue=0.010000;

angle0=0.000000;

angle1=-0.209440;

};

};

};

class rip31st_lcm3: rip31st_lcm

{

sectionsInherit="Ship";

sections[]=

{

"zasleh_1"

};

skeletonName="rip31st_lcm3";

class Animations: Animations

{

class Turret_2: MainTurret

{

source="Turret_2";

selection="OtocVez_1";

axis="OsaVeze_1";

};

class Gun_2: MainGun

{

source="Gun_2";

selection="OtocHlaven_1";

axis="OsaHlavne_1";

};

};

};

};


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  

×