Jump to content
Sign in to follow this  
Dragonian

Satchel (PipeBomb) config basics

Recommended Posts

Hello,

I've been scripting since OFP was released and carried on to ArmA but I have never done anything with addons and configs so I decided to fiddle with some basic things to get the hang of it.

I'm just trying to add a new muzzle (PipeBomb2Muzzle) for my new satchel charge (PipeBomb2) with some minor damage alterations.

I unpacked the config.bin from weapons.pbo with cpbo and unRap. Then I searched all the things I thought I needed to make this work and compiled them into a new config.cpp file which I packed with cpbo to PipeBomb2.pbo. I threw this into the ArmA AddOns folder.

The problem is that I can't get it to work ingame. It just gives me an error saying no entry 'bin\config.bin/CfgMagazines/PipeBomb2'. when I try to add the magazine to a unit via unit addmagazine "PipeBomb2" like the class does not exist at all.

I also tried first compiling the config.cpp into a config.bin but that didn't seem to work either.

Here's the contents of the config.cpp:

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

#define true 1

#define false 0

#define private 0

#define protected 1

#define public 2

#define VSoft 0

#define VArmor 1

#define VAir 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 ReadAndWrite 0

#define ReadAndCreate 1

#define ReadOnly 2

#define ReadOnlyVerified 3

#define LockNo 0

#define LockCadet 1

#define LockYes 2

class CfgAmmo {

class TimeBomb;

class TimeBomb2 : TimeBomb {

hit = 600;

indirectHit = 500;

indirectHitRange = 1;

soundHit[] = {"\ca\Weapons\Data\Sound\explosion_big_01", 56.2341, 1};

};

class PipeBomb2 : TimeBomb2 {

simulation = "shotPipeBomb";

};

};

class CfgMagazines {

class TimeBomb;

class TimeBomb2 : TimeBomb {

scope = protected;

displayName = $STR_MN_TIME_BOMB;

picture = "\CA\weapons\data\equip\m_satchel_CA.paa";

useAction = true;

useActionTitle = $STR_ACTION_PUTBOMB;

type = 2 * 256;

value = 5;

ammo = "TimeBomb2";

count = 1;

initSpeed = 0;

maxLeadSpeed = 0;

nameSoundWeapon = "satchelcharge";

sound[] = {"\ca\Weapons\Data\Sound\gravel_L", db-70, 1};

};

class PipeBomb2 : TimeBomb2 {

scope = public;

displayName = $STR_MN_PIPE_BOMB;

value = 5;

ammo = "PipeBomb2";

count = 1;

initSpeed = 0;

maxLeadSpeed = 0;

nameSoundWeapon = "satchelcharge";

useAction = true;

useActionTitle = $STR_ACTION_PUTBOMB;

sound[] = {"\ca\Weapons\Data\Sound\gravel_L", db-70, 1};

};

};

class cfgWeapons {

class Default;

class Put : Default {

scope = protected;

value = 0;

type = VSoft;

displayName = $STR_DN_PUT;

canDrop = false;

muzzles[] = {"PipeBomb2Muzzle","TimeBombMuzzle", "PipeBombMuzzle", "MineMuzzle", "MineEMuzzle"};

class PutMuzzle : Default {

sound[] = {"", db-70, 1};

reloadSound[] = {"", 0.000316228, 1};

enableAttack = false;

optics = false;

showEmpty = 0;

canLock = LockNo;

primary = 10;

minRange = 0;

minRangeProbab = 0.1;

midRange = 3;

midRangeProbab = 0.9;

maxRange = 15;

maxRangeProbab = 0.04;

};

class PipeBomb2Muzzle : PutMuzzle {

displayName = $STR_DN_PIPE_BOMB;

magazines[] = {"PipeBomb2"};

enableAttack = true;

};

class TimeBombMuzzle : PutMuzzle {

displayName = $STR_DN_TIME_BOMB;

magazines[] = {"TimeBomb"};

enableAttack = true;

};

class PipeBombMuzzle : PutMuzzle {

displayName = $STR_DN_PIPE_BOMB;

magazines[] = {"PipeBomb"};

enableAttack = true;

};

class MineMuzzle : PutMuzzle {

displayName = $STR_DN_MINE;

magazines[] = {"Mine"};

};

class MineEMuzzle : PutMuzzle {

displayName = $STR_DN_MINE;

magazines[] = {"MineE"};

};

};

};

Does anybody have any ideas what I'm doing wrong. Does my config.cpp lack information or did I pack the file wrong or what could be the problem?

Share this post


Link to post
Share on other sites

Ofcourse I found the solution just after I posted this thread biggrin_o.gif

I just had to add this into the config.cpp after the definitions:

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

class CfgPatches

{

class PipeBomb2

{

units[] = {};

weapons[] = {};

requiredVersion = 1.00;

requiredAddons[] = {};

};

};

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  

×