Advertisement

Author Topic: Configs for re-skined units  (Read 5487 times)

0 Members and 1 Guest are viewing this topic.

Offline The_Blink

  • Members
  • *
Configs for re-skined units
« on: 19 Apr 2009, 14:50:12 »
hey guys im new to configs and this is the first one ive ever needed to try

ive tried editing the config for a units form the BIS configs but got no luck
can anyone show a basic single unit config without weapons and on the civ side?

if you need more info just ask

thanks

Offline Gnat

  • Addons Depot
  • Moderator
  • *****
  • I Bite!
    • Gnats
Re: Configs for re-skined units
« Reply #1 on: 19 Apr 2009, 15:12:51 »
definitely need more info.
First, what type of unit are we talking about?
man, car, plane .... ?
second, whats the exact name of the p3d

Offline The_Blink

  • Members
  • *
Re: Configs for re-skined units
« Reply #2 on: 19 Apr 2009, 21:04:15 »
sry lol
a man

the texture was taken form a racs airmen so ill use that and take the helmat off

Offline Gnat

  • Addons Depot
  • Moderator
  • *****
  • I Bite!
    • Gnats
Re: Configs for re-skined units
« Reply #3 on: 20 Apr 2009, 16:10:46 »
Hmmm, haven't mod'ed men myself, but at a guess (untested);

This is the default Civilian (under CfgVehicles) ;

Quote
   class Civilian  : CAManBase {
      scope = 2;
      access = 2;
      side = 3;
      displayName = "$STR_DN_CIVILIAN";
      nameSound = "civilian2";
      model = "\ca\characters\civil_1_tshirt";
      accuracy = 0.600000;
      camouflage = 1.200000;
      threat[] = {0.000000,0.000000,0.000000 };
      weapons[] = {"Throw","Put" };
      magazines[] = {};
      cost = 100000;
      fsmFormation = "ca\characters\scripts\formationC.fsm";
      fsmDanger = "ca\characters\scripts\formationCDanger.fsm";
      formationX = 2;
      formationZ = 5;

      class Wounds  {
         tex[] = {};
         mat[] = {"ca\characters\data\civil_1_tshirt_shorts_klapky_ksiltka_hhl.rvmat","ca\characters\data\civil_1_tshirt_shorts_klapky_ksiltka_hhl_wound1.rvmat","ca\characters\data\civil_1_tshirt_shorts_klapky_ksiltka_hhl_wound2.rvmat","ca\characters\data\civil_tshirt_body.rvmat","ca\characters\data\civil_tshirt_body_wound1.rvmat","ca\characters\data\civil_tshirt_body_wound2.rvmat" };
      };
   };

So your Civilian config should look like

Quote
class CfgPatches
{
   class TAG_MyCivilianAddon
        {
         units[] = {MyCivi};
    weapons[] = {};
    requiredAddons[] = {"CAData", "CACharacters", "CAWeapons", "CASounds", "CA_Anims_Char"};
        };

};
class CfgVehicles  {
class Civilian; // extend class
class MyCivi : Civilian
{
displayName = "My Man";
model = "\MyCivi\MyCivimodel.p3d";
class Wounds  {
         tex[] = {};
         mat[] = {xxxxxxxxxxxxxxxxxxxxxx};

};
};

If the RAC Airman has mat[]= defined, you may be able to copy those definitions, otherwise you'll have to make your own wound textures.

Offline The_Blink

  • Members
  • *
Re: Configs for re-skined units
« Reply #4 on: 20 Apr 2009, 19:38:40 »
displayName = "My Man";(i rename this to whatever i want call it?)

class Wounds  {
         tex[] = {};  (do i add the texture i made to this?)
         mat[] = {xxxxxxxxxxxxxxxxxxxxxx}(i add the wound texture here?)

am i right in my questions?

btw thank you bvery much

Offline Gnat

  • Addons Depot
  • Moderator
  • *****
  • I Bite!
    • Gnats
Re: Configs for re-skined units
« Reply #5 on: 21 Apr 2009, 15:31:54 »
no prob

1) Yes, anything
2) No, stays empty
3) Yes, in groups of 3. First def. is no wounds, second is some wounds, 3rd is full wounds.
  Like;

