OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: gadolinite on 15 Feb 2004, 08:24:34

Title: config.cpp files
Post by: gadolinite on 15 Feb 2004, 08:24:34
I know the object oriented principle because i study Java and C#.  I know what class inherentince is (one class obtains the traits of another).  What I need to know is the framework for the Flashpoint Game Engine (equivilent of Microsoft .NET framework or java's class libraries) so I can write my own config files from scratch.  What is Flashpoint's base class?  Which classes pertain to which objects in the game?  This is what I have the most trouble with, is nailing the <Framework> for the flashpoint game engine.  

The syntax is that of object oriented C++ (a language that comes intuitively to me).  

 ;)Thmax
Title: Re:config.cpp files
Post by: Rastavovich on 15 Feb 2004, 14:03:54
Best will be to download the official commented config from http://www.flashpoint1985.com/breathe/download/Commented_Config_191.zip.

Title: Re:config.cpp files
Post by: gadolinite on 15 Feb 2004, 18:14:22
Where is the TargetGrenade class?
Title: Re:config.cpp files
Post by: Rastavovich on 15 Feb 2004, 19:47:33
TargetGrenade class????
Title: Re:config.cpp files
Post by: gadolinite on 16 Feb 2004, 18:02:54
class CfgVehicles
{
   class All {};
   class Static: All {};
   class Building: Static {};
   class NonStrategic: Building {};
   class TargetTraining: NonStrategic {};
   class TargetGrenade: TargetTraining {};
   
   class Crate: TargetGrenade
   {
      model="\crate\crate";
      armor=20000;
      scope=2;
      displayName="Crate";
   }
}

Ok, this is the config.cpp file for brsseb'z crate addon tutorial.  Where did he look to find these classes?  Are there any tutes on how to program with the flashpoint game engine?  I found one on this site with dead links that is not very elaborate.  The C++ syntax is all but familiar, but mapping everything out, so the cpp files work, is what I am struggling with.  
Title: Re:config.cpp files
Post by: sa8gecko on 16 Feb 2004, 18:39:23
As Rastavovich said, look at commented_config_191 -> cfgVehicles.hpp
Title: Re:config.cpp files
Post by: Rastavovich on 16 Feb 2004, 19:45:51
Ah, that targetgrenade class:)

That is part of the CfgVehicles (as it mention itself) in config.cpp

Best will be you look into the files I mentioned:
there you will find a cfgvehicles.hpp where this part is in.

Be aware: your entries need to be in a config.cpp or config.bin later, else the gameengine wont load it.

PS: sa8gecko brought the thing better to the point, now that I read through it again;)