OFPEC Forum
Addons & Mods Depot => ArmA - Configs & Scripting => Topic started by: Deadfast 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
-
config.cpp
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 (http://dev-heaven.net/boards/17/topics/show/383)
Suggested naming:
PBO naming thoughts (http://dev-heaven.net/boards/17/topics/show/137)
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:
-
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?
-
Yep, check
http://community.bistudio.com/wiki/Model_Config#cfgModels
I find the explanation rather complicated.
To me the config code seems more understandable.
-
This is getting rather annoying.
Not only it's still not animated, but now the windows are not even transparent when binarising the model...
-
Some patience and wait for the animation master Gnat. :D
Make use of the new fast BIF search for billion transparent
texture threads. :whistle:
-
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
;
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.
-
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?
-
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.
-
Add a new passenger position(s).
-
Oh lol
In O2
- CREATE -> PROXY
- In drop-down list select "cargo", or type in "cargo"
In CONFIG.CPP add
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.
-
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?
-
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.
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";
-
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.
-
- 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).
-
There is no relationship between the points and any cargo proxy (or driver, gunner or commander).
well that isnt strictly true of course, because you can attach memory point to a proxy and this prevents you boarding at the back of the vehicle ,when you clicked at the side door. and ensures you get out at the right point too.
example is from my side guns and searchlight on an aircraft .
turret 1
proxyIndex = 1;
gunnerName = "Left Door Gun";
memoryPointsGetInGunner = "pos_gunner";
memoryPointsGetInGunnerDir = "pos_gunner_dir";
turret 2
proxyIndex = 2;
gunnerName = "Right Door Gun";
memoryPointsGetInGunner = "pos_gunner_2";
memoryPointsGetInGunnerDir = "pos_gunner2_dir";
turret3
proxyIndex = 3;
gunnerName = "search light";
memoryPointsGetInGunner = "pos_gunner_3";
memoryPointsGetInGunnerDir = "pos_gunner3_dir";
this way you will start your animation facing the propper way and also start the animation Getinlow in the right place