Jump to content
Sign in to follow this  
abs

Where does one begin?

Recommended Posts

Hi,

So, I know how to model, UV map, and I have a texture artist...but I know 0% about configs. I've done my best in o2 to have my model mimic the selections for the humvee, but so far I've only been able to get it in-game as a static object.

What I'm wondering is: does anyone know any good resources/tutorials to help a complete beginner like me get a car in-game? Everything I've found so far is either way above my knowledge level or for OFP.

Any help at all in this matter is greatly appreciated.

Abs

Share this post


Link to post
Share on other sites

Don't recall any tuts but heres a bit.

MODEL.CFG

In theory I'm guessing its possible to create a model.cfg that inherits everything from other models (ie the existing HMMWV) and hence with would only be 10 lines long ....

But I've yet to get that to work, so the best thing seems to be simply copy the model.cfg demo data that BIS provided.

Simply take and use only the bits that would apply to your model.

Below is a simple "all-included" section, if your model doesn't have all these named sections and animations, it won't matter.

Remeber

Remember your actual p3d file name must match the bit after CfgModel. i.e. "MyCar.p3d" would be the file name in this example

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class CfgSkeletons

{

class MYSkeleton

{

isDiscrete=1;

skeletonInherit="";

skeletonBones[]=

{

"volant",

"",

"levy predni tlumic",

"",

"pravy predni tlumic",

"",

"levy dalsi tlumic",

"",

"pravy dalsi tlumic",

"",

"levy predni zatoc",

"levy predni tlumic",

"pravy predni zatoc",

"pravy predni tlumic",

"levy dalsi zatoc",

"levy dalsi tlumic",

"pravy dalsi zatoc",

"pravy dalsi tlumic",

"levy prostredni tlumic",

"",

"pravy prostredni tlumic",

"",

"levy zadni tlumic",

"",

"pravy zadni tlumic",

"",

"levy predni",

"levy predni zatoc",

"pravy predni",

"pravy predni zatoc",

"levy dalsi",

"levy dalsi zatoc",

"pravy dalsi",

"pravy dalsi zatoc",

"levy prostredni",

"levy prostredni tlumic",

"pravy prostredni",

"pravy prostredni tlumic",

"levy zadni",

"levy zadni tlumic",

"pravy zadni",

"pravy zadni tlumic",

"ukaz_rychlo",

"",

"ukaz_rychlo2",

"",

"ukaz_rpm",

"",

"OtocVez",

"",

"OtocHlaven",

"OtocVez",

"fuel_01",

"",

"fuel_1",

"",

"prop_01",

"",

"prop_02",

"",

"prop_2",

"",

"prop_1",

"",

"damageHide",

"",

"damageVez",

"OtocVez",

"damageHlaven",

"OtocHlaven"

};

};

};

class CfgModels

