Home   Help Search Login Register  

Author Topic: Config for a re-skinned vehicle  (Read 6106 times)

0 Members and 1 Guest are viewing this topic.

Offline Deadfast

  • Members
  • *
Config for a re-skinned vehicle
« on: 13 Apr 2009, 14:22:06 »
Hello all,
I'll say it right away - I'm a total newbie when it comes to making any configs :)


Now I'd need a little help - I've made a bunch of civilian vehicles reskins and I'd like to get them into the game. They should be stand alone and shouldn't replace any of the default vehicles.


Could anyone be that kind and give me some directions with, let's say, a reskin for the hatchback?



Thanks a lot,
Deadfast
« Last Edit: 13 Apr 2009, 20:17:59 by Deadfast »

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: Config for a re-skinned vehicle
« Reply #1 on: 13 Apr 2009, 15:36:45 »
config.cpp

Code: [Select]
class CfgPatches
{
class YourTag_MyVehicle
{
units[] = {"YourTag_MyVehicle"};
weapons[] = {};
requiredVersion = 1.14;
requiredAddons[] = {"CAWheeled"};
};
};
class CfgVehicles
{
class Car_hatchback;
class YourTag_MyVehicle: Car_hatchback
{
model = "\YourTag\MyVehicle\P3dName";
};
};

Addon structure:
P:\YourTag\MyVehicle\*

PboPrefix:
YourTag\MyVehicle

If you want to do it GOOD, separate config, from model, from sound etc into separate Pbos.

See:
Good design - separate an addon in multiple PBOs


Suggested naming:
PBO naming thoughts

So for example:

DFS_C_CIV_MyVehicle, DFS_P_CZ_MyVehicle and DFS_P_CZ_MyVehicle.

Use this setup for each model to make them all standalone and
easy to make replacement configs for em.  :good:
« Last Edit: 13 Apr 2009, 16:26:35 by kju »

Offline Deadfast

  • Members
  • *
Re: Config for a re-skinned vehicle
« Reply #2 on: 13 Apr 2009, 15:54:34 »
Much appreciated, gonna take a look on it right away :)



EDIT: Well, got it do display in the game, but it's missing any animations.
If my memory servers me correctly model.cfg has something to do with this, correct?
« Last Edit: 13 Apr 2009, 16:07:01 by Deadfast »

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: Config for a re-skinned vehicle
« Reply #3 on: 13 Apr 2009, 16:26:09 »
Yep, check

http://community.bistudio.com/wiki/Model_Config#cfgModels

I find the explanation rather complicated.
To me the config code seems more understandable.
« Last Edit: 13 Apr 2009, 16:28:10 by kju »

Offline Deadfast

  • Members
  • *
Re: Config for a re-skinned vehicle
« Reply #4 on: 13 Apr 2009, 17:05:53 »
This is getting rather annoying.

Not only it's still not animated, but now the windows are not even transparent when binarising the model...

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: Config for a re-skinned vehicle
« Reply #5 on: 13 Apr 2009, 18:03:45 »
Some patience and wait for the animation master Gnat.  :D

Make use of the new fast BIF search for billion transparent
texture threads.  :whistle:

Offline modEmMaik

  • Members
  • *
Re: Config for a re-skinned vehicle
« Reply #6 on: 13 Apr 2009, 18:58:38 »
This is getting rather annoying.

Not only it's still not animated, but now the windows are not even transparent when binarising the model...

Everybody runns into this effect  ;)

The name in the CfgModels must match you .p3d name...  :cool2:
e.g. The model is named my_hatchback.p3d

Code: [Select]
;
class CfgModels
{
    class Default
    {
        sectionsInherit="";
        sections[] = {};
        skeletonName = "";
    };
class my_hatchback: Default
{
sectionsInherit="Default";
sections[]=
{
"ammo",
...
"P svetlo"
};
skeletonName="my_hatchback_skeleton";
class Animations
{
class DrivingWheel
{
type="rotation";
source="drivingWheel";
selection="volant";
axis="volant osa";
memory="true";
animPeriod=0;
minValue=-1;
maxValue=1;
angle0=18;
angle1=-18;
};
...
};
};
};


The non-transparent effect belongs to missing .rvmat-files in your CA/xxx directory. When unbin, it uses the rvmat's from the BI-pbo's. I simply unpbo'ed most of BI's pbo's and saved them in the P:\CA directory.

e.g. P:\CA\wheeled, P:\CA\tracked and so on.
« Last Edit: 13 Apr 2009, 19:00:31 by modEmMaik »

Offline Deadfast

  • Members
  • *
Re: Config for a re-skinned vehicle
« Reply #7 on: 13 Apr 2009, 19:21:16 »
Thanks, you guys just made my day! :D


Problem solved :)