{"ca\characters\data\civil_1_tshirt_shorts_klapky_ksiltka_hhl.rvmat",
"ca\characters\data\civil_1_tshirt_shorts_klapky_ksiltka_hhl_wound1.rvmat",
"ca\characters\data\civil_1_tshirt_shorts_klapky_ksiltka_hhl_wound2.rvmat",
"NoWound",
"1st Level Wounds",
"2nd Level Wounds",
etc etc

Offline The_Blink

  • Members
  • *
Re: Configs for re-skined units
« Reply #6 on: 21 Apr 2009, 20:42:22 »
k i added that to the config

i can see the unit in the editor but when i click preview..the game crashes
im sure ive gone wrong but havnt a clue were

Offline modEmMaik

  • Members
  • *
Re: Configs for re-skined units
« Reply #7 on: 21 Apr 2009, 21:13:19 »
Best to check this issue in the bulldozer. It may show you some more info's about what is going wrong.

The ARMA.rpt may also show some more info.

When your last change was the wounds, check for correct "," setting.

E.g.: Wrong version (missing [] and too much ",")
class Wounds{   tex={};
         mat={"ca\characters\data\civil_1_tshirt_shorts_klapky_ksiltka_hhl.rvmat",
"ca\characters\data\civil_1_tshirt_shorts_klapky_ksiltka_hhl_wound1.rvmat",
"ca\characters\data\civil_1_tshirt_shorts_klapky_ksiltka_hhl_wound2.rvmat",};
};

correct version:
class Wounds{   tex[]={};
         mat[]={"ca\characters\data\civil_1_tshirt_shorts_klapky_ksiltka_hhl.rvmat",
"ca\characters\data\civil_1_tshirt_shorts_klapky_ksiltka_hhl_wound1.rvmat",
"ca\characters\data\civil_1_tshirt_shorts_klapky_ksiltka_hhl_wound2.rvmat"};
};
« Last Edit: 21 Apr 2009, 21:17:30 by modEmMaik »

Offline The_Blink

  • Members
  • *
Re: Configs for re-skined units
« Reply #8 on: 22 Apr 2009, 17:52:26 »
should i use \ca\characters etc since im making a new unit?

also if i used this layout once i get the unit working
would using the same config but with different p3d files and name of unit casue any clashing?

Offline modEmMaik

  • Members
  • *
Re: Configs for re-skined units
« Reply #9 on: 24 Apr 2009, 12:22:10 »
Well, a different .p3d name implies that you must supply a correct model.cfg, matching the .p3d.
Because the system is unable to determine the correct CfgSkeletons / CfgModels. It matches the CfgModels class with the .p3d name in the model.cfg.

The CfgVehicles entries can be used in a inherritance. E.g.:
Code: [Select]
class SoldierWPilot;
class YourModifiedPilotClassName: SoldierWPilot {};

This should work without any sidekicks to the existing addons.

Offline The_Blink

  • Members
  • *
Re: Configs for re-skined units
« Reply #10 on: 24 Apr 2009, 23:29:53 »
ok i get an error message now
"cannot laod material file mowound"

i can see a racs airman with his arms out,and his leg missing

any hints?

Offline modEmMaik

  • Members
  • *
Re: Configs for re-skined units
« Reply #11 on: 25 Apr 2009, 12:37:18 »
Nope,

would be fine, when you add more info about what you have done.

e.g.
- Upload your config.cpp and model.cfg to pastebin
- Upload your complete addon to zshare or other hosters

But first of all, try to get an unmodified version of the .p3d ingame, before changing anything on the model. Also check for simmilar addons (binkowski, relikki etc.), how they did it.

BR,
mike

Offline The_Blink

  • Members
  • *
Re: Configs for re-skined units
« Reply #12 on: 29 Apr 2009, 18:37:35 »
were can i apply my texture to the unit in the config? all i see is the model in RACs airmen uniforms

im really stuck but i can understand your help

Offline modEmMaik

  • Members
  • *
Re: Configs for re-skined units
« Reply #13 on: 29 Apr 2009, 19:11:54 »
Texture/material definition is in the .p3d file (visual LOD's / Face Properties).

The config may define certain sections as hiddenSelections, which can be manipulated via setObjectTexture in game.

The config includes material definition for wounds, but I think you want to apply your own texture  ???.

This should be done in O2.  ;)

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: Configs for re-skined units
« Reply #14 on: 30 Apr 2009, 21:59:35 »
I've been helping Blink. I've got the unit in game, but he just stands there frozen. I believe he's just an object, rather than a human unit.

Code: [Select]
class CfgPatches
{
class SL_Medic
{
units[] = {"SL_Medic"};
weapons[] = {};
requiredVersion = 1;
};
};

class CfgVehicleClasses
{
class sl_units
{
displayName = "SL - Civilians";
};
};


class CfgVehicles  {
class Civilian; // extend class
class SL_Medic : Civilian
{

vehicleClass = "sl_units";
displayName = "Paramedic";
model = "\sl_medic\SL_medic.p3d";

//class Wounds  {
//         tex[] = {};
//         mat[] = {"ca\characters\data\res_pilot_body.rvmat", "ca\characters\data\res_pilot_molle_webbings.rvmat", "ca\characters\data\us_officer_equip.rvmat","ca\characters\data\us_pilot_helmet.rvmat", "ca\characters\data\us_pilot_hhl.rvmat", "ca\wheeled\data\empty_nzw.rvmat"
//};


I commented out the wounds bit, as I wasn't sure it would be necesssary. Wouldn't it already be declared in civilian class?

What else do we need to expand on it and actually make a human playable unit?

Edit: I made some progress. The unit bleeds when shot but doesn't actually go down. However, the unit no longer goes solid. It's like the units geometry LOD dies, and falls to the floor but the rest of the model does nothing. What's wrong?
« Last Edit: 30 Apr 2009, 22:26:50 by JasonO »