OFPEC Forum
Addons & Mods Depot => ArmA - Configs & Scripting => Topic started by: The_Blink 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
-
definitely need more info.
First, what type of unit are we talking about?
man, car, plane .... ?
second, whats the exact name of the p3d
-
sry lol
a man
the texture was taken form a racs airmen so ill use that and take the helmat off
-
Hmmm, haven't mod'ed men myself, but at a guess (untested);
This is the default Civilian (under CfgVehicles) ;
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
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.
-
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
-
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
-
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
-
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"};
};
-
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?
-
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.:
class SoldierWPilot;
class YourModifiedPilotClassName: SoldierWPilot {};
This should work without any sidekicks to the existing addons.
-
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?
-
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 (http://pastebin.com/)
- 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
-
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
-
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. ;)
-
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.
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?
-
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.:
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 {};
-
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.
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 {};
};
-
Too many brackets :)
class Civilian: CAManBase{}; // extend class
{
...
correct (I hope...)
class Civilian: CAManBase
{
...
But I think that this alternative should work, too:
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 (http://community.bistudio.com/wiki/Model_Config) for a soldier, but I am not 100% sure if this works: Pastebin model.cfg BISoldier (http://pastebin.com/m56e617ab)
The bones should be the same, just add
class SL_medic: ArmaMan{};
to link it to your SL_medic.p3d instead of the BISoldier
-
Kinda done it.. something's clearly not right though, haha :P
-
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 (http://www.zshare.net/download/59601559496d62c1/)
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
-
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
-
Everything is correct, I just changed the inherritance like this:
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 (http://www.zshare.net/image/59650177c33e28e4/)
You find the "Sahrani Medic" in Blufor / Men / "Sahrani Medic".
Only issue left seems to be the shadows.
-
wow tats great XD thanks alot for your help maik
and jason too ,although uve heard it before on arma-rpg lmao
-
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.
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
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.
-
Nice work!
...only, of course, you haven't tagged your creation :no: Get yourself over to OFPEC Tags (http://www.ofpec.com/tags/index.php) 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.
-
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.