Home   Help Search Login Register  

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

0 Members and 1 Guest are viewing this topic.

Offline modEmMaik

  • Members
  • *
Re: Configs for re-skined units
« Reply #15 on: 02 May 2009, 12:10:08 »
I am not an expert to characters, but it seems that those units get animated via .rtm's only (the model.cfg includes not animations, as far as I have analyzed this).

So you may check the animations, using a rtm-file (e.g. ca/wheeled/data/anim/xxx.rtm) an load this into O2 (Animations window) for all LODs (right click into the animations window pos up a menu).

plus: Have you checked the model.cfg for a correct bone structure and the assignment to the .p3d's name.

e.g.:
Code: [Select]
class CfgModels
{
class Default;
...
class ArmaMan : Default
{
sections[] =
{
    "osobnost","Head_Injury","Body_Injury","l_leg_injury","l_arm_injury","r_arm_injury","r_leg_injury",
    "clan"
};
  skeletonName = "OFP2_ManSkeleton";
};

class SL_medic: ArmaMan {};

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: Configs for re-skined units
« Reply #16 on: 03 May 2009, 01:31:52 »
I don't have a model.cfg. I assume this is important.

Some research tells me that the classname has to be the same name as the model (sl_medic) as you have there. So will play around and see if I achieve anything from it.

Thanks for the reply.

Edit: OK, here's error message I got. Not sure on the syntax used in config's i'm afraid, so not sure what's wrong.
Code: [Select]
class CfgModels
{
class All{};
class AllVehicles: All{};
class Land: AllVehicles{};
class Man: Land{};
class CAManBase: Man{};
class Civilian: CAManBase{}; // extend class
{
sections[] =
{
    "osobnost","Head_Injury","Body_Injury","l_leg_injury","l_arm_injury","r_arm_injury","r_leg_injury", "clan"
};
  skeletonName = "OFP2_ManSkeleton";
};

class SL_medic: Civilian {};
};
« Last Edit: 03 May 2009, 18:01:59 by JasonO »

Offline modEmMaik

  • Members
  • *
Re: Configs for re-skined units
« Reply #17 on: 03 May 2009, 22:19:53 »
Too many brackets  :)

Code: [Select]
class Civilian: CAManBase{}; // extend class
{
...
correct (I hope...)
Code: [Select]
class Civilian: CAManBase
{
...

But I think that this alternative should work, too:
Code: [Select]
class Civilian;
class SL_medic: Civilian {};

But the model.cfg should include class CfgSkeletons and class CfgModels. class CfgModels is config.cpp.

I just located an old model.cfg for a soldier, but I am not 100% sure if this works: Pastebin model.cfg BISoldier
The bones should be the same, just add
Code: [Select]
class SL_medic: ArmaMan{};
to link it to your SL_medic.p3d instead of the BISoldier
« Last Edit: 03 May 2009, 22:27:50 by modEmMaik »

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: Configs for re-skined units
« Reply #18 on: 04 May 2009, 01:16:11 »
Kinda done it.. something's clearly not right though, haha :P

Offline modEmMaik

  • Members
  • *
Re: Configs for re-skined units
« Reply #19 on: 05 May 2009, 00:12:25 »
Hmmm... suprising  :o

I have just checked the new sjb_sas package, and he uses nearly the same skeleton. Buy my config seems to include at least one error. The skeletonName="Head" is definitely missing. May be you get a better model.cfg from Jackal326, because he released the latest units.

Alternatively: Have you tried a BI-standard unit with this config?

:edit: I have just created a little repl-config for the BI-BLUFOR standard unit: unit repl config unbin

The model.cfg was definitely buggy :(
I am not sure, if the flag / flag_carrier definitions are needed, but the unit works ingame. The .pbo is unbinarized. I hope this helps you.

br,
mike
« Last Edit: 05 May 2009, 00:37:26 by modEmMaik »

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: Configs for re-skined units
« Reply #20 on: 06 May 2009, 02:51:14 »
Hmm, I tried replacing your model and putting mine in then just changing the necessary.. and it goes back to how it was with him half in the ground and standing still.

I've zipped what I have now. Maybe you can see anything i've missed out? I hate having to send the whole thing over to have someone else 'do' it, but i'm really stumped to a solution on why this isnt working.

Thanks for your replies modEmMaik - It really is greatly appreciated :)

Jason

Offline modEmMaik

  • Members
  • *
Re: Configs for re-skined units
« Reply #21 on: 06 May 2009, 10:40:16 »
Everything is correct, I just changed the inherritance like this:

Code: [Select]
class CfgPatches {

class SL_medic {
Units[] = {"SL_medic"};
Weapons[] = {};
requiredVersion = 1.000000;
requiredAddons[] = {"CACharacters"};
};
};


class CfgVehicles
{
class SoldierWMedic;
class SL_medic : SoldierWMedic
{
displayName="Sahrani Medic";
model="\sl_medic\sl_medic";
class Wounds
{
tex[]={};
mat[]={
"ca\characters\data\res_pilot_body.rvmat",
"ca\characters\data\res_pilot_body_wound1.rvmat",
"ca\characters\data\res_pilot_body_wound2.rvmat",
"ca\characters\data\us_pilot_hhl.rvmat",
"ca\characters\data\us_pilot_hhl_wound1.rvmat",
"ca\characters\data\us_pilot_hhl_wound2.rvmat"
};
};
};
};

Result Pic

You find the "Sahrani Medic" in Blufor / Men / "Sahrani Medic".

Only issue left seems to be the shadows.

Offline The_Blink

