Jump to content
Locklear

Characters And Gear Encoding Guide

Recommended Posts

Greetings.

Your guide is very usefull. Will you update the part about FIA headgear randomization according to what Tom said ?

https://forums.bistudio.com/topic/180812-characters-and-gear-encoding-guide/page-2#entry2880628

Thanks !

I edited the documentation to reflect the recent changes. Despite the fact it's still a draft, it should provide enough information to use the new system.

Note: the new system has a full backward compatibility.

Share this post


Link to post
Share on other sites

I don't know, why but somehow my PrePocessor thingy error's and quit's when I define mag-macros within a conifg.cpp with a message somewhere along this line: "Invalid file name(empty filename)" or so... I quite don't get, since I did it the way it's shown in the guide...

//How my define looks like in my config.cpp
#define mag_3(12Rnd_mas_45acp_Mag) 12Rnd_mas_45acp_Mag, 12Rnd_mas_45acp_Mag, 12Rnd_mas_45acp_Mag
#define mag_10(CUP_30Rnd_556x45_Stanag) CUP_30Rnd_556x45_Stanag, CUP_30Rnd_556x45_Stanag, CUP_30Rnd_556x45_Stanag, CUP_30Rnd_556x45_Stanag, CUP_30Rnd_556x45_Stanag, CUP_30Rnd_556x45_Stanag, CUP_30Rnd_556x45_Stanag, CUP_30Rnd_556x45_Stanag, CUP_30Rnd_556x45_Stanag, CUP_30Rnd_556x45_Stanag

//After these two lines usually my CfgPatches is being defined/included.

//How it is shown in the guide:
#define mag_2(a) a, a
#define mag_10(a) a, a, a, a, a, a, a, a, a, a

Share this post


Link to post
Share on other sites

Just please use the define as shown in the guide. Then in the config, type mag_3(12Rnd_mas_45acp_Mag) to get three pieces of the mag in the brackets, and mag_10(CUP_30Rnd_556x45_Stanag) to get ten pieces of that one in the brackets.

 

The define works with parameters in brackets, so simply put, #define mag_2(a) a, a tells the computer: "when you see 'mag_2(something)', replace it with that something in the brackets, a comma, a space, and whatever is in the brackets again".

Share this post


Link to post
Share on other sites

@Locklear

 

Thank you sir, gonna try it out when I find some spare time. But have one question though, before I stop harassing you: is it possible to make a macro for the CfgVehicles section, in the same way it's shown on the guide?

 

Like this:

#define UNIFORM(NAME,DN,PIC,TEX,SOLDIER,LOAD,WEIGHT) \
    class ##NAME##: Uniform_Base \
    { \
        author = "Splendid Modder"; \
        scope = 2; \
        displayName = ##DN##; \
        picture = "\A3\characters_f\data\ui\icon_##PIC##_ca.paa"; \
        model = "\A3\Characters_F\Common\Suitpacks\suitpack_original_F.p3d"; \
        hiddenSelections[] = {"camo"}; \
        hiddenSelectionsTextures[] = {"\A3\Characters_F_New\BLUFOR\Data\##TEX##.paa"}; \
        \
        class ItemInfo: UniformItem \
        { \
            uniformModel = "-"; \
            uniformClass = ##SOLDIER##; \
            containerClass = Supply##LOAD##; \
            mass = ##WEIGHT##; \
        }; \
    };
 
class cfgWeapons
{
    class Uniform_Base;
    class UniformItem;
 
    UNIFORM(U_B_soldier_new,"New Uniform",u_b_soldier_new,b_soldier_new,B_soldier_new,40,40);
    UNIFORM(U_B_soldier_new_2,"New Uniform 2",u_b_soldier_new_2,b_soldier_new_2,B_soldier_new_2,60,60);
};

I figured it could actually be possible, according to what the guide says about using and defining macros right above the shown script in the guide, but I am not sure though.

 

Cheers, mate.

Share this post


Link to post
Share on other sites

