Jump to content
Sign in to follow this  
meshcarver

Clear CFG explanation request

Recommended Posts

Hi all,

this is a sort of request more than a question, but it would be very beneficial to us beginners if someone in the know could literally baby step us (me too) through exactly what each part of a CFG is and what it relates to.

I've got a fairly good idea now, and I understand what it does as I'm using them for multiple objects now, but not what each individual line command does.

The CFG below is also linked as an image here:

http://www.flickr.com/photos/86890612@N02/8457886066/in/photostream

and it would be great if someone could literally draw in red over the top of it and point out what does exactly what, then we'd have a goto ref as simple as it gets. Or, even just describing the lines here would help.

I'm asking because for things like:

destrType = "DestructNo";

This makes it so the addon cannot be destroyed for example.

How are beginners meant to know/find out what options there are? Where is a list etc?

There's also one called "Placement=vertical" or something that I didn't know existed but came across it by chance, tried it, and it done what I was after!

I know that can also be construed as "how you learn", but it takes days/weeks (For one simple thing) and then only by chance and wastes a lot of production time.

Also, the:

{
  class Barrel1; // from bis
  class MESH_barrelred:Barrel1
  {

is not clear to me, as I found that changing the "barrel1" I found from ARMA2 OBJECTS LIBRARY (IS this a good source for CLASSNAMES(?) changes the icon in the editor?

If so, do we have to stick to classnames that are already here, or can we make our own? I tried chaning this to just "barrel" and it didn't work- gave me a "scope" error..!?!? What is that for example?

I know there's CFG guides here, but tbh they're written very programmatically so don't lend themselves to learning straight from them, more sort of trial and error..!

Also, having a properly formatted/layout for a CFG would be a great example, as all the little

{;

symbols mean nothing to me, and their placement even less.

Until modding for ARMA 2 I have never done scripting or programming in my entire life, so these symbols are a mystery lol..!

I have to point out I utterly enjoy modding for ARMA2(3!), and want to overcome these hurdles whilst also understanding them, so please no-one suggest that perhaps it isn't for me... I love it and am making great progress on my STALKER map..!

class cfgPatches
{
  class MESH_barrelred
  {
    units[]={MESH_barrelred};
    weapons[]={};
    requiredVersion=1.5;
    requiredAddons[]={CaBuildings}; // to use bis stuff
  };
};

class CfgVehicles
{
  class Barrel1; // from bis
  class MESH_barrelred:Barrel1
  {
     displayname="MESH_barrelred";
     scope=2; // see it in the editor
     destrType = "DestructNo";
     vehicleClass=MESH_barrelred;
     model=MESH_barrelred\MESH_barrelred.p3d;
  };
};
class CfgVehicleClasses
{
   class MESH_barrelred{DisplayName="barrel red";};
};

OK, I understand people could get p*&%^d with this, as there are resources available, but honestly they're not clear to a modeller/texture artist as they could be- so perhaps this could help.

Either way, thanks for reading..!

Marc

Share this post


Link to post
Share on other sites

You could of course try the wiki. :rolleyes:

Though that page doesnt explain inheritance which also seems to confuse you, but using that as a keyword should get you started on your searches. ;)

EDIT: Easiest way to learn: Find an addon similar to what you want to achieve (Like an addon that adds just a static object, like a house), look at its config and start from there. Trying to write a config from scratch is pretty much impossible as a beginner.

Edited by NeMeSiS

Share this post


Link to post
Share on other sites

Thanks very much NeNeSis,

That helps yes, and I've seen it a few times, but it's the grass roots stuff, like why is it even called a VEHICLEs CGF link..? Why vehicles..? Are they all specific to "vehicles" and are there "house" cgfs and "objects" cfgs for example?

You see where I'm coming from..?

What do you mean by "inheritance"..? Google search comes up with utterly different topics.

It'd really clear a LOT of things up in one fell swoop if some brave fellow could red ink over that image I posted explaining each part...

Again though, thank you for your input mate!

Share this post


Link to post
Share on other sites

IMHO You continue to overanalyze the detail making your addon making very slow. my 0.02

INHERIT simply means you are copying an existing working class/definition/addon, and typically tweaking just a FEW of the main parameters (model= description= etc etc) such that its different, and yours.

You DO NOT have to even mention a parameter in your CONFIG if you aren't changing it, because you INHERITED the full / total class definition, EVERY parameter is default defined for you.

There are THOUSANDS of parameters, no one is ever going to explain more than a handful. Even BIS and their BIKI barely scratch the surface of explaining the multitude.

Do what everyone else has. Inherit 99% of an existing class (be it BIS's or someone else), then slowly (over weeks/months) tweak (add/redefine) one or two of the parameters you find elsewhere, to see what they do and how your variation changes something ingame.

What 90% of parameters do can be guessed from their name; AIMDOWN=, LANDINGAOA=, etc etc

The ALLINONE Config file from DevHeaven is my config BIBLE.

If I want to know what is typically defined for a tank for example. I pick a tank (eg M1A1) and read it's whole defintion.

I then see which class it originally came from (eg Tank). Its PARENT class. I read that to see all the different parameters.

I repeat the exercise going back to find every parent class (LandVehicle, Land etc) until I'm comfortable I've seen most of what makes that addon tick.

I definately still don't know what 80% of the parameters might do ...... but their names give me hints about which ones I should play with ........

crewVulnerable = 0;

outGunnerMayFire = 1;

enableGPS = 1;

brakeDistance = 10;

etc

etc

Edited by [APS]Gnat
typos

Share this post


Link to post
Share on other sites

Hey,

thanks Gnat..! Even that has helped me, as I assumed experienced addons makers had the absolute world of CGFs at their feet lol..! ;)

I've book marked ALLINONE config file, thanks.

Yeah, I'm trying not too over analyse too much, but wasn't sure whether this seemingly important area was worth understanding more fully- point taken man.

Share this post


Link to post
Share on other sites
I've book marked ALLINONE config file, thanks.

I save the file on my HDD. Whenever I open Notepad++ to write anything, the ALLINONE is the first tab, already opened, always ready for me to search & refer to.

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  

×