{

class hmmwv;

class MyCar: hmmwv

{

sectionsInherit="";

sections[]=

{

"ammo",

"sklo predni p",

"sklo predni l",

"zadni svetlo",

"brzdove svetlo",

"spz",

"karoserie",

"motor",

"zbran",

"vez",

"zbytek",

"levy predni",

"levy prostredni",

"levy zadni",

"pravy predni",

"pravy prostredni",

"pravy zadni",

"clan",

"clan_sign",

"zasleh",

"P svetlo",

"L svetlo",

"palivo"

};

skeletonName="MYSkeleton";

class Animations

{

class damageHide

{

type="hide";

source="damage";

selection="damageHide";

};

class IndicatorSpeed

{

animPeriod=0;

type="rotation";

source="speed";

selection="ukaz_rychlo";

axis="osa_rychlo";

memory=0;

minValue=0.000000;

maxValue=16.670000;

angle0=0.000000;

angle1=2.879793;

};

class IndicatorSpeed2

{

type="rotation";

source="speed";

selection="ukaz_rychlo2";

axis="osa_rychlo2";

memory="false";

animPeriod=0;

minValue=0;

maxValue=16.670000;

angle0=0;

angle1="rad -240";

};

class IndicatorRPM

{

animPeriod=0;

type="rotation";

source="rpm";

selection="ukaz_rpm";

axis="osa_rpm";

memory=0;

minValue=0.000000;

maxValue=1.000000;

angle0=0.000000;

angle1=2.967060;

};

class DrivingWheel

{

type="rotation";

source="drivingWheel";

selection="volant";

begin="osaVolantZac";

end="osaVolantKon";

memory="false";

animPeriod=0;

minValue=-1;

maxValue=1;

angle0=-8;

angle1=8;

};

class TurnFrontWheelR

{

type="rotationY";

source="drivingWheel";

selection="pravy predni zatoc";

axis="pravy predni";

memory="false";

animPeriod=0;

sourceAddress="loop";

minValue="rad -180";

maxValue="rad +180";

angle0="rad +90";

angle1="rad -90";

};

class TurnFrontWheelL: TurnFrontWheelR

{

selection="levy predni zatoc";

axis="levy predni";

};

class TurnFrontWheelR2: TurnFrontWheelR

{

selection="pravy dalsi zatoc ";

axis="pravy dalsi";

};

class TurnFrontWheelL2: TurnFrontWheelR

{

selection="levy dalsi zatoc ";

axis="levy dalsi";

};

class FrontWheelR

{

type="rotationX";

source="wheel";

selection="pravy predni";

axis="";

memory="true";

animPeriod=0;

sourceAddress="loop";

minValue=0;

maxValue=1;

angle0=0;

angle1="rad -360";

};

class FrontWheel2R: FrontWheelR

{

selection="pravy dalsi";

};

class BackWheelR: FrontWheelR

{

selection="pravy zadni";

};

class BackWheel2R: FrontWheelR

{

selection="pravy prostredni";

};

class FrontWheelL: FrontWheelR

{

selection="levy predni";

};

class FrontWheel2L: FrontWheelR

{

selection="levy dalsi";

};

class BackWheelL: FrontWheelR

{

selection="levy zadni";

};

class BackWheel2L: FrontWheelR

{

selection="levy prostredni";

};

class FrontWheelDamperR

{

type="translationY";

source="damper";

selection="pravy predni tlumic";

axis="";

animPeriod=0;

minValue=-1000;

maxValue=1000;

};

class FrontWheelDamper2R: FrontWheelDamperR

{

selection="pravy dalsi tlumic";

};

class BackWheelDamperR: FrontWheelDamperR

{

selection="pravy zadni tlumic";

};

class BackWheelDamper2R: FrontWheelDamperR

{

selection="pravy prostredni tlumic";

};

class FrontWheelDamperL: FrontWheelDamperR

{

selection="levy predni tlumic";

};

class FrontWheelDamper2L: FrontWheelDamperR

{

selection="levy dalsi tlumic";

};

class BackWheelDamperL: FrontWheelDamperR

{

selection="levy zadni tlumic";

};

class BackWheelDamper2L: FrontWheelDamperR

{

selection="levy prostredni tlumic";

};

class damageVez: damageHide

{

selection="damageVez";

};

class damageHlaven: damageHide

{

selection="damageHlaven";

};

};

};

};

Easier to read PASTEBIN - MODEL.CFG

CONFIG.CPP

A simple config.cpp file is easy. you can inherit all the various conditions from other models (map icon, number of cargo spaces, max speed etc etc) and you only need to point it to your p3d file.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">// some basic defines

#define TEast 0

#define TWest 1

#define TGuerrila 2

#define TCivilian 3

#define TSideUnknown 4

#define TEnemy 5

#define TFriendly 6

#define TLogic 7

#define true 1

#define false 0

// type scope

#define private 0

#define protected 1

#define public 2

#define WeaponNoSlot 0 // dummy weapons

#define WeaponSlotPrimary 1 // primary weapons

#define WeaponSlotSecondary 16 // secondary weapons

#define WeaponSlotItem 256 // items

#define WeaponSlotBinocular 4096 // binocular

#define WeaponHardMounted 65536

#define CanSeeRadar 1

#define CanSeeRye 2

#define CanSeeOptics 4

#define CanSeeEar 4

#define CanSeeCompass 16

#define CanSeeRadarC CanSeeRadar+CanSeeCompass

#define CanSeeAll 31

class CfgPatches

{

class ABS_MyCar

{

units[] = {MyCar};

weapons[] = {};

requiredVersion = 1.0;

};

};

class CfgVehicles

{

class HMMWV;

class MyCar: HMMWV

{

model=\MYCar\MyCar.p3d;

displayName= "My Car";

};

};

Easier to read PASTEBIN - CONFIG.CPP

To modify all above further, I suggest you open the demo MODEL.CFG and CONFIG.CPP files provided by BIS.

