Hello all,
I've got a bit of a problem with a vehicle config. It's a real simple one: replace the default weapons of a vehicle with my own weapons (which I've defined elsewhere and which work - tested ingame using addweapon). Here's the config, a part of cfgVehicles:
class BRDM2_Base;
class Turrets;
class MainTurret;
class RUG_HD_BRDM2_CDF2 : BRDM2_Base
{
faction = "RUG_HD_CDF";
scope = 2;
side = 1;
displayName = "CDF HD BRDM2";
crew = "RUG_HD_CDF_Soldier_Crew";
class Turrets : Turrets
{
class MainTurret : MainTurret {
weapons[] = {"RUG_HD_KPVT","RUG_HD_PKT" };
magazines[] = {"500Rnd_145x115_KPVT","1500Rnd_762x54_PKT" };
};
};
};
The "Turrets" and "MainTurret" classes are there to avoid the "undefined base class" error that will prevent Arma 2 from starting. Anyway, once the game loads, I get the following error:
No entry "bin\config.bin/CfgVehicles/Turrets.scope".
The unit shows up in-game in its proper faction etc (the above error repeats itself whenever I click to add a new unit), but when I place it and then try to preview, the following error appears:
No entry "bin\config.bin/CfgVehicles/RUG_HD_BRDM2_CDF2/Turrets/MainTurret/selectionFireAnim."
I believe this means that the config, as it stands, is simply incomplete. What I want to know now is whether or not I am actually going to have to include the -whole goddamned vehicle config- to be able to change this one thing (namely the weapons)? Please note I have tried changing the RUG_HD_ weapons to their regular counterparts, but the same errors occur.
At the moment, I'm considering simply using a script to exchange the weapons, but the problem then is that none of the animations follow - this is especially noticeable on the static weapons which have simulated recoil and reload animations, which won't work the same if the weapon has just been added with a script. This in turn makes me wonder if it is at all possible to change the weapons in this way, or if the weapons are integrated with the vehicle on a model-level somehow, meaning I'd have to use a replacement config (which is not an option - and neither is obviously adding the whole of air.pbo, wheeled.pbo and so forth to my addon
).
Thoughts? Note: the above IS the entire config, as it stands, as it is. Replace RUG_HD_PKT/KPVT with just the regular "PKT" and "KPVT" & remove the custom crew/faction, and then try running it - nothing changes.
Thanks!
Wolfrug out.