OFPEC Forum
Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: The-Architect on 13 Dec 2005, 17:12:30
-
Please help me.
Ok, I have the Dang-er sign from the editor and I want to add a new front to it. I( have the pic and I am all ready to go. However I cannot config. How should such a thing look?
I did an adaptation of the BIS Laptop if anyone remembers but that was a weapon. This is to be an object and so I know the config will be different.
-
the easiest way is to look into the commented configs, and simply make your new danger sign a sub-class of the existing sign:
class cfgvehicles
{
class all {};
class static: all {};
class building: static {};
class strategic: building {};
class flagcarrier: strategic {};
class dänger: flagcarrier {};
class new_dänger: dänger
{
model="path\modelname";
displayname="new dänger sign";
};
};
//edit: damn replacement.... you have to replace the 'ä' in 'dänger' with the 'a' and it should work
-
I don't get it. Please explain for dummies.
-
Here is a basic config, change the names as it suits you.
// 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
class CfgPatches
{
class NameOfMyPBO
{
units[]={NameOfMyCfgVehicleClass};
requiredVersion=1.75;
};
};
class CfgModels
{
class Default
{
sections[]={""};
sectionsInherit="";
};
class Vehicle: Default {};
class NameOfMyP3DFile: Vehicle {};
};
class CfgVehicles
{
class All {};
class Static: All {};
class Building: Static {};
class Strategic: Building {};
class FlagCarrier: Strategic {};
class NameOfMyCfgVehicleClass: FlagCarrier
{
displayName="Name You Want";
model="\NameOfMyPBO\NameOfMyP3DFile.p3d";
};
};
More or less what remcen said. ::)
Planck
-
oops, yep, i forgot the cfgpatches. but i actually don't think you need a cfgmodels section, it's only for models that have special selections which the dänger-sign doesn't have.
put planck's code in an empty text file, name it config.cpp, put it in the same directory as the model and textures, pack it with makepbo, shift the pbo it into the addons directory, and off you go ;)
-
Ok, I tried doing it myself and came up with this,
// 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
class CfgPatches
{
class ArchMineSign
{
units[]={Objects};
requiredVersion=1.75;
};
};
class CfgModels
{
class Default
{
sections[]={""};
sectionsInherit="";
};
class Vehicle: Default {};
class Danger!.p3d: Vehicle {};
};
class CfgVehicles
{
class All {};
class Static: All {};
class Building: Static {};
class Strategic: Building {};
class FlagCarrier: Strategic {};
class Objects: FlagCarrier
{
displayName="Mine Warning Russian";
model="\ArchMineSign\Danger!.p3d";
};
};
However I'm getting an error which goes something like,
! encountered instaed of }
-
You can't use the same p3d file if you have retextured it, you need to use a copy and name it something else.
In other words you can't use D anger!.p3d as the model name because the game already uses that.
Try D anger2.p3d instead
EDIT:L and you don't use the .p3d extension in cfgModels, just drop the extension.......in fact drop cfgModels. ;D
Planck
-
So what do I do with this new p3d? Put it in the same folder I'm going to Pbo?
Also how do I stop getting those error messages because of the !
-
The way I understood you were doing this was:
You were retexturing the sign....in which case you work on a copy of the original.
Making a config for the newly textured copy
And you have the new textures you are using handy.
You need to then place all 3 of those things in a folder and PBO the folder using the PBO name you have already decided on.
Pop your PBO in Addons and away you go.....maybe
EDIT: I think the '!"' error comes from the '!' in D ander!
Renaming your model should fix that
Planck
-
I'm totally lost. Here is a .zip with what I've got.
-
Ok....I got it in-game.
But it is exactly the same as the original.
Did you retexture it in Oxygen?
Planck
-
No, I just made a new texture and attempted to get the config to look for it in the pbo.
-
OK.........All fixed now.....retextured in Oxygen and ODOLised again.
Attached
Planck
-
Cheers Planck.
Is there a way that I can create loads of these myself without having to go into Oxygen? I don't have it you see. I mean can I just edit the config to accomodate the new skin and just carry on.
Perhaps If I create a shed load of skins and have it so you can setobjecttexure the addon to get many different signs?
-
You can't really do the texturing from the config (apart from setobjecttexture), it needs to be done in Oxygen really.
Or you can use a hex editor to edit the texture paths.
Planck
-
All that is beyond me. I dabble with textures when I want to create something specific for a mission but I always need help as you probably noticed.
Tell me more about the SetObjectTexture. Are you saying that if I throw 5 or 10 textures into the .pbo file that with a command they can all be used on the same sign?
If so, How would I go about doing it?
-
I've never really had cause to use setobjecttexture, so my knowledge there is limited.
There is a tutorial (http://www.ofpec.com/editors/resource_view.php?id=820) about this by Fab in the Editors Depot.
Planck
-
well.... the setobjecttexture command only works for models which have selections which you refer to... so you necessarily need to load the model in o² beforehand in order to give the models selections at all. simple objects don't have any selection.
... so you see: if you don't want to change the texture path via hex-editing or a texture swap tool, you won't be able to avoid editing in o².
and if you want to make loads of re-textured addons, i would really recommend you to get familiar with o2... believe me, it's dead simple and IMO easier than texture swap tools and hex editnig which can potentially mess up the whole model.