  • Members
  • *
Re: Configs for re-skined units
« Reply #22 on: 06 May 2009, 14:01:20 »
wow tats great XD thanks alot for your help maik

and jason too ,although uve heard it before on arma-rpg lmao

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: Configs for re-skined units
« Reply #23 on: 07 May 2009, 01:05:31 »
Fantastic!

I edited the textures a bit. We removed the helmet from the unit, but he still had the RVMAT files so he had a funny shadow on his head :P

Here's the final config for a working unit for anyone who wants to use it.

Code: [Select]
class CfgPatches {

class SLR_medic {
Units[] = {"SLR_medic"};
Weapons[] = {};
requiredVersion = 1.000000;
requiredAddons[] = {"CACharacters"};
};
};


class CfgVehicles
{
class SoldierGMedic;
class SLR_medic : SoldierGMedic
{
displayName="SLR Paramedic";
model="\SLR_medic\SLR_medic";
weapons[] = {};
magazines[] = {};

class Wounds
{
tex[]={};
mat[]={
"ca\characters\data\soldier_captive_body.rvmat",
"ca\characters\data\soldier_captive_body_wound1.rvmat",
"ca\characters\data\soldier_captive_body_wound2.rvmat",
"ca\characters\data\soldier_captive_hhl.rvmat",
"ca\characters\data\soldier_captive_hhl_wound1.rvmat",
"ca\characters\data\soldier_captive_hhl_wound2.rvmat"
};
};
};

};

Also included is model.cfg

Code: [Select]
class CfgSkeletons
{
class Default
{
isDiscrete = 1;
skeletonInherit = "";
skeletonBones[] = {};
};
class Head
{
isDiscrete = 0;
skeletonInherit = "";
skeletonBones[] =
{
"neck","",
"neck1","neck",
    "head","neck1",
"lBrow","head",
"mBrow","head",
"rBrow","head",
"lMouth","head",
"mMouth","head",
"rMouth","head",
"eyelids","head",
"LLip","head"
};
};
class OFP2_ManSkeleton
{
isDiscrete = 0;
skeletonInherit = "Head";
skeletonBones[] =
{
"weapon","",
"launcher","",
"Camera","",
"Spine","",
"Spine1","",
"Spine2","",
"Spine3","",
"Pelvis","",
//Left upper side
"LeftShoulder","",
"LeftArm","",
"LeftArmRoll","",
"LeftForeArm","",
"LeftForeArmRoll","",
"LeftHand","",
"LeftHandRing","",
"LeftHandRing1","",
"LeftHandRing2","",
"LeftHandRing3","",
"LeftHandPinky1","",
"LeftHandPinky2","",
"LeftHandPinky3","",
"LeftHandMiddle1","",
"LeftHandMiddle2","",
"LeftHandMiddle3","",
"LeftHandIndex1","",
"LeftHandIndex2","",
"LeftHandIndex3","",
"LeftHandThumb1","",
"LeftHandThumb2","",
"LeftHandThumb3","",

//Right upper side
"RightShoulder","",
"RightArm","",
"RightArmRoll","",
"RightForeArm","",
"RightForeArmRoll","",
"RightHand","",
"RightHandRing","",
"RightHandRing1","",
"RightHandRing2","",
"RightHandRing3","",
"RightHandPinky1","",
"RightHandPinky2","",
"RightHandPinky3","",
"RightHandMiddle1","",
"RightHandMiddle2","",
"RightHandMiddle3","",
"RightHandIndex1","",
"RightHandIndex2","",
"RightHandIndex3","",
"RightHandThumb1","",
"RightHandThumb2","",
"RightHandThumb3","",
//Left lower side
"LeftUpLeg","",
"LeftUpLegRoll","",
"LeftLeg","",
"LeftLegRoll","",
"LeftFoot","",
"LeftToeBase","",
//Right lower side
"RightUpLeg","",
"RightUpLegRoll","",
"RightLeg","",
"RightLegRoll","",
"RightFoot","",
"RightToeBase",""
};
};
class Flag: Default
{
};
class FlagCarrier: Default
{
skeletonInherit="Default";
skeletonBones[]=
{
"stozar",
"",
"vlajka",
""
};
};
};
class CfgModels
{
class Default
{
sections[] = {};
sectionsInherit="";
skeletonName = "";
};
class flag_vojak: Default
{
        sectionsInherit="";
sections[]=
{
"latka"
};
};
class Head: Default
{
        sectionsInherit="Default";
sections[]=
{
"osobnost",
"brejle"
};
skeletonName="Head";
};
class ArmaMan: Head
{
        sectionsInherit="Head";
sections[]=
{
"osobnost",
"Head_Injury",
"Body_Injury",
"l_leg_injury",
"l_arm_injury",
"r_arm_injury",
"r_leg_injury",
"clan"
};
skeletonName="OFP2_ManSkeleton";
};
class SLR_medic: ArmaMan
{
};
};

Hopefully this helps someone else who may have the same problem as me :)

Thank you very much modEmMaik for your contribution in helping me with the config. It really has helped, and I've learnt quite a few things regarding configs from it. Once again, thank you.
« Last Edit: 07 May 2009, 20:08:10 by JasonO »

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Configs for re-skined units
« Reply #24 on: 07 May 2009, 10:17:07 »
Nice work!

...only, of course, you haven't tagged your creation  :no: Get yourself over to OFPEC Tags and register a tag, and change the classname to TAG_medic instead (or TAG_sl_medic). Really. It'll save you and everyone else a lot of work, and since you're digging around the configs anyway... :)

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: Configs for re-skined units
« Reply #25 on: 07 May 2009, 20:07:29 »
http://www.ofpec.com/tags/index.php?action=details&tag_id=1743

Okay, I've registered SLR. Updated confg above, will do same for ingame ones too.