Technically, yes, but I wouldn't do it. Macros are great for saving some space when a piece of code is used many times in a config, but it's often clearer (and cleaner) just to type stuff normally.

Share this post


Link to post
Share on other sites

Hi, what do the following commands in character configs do?

uniformAccessories[]={};
accuracy=2.3;
minFireTime=7;

Is 'accuracy' really as obvious as it seems? If so, on what scale or calculations does it work (Is 2.3 high or low?) and how much will it affect ai behaviour. I assume this has no effect on players?

 

Thanks in advance

Share this post


Link to post
Share on other sites

Hi, what do the following commands in character configs do?

uniformAccessories[]={};
accuracy=2.3;
minFireTime=7;

Is 'accuracy' really as obvious as it seems? If so, on what scale or calculations does it work (Is 2.3 high or low?) and how much will it affect ai behaviour. I assume this has no effect on players?

 

Thanks in advance

Can find info on accuracy here. Its not used to define 'aiming accuracy' but is an essential part of the calculation the game performs to determine when the AI 'notice' a unit/building/vehicle and identify them as actually being a unit/building/vehicle...

As to the other two, minFiretime is also mentioned, but I haven't found any mention of uniformAccessories on the BIKI, where did you see it used?

Share this post


Link to post
Share on other sites

I have made a config, typically using macros I have written. Its output is good when I use CfgConvert or Rapify, but when it comes to pboProject or AddonBuilder, it fails!

Here is the config: http://pastebin.com/PRZTF1LZ

And the config.bin dump (when config.cpp is compiled by hand with CfgConvert) is: http://pastebin.com/6Ws7FGgd

 

I tried making PBO with makePBO but after that (and using the -@ option for prefix e,g, -@=hadimods, to make correct paths) the PBO is not known by the game, and I can't even use SetObjectTexture command. It says the path doesn't exist!

 

May someone help me with this, please?

 

Thanks.

Share this post


Link to post
Share on other sites

Can someone help me ? is this script for a vest Okay ? 

class CfgPatches
 {
  class 101VestsandPatches
  {
  units[] = {};
  weapons[] = {Vests};
  requiredVersion = 0.1;
  requiredAddons[] = {"A3_Characters_F"};
  };
 
 class cfgWeapons
{
    class ItemCore;
class VestItem;
    class Vest_Camo_Base: ItemCore
    {
        class ItemInfo;
    };
    class 101stCarrierGl: Vest_Camo_Base
    {
 
        scope = 2;
 
        displayName = "101st Gl platecarrier";
 
        author = "DiegoAlejandro";
 
        picture = "\A3\characters_f_mark\Data\UI\icon_carrier_gl_rig_grn.paa";
 
        model = "A3\Characters_F\BLUFOR\equip_b_carrier_gl_rig";
 
        hiddenSelections[] = {"camo"};
 
        hiddenSelectionsTextures[] = {"101Vests\Data\101st_Platecarrier_GL.paa"};
 
        class ItemInfo: VestItem {
 
 
 
            uniformModel = "A3\Characters_F\BLUFOR\equip_b_carrier_gl_rig";
 
            containerClass = "Supply120";
 
            mass = 100;
 
            hiddenSelections[] = {"camo"};
            class HitpointsProtectionInfo {
                class Chest {
                    HitpointName = "HitChest";
                    armor = 78;
                    PassThrough = 0.6;
                };
 
                class Diaphragm {
                    HitpointName = "HitDiaphragm";
                    armor = 78;
                    PassThrough = 0.6;
                };
 
                class Abdomen {
                    hitpointName = "HitAbdomen";
                    armor = 16;
                    passThrough = 0.3;
                };
 
                class Body {
                    hitpointName = "HitBody";
                    passThrough = 0.6;
                };
class Neck
{
hitpointName = "HitNeck"; 
armor = 8; 
passThrough = 0.5; 
};
class Pelvis
{
hitpointName = "HitPelvis"; 
armor = 16;
passThrough = 0.3;
};
class Arms
{
hitpointName = "HitArms";
armor = 8;
passThrough = 0.5;
};
            };
        };
    };

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

×