Actually one more question:
How would one go about adding seats to the vehicle?
For example the Coyota?
« Last Edit: 13 Apr 2009, 22:33:32 by Deadfast »

Offline Gnat

  • Addons Depot
  • Moderator
  • *****
  • I Bite!
    • Gnats
Re: Config for a re-skinned vehicle
« Reply #8 on: 14 Apr 2009, 13:56:29 »
Not sure what you mean ... as in model seats into the vehicle ?
Use O2, and you can make a seat out of 2 boxes. 1 Box is the back of the seat, 1 for the seat itself.
A seat with head-rest. thats 3 boxes :D

...... or, copy (Control-C) the seats in a BIS model, open your model .... paste.
Move it around until its in the right position.
The path to the textures should be presevered.

Beware but, by community rules, using BIS 3D material means your raw model is now public domain, its requestable to be handed over.

Offline Deadfast

  • Members
  • *
Re: Config for a re-skinned vehicle
« Reply #9 on: 14 Apr 2009, 14:10:26 »
Add a new passenger position(s).

Offline Gnat

  • Addons Depot
  • Moderator
  • *****
  • I Bite!
    • Gnats
Re: Config for a re-skinned vehicle
« Reply #10 on: 14 Apr 2009, 14:26:40 »
Oh lol
In O2
- CREATE -> PROXY
- In drop-down list select "cargo", or type in "cargo"

In CONFIG.CPP add
Quote
transportSoldier=3;
cargoAction[] = {"UH60_Cargo02"};

The "CargoAction" can be an array, the N'th element of the array defining the stance of the N'th cargo proxy.

EDIT
If you want to know what all the available "actions are, scan all the sample BIS configs for the word "CargoAction" to see whats available.
« Last Edit: 14 Apr 2009, 14:30:05 by Gnat »

Offline Deadfast

  • Members
  • *
Re: Config for a re-skinned vehicle
« Reply #11 on: 14 Apr 2009, 15:09:08 »
Thanks a lot and sorry for not being descriptive enough at first ;)


EDIT:
Works great, but how do I define the enter (where the Get in action appears) and exit points?
I can see some related points in the Memory LOD ("pos cargo", "pos cargo dir"), however I have no idea how to call the new ones?
« Last Edit: 14 Apr 2009, 16:39:30 by Deadfast »

Offline DeanosBeano

  • Addons Depot Staff
  • *****
  • SirDeanosbeano bstowed on me by sui ;)
    • Fraghaus
Re: Config for a re-skinned vehicle
« Reply #12 on: 14 Apr 2009, 19:02:30 »
 getinpoints are vertices added in memmory lod and defined in cpp with

  memoryPointsGetInCargo= "pos_cargo";  and memoryPointsGetInCargoDir = "pos_cargo_dir";

 If you have inherited from Car_hatchback it will only have one defined from default  for cargo i think so you will have to add   the original and another if you are to modify.  names in memory lod will need to be exact same as in cpp or arma.rpt will say no defined getin pos etc etc

 here are most of the available pos for cpp.

 
Code: [Select]
memoryPointsGetInDriver = "pos_driver";
memoryPointsGetInDriverDir = "pos_driver_dir";
memoryPointsGetInCommander = "pos_commander";
memoryPointsGetInCommanderDir = "pos_commander_dir";
// memoryPointsGetInGunner = "pos_gunner"; //ToDo: might be obsolete
// memoryPointsGetInGunnerDir = "pos_gunner_dir"; //ToDo: might be obsolete
memoryPointsGetInCargo = "pos_cargo";
memoryPointsGetInCargoDir = "pos_cargo_dir";
memoryPointsGetInCoDriver = "pos_codriver";
memoryPointsGetInCoDriverDir = "pos_codriver_dir";
« Last Edit: 14 Apr 2009, 19:11:44 by DeanosBeano »
I love ofp

Offline Deadfast

  • Members
  • *
Re: Config for a re-skinned vehicle
« Reply #13 on: 14 Apr 2009, 19:43:01 »
What if I have more cargo seats though?

EDIT: Hang on, it seems there can be more verts per pos cargo and pos cargo dir selection.
« Last Edit: 14 Apr 2009, 19:48:02 by Deadfast »

Offline Gnat

  • Addons Depot
  • Moderator
  • *****
  • I Bite!
    • Gnats
Re: Config for a re-skinned vehicle
« Reply #14 on: 15 Apr 2009, 13:28:12 »
- If you stick to the names used by BIS ("pos cargo" and "pos cargo dir", no under-score, just a space), you don't have to re-define them in your config.
- Yes, you can have more than 1 point called this. You can have many.
- But any of these "entry points" can be used by any AI/human to get into any seat. There is no relationship between the points and any cargo proxy (or driver, gunner or commander).