OFPEC Forum
Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: marcus3 on 17 Nov 2005, 06:44:15
-
i need a small cfg file for a fire addon i am makeing...i dont know where to look.
thanks
-
Look at the commented configs (http://www.ofpec.com/editors/resource_view.php?id=92)
It will look something like this:
#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
#define private 0
#define protected 1
#define public 2
class CfgPatches
{
class nameofPBOwhichyourmodelisin
{
units[] = {YourCfgVehiclesclassname};
requiredVersion = 1.46
};
};
class CfgModels
{
class Default {};
class modelnamewithouttheP3Dextension : Default
{
sections[] = {};
sectionsInherit="";
};
};
class CfgVehicles
{
class All {};
class Static: All {};
class Building: Static {};
class NonStrategic : Building {};
class Fire: NonStrategic {};
class YourCfgVehiclesclassname: Fire
{
scope = public;
simulation="fire";
sound = "Fire";
vehicleClass="Objects";
icon="Unknown_object";
model = "\PBOname\modelname";
displayName="SomeName";
mapSize = 1.2;
cost=0;
armor=20;
class Smoke : FlameSpectrum
{
interval = 0.01;
cloudletDuration = 0.9;
cloudletAnimPeriod = 1.0;
cloudletSize = 0.1;
cloudletAlpha = 0.8;
cloudletGrowUp = 0.4;
cloudletFadeIn = 0.0;
cloudletFadeOut = 5.0;
cloudletAccY = -0.1;
cloudletMinYSpeed = 0.3;
cloudletMaxYSpeed = 1.5;
cloudletShape = "cl_basic";
cloudletColor[] = {1, 1, 1, 0};
initT = 1000;
deltaT = -500;
class Table
{
class T1 {maxT = 0; color[] = {0.8, 0.8, 0.8, 1};}
class T2 {maxT = 900; color[] = {0.3, 0.3, 0.3, 1};}
class T3 {maxT = 1000; color[] = {1, 0.5, 0, 0.5};}
};
initT = 2200;
deltaT = -4000;
density = 0.5;
size = 0.1;
initYSpeed = 1.7;
timeToLive = 1e20;
in = 0.0;
out = 0.0;
};
class Light
{
color[] = {1.0, 0.5, 0.0, 1.0};
ambient[] = {0.3, 0.15, 0.0, 1.0};
brightness = 0.08;
shape = "koulesvetlo";
size = 0.3;
position = "ohniste";
};
};
};
I am pretty sure this needs a CfgPatches section, I will add it when I remember how to do it ::)
There also might need to be something entered for CfgModels SectionsInherit.
-Pilot
EDIT:
Ok, CfgPatches added. Simply replace the "class YourFire" with the name of your fire. Make sure the name of the class is also the name of the pbo. For example, if you chose "MarcusFire" as the name, you would name the pbo file MarcusFire.pbo and you would use class MarcusFire.
EDIT EDIT:
Btw, this config isn't tested and is not guarenteed to work. You will most likely have some problem with it as I probably forgot something. ::)
-
Pilots example is fine, however one or two things to add:
class CfgPatches
{
class nameofPBOwhichyourmodelisin
{
units[] = {YourCfgVehiclesclassname};
requiredVersion = 1.46
};
};
Also:
class CfgModels
{
class Default {};
class modelnamewithouttheP3Dextension : Default
{
sections[] = {};
sectionsInherit="";
};
};
Finally:
class CfgVehicles
{
class All {};
class Static: All {};
class Building: Static {};
class NonStrategic : Building {};
class Fire: NonStrategic {};
class YourCfgVehiclesclassname: Fire
{
scope = public;
simulation="fire";
sound = "Fire";
vehicleClass="Objects";
icon="Unknown_object";
model = "\PBOname\modelname";
displayName="SomeName";
mapSize = 1.2;
cost=0;
armor=20;
Ok, so I lied it was three things. ;D ;D
Planck
-
Somehow I knew Planck would show up. ;D ;D
Actually, that clears up a few things for me. I never was too sure of the reationship of the model name, pbo name, and cfgvehicles name with the various config sections (no idea if that made any sense ::)) To get around it I just gave the PBO, model, and CfgVehicles class names the same name.
That isn't incorrect practice, is it?
-Pilot
EDIT:
I modified my original post to take Planck's fixes into account
-
No, if you want everything to have the same name, that is fine.
However it might not make sense if you have more than one model in your PBO.
Especially if you come back to work on your project after a few weeks of R&R.
EDIT: I must also mention that it is wise to use an OFPEC tag for your pbo, model, etc.
Find out about Tags (http://www.ofpec.com/tags_about.php) < -- there
Planck
-
Fortunately, there is only 1 model in the addon. Like it matters, I will probably never finish it... ::)
Yes, do look into tags, they go a long way to eliminating addon conflict issues.
-Pilot
-
i get this error msg when i start ofp
Cfgvehicles/marcus_fire.smoke: undefind class base "Flamespectrum"
i have no idea what the problem is, i took the cfg from pilots post, word for word, put my names in. anways, thanks for the help so far.
-
Replace the class Smoke section with this one:
class Smoke
{
interval=0.01;
cloudletDuration=0.9;
cloudletAnimPeriod=1.0;
cloudletSize=0.1;
cloudletAlpha=0.8;
cloudletGrowUp=0.4;
cloudletFadeIn=0.0;
cloudletFadeOut=5.0;
cloudletAccY=-0.1;
cloudletMinYSpeed=0.3;
cloudletMaxYSpeed=1.5;
cloudletShape="cl_basic";
cloudletColor[]={1,1,1,0};
initT=1000;
deltaT=-500;
density=0.5;
size=0.1;
initYSpeed=1.7;
timeToLive=1.00000002004088E+20;
in=0.0;
out=0.0;
class Table
{
class T1
{
maxT=0;
color[]={0.8,0.8,0.8,1};
};
class T2
{
maxT=900;
color[]={0.3,0.3,0.3,1};
};
class T3
{
maxT=1000;
color[]={1,0.5,0,0.5};
};
};
};
Next time I'll need to check more thoroughly. ::)
Planck
-
thanks mate! works ;D
(clicks solve)