Sign in to follow this  
Followers 0
speedweasel

Simplify Loot Spawn config?

7 posts in this topic

Would it be easier to configure loot spawn in the following way?

CfgLootTables
{
#include "CfgLootTables.hpp"
};

It might reduce cut + paste errors when editing exile_server_config\config.cpp and it sure speeds up the process of iteratively tweaking loot tables.

Share this post


Link to post
Share on other sites

Just realized it should look like this in order to work with the generated CfgLootTables.hpp file:

//class CfgLootTables
//{
#include "CfgLootTables.hpp"
//};

 

Share this post


Link to post
Share on other sites
Advertisement

Your second one is correct, you don't need the CfgLootTables anymore just the include

I do mine the same way:

class CfgBuildings
{
	#include "CfgBuildings_Taviana.h"
	#include "CfgBuildings_Default.h"
};

#include "CfgLootTables.hpp"

 

2 people like this

Share this post


Link to post
Share on other sites

Hello,

Where would I put the  #include "CfgLootTables.hpp" ?

In the description.ext?

or somewhere else? could you provide an example please of what you are editing?

 

Thank

rhammer

Share this post


Link to post
Share on other sites

I mentioned it in the first post.   exile_server_config\config.cpp is the file you want to edit.

Share this post


Link to post
Share on other sites

so I put the #include "CfgLootTables.hpp" right after the last item in class CfgBuildings  in the config.cpp? do I remove all the items under Class CfgLootTables.hpp?

like this?

class CfgBuildings
{

    class Land_dp_smallFactory_F
    {
        table = "Factories";
        positions[] = {{-1.97266, 3.14844, 2.62608}, {-6.49609, -4.92773, 2.82442}, {5.32422, -3.69531, 2.95848}, {9.49805, -4.71094, 1.21193}, {9.95898, 1.41211, 1.21193}};
    };
    
    class Land_dp_mainFactory_F
    {
        table = "Factories";
        positions[] = {{-12.8477, -4.8457, -4.45162}, {-15.4961, 6.70703, -4.45162}, {-6.36133, -2.13477, 1.18268}, {-6.91211, -15.3555, 1.18268}, {0.736328, 8.16406, 1.18268}, {1.25391, -10.5801, 1.18268}, {12.8926, 7.0332, -5.51301}, {13.0332, -3.95117, -4.22302}, {13.1719, 4.60742, -4.22302}, {13.2676, 0.710938, -4.22302}, {14.793, -16.8613, -4.08302}, {18.1406, -9.24023, -4.08302}, {19.0566, 5.17969, -7.61482}, {19.0996, -5.68555, -5.51301}, {19.3535, 2.14844, -5.51301}, {3.43555, -2.94141, 1.18268}, {8.82617, -7.33008, -0.280016}, {8.92773, -13.9453, -0.280016}, {9.13281, 8.58203, -0.280016}};
    };
};

#include "CfgLootTables.hpp"

it would help if you had a working example you could post so I can see what works here.

 

Thanks

rhammer

Share this post


Link to post
Share on other sites
10 hours ago, rhammer2003 said:

so I put the #include "CfgLootTables.hpp" right after the last item in class CfgBuildings  in the config.cpp? do I remove all the items under Class CfgLootTables.hpp?

like this?

class CfgBuildings
{

    class Land_dp_smallFactory_F
    {
        table = "Factories";
        positions[] = {{-1.97266, 3.14844, 2.62608}, {-6.49609, -4.92773, 2.82442}, {5.32422, -3.69531, 2.95848}, {9.49805, -4.71094, 1.21193}, {9.95898, 1.41211, 1.21193}};
    };
    
    class Land_dp_mainFactory_F
    {
        table = "Factories";
        positions[] = {{-12.8477, -4.8457, -4.45162}, {-15.4961, 6.70703, -4.45162}, {-6.36133, -2.13477, 1.18268}, {-6.91211, -15.3555, 1.18268}, {0.736328, 8.16406, 1.18268}, {1.25391, -10.5801, 1.18268}, {12.8926, 7.0332, -5.51301}, {13.0332, -3.95117, -4.22302}, {13.1719, 4.60742, -4.22302}, {13.2676, 0.710938, -4.22302}, {14.793, -16.8613, -4.08302}, {18.1406, -9.24023, -4.08302}, {19.0566, 5.17969, -7.61482}, {19.0996, -5.68555, -5.51301}, {19.3535, 2.14844, -5.51301}, {3.43555, -2.94141, 1.18268}, {8.82617, -7.33008, -0.280016}, {8.92773, -13.9453, -0.280016}, {9.13281, 8.58203, -0.280016}};
    };
};

#include "CfgLootTables.hpp"

it would help if you had a working example you could post so I can see what works here.

 

Thanks

rhammer

Yes, they way you show above is correct.  The include command inserts the entire contents of the named file into the current file.  As CfgLootTables.hpp defines the CfgLootTables {} class, you can remove  CfgLootTables {} (and everything under it) from  exile_server_config\config.cpp

Below is the relevant code from my file

class CfgBuildings
{
	#include "CfgBuildings_Chernarus.h"
	/*
	#include "CfgBuildings_Esseker.h"
	#include "CfgBuildings_Bornholm.h"
	#include "CfgBuildings_Panthera.h"
	#include "CfgBuildings_Taviana.h"
	#include "CfgBuildings_Altis.h"
	*/
};

//class CfgLootTables // (Class container included in CfgLootTables.hpp file)
//{
#include "CfgLootTables.hpp"
//};

 

Edited by speedweasel

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.