They show you all the different parameters that can be defined (and hence re-defined).

The above provided code works with the demo "HMMWV.p3d" provided by BIS.

Simply place this file in a folder called "MyCar", and rename that p3d to "MyCar.p3d". Add the above files config.cpp and model.cfg to the folder and Binerize ..... you then have a new HMMWV called "My Car" in the editor menu (under Cars category).

HTH

Share this post


Link to post
Share on other sites

Thanks a lot, Gnat. I'm at work now, but I'll have to try this in the morning. It's really generous of you to take the time to answer me. Thanks again.

Abs

(I don't know if you can tell by all my thanks how frustrating this config thing has been for me so far. wink_o.gif )

Share this post


Link to post
Share on other sites

np mate, I know what you mean, but it always ends up being trial and error that creates learning, as it was for me .... a shame it always takes longer than we want!  wink_o.gif

edit tpyo

Share this post


Link to post
Share on other sites

So, I've given it a shot. Like I had mentioned before, I can get the model in as a static object, but whenever I try to get it in as a car the game crashes. Has anyone had a problem like this before? Can I provide more information that might be helpful?

Abs

Share this post


Link to post
Share on other sites

i am having same problem. :P because i tryed to make the model for you:P (ONS) anyway. the problem is the object i did wont even show in game , but the name of the object shows in menu of the mission editor, however it does never appear.

Share this post


Link to post
Share on other sites
So, I've given it a shot. Like I had mentioned before, I can get the model in as a static object, but whenever I try to get it in as a car the game crashes. Has anyone had a problem like this before? Can I provide more information that might be helpful?

Abs

Sorry, missed this.

- Do you have a LOD called View-Cargo (typical copy the res lod as a start) ?

- Do you have a driver proxy and a cargo proxy (or 2) ?

If so, they should be named simply "driver.001" and "cargo.001" etc

If your Binarized the addon, then the log file it makes will tell you a fair bit too.

Share this post


Link to post
Share on other sites
i am having same problem. :P  because i tryed to make the model for you:P (ONS)   anyway. the problem is the object i did wont even show in game , but the name of the object shows in menu of the mission editor, however it does never appear.

What is your "model" set as in the cpp file .... sounds like that wrong.

Should be similar to;

Quote[/b] ]model="\GNT_v22\GNT_v22.p3d";

Share this post


Link to post
Share on other sites

i have the model marked and selected the part as view - pilot and view-cargo, problem is still, and the model is. well i have an lav25, and a small jet. but i got an arsenal of 3ds models to convert if anyone would help me with em in oxygen 2

Share this post


Link to post
Share on other sites

Yuo are making a model for us? Cool. Get in touch with me and let me know what it is. wink_o.gif

I found out that the reason my model was crashing is because of the LandContact lod. Once I removed it it showed up in-game as a car. Why it's crashing, I have no clue yet. I've done it properly just like the BIS demo models, but I'll worry about that later...unless someone else had the same problem.

Quote[/b] ]- Do you have a LOD called View-Cargo (typical copy the res lod as a start) ?

- Do you have a driver proxy and a cargo proxy (or 2) ?

Not yet. I'll do those today and get back to you to see if that solves some of my crash issues. Would missing those show up int the rpt file?

Abs

Share this post


Link to post
Share on other sites
You are making a model for us? Cool. Get in touch with me and let me know what it is. wink_o.gif

I found out that the reason my model was crashing is because of the LandContact lod. Once I removed it it showed up in-game as a car. [...]Abs

yes, mohahaha! the funny thing is it was the first asssignement u made me do, the "aase´s" wall- a mud wall- well the problem is i cant see it in game, but the scripts are correct, which means, the problem isin the program oxygen 2. (most likely, LODs) and as for my model? same problem, im dont know how to configure it on oxygen ... icon_rolleyes.gifhuh.gifcrazy_o.gifpistols.gifpistols.gifpistols.gifbanghead.gifhelp.gif

Share this post


Link to post
Share on other sites

Okay, so here's my arma.RPT. Any insight?

Quote[/b] ]

=====================================================================

== C:\Program Files\Atari\ArmA\arma.exe

=====================================================================

Exe version: Fri May 23 12:37:02 2008

build 1.14.5256

Item STR_03s01 listed twice

Item STR_LIB_HILUX listed twice

Updating base class ->Default, by ca\anims\characters\config.bin/CfgMovesBasic/DefaultDie/

