PDA

View Full Version : Single new guy config



DaanVS
Jun 27 2007, 11:18
Hello guys,

I'm a graphical designer myself and I'd love to try my skills on creating a new unit in arma. The problem is, I just don't understand any of the code. I was hoping one of you would be so kind to copy/paste here a config file needed to add one guy to the BLUEFOR side (if possible under a new section called BBE), called "BBE operator."
This guy should be armed with an M4, NVG's, an M9 and some grenades. The pbo will be called bbe_operator.pbo

If I'm asking too much, could anyone be so kind to just post the config file of the west soldier for me?

Thanks in advance,

Daan

W0lle
Jun 28 2007, 05:39
Here's a pretty basic config which should fit to your needs:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgPatches
{
class BBE_Operators
{
units&#91;&#93; = {&#34;BBE_Operator&#34;};
weapons&#91;&#93; = {};
requiredVersion = 1.00;
requiredAddons&#91;&#93; = {&#34;CAData&#34;,&#34;CACharacters&#34;,&#34;CAWeapons&#34;};
};
};

class CfgVehicleClasses
{
class BBE
{
displayName = &#34;BBE Operators&#34;;
};
};

class CfgVehicles
{
/*extern*/ class SoldierWB;
class BBE_Operator&#58; SoldierWB
{
displayName=&#34;Rifleman&#34;;
vehicleClass=&#34;BBE&#34;;
model = &#34;&#92;ca&#92;characters&#92;us_soldier_sabot.p3d&#34;; // place the path to your model here
scope = 2;
picture = &#34;&#92;Ca&#92;characters&#92;data&#92;Ico&#92;i_SF_CA.paa&#34;; // picture of the unit as it appears in the commandbar
canHideBodies = 1;
canDeactivateMines = 1;
nightVision = 1;
weapons&#91;&#93;={&#34;M4&#34;,&#34;M9&#34;,&#34;NVGoggles&#34;,&#34;Throw&#34;,&#34;Put&#34;};
magazines&#91;&#93;={&#34;30Rnd_556x45_Stanag&#34;,&#34;30Rnd_556x45_Stanag&#34;,&#34;30Rnd_556x45_Stanag&#34;,&#34;30Rnd_556x45_Stanag&#34;,&#34;30Rnd_556x45_Stanag&#34;,&#34;30Rnd_556x45_Stanag&#34;,&#34;30Rnd_556x45_Stanag&#34;,&#34;30Rnd_556x45_Stanag&#34;,&#34;HandGrenade&#34;,&#34;HandGrenade&#34;,&#34;HandGrenade&#34;,&#34;HandGrenade&#34;,&#34;15Rnd_9x19_M9&#34;,&#34;15Rnd_9x19_M9&#34;,&#34;15Rnd_9x19_M9&#34;,&#34;15Rnd_9x19_M9&#34;};
class Wounds // below change the paths to your textures
{
tex&#91;&#93; = {};
mat&#91;&#93; = {&#34;ca&#92;characters&#92;data&#92;us_rukavy_sab_hhl.rvmat&#34;, &#34;ca&#92;characters&#92;data&#92;us_rukavy_sab_hhl_wound1.rvmat&#34;, &#34;ca&#92;characters&#92;data&#92;us_rukavy_sab_hhl_wound2.rvmat&#34;, &#34;ca&#92;characters&#92;data&#92;us_soldier_sabot_body.rvmat&#34;, &#34;ca&#92;characters&#92;data&#92;us_soldier_sabot_body_wound1.rvmat&#34;, &#34;ca&#92;characters&#92;data&#92;us_soldier_sabot_body_wound2.rvmat&#34;};
};
};
};[/QUOTE]

Above is using the default SF model and it&#39;s textures. You need of course to change somethings, especially the path to the mode l and the wounded textures.

Most lines are self-explaining, to the ones which need your attention I added comments at the end.
Should you need more help, PM me and I see where I can assist you.

DaanVS
Jun 28 2007, 08:16
you sir, are the best. thanks http://forums.bistudio.com/oldsmileys/smile_o.gif

