Jump to content
Sign in to follow this  
tcp

Dummy Magazine

Recommended Posts

I'm getting this error:

Addon tcp_rf (entry Dummybatteries) not found in the list of active addons.

Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted.

tcp_rf

class CfgPatches {
class TCP_RF {
	units[] = {};
	weapons[] = {"Laserdesignator"};
	requiredVersion = 0.1;
	requiredAddons[] = {"CAWeapons","CAWeapons2","Extended_EventHandlers"};
};
};
class CfgMagazines {
class Default;
class FakeMagazine;
class Dummybatteries : FakeMagazine {
	scope = 1;
	displayName = "Lithium Battery";
	picture = "\CA\weapons\data\equip\m_battery_CA.paa";
	descriptionShort = "Lithium Battery";
};
};
class CfgWeapons {
class Default;
class Binocular;
class Laserdesignator : Binocular {
		opticsZoomMin = 0.0;
		opticsZoomMax = 12.0;
		opticsZoomInit = 5.0;
		magazines[] = {"Laserbatteries","Dummybatteries"};
};
};
class Extended_PostInit_EventHandlers {
TCP_RF_postinit = "[] execVM '\TCP_RF\initRF.sqf'";
};

...followed by dialogs

Am I doing something wrong?

Share this post


Link to post
Share on other sites

Try this:

class CfgPatches
{
class TCP_RF
{
	units[] = {};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] =
	{
		"CAWeapons",
		"CAWeapons2",
		"Extended_EventHandlers"
	};
};
};
class CfgMagazines
{
class FakeMagazine;
class Dummybatteries: FakeMagazine
{
	scope = 1;//might be a problem, use 2
	displayName = "Lithium Battery";
	picture = "\CA\weapons\data\equip\m_battery_CA.paa";
	descriptionShort = "Lithium Battery";
};
};
class CfgWeapons
{
class Binocular;
class Laserdesignator: Binocular
{
	opticsZoomMin = 0;
	opticsZoomMax = 12;
	opticsZoomInit = 5;
	magazines[] =
	{
		"Laserbatteries",
		"Dummybatteries"
	};
};
};
class Extended_PostInit_EventHandlers
{
TCP_RF_postinit = "[] execVM '\TCP_RF\initRF.sqf'";
};

And if you create Dummybatteries via script, before doing so call

http://community.bistudio.com/wiki/activateAddons:

activateAddons["TCP_RF"];

Share this post


Link to post
Share on other sites

thanks for the advice, kju.

activateAddons works, but there was a problem with FakeMagazine so I used:

class CfgPatches {
class test {
	units[] = {};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {};
};
};
class CfgMagazines {
class Laserbatteries;
class LithBat : Laserbatteries {
	displayName = "Lithium Battery";
	ammo = "FakeAmmo";
	descriptionShort = "Lithium Battery";
};
};

If I end up creating a new magazine class, will that break MP support as a client side addon? I wonder if I can fix FakeMagazine and take that over.

Share this post


Link to post
Share on other sites

Once you create a new class, everyone needs to have the addon.

Share this post


Link to post
Share on other sites

Hi. I know I asked for this "little" feature :) But seeing how it makes addon a requirement, I think it would be better if the "spent" battery was simply removed from inventory. The readme should state the nature, and why it is the preferred method (if it is).

Share this post


Link to post
Share on other sites

Yea, not what most people are looking for. When I come out with a final release version, I will just make two versions. One with the default batteries, and one with the dummies. Squads who want to enforce the battery and overheat missions, can replace all laserbatteries with dummybatteries in their missions.

Actually, I just thought of a way to enforce it. Instead of a fired event handler which doesn't work with the designator, I can just use a mousedown key handler and shut off the laser if the RF display is not switched on.

Also, Carl, I have a question about QRF, which I will ask in the other thread.

Edited by tcp

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  

×