Updating base class ->Default, by ca\anims\characters\config.bin/CfgMovesMaleSdr/States/Crew/

Updating base class ->MGunCore, by ca\weapons\config.bin/cfgWeapons/MGun/

Updating base class ->Man, by ca\characters\config.bin/CfgVehicles/CAManBase/

Updating base class Soldier->CAManBase, by ca\characters\config.bin/CfgVehicles/SoldierWB/

Updating base class ->HMMWV50, by ca\wheeled\config.bin/CfgVehicles/HMMWV/

ca\Desert2\config.bin/CfgDestroy/BuildingHit.sound: Cannot update non array from array

Warning: ons_armoured\ons_nyala.p3d:0 Face 4511, point 4493, face points 4493,4495,4507 - very small normal -0,0,-0

Warnings in ons_armoured\ons_nyala.p3d:0

Warning: ons_armoured\ons_nyala.p3d:0 Face 4511, point 4493, face points 4493,4495,4507 - very small normal -0,0,-0

Warnings in ons_armoured\ons_nyala.p3d:VIEW_PILOT

Warning: ons_armoured\ons_nyala.p3d:0 Face 4511, point 4493, face points 4493,4495,4507 - very small normal -0,0,-0

Warnings in ons_armoured\ons_nyala.p3d:VIEW_CARGO

=======================================================

Date: 10/24/08  Time: 19:53:08

-------------------------------------------------------

Exception code: C0000005 ACCESS_VIOLATION at 004E83BC

graphics:  D3D9, Device: NVIDIA GeForce 8800 GTX, Driver:nvd3dum.dll 7.15.11.7813

resolution:  1680x1050x32

Addons:

 Datsun_armed_DBE1 in CA\DBE1\datsun_armed\, ons_buildings in ons_buildings\

 CTI_buildingsBmp2_hq in ca\cti_buildings\bmp2_hq\

 CTI_buildingsM113_hq in ca\cti_buildings\m113_hq\, DBE1 in CA\DBE1\

 CA_Hotfix in ca\hotfix\, SaraLite in ca\saralite\, Desert in ca\desert\

 CAIntroAnims in ca\introanims\, LLW_WEAPON in llw_weapon\

 WarfareBuildings_TOW_Tripod in ca\cti_buildings\tow_stat\

 ericm_hind in ericm-hind\, CASounds in ca\sounds\

 WarfareBuildings_T72_RACS in ca\cti_buildings\t72_racs\, DBE1_UI in CA\DBE1\ui\

 Desert2_Buildings in ca\Desert2\build\, CAMiscUS in ca\miscUS\

 CA_Missions_Armory1 in ca\missions\armory1.intro\

 CAweapons3_m107 in CA\weapons3\m107\

 CAweapons3_m16a4_acg in CA\weapons3\m16a4_acg\, CAWheeled in ca\wheeled\

 ONS_Armoured in ons_armoured\, Desert2_Objects in ca\Desert2\objects\

 CA_Missions in ca\missions\, CARoads in ca\roads\

 CAWheeled3_TT650 in CA\wheeled3\tt650\, CAAir in ca\air\, CA_Anims in ca\anims\

 MK19_Tripod in ca\cti_buildings\mk19_stat\, CAUSMCD in ca\usmcd\

 CAAnimals in CA\animals\, CA_desert2_Characters in ca\Desert2\characters\

 CAUI in ca\ui\, CAWeapons in ca\weapons\, CAweapons3_m16a4 in CA\weapons3\m16a4\

 CAWeapons3_ammocrates in CA\weapons3\ammocrates\, CAAir3_Su34 in CA\air3\su34\

 CACharacters in ca\characters\, DC3_DBE1 in CA\DBE1\dc3\, CASigns in CA\signs\

 CAFonts in ca\UIFonts\, CAweapons3_m16a4_gl in CA\weapons3\m16a4_gl\

 CAWeapons3 in CA\weapons3\, CAWheeled3_M1030 in CA\wheeled3\m1030\

 CAAir3 in CA\air3\, DSHkM_Mini in ca\cti_buildings\dshkm_stat\, CAMisc in ca\misc\

 CAPlants in CA\plants\, CAVoice in ca\voice\, CAData in ca\

 WarfareBuildings_Stinger_Twice_static in ca\cti_buildings\stinger_stat\

 CALanguage in ca\language\, CAWater in CA\water\

 CAweapons3_aks74pso in CA\weapons3\aks74pso\

 CA_Anims_Char in ca\anims\characters\, WarfareBuildings in ca\cti_buildings\

 M2HD_Mini in ca\cti_buildings\m2_stat2\, CATracked in ca\tracked\

 Warfare in warfare\, CAweapons3_ksvk in CA\weapons3\ksvk\

 ons_captive in ons_infantry\, CAA10 in ca\a10\, Porto in ca\Desert2\

 3lb_f22 in 3lb_f22\, 6G30_DBE1 in CA\DBE1\6g30\, Sara in ca\sara\

 CAWheeled3 in CA\wheeled3\, CABuildings in ca\buildings\

 Hilux_armed_DBE1 in CA\DBE1\hilux_armed\

 CA_Hotfix_vez_ropa in ca\hotfix\vez_ropa\, CARocks in Ca\Rocks\

 CAweapons3_m16a4_acg_gl in CA\weapons3\m16a4_acg_gl\

