View Full Version : Ship turret
Mondkalb
Dec 1 2007, 14:39
Hi there,
I'm modelling a ship, so far - so good, but now I want to create the front turret. I made it able to fire, but it's not moveable.
I don't have any clue why, and this is the part where you get involved.
This is the config-code from cfgVehicles:
Quote[/b] ]class RHIB;
class MBG_FgtSachsen: RHIB
{
scope=public;
vehicleClass="MBG_Sea";
displayName="Fregatte Sachsen";
model="\MBG_FgtSachsen\sachsen.p3d";
crew="SoldierWB";
cost=100000;
armor=100;
maxSpeed=60;
nameSound="ship";
simulation="ship";
accuracy=0.005;
audible=6;
fuelCapacity=700;
enableGPS = true;
formationX=50;
formationZ=100;
transportSoldier = 0;
type=VArmor;
threat[]={0.2, 0.2, 0.1};
getInRadius = 100;
steerAheadSimul = 2;
steerAheadPlan = 2;
predictTurnSimul = 3;
predictTurnPlan = 3;
precision = 50;
brakeDistance = 50;
hasGunner = true;
castDriverShadow = true;
castCargoShadow = true;
gunnerHasFlares = false;
typicalCargo[] = {"SoldierWB", "SoldierWB"};
supplyRadius = 3;
transportMaxMagazines = 1000;
transportMaxWeapons = 2000;
class TransportMagazines {};
memoryPointsGetInDriver = "pos driver";
memoryPointsGetInDriverDir = "pos_driver_dir";
memoryPointsGetInCargo = "pos cargo";
memoryPointsGetInCargoDir = "pos_cargo_dir";
memoryPointsGetInGunner = "pos gunner";
memoryPointsGetInGunnerDir = "pos_gunner_dir";
class NewTurret;
class Turrets: Turrets
{
class Leichtgesch: NewTurret
{
gunnerAction = "RHIB_Gunner";
ejectDeadGunner = false;
outGunnerMayFire = true;
gunnerOpticsModel = "\ca\weapons\optika_empty";
gunnerForceOptics = false;
startEngine = false;
gunnerName = "Leichtgeschuetz";
proxyIndex = 1;
commanding = -1;
body = "LeichtgeschTUR";
gun = "LeichtgeschGUN";
animationSourceBody = "LeichtgeschTUR";
animationSourceGun = "LeichtgeschGUN";
//body = "otocvez";
//gun = "otochlaven";
//animationSourceBody = "osa veze";
//animationSourceGun = "osa hlavne";
memoryPointsGetInGunner = "pos gunner";
memoryPointsGetInGunnerDir = "pos_gunner_dir";
memoryPointGun = "kulas";
memoryPointGunnerOptics = "gunnerview";
memoryPointGunnerOutOptics = "gunnerview";
gunBeg = "usti hlavne";
gunEnd = "konec hlavne";
maxHorizontalRotSpeed=1.200000;
maxverticalRotSpeed=1.200000;
weapons[]={"MBG_76mm_OTO_gun"};
magazines[]={"MBG_80Rnd_76mm_OTOGun", "MBG_80Rnd_76mm_OTOGun", "MBG_80Rnd_76mm_OTOGun", "MBG_80Rnd_76mm_OTOGun"};
minElev = -80;
maxElev = 25;
initElev = -80;
minTurn = -70;
maxTurn = 70;
initTurn = 0;
class ViewOptics
{
initAngleX = 0;
minAngleX = -30;
maxAngleX = 30;
initAngleY = 0;
minAngleY = -135;
maxAngleY = -45;
initFov = 0.6;
minFov = 0.6;
maxFov = 0.5;
};
class ViewGunner
{
initAngleX = 5;
minAngleX = -30;
maxAngleX = 30;
initAngleY = 0;
minAngleY = -100;
maxAngleY = 100;
initFov = 0.7;
minFov = 0.42;
maxFov = 0.85;
};
};
};
extCameraPosition[] = {0, 4.0, -14.0};
/* class Exhausts
{
class Exhaust1
{
position = "vyfuk start";
direction = "vyfuk konec";
effect = "";
};
};
*/
class Reflectors
{
class Reflector
{
color[] = {0.9, 0.8, 0.8, 1.0};
ambient[] = {0.1, 0.1, 0.1, 1.0};
position = "L svetlo";
direction = "konec L svetla";
hitpoint = "L svetlo";
selection = "L svetlo";
size = 0.5;
brightness = 0.25;
};
};
class Library
{
libTextDesc = "blah!";
};
};
And this is, what arma.rpt says to this problem:
Quote[/b] ]Error: bin\config.bin/CfgVehicles/MBG_FgtSachsen/Turrets/Leichtgesch/: Turret body LeichtgeschTUR not found while initializing the model mbg_fgtsachsen\sachsen.p3d
Error: bin\config.bin/CfgVehicles/MBG_FgtSachsen/Turrets/Leichtgesch/: Turret gun LeichtgeschGUN not found while initializing the model mbg_fgtsachsen\sachsen.p3d
Can anyone explain to me, what this means? In every LOD (Even Memory) of the ship model are selections named "LeichtgeschGUN" and "LeichtgeschTUR".
And how important is a cfgModels for this turret?
Thanks.
RN Malboeuf
Dec 1 2007, 14:50
any moving bone must be defined in cfgModels/skeletone
it won't work other way
Mondkalb
Dec 1 2007, 15:03
Thanks, I've written the CfgSkeletons, but it's still not working.
This is, how it looks:
Quote[/b] ]
class CfgSkeletons
{
class ship;
class MBG_FgtSachsen: ship
{
isDiscrete=1;
skeletonInherit="";
skeletonBones[]=
{
"LeichtgeschTUR","",
"LeichtgeschGUN","LeichtgeschTUR",
};
};
};
class CfgModels
{
class MBG_FgtSachsen
{
skeletonName = "MBG_FgtSachsen";
sectionsInherit = "";
skeletonBones[]=
{
"LeichtgeschTUR","",
"LeichtgeschGun","LeichtgeschTUR"
};
sections[]=
{
"clan","clan_sign","zasleh"
};
class Animations
{
class LeichtgeschGun
{
type="rotationY";
source="otochlaven";
selection="LeichtgeschGun";
axis="osahlavne";
animPeriod=0;
memory=1;
minValue="rad -360";
maxValue="rad +360";
angle0="rad -360";
angle1="rad +360";
};
class LeichtgeschTUR
{
type="rotationX";
source="otocvez";
selection="LeichtgeschTUR";
axis="osaveze";
animPeriod=0;
memory=1;
minValue="rad -360";
maxValue="rad +360";
angle0="rad -360";
angle1="rad +360";
};
};
};
};
RN Malboeuf
Dec 1 2007, 15:07
bad source. do you got any tank example ?
Mondkalb
Dec 1 2007, 15:11
No.
I took this from VTE, some parts from their ACH47, and some from their PBR.
So, do you mean I should base this turret on a Tank-config?
RN Malboeuf
Dec 1 2007, 15:17
i mean you got wrong "source" parameter. look through examples
Mondkalb
Dec 1 2007, 15:29
The examples are quite confusing. What selection has to be written behind "source"?
For now I filled in the following:
Quote[/b] ]Source = "LeichtgeschTUR"
[...]
Source = "LeichtgeschGUN"
but still no result.
Have you got any working/proper examples?
RN Malboeuf
Dec 1 2007, 15:34
open any tank addon and define turrets like in there http://forums.bistudio.com/oldsmileys/wink_o.gif there's example into biki too.
look for
animationSourceBody,animationSourceGun http://forums.bistudio.com/oldsmileys/wink_o.gif
Mondkalb
Dec 1 2007, 17:56
Combining this with Tank configs crushes everything. Is there a simple thing in my posted config that is blocking the turret?
I mean: Where is the error? Inside the cfgModels, CfgSkeletons or cfgVehicles?
I just don't get it...
config skeleton config models and config of a ship, in this case with 2 turrets, a working radar and 3 working schiffsschrauben. it has also a useraction defined, delete it when u dont need that feature. important is to have identical naming in model and config. so my selection of the radar in model is named radar. my maingun named maingun, seconday gun named sensors, secondary gun turret "sensors_turret"
Quote[/b] ]
class CfgSkeletons
{
class sc9_GBBones
{
isDiscrete=1;
skeletonInherit = "";
skeletonBones[]=
{
"Radar","",
"schraube","",
"schraube1","",
"schraube2","",
"mainTurret","",
"mainGun","mainTurret",
"sensors_turret","",
"sensors","sensors_turret",
};
};
};
Quote[/b] ]class cfgModels
{
class Default
{
sectionsInherit="";
sections[] = {};
skeletonName = "";
};
class Vehicle : Default
{
sections[] ={};
};
class Ship : Vehicle
{
sections[] =
{
"otochlaven","otocvez","volant","radar",&quo
t;kompas","fuel","hodinova","minutova","mph",
"rpm","rpm2","mainTurret","mainGun"
};
};
class SC9_ship : Ship
{
sectionsInherit="Ship";
sections[] = {"Radar","propeller","n1","n2","n3",&quo
t;sensors_turret","sensors","sensors_turret_1","sensors_1&qu
ot;,"sensors_turret_2","sensors_2","mainTurret","mainGu
n","rak_gun","rak_turret","kordel","schraube1"
;,"schraube2","door","fake"};
skeletonName = "";
};
class gunb: sc9_ship
{
skeletonName = "sc9_MBones";
sectionsInherit="sc9_ship";
sections[]={"Radar","propeller","n1","n2","n3",&quo
t;sensors_turret","sensors","mainTurret","mainGun",&quo
t;kordel"};
class Animations
{
class mainTurret //the horizontal moving part of the turret
{
type="rotationY";
source="mainTurret";
selection="mainTurret";
axis="osaveze";
animPeriod=0;
memory=1;
minValue="rad -360";
maxValue="rad +360";
angle0="rad -360";
angle1="rad +360";
};
class mainGun //the vertical moving part of the turret
{
type="rotationX";
source="mainGun";
selection="mainGun";
axis="osahlavne";
animPeriod=0;
memory=1;
minValue="rad -360";
maxValue="rad +360";
angle0="rad -360";
angle1="rad +360";
};
class sensors_turret : mainTurret
{
source = "sensors_turret";
selection = "sensors_turret";
axis = "flakt_axis";
};
class sensors : mainGun
{
source = "sensors";
selection = "sensors";
axis = "flakg_axis";
};
class radar
{
type="rotation";
animPeriod=2;
source = "radar";
sourceAddress = "loop";
selection="Radar";
axis="osa radaru";
angle0=0;
angle1="rad +360";
};
class kordel
{
type="translation";
animPeriod=3;
source ="kordel";
minValue=0;
maxValue=1;
sourceAddress = "clamp";
selection="kordel";
begin= "mine home";
end= "mine away";
offset0= 0;
offset1= 1;
};
class Propeller
{
type = "rotation";
source ="speed";
sourceAddress = "loop";
minValue=0;
maxValue=1;
animperiod= 0.0001;
selection ="propeller";
axis = "prop_axis";
angle0= "rad -360";
angle1="rad +360";
};
};
};
};
Quote[/b] ]
class CfgVehicles
{
class AllVehicles;
class Ship; // External class reference
class sc9_ship : Ship {
unitInfoType = "UnitInfoSoldier";
scope= 0;
type=1;
vehicleClass="sc9_naval";
class HitEngine
{ armor = 1.4;
material = 60;
name = "engine";
visual = "engine";
passThrough = true;
};
class HitBody
{ armor = 1.2;
material = 58;
name = "hull";
visual = "hull";
passThrough = true;
};
class NewTurret; // External class reference
class Turrets; // External class reference
class ViewPilot;
nameSound = "boat";
};
class sc9_gbe : SC9_ship
{
scope = 2;
displayName = "ANS Tiamat Class";
type = 1;
vehicleClass="sc9_armada";
picture = "\sc9_egunb\ico.paa";
Icon = "\sc9_egunb\map.paa";
soundengine[]={"\sc9_Egunb\engine.ogg",1,0.7};
soundEnviron[] = {"\sc9_Egunb\s\amb.ogg",1,0.7};
soundDammage[] = {"\sc9_Egunb\s\hit.ogg",1,1.05};
extCameraPosition[] = {0, 18.0, -35.0};
mapsize = 25;
hascommander = false;
hasgunner = true;
hasdriver = true;
gunneriscommander = true;
hideWeaponsDriver = true;
hideWeaponsCargo = true;
unloadInCombat =false;
hiddenSelections[] = {"n1","n2","n3"};
driverAction = "RHIB_Driver";
driverCanSee = 2+8+16;
gunnerCanSee = 4+8+31;
memoryPointDriver = {"pilot"};
memoryPointsGetInDriver = "pos driver";
memoryPointsGetInDriverDir = "pos driver dir";
getInRadius=15;
irScanRangeMin=100;
irScanRangeMax=6000;
irScanToEyeFactor = 1;
irtarget=true;
side = TEast;
threat[] = {0.8,1,0.6};
minSpeed = -10;
maxSpeed = 40;
secondaryExplosion = -1;
steerAheadSimul = 2.6;
steerAheadPlan = 3.2;
predictTurnSimul = 2.4;
predictTurnPlan = 2.8;
precision = 75;
brakeDistance = 75;
formationX = 55;
formationZ = 80;
formationTime = 2;
animated=1;
memoryPointCommonDamage = "zamerny";
memoryPointCameraTarget = "pilot";
memoryPointcommanderOptics = "pilot";
commanderOpticsModel = "\ca\weapons\optika_D30";
memoryPointSupply = "doplnovani";
transportSoldier=2;
typicalCargo[] = {"OfficerE","SoldierEB"};
cargoAction[] = {"RHIB_Driver","RHIB_Driver"};
crew = "SoldierEB";
accuracy = 0.05;
fuelCapacity = 1500;
model="\sc9_Egunb\gunb.p3d";
cost=2000000;
armor = 700;
enableGPS = 1;
class Turrets : Turrets
{
class mainTurret: NewTurret
{
body = "mainTurret";
gun = "mainGun";
animationSourceBody = "mainTurret";
animationSourceGun = "mainGun";
gunnerAction = "RHIB_Gunner";
castGunnerShadow = 1;
ejectDeadGunner = 0;
hasgunner=true;
primary=true;
outGunnerMayFire = 1;
inGunnerMayFire = 1;
proxyType="CPGunner";
proxyIndex = 1;
primaryGunner = 1;
minElev = -5;
maxElev = 45;
soundServo[]={"\ca\wheeled\Data\Sound\servo3",0.000178,0.900000};
initElev = 5;
minTurn = -85;
maxTurn = 85;
initTurn = 0;
commanding = 1;
memoryPointGun = "usti hlavne";
gunBeg = "usti hlavne";
gunEnd = "konec hlavne";
weapons[] = {"sc9_85mm"};
magazines[] = {"sc9_85mm_HEAT","sc9_85mm_Sabot"};
gunnerName = "Main Gunner";
gunnerOpticsModel = "\ca\weapons\optika_D30";
memoryPointGunnerOutOptics = "maingout";
memoryPointGunnerOptics = "gunnerview";
showgunneroptics = 1;
gunnerForceOptics = 0;
startEngine = 0;
class ViewPilot {
initAngleX = 15;
minAngleX = -2;
maxAngleX = 55;
initAngleY = 0;
minAngleY = -115;
maxAngleY = 115;
};
class ViewOptics {
initAngleX = 15;
minAngleX = -5;
maxAngleX = 55;
initAngleY = 0;
minAngleY = -115;
maxAngleY = 115;
initFov = 0.7;
minFov = 0.012;
maxFov = 1.2;
};
class ViewGunner {
initAngleX = 15;
minAngleX = -5;
maxAngleX = 55;
initAngleY = 0;
minAngleY = -115;
maxAngleY = 115;
initFov = 0.7;
minFov = 0.2;
maxFov = 1.2;
};
};
class sensors_turret : MainTurret
{
body = "sensors_turret";
gun = "sensors";
animationSourceBody = "sensors_turret";
animationSourceGun = "sensors";
animationSourceHatch = "";
selectionFireAnim = "";
hasgunner=true;
proxytype="cpgunner";
proxyIndex = 2;
gunnerName = "Flak Gunner";
commanding = -1;
gunnerAction = "RHIB_Gunner";
primary=false;
minElev = -8;
maxElev = 75;
initElev = 10;
minTurn = -360;
maxTurn = 360;
initTurn = 180;
weapons[] = {"sc9_30mm"};
magazines[] = {"sc930mm","sc930mm","sc930mm","sc930mm","sc9
30mm","sc930mm"};
gunBeg = "usti hlavne_1";
gunEnd = "konec hlavne_1";
primarygunner = 0;
memoryPointGun = "usti hlavne_1";
memoryPointGunnerOptics = "gunnerview_1";
memoryPointGunnerOutOptics = "secgout";
gunnerUsesPilotView = false;
gunnerOpticsModel = "\ca\tracked\optika_zsu_gunner";
};
};
class EventHandlers
{
Init = " _this exec ""\sc9_egunb\num.sqs""; _this exec ""\sc9_Egunb\flag.sqs"";";
engine = "_this exec ""\sc9_Egunb\minefx.sqs""; _this exec ""\sc9_Egunb\engwat.sqs"" ";
Killed = " _this exec ""\sc9_egunb\titanic.sqs""; ";
};
class Library
{
libTextDesc = "A corvette of the North Sahrani Armada, equipped as a minesweeper. It has reduced enginepower to operate within magnetic and accustic minefields. Special Equipment is to send out magnetic signatures to detonate nearby mines. Equipped with a outdated 85mm cannon and a 4 barrel 30mm anti air gun.";
};
class AnimationSources
{
class radar // Should be the same as your selection name.
{
source = "time";
sourceAddress = "loop";
animPeriod=1;
};
class kordel
{
source = "user"; //The controller is defined as a user animation.
animPeriod = 4; //The animation period used for this controller.
initPhase=0; //Initial phase when object is created. 0 = CLOSED
};
};
class UserActions
{
class enmin
{
displayName ="Enable Anti Mine Procedures";
position = "pilot";
radius =15;
onlyForplayer= false;
condition = "this animationPhase ""kordel"" <= 0.1";
statement = "[this] exec ""\sc9_egunb\enmin.sqs""";
};
class stomin
{
displayName ="Stop Anti Mine Procedures";
position = "Pilot";
radius =15;
onlyForplayer= false;
condition = "this animationPhase ""kordel"" >= 0.9";
statement = "[this] exec ""\sc9_egunb\stomin.sqs""";
};
};
class Reflectors
{
class Left
{
color[] = {0.9, 0.8, 0.8, 1.0};
ambient[] = {0.1, 0.1, 0.1, 1.0};
position = "svetlo pp";
direction = "konec svetla pp";
hitpoint = "svetlo pp";
selection = "svetlo pp";
size = 2.2;
brightness = 2.95;
};
class back
{
color[] = {0.9, 0.8, 0.8, 1.0};
ambient[] = {0.1, 0.1, 0.1, 1.0};
position = "cargolight";
direction = "cargostrahl";
hitpoint = "cargolight";
selection = "cargolight";
size = 1;
brightness = 1;
};
};
};
Quote[/b] ]
class CfgVehicles
{
class AllVehicles;
class Ship; // External class reference
class sc9_ship : Ship {
unitInfoType = "UnitInfoSoldier";
scope= 0;
type=1;
vehicleClass="sc9_naval";
class HitEngine
{ armor = 1.4;
material = 60;
name = "engine";
visual = "engine";
passThrough = true;
};
class HitBody
{ armor = 1.2;
material = 58;
name = "hull";
visual = "hull";
passThrough = true;
};
class NewTurret; // External class reference
class Turrets; // External class reference
class ViewPilot;
nameSound = "boat";
};
try this first, i think you doesnt define the turret/newturret thing correct. and animationsource needs to be maingun and mainturret i think, didnt get the czech octohlaven and octovez to work-
EDITand most important, in cfgmodels, the class has to be named like the selection in the model
took a look again, bdfy is absolutly right, only obvious error in your config are the animationsource for gun and turret wich need to be maingun and mainturret. predefined from engine itself.
everything else should, if named in model correctly, work.
Mondkalb
Dec 1 2007, 18:39
Thanks for your help.
So, when the arma.rpt says me:
Quote[/b] ]Error: bin\config.bin/CfgVehicles/MBG_FgtSachsen/Turrets/mainTurret/: Turret body mainTurret not found while initializing the model mbg_fgtsachsen\sachsen.p3d
Error: bin\config.bin/CfgVehicles/MBG_FgtSachsen/Turrets/mainTurret/: Turret gun mainGun not found while initializing the model mbg_fgtsachsen\sachsen.p3d
It's just some wrong named selections in the model?
RN Malboeuf
Dec 1 2007, 19:06
Quote[/b] ]animationsource for gun and turret wich need to be maingun and mainturret.
true
Quote[/b] ]predefined from engine itself
false. nothing is defined by the engine
Mondkalb
make everything like in tank. that's my final advise if you can't get the structure
Quote[/b] ]Animation sources
These are the controllers that provide the input for the animation phase of the animations. These are the controllers that provide the input for the animation phase of the animations. These controllers are defined in the animation class using the source parameter. It's also possible to define custom controllers in the main configuration file, using class AnimationSources.
thats what i ment with predefined by the engine, saying using the default animation source would have been more on point i guess.
Snake Man
Dec 1 2007, 19:58
Hehe dont take the config from VTE PBR as its not working http://forums.bistudio.com/oldsmileys/smile_o.gif
The ACH-47A gunship config does however work very nicely (besides the gunner view bug), but turret wise its ok.
Mondkalb
Dec 2 2007, 08:40
Okay, for now I have based the config on a tank's one.
But it still tells me that:
Quote[/b] ]Error: bin\config.bin/CfgVehicles/MBG_FgtSachsen/Turrets/MainTurret/: Turret body MainTurret not found while initializing the model mbg_fgtsachsen\sachsen.p3d
Error: bin\config.bin/CfgVehicles/MBG_FgtSachsen/Turrets/MainTurret/: Turret gun MainGun not found while initializing the model mbg_fgtsachsen\sachsen.p3d
What does this tell? Where is he looking for "MainGun" and "MainTurret"?
In your p3d make sure you have selections named "MainTurret" and "MainGun" and the selection names assigned for your axis. In this case, for the axis I used "MainTurret axis" and "MainGun axis".
In your model.cfg, make sure you have animations defined and named as "mainTurret" and "mainGun":
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class mainTurret
{
type = "rotationY";
source = "mainTurret";
selection = "mainTurret";
axis = "mainTurret axis";
animPeriod = 0;
memory = 1;
minValue = "rad -360";
maxValue = "rad +360";
angle0 = "rad -360";
angle1 = "rad +360";
};
class mainGun
{
type = "rotationX";
source = "mainGun";
selection = "mainGun";
axis = "mainGun axis";
animPeriod = 0;
memory = 1;
minValue = "rad -360";
maxValue = "rad +360";
angle0 = "rad -360";
angle1 = "rad +360";
};
[/QUOTE]
In your config, for the turret, make sure you have "MainTurret" and "MainGun" assigned to:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">body="mainTurret";
gun="mainGun";
animationSourceBody="mainTurret";
animationSOurceGun="mainGun";
[/QUOTE]
If you have all of these in place, you should not get any error messages in Arma.rpt.
[APS]Gnat
Dec 2 2007, 11:58
Just as a note for the named selections in the model;
- mainTurret is ALL the turret, including the gun barrel
- mainGun is just the gun barrel
Scars,
Not sure the slight difference, but my CfgVehicles has it like this;
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
......
class Turrets {
class MainTurret : NewTurret {
body = "main1turret";
gun = "main1gun";
animationSourceBody = "main1turret";
animationSourceGun = "main1gun";
.........
[/QUOTE]
My pre-definite seems the same;
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
.......
class CfgVehicles
{
class All;
class AllVehicles : All {};
class Land : AllVehicles {};
class LandVehicle : Land {};
class Ship : AllVehicles {};
class GNTShip1 : Ship
{
class NewTurret;
class Turrets;
irScanRangeMin=500;
class viewpilot;
class viewgunner;
};
class GNTKrivak: GNTShip1
{
..........
[/QUOTE]
RN Malboeuf
Dec 2 2007, 12:05
Quote[/b] ]- mainTurret is ALL the turret, including the gun barrel
- mainGun is just the gun barrel
doesn't matter. this bones are linked via config anyway
Mondkalb
Dec 2 2007, 19:13
I've tried every tip you gave me, thank for that, but it's still not working.
This is the part from CfgVehicles.Turrets:
Quote[/b] ]class Turrets : Turrets
{
class MainTurret: NewTurret
{
body = "MainTurret";
gun = "MainGun";
animationSourceBody = "MainTurret";
animationSourceGun = "MainGun";
gunnerAction = "RHIB_Driver";
castGunnerShadow = 1;
ejectDeadGunner = 0;
hasgunner=true;
primary=true;
outGunnerMayFire = 1;
inGunnerMayFire = 1;
proxyType="CPGunner";
proxyIndex = 1;
primaryGunner = 1;
minElev = -5;
maxElev = 45;
soundServo[]={"\ca\wheeled\Data\Sound\servo3",0.000178,20};
initElev = 5;
minTurn = -85;
maxTurn = 85;
initTurn = 0;
commanding = 0;
memoryPointGun = "usti hlavne";
gunBeg = "usti hlavne";
gunEnd = "konec hlavne";
weapons[]={"MBG_76mm_OTO_gun"};
magazines[]={"MBG_80Rnd_76mm_OTOGun", "MBG_80Rnd_76mm_OTOGun", "MBG_80Rnd_76mm_OTOGun", "MBG_80Rnd_76mm_OTOGun"};
gunnerName = "Main Gunner";
gunnerOpticsModel = "\ca\weapons\optika_D30";
//memoryPointGunnerOutOptics = "maingout";
memoryPointGunnerOptics = "gunnerview";
showgunneroptics = 1;
gunnerForceOptics = 0;
startEngine = 0;
class ViewPilot {
initAngleX = 15;
minAngleX = -2;
maxAngleX = 55;
initAngleY = 0;
minAngleY = -115;
maxAngleY = 115;
};
class ViewOptics {
initAngleX = 15;
minAngleX = -5;
maxAngleX = 55;
initAngleY = 0;
minAngleY = -115;
maxAngleY = 115;
initFov = 0.7;
minFov = 0.012;
maxFov = 1.2;
};
class ViewGunner {
initAngleX = 15;
minAngleX = -170;
maxAngleX = 80;
initAngleY = 0;
minAngleY = -115;
maxAngleY = 115;
initFov = 0.7;
minFov = 0.2;
maxFov = 1.2;
};
};
};
so, and this is CfgModels:
Quote[/b] ]class cfgModels
{
class Default
{
sectionsInherit="";
sections[] = {};
skeletonName = "";
};
class Vehicle : Default
{
sections[] ={};
};
class Ship : Vehicle
{
sections[] =
{
"MainTurret","MainGun"
};
};
class MBG_ship : Ship
{
sectionsInherit="Ship";
sections[] = {"MainTurret","MainGun"};
skeletonName = "";
};
class MBG_gunb: MBG_ship
{
skeletonName = "MBG_MBones";
sectionsInherit="MBG_ship";
sections[]={"MainTurret","MainGun"};
class Animations
{
class MainTurret
{
type = "rotationY";
source = "MainTurret";
selection = "MainTurret";
axis = "MainTurretAxis";
animPeriod = 0;
memory = 1;
minValue = "rad -360";
maxValue = "rad +360";
angle0 = "rad -360";
angle1 = "rad +360";
};
class mainGun
{
type = "rotationX";
source = "MainGun";
selection = "MainGun";
axis = "MainGunAxis";
animPeriod = 0;
memory = 1;
minValue = "rad -360";
maxValue = "rad +360";
angle0 = "rad -360";
angle1 = "rad +360";
};
};
};
};
And this is, how the memoryLOD looks like:
http://img148.imageshack.us/img148/2644/memorydefineslu3.jpg
Are there some things missing? Are the points case sensitive?
ArmA.rpt is still saying the same.
[APS]Gnat
Dec 3 2007, 09:58
PM'ed you 2 working (un-BinPBO'ed) examples ..... see if that helps.
is there any movement at all?? is maingun and mainturret defined in every lod? the last errormessage you posted stated clearly that there is no selection named maingun and main turret in the model
Quote[/b] ]Error: bin\config.bin/CfgVehicles/MBG_FgtSachsen/Turrets/MainTurret/: Turret body MainTurret not found while initializing the model mbg_fgtsachsen\sachsen.p3d
Error: bin\config.bin/CfgVehicles/MBG_FgtSachsen/Turrets/MainTurret/: Turret gun MainGun not found while initializing the model mbg_fgtsachsen\sachsen.p3d
i would redefine the selections in the resolution lod.
Quote[/b] ]is there any movement at all?? is maingun and mainturret defined in every lod? the last errormessage you posted stated clearly that there is no selection named maingun and main turret in the model
I got the same sort of error when I removed just the animations from model.cfg. That’s why I posted just the animations, as an example and not the bone definitions.
I noticed in the example of cfgModels Mondkalb posted, there is no section for cfgSkeletons? To be honest, I found inheriting bones from the existing classes to be a bit fickle, it may not even work at all?
When I wrote some configs to get the BI sample models into the game, as individual pbo's. I decided to define them all myself from scratch.
i didnt know that the error would come when the animation is deleted. the cfg looks (except of the missing cfgskeletons) ok to me. at least good enough to enable some movement on the turret. during testing this in the past month i (and i think most others who played around with it) had different kind of movement before it work like it should. only gun, only turret, only when optics enabled. i had the issue of selections that were existing but not working, these maingun and mainturret selections were messed up with weight values of selections they had nothing to do with and they werent working in a correct configured vessel. after redefine the selections in the model, all worked fine again. that was my thought behind this
@<hidden>[APS] Gnat
it really seem that aslong you use identical naming in model and config the name itself doesnt matter. its same with original models, sometimes they use maingun and mainturret, sometimes octovez and octohlaven, same with the axis naming.
Marco-Polo-IV
Dec 3 2007, 15:42
for 2 Turrets
exemple CfgSkeleton:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
class CfgSkeletons
{
class Default
{
isDiscrete = 1;
skeletonInherit = "";
skeletonBones[] = {};
};
class Vehicle : Default
{
isDiscrete = 1;
skeletonInherit = "Default";
skeletonBones[] =
{
"ukaz_rpm","",
"ukaz_rychlo","",
"volant","",
"otocvez","",
"otochlaven","otocvez",
};
};
class Ship_Skeleton : Vehicle
{
isDiscrete = 1;
skeletonInherit = "Vehicle";
skeletonBones[] =
{
"right_turret1","",
"right_turret1_Gun","right_turret1",
};
};
};
[/QUOTE]
exemple CfgModels:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
class CfgModels
{
class Default
{
sectionsInherit = "";
sections[] = {};
skeletonName = "";
};
class Vehicle: Default
{
sectionsInherit = "Default";
sections[] =
{
"cislo",
"grupa",
"side",
"sektor",
"clan",
"clan_sign",
"podsvit pristroju",
"poskozeni",
"L svetlo",
"P svetlo",
"otochlaven",
"otocvez",
"volant",
"zasleh"
};
skeletonName = "Vehicle";
class Animations
{
class mainTurret
{
type = "rotationY";
source = "mainTurret";
selection = "otocvez";
axis = "OsaVeze";
memory = true;
sourceAddress = "loop";
minValue = "rad -360";
maxValue = "rad 360";
angle0 = "rad -360";
angle1 = "rad 360";
};
class mainGun
{
type = "rotationX";
source = "mainGun";
selection = "otochlaven";
axis = "OsaHlavne";
memory = true;
sourceAddress = "loop";
minValue = "rad -360";
maxValue = "rad 360";
angle0 = "rad -360";
angle1 = "rad 360";
};
class DrivingWheel
{
type = "rotation";
source = "drivingWheel";
selection = "volant";
axis = "osavolantkon";
memory = false;
angle0 = "rad 180";
angle1 = "rad -180";
minValue = -1;
maxValue = 1;
};
};
};
class MyShip : Vehicle
{
sectionsInherit = "Vehicle";
sections[] = {"zasleh_g1"};
skeletonName = "Ship_Skeleton";
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
{
type = "rotationX";
source = "mainGun";
selection = "otochlaven";
axis = "osahlavne";
animPeriod = 0;
minValue = "rad -360";
maxValue = "rad +360";
angle0 = "rad -360";
angle1 = "rad +360";
};
class rightTurret : mainTurret
{
source = "rightTurret";
selection = "right_turret1";
axis = "osaveze_g1";
};
class rightTurretGun : mainGun
{
source = "rightTurretGun";
selection = "right_turret1_Gun";
axis = "osahlavne_g1";
};
};
};
};
[/QUOTE]
exemple Config part Turrets
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
class Turrets
{
class MainTurret: NewTurret
{
startEngine = 0;
outGunnerMayFire = 1;
commanding = -1;
gunnerName = "Left Gunner";
memoryPointsGetInGunner = "pos_gunner";
memoryPointsGetInGunnerDir = "pos_gunner_dir";
memoryPointGun = "maschinegun";
memoryPointGunnerOptics = "gunnerview";
selectionFireAnim = "zasleh";
gunnerAction = "UH60_Gunner";
gunnerInAction = "UH60_Gunner";
weapons[] = {"MAP_M2"};
magazines[] = {"100Rnd_127x99_M2","100Rnd_127x99_M2","100Rnd_127x99_M2","100Rnd_127x99_M2","100Rnd_127x99_M2","100Rnd_127x99_M2"};
minElev = -45;
maxElev = 15;
initElev = 0;
minTurn = 40;
maxTurn = 130;
initTurn = 90;
class ViewOptics
{
initAngleX = 0;
minAngleX = -30;
maxAngleX = 30;
initAngleY = 0;
minAngleY = -100;
maxAngleY = 100;
initFov = 0.600000;
minFov = 0.600000;
maxFov = 0.500000;
};
gunnerOpticsModel = "\ca\weapons\optika_empty";
gunnerForceOptics = 0;
};
class RightDoor_Gun : MainTurret
{
body = "rightTurret";
gun = "rightTurretGun";
animationSourceBody = "rightTurret";
animationSourceGun = "rightTurretGun";
animationSourceHatch = "";
selectionFireAnim = "zasleh_g3";
proxyIndex = 2;
gunnerName = "Right Door Gunner";
commanding = -2;
minElev = -45;
maxElev = 15;
initElev = 0;
minTurn = -130;
maxTurn = -40;
initTurn = -90;
weapons[] = {"MAP_M2_2"};
magazines[] = {"100Rnd_127x99_M2","100Rnd_127x99_M2","100Rnd_127x99_M2","100Rnd_127x99_M2","100Rnd_127x99_M2","100Rnd_127x99_M2"};
gunBeg = "usti hlavne_g3";
gunEnd = "konec hlavne_g3";
primary = 0;
memoryPointGun = "maschinegun_g3";
memoryPointGunnerOptics = "gunnerview_g3";
};
};
[/QUOTE]
i hope thats will help you
regreetz
Marco
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.