Comrades in Arms Discussion Board

Full Version: Converting Units to WGL
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ive been asked how to do this a couple of times now, so Im going to put it in one place, so its easily linkable. This post is likely to be quite massive, Im sorry.

I will upload the standalone config which I used for my conversion, so you can just use that as a template if you wish. : http://www.filefront.com/15754505/config.cpp

Find wgl_men_config.pbo in the WGL addons folder.

In here, there are a set of files prefixed with cfg. These are the configs for each of the groups of units in standard WGL.

Find the one which most relates to the units you are making. Open it with Notepad.

In this, you get a list looking something like this:
Code:
// BASIC INFANTRY SOLDIERS ///////////////////////////////////////////////////////////////////////////////////
class WGL_SoldierWB: SoldierWB
{
    WGL_SOLDIERWB_MODEL
    WGL_SOLDIERWB_WOUNDS
    WGL_SOLDIERWB_HS
    scope = WGL_VEHICLES_ACTIVE;
    vehicleClass = "#WGL Infantry";
    displayName="Rifleman";
    picture="\wgl_ui\menicons\wglicon.paa";
    camouflage=1;
    moves="CfgMovesMC";

    weapons[]={WGL_M16, WGL_RucksackAlice, DefaultManWeapons};
    magazines[]=
    {
        WGL_M16Mag, WGL_M16Mag, WGL_M16Mag, WGL_M16Mag,
        WGL_M16Mag, WGL_M16Mag, WGL_M16Mag, WGL_M16Mag,
        WGL_HandGrenade, WGL_HandGrenade,
        WGL_M16_PDM, WGL_M16_PDM, WGL_M249_PDM, WGL_HandGrenade_PDM
    };
    wgl_armor_basic
};
class WGL_SoldierWSL: WGL_SoldierWB
{
    WGL_SOLDIERWSL_MODEL
    WGL_SOLDIERWSL_WOUNDS
    WGL_SOLDIERWSL_HS
    displayName="Squad Leader";

    weapons[]={WGL_M16, WGL_RucksackAlice, Binocular, DefaultManWeapons};
    magazines[]=
    {
        WGL_M16Mag, WGL_M16Mag, WGL_M16Mag, WGL_M16Mag,
        WGL_M16Mag, WGL_M16Mag,WGL_M16Mag, WGL_M16Mag,
        WGL_HandGrenade, WGLBandage,
        WGL_M16_PDM, WGL_M16_PDM, WGL_M249_PDM, WGL_HandGrenade_PDM
    };
    accuracy=2;
    cost=300000;
};

but with more entries.

The first thing you want to do is find all entries of vehicleClass and change it to whatever you want them to come under in the editor menu. Do this first otherwise it get forgotten easily.

Next thing to do is change the config name of each unit. Use something easliy remembered and also systematic. I made the mistake of not thinking about this at first, so my basic UKF troops have names like: WGL_SoldierWukfB and WGL_SoldierWukfG, which dont look to bad, but when I compare it to say, the Marines: WGL_RM_RM or WGL_RM_GR you realise why I have been hating myself for this.

Remember to change the base class to the right of the unit name, otherwise you get problems.

Next thing you want to do is to replace this section:
Code:
    WGL_SOLDIERWSL_MODEL
    WGL_SOLDIERWSL_WOUNDS
    WGL_SOLDIERWSL_HS
with the Model, wounds section and hiddenselection of your chosen model. If you have done the above section properly, then you should only have to do this for the Medic, Rifleman and Snipers as the base class on all but the Snipers and Medic point back to the unit at the top.

You can also change the weapons now, to whatever you want. When creating weapons, I just took the nearest weapon to the one I was making from WGL, copied the config entry and changed it where nessesary.

To get ruck mags working, you need to config them (see how Ive done it in mine) and then find WGLevents in the addons folder. In the weaponfx folder, there is a file called ruck_dropstuff.sqs. Open it and you should see a list of the different ruckmags and what mags relate to them. Add yours in here.

Also, always make sure you are not using names which other weapons are, otherwise you get the same problem as I did where 50cals are firing 9mm pistol bullets.

Im pretty sure that at the moment, that should be enough to get you on the right track, if you don't understand this, then you probably shouldn't be trying to do a new config, but Ill add extra stuff when people ask about it.
(03-06-2010, 12:55 PM)Mjolnir link Wrote:Also, always make sure you are not using names which other weapons are, otherwise you get the same problem as I did where 50cals are firing 9mm pistol bullets.
Most important paragraph in the post. Last thing you want to do is to override WGL classnames and/or addon names, this is bound to cause trouble...
This is not only true for weapons but for all things you convert.
So it's possible to let a pistol fire javelin missiles?  ;D