Mods: CA;@ONS

Distribution: 1293

Version 1.14.5256

Fault address:  004E83BC 01:000E73BC C:\Program Files\Atari\ArmA\arma.exe

file:     Abs

world:    Intro

Prev. code bytes: 00 00 8B 4B 58 E8 7A 1D F4 FF D9 05 F8 DC 92 00

Fault code bytes: F3 0F 10 80 40 01 00 00 F3 0F 5C 80 34 01 00 00

Registers:

EAX:00000000 EBX:1210B000

ECX:04CB92AC EDX:0125F88C

ESI:1210B01C EDI:12113C00

CS:EIP:001B:004E83BC

SS:ESP:0023:01257B4C  EBP:0125F9BC

DS:0023  ES:0023  FS:003B  GS:0000

Flags:00010246

=======================================================

note: Minidump has been generated into the file C:\Users\Abs\AppData\Local\ArmA\arma.mdmp

Abs

Share this post


Link to post
Share on other sites

yes abs,...   the rpt says this is wrong :P :

Updating base class ->HMMWV50, by ca\wheeled\config.bin/CfgVehicles/HMMWV/

ca\Desert2\config.bin/CfgDestroy/BuildingHit.sound: Cannot update non array from array

Warning: ons_armoured\ons_nyala.p3d:0 Face 4511, point 4493, face points 4493,4495,4507 - very small normal -0,0,-0

Warnings in ons_armoured\ons_nyala.p3d:0

Warning: ons_armoured\ons_nyala.p3d:0 Face 4511, point 4493, face points 4493,4495,4507 - very small normal -0,0,-0

Warnings in ons_armoured\ons_nyala.p3d:VIEW_PILOT

Warning: ons_armoured\ons_nyala.p3d:0 Face 4511, point 4493, face points 4493,4495,4507 - very small normal -0,0,-0

Warnings in ons_armoured\ons_nyala.p3d:VIEW_CARGO

basicaly on your ons armored addon, the particular file nyala.p3d is modeled wrong way, or scripted wrong, since view_cargo and view_pilot has errors..... sad_o.gif  let me check details .

EDIT:

btw, im registered on your site. same login name as the nick on forum here, why dont you just send the addon? and the whole pbo file.... . (i dont have internet so it will take 1 day for me between each reply.)

solid_s out.

Share this post


Link to post
Share on other sites

So then what exactly does very small normal mean?

Abs

Share this post


Link to post
Share on other sites

whistle.gifwhistle.gif i really dont know. the point is listed... as

"0 Face 4511, point 4493, face points 4493,4495,4507 - very small normal -0,0,-0"

what that means i can only check with oxygen 2. if i had the p3d file. but try to render it and look at the model if it has errors anywhere, (or send me the file ) :P

Share this post


Link to post
Share on other sites

Have you tried selecting all faces, and then clicking F5 to recalculate normals?

Share this post


Link to post
Share on other sites

Hey Rocket,

I just recalculated normals, and it didn't seem to work. I think I'm going to try to hunt down that face and just delete it. Thanks.

Abs

Share this post


Link to post
Share on other sites

a normal of 0,0,0 means that it doesn't exist which means that somewhere during the process of exporting or importing the normal data was lost.

crazy_o.gif

Share this post


Link to post
Share on other sites

lol...great. Well, at least that's now solved. smile_o.gif

Thanks guys, and thanks for the clarification Soul Assassin.

Abs

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
Sign in to follow this  

×