namreg
Jun 29 2007, 16:43
And then???
When you have created all of your textures, how do you make an addon from it???
Do you have to PBO it???
Because I don&#39;t really know if you can create all of your textures and even modify the P3D file of your own addon, do you create them all in your own folder in the desktop??? and then ,PBO it and place them in the addons folder in ArmA?http://forums.bistudio.com/oldsmileys/huh.gif

http://forums.bistudio.com/oldsmileys/huh.gif

Sorry if this has been covered before, but DaanVS made the correct question and the answer was a strike one so... http://forums.bistudio.com/oldsmileys/whistle.gif is there any tutorial that covers all the addon creating step by step?http://forums.bistudio.com/oldsmileys/huh.gif

http://forums.bistudio.com/oldsmileys/biggrin_o.gif THX again http://forums.bistudio.com/oldsmileys/biggrin_o.gif

W0lle
Jul 1 2007, 05:55
Yes you put all the stuff (textures, model and config) into one folder - which of course must have the same name in both the edited model and the config.

Then you use one of the Tools out there to create a pbo file out of it.

namreg
Jul 1 2007, 22:52
Well I tried that and my ArmA crashed saying that is out of memory....

I used the MikeShell&#39;s Texture Swap Utility to change the route of my new textures from the ca&#92;characters&#92; directory to my directory in the addons folder and it crashed.

If I didn&#39;t change textures, my new guys kept taking textures from that directory and no the ones I placed in the pboed file in the addon directory of ArmA. So I used MikeShell&#39;s Texture Swap Utility to change that and ....well you know...game crashed.

Please....some advice?http://forums.bistudio.com/oldsmileys/huh.gif

DaanVS
Jul 2 2007, 11:20
I&#39;m not sure if the texture utility works for ArmA :-/
I used a hex editor.

namreg
Jul 2 2007, 13:44
Is it easy to use a hex editor??? How do I use it to change textures?http://forums.bistudio.com/oldsmileys/huh.gif

could you give me some examples I could follow???

THX in advance mate

http://forums.bistudio.com/oldsmileys/notworthy.gif __http://forums.bistudio.com/oldsmileys/notworthy.gif

And another question to W0lle:

How can I make my new unit to appear in the UNITS CLASS at the MISSION EDITOR??? Because your config creates a brand new class and only my unit is in it....

DaanVS
Jul 2 2007, 17:32
first get yourself the original p3d file and textures. put all of that inside a new folder.
Edit the textures with your favorite photo editing application. I use adobe photoshop myself.
Download a hex editor. I use XVI32 for years now, you can find it here: http://www.handshake.de/user/chmaas/delphi/download/xvi32.zip

Open the p3d file in your hex editor.
Press control+f and type in the name of the texture you changed. The hex editor will find multiple instances of this filename. change the path and name of that/those texture(s) to something with the exact same amount of characters.

http://www.bbe-squad.com/hex.jpg

An example:
The texture I changed was called "res_officer_equip_co.paa

The hex editor showed the path as ca&#92;characters&#92;data&#92;res_officer_equip_co.paa

I changed it to bbe_operators&#92;data&#92;res_officer_equip_co.paa

where "bbe_operators" is the root folder in which I made another folder called data, that contains the new/edited texture.

As you can see in the code example above, the config.cpp has to point to wherever your new .p3d file is.

use pboview (ftp://www.armedassault.info/armad/tools/PboView.zip) to pack it all up together, put the newly created pbo file (in my case bbe_operators.pbo) into the addons folder, and check it out http://forums.bistudio.com/oldsmileys/smile_o.gif

EDIT:
Just so you can see, the filename/path has to have the same amount of characters:

ca&#92;characters&#92;data&#92;res_soldier_co.paa
bbe_operators&#92;data&#92;res_soldier_co.paa

And when you&#39;ve done it all right, you&#39;ll see your units ingame with their new outfits http://forums.bistudio.com/oldsmileys/wink_o.gif

http://www.bbe-squad.com/arma-at2.jpg

DaanVS
Jul 2 2007, 18:32
About the texture utility, I never used it myself but my guess is that it could work as long as you keep the paths the same length (as in the same amount of characters). You could test that if you want, please post your conclusion here http://forums.bistudio.com/oldsmileys/wink_o.gif

namreg
Jul 3 2007, 01:44
Alright, I did everything you said....

I found all the files of the p3d file.
I changed the one i wanted, put it in the data folder in my characters folder.
I used the HEX editor you kindly gave me and changed the route with the exact 13 characters.
I created the config file as M0lle taught us to and this was the result:

I can see my unit in 1st person mode with my oufit. But if I go to 3rd person view I see the default textures.... it happens too if I place a second unit in the scene.... I see my new textures in 1st person camera but I see the other unit with the default ones

Here I posted a video (XviD):

Texture - VIDEO (XviD) (http://www.oriolajuan.com/arma/arma_texture.avi)

And here is the config file:


Quote[/b] ]class CfgPatches
{
class RACSBodyguard
{
units[] = {"RACSBodyguard"};
weapons[] = {};
requiredVersion = 1.00;
requiredAddons[] = {"CAData","CACharacters","CAWeapons"};
};
};

class CfgVehicleClasses
{
class RACSBodyguard
{
displayName = "RACSBodyguard";
};
};

class CfgVehicles
{
/*extern*/ class soldiergb;
class RACSBodyguard: soldiergb
{
displayName="RACSBodyguard";
vehicleClass="RACSBodyguard";
model = "&#92;racsbodyguard&#92;racsbodyguard.p3d"; // place the path to your model here
scope = 2;
picture = "&#92;racsbodyguard&#92;data&#92;Ico&#92;i_bg_ca.paa"; // picture of the unit as it appears in the commandbar
canHideBodies = 1;
canDeactivateMines = 1;
nightVision = 1;
weapons[]={"mp5a5","M9","NVGoggles","Throw","Put"}


;
magazines[]={"30rnd_9x19_mp5","30rnd_9x19_mp5","30rnd_9x19_mp5","Ha


ndGrenade","HandGrenade","HandGrenade","HandGrenade",&a
mp;a
mp;q
uot;15Rnd_9x19_M9","15Rnd_9x19_M9","15Rnd_9x19_M9","15Rnd_9x


19_M9"};
class Wounds // below change the paths to your textures
{
tex[] = {};
mat[] = {"ca&#92;characters&#92;data&#92;np_hhl.rvmat", "ca&#92;characters&#92;data&#92;np_hhl_wound1.rvmat", "ca&#92;characters&#92;data&#92;np_hhl_wound2.rvmat", "ca&#92;characters&#92;data&#92;np_soldier_body_wound1.rvmat", "ca&#92;characters&#92;data&#92;np_soldier_body_wound2.rvmat"};
};
};
};


The target p3d is np_soldier_captive.p3d

DaanVS
Jul 3 2007, 10:38
As I said, there are more instances of the same texture in the p3d file. you have to change the paths and names of all of those instances. By the sound of it, you only changed the first instance the search function showed you.

hotshotmike1001
Jul 5 2007, 22:57
i try to follow what You Talked About all i get is Memory Crash to Desktop i am trying to edit texture path for the AH6 so i can add a Russian Copy to the game using custom textures

namreg
Jul 6 2007, 14:30
I tried to do the same with the P3DUtil (Texture Swap Utility) using the same path length for replacing the textures and continues crashing.

And finally I did what you said... find all the instances for the same texture in the HEX editor and it works perfectly now.

DaanVS
Jul 6 2007, 14:56
Good to hear mate http://forums.bistudio.com/oldsmileys/smile_o.gif

stock762
Aug 3 2007, 05:26
I added a unit from OFP to this config and he&#39;s in the stance he&#39;s in when in the modeling program, do you know what needs to be done to fix that. It seems as if he has no animations or anything just slides around the ground. Thanks