Jump to content
Sign in to follow this  
person915

Error with Config.cpp

Recommended Posts

Okay, so each of the classes (like vl_grass) operate under whatever is after the ":"?

Then how is the (in this instance) "DefaultClutter" tied in with everything else? How does it work with the other files?

---------- Post added at 00:51 ---------- Previous post was at 00:48 ----------

Hmm.. logfile says:

File p:\grmrl\village\config.cpp, line 126: /CfgWorlds/: Missing '}'

I thought it was in order. I've actually tried to fix this line myself a few times with no avail. I just can't figure out where it needs to end, by which point it's fine in defining the class. I'll try it again, but any ideas?

Share this post


Link to post
Share on other sites

Where does CfgWrolds' class end in the config .cpp? I've been trying to end it in various places to see the effects. Right now I have it defined as such:

class CfgWorlds

{

class CAWorld;

class Chernarus: CAWorld

{

class Grid;

class DefaultClutter;

};

class Village: Chernarus

{

cutscenes[] = {};

description = "Vybo, Czech Coast.";

worldName = "GRMRL\Village\village.wrp";

pictureShot = "GRMRL\Village\Data\vl_ui_ca.paa";

startTime = "07:00";

startDate = "05/03/2001";

startWeather = 0.2;

startFog = 0.0;

forecastWeather = 0.6;

forecastFog = 0.0;

centerPosition[] = {1280,1280,100};

seagullPos[] = {1280,1280,100};

longitude = 15;

latitude = 49;

elevationOffset = 0;

midDetailTexture = "GRMRL\Village\Data\vl_grass_mco.paa";

minTreesInForestSquare = 4;

minRocksInRockSquare = 2;

ilsPosition[] = {1024,1024};

ilsDirection[] = {0.5075,0.08,-0.8616};

ilsTaxiIn[] = {};

ilsTaxiOff[] = {};

drawTaxiway = 0;

class SecondaryAirports {};

};

and I get a message on the logfile:

File p:\grmrl\village\config.cpp, line 66: /CfgWorlds.Grid: Undefined base class 'Grid'

---------- Post added at 01:03 ---------- Previous post was at 00:58 ----------

Now when I change the CfgWorld class to

http://pastebin.com/R47aNkhT

logfile gives me this (File p:\grmrl\village\cfgClutter.hpp, line 0: /CfgWorlds/Clutter.vl_grassb: Undefined base class 'DefaultClutter') message about the cfgclutter.hpp

updated cfgclutter.hpp:

http://pastebin.com/YCT2VcT9

This error seems to relate to what I was asking you before of how the configs know to use DefaultClutter. I've never seen it actually WRITTEN IN any of the configs.... hm... maybe I'll go check where it references clutter and see what I can find, maybe I'll figure how to edit it to work somehow by accident.

-Edit- Class DefaultClutter is listed there.... hm... not quite sure where to go from here. Honestly the swapping around of where cfgWorld ends and looking at what the logfile spits at me hasn't helped in determining what's right or wrong, or what's more right and what's more wrong, but if I put it back to its original there will still be an error on that line....

---------- Post added at 01:31 ---------- Previous post was at 01:03 ----------

It's an inheritance. Your inheriting from that class.

If I'm inheriting from DefaultClutter, doesn't it need to be defined first? Where is it defined at?

Share this post


Link to post
Share on other sites

your confusing me and the issue your having further. why would you take the working config for the island and change it?

that is how it is supposed to be.

the cfgclutter comes into the config by the way of #include at the end of the cfgworld definitions..now you have taken the closing bracket and closed off cfgworlds sooner than it is supposed to be

this is how the config should be. don't move the brackets around

http://pastebin.com/ZGaCVbJU

Share this post


Link to post
Share on other sites

ok, I don't understand something. I changed the brackets around because the config wasn't working, and I got an error. Now it worked. I'll see if the terrain actually made it in-game, but binPBO seemed to like it. I don't understand why the first time it didn't work, when the second time, even though I had the same files with the same text entries, it worked.... Oh, well! I learned, you helped, and I'm atleast 1 step closer if not all the way there. Thanks a bunch!

Share this post


Link to post
Share on other sites
I think in moving around the bracket you deleted one

The terrain has made it in-game. The only problem is that the clutter did not. There is something that has sort of confused me that might be contributing to this problem.

In CfgSurfaces, what is it asking for when it says "character"? For instance, the link to mine that I'm about to show you is my attempt at trying to make sense of it, trying to get the game to use my clutter on the grass:

http://pastebin.com/FPZisTAy

originally, in the character place I had the classname for the clutter I had, so it would have been character = "vl_grassb" like it was in the CfgClutter. Bin PBO will take this CfgSurfaces, but it won't display any clutter, and all that's on the ground is the grass textures. Everything works fine EXCEPT for the placement of clutter, which in this case doesn't work at all.

I'm thinking that possibly the "character" is asking for a filepath, considering whenever something is wrapped in "" that usually means it wants one, however I don't know what file it would want, whether it was the actual clutter models or a reference to the cfgclutter, or even the classnames like I had before.

What should be in the "character"? And considering I DON'T want any clutter on any of the surfaces other than the grass, what should I put in the "character" section for the other surfaces?

Share this post


Link to post
Share on other sites

In character you place the name of the definition in cfgsurfacecharacters.

In your case the first on would be


character= "vl_grassClutter";
[/Code]

If you want no clutter do this

[Code]
character= "Empty";
[/Code]

Although your names of the clutter is wrong after the probability.

They need to match the clutter names you specified in your Cfgclutter.hpp

So for instance replace c_grassdrylong with vl_grassdry

Share this post


Link to post
Share on other sites
In character you place the name of the definition in cfgsurfacecharacters.

In your case the first on would be


character= "vl_grassClutter";
[/Code]

If you want no clutter do this

[Code]
character= "Empty";
[/Code]

Although your names of the clutter is wrong after the probability.

They need to match the clutter names you specified in your Cfgclutter.hpp

So for instance replace c_grassdrylong with vl_grassdry

Alright, so what I want to do is in my cfgSurfaces, where I define the probability of my clutter and then under it give the names, the names have to be the "what" from my cfgclutter?

The class names, or the p3d names? This is my cfgclutter:

class vl_grassb: DefaultClutter

{

model = "ca\plants_2\clutter\c_grassBunch.p3d";

affectedByWind = 0.7;

swLighting = 1;

scaleMin = 0.85;

scaleMax = 1.1;

};

class vl_grassl: DefaultClutter

{

model = "ca\plants_2\clutter\c_GrassDryLong.p3d";

affectedByWind = 0.7;

swLighting = 1;

scaleMin = 0.85;

scaleMax = 1.1;

};

class vl_grasst: DefaultClutter

{

model = "ca\plants_2\clutter\c_GrassTall.p3d";

affectedByWind = 0.7;

swLighting = 1;

scaleMin = 0.85;

scaleMax = 1.1;

};

class vl_weed: DefaultClutter

{

model = "ca\plants_2\clutter\c_weed2.p3d";

affectedByWind = 0.7;

swLighting = 1;

scaleMin = 0.85;

scaleMax = 1.1;

};

is it the model names or the class names? right now I have it set to the class names, and it still doesn't work.

the model names are from the ca\ folder so they have the original tags, so does that mean I need to move the clutter to my project folder and rename them with my tag, and then repath them?[color=Silver]

[size=1]---------- Post added at 02:53 ---------- Previous post was at 02:37 ----------[/size]

[/color]this is then my cfgsurfaces:

class CfgSurfaces

{

class Default {};

class vlgrassSurface : Default

{

files = "vl_grass_*";

rough = 0.1;

dust = 0.1;

soundEnviron = "dirt";

soundHit = "hard_ground";

character = "vl_grassClutter";

};

class vlsandSurface : Default

{

files = "vl_sand_*";

rough = 0.1;

dust = 0.1;

soundEnviron = "dirt";

soundHit = "hard_ground";

character = "Empty";

};

class vlgravelSurface : Default

{

files = "vl_gravel_*";

rough = 0.1;

dust = 0.1;

soundEnviron = "dirt";

soundHit = "hard_ground";

character = "Empty";

};

class vlforestSurface : Default

{

files = "vl_forest_*";

rough = 0.1;

dust = 0.1;

soundEnviron = "dirt";

soundHit = "hard_ground";

character = "Empty";

};

};

class CfgSurfaceCharacters

{

class vl_grassClutter

{

probability[] = {0.2,0.2,0.5,0.1};

names[] = {"vl_grassb","vl_grassl","vl_grasst","vl_weed"};

};

};[color=Silver]

[size=1]---------- Post added at 03:11 ---------- Previous post was at 02:53 ----------[/size]

[/color]

In character you place the name of the definition in cfgsurfacecharacters.

In your case the first on would be

[Code]
character= "vl_grassClutter";
[/Code]

If you want no clutter do this

[Code]
character= "Empty";
[/Code]

Although your names of the clutter is wrong after the probability.

They need to match the clutter names you specified in your Cfgclutter.hpp

So for instance replace c_grassdrylong with vl_grassdry

Oh my gosh. Thank you so much. I finally figured out the problem. The folder isn't plants_2, it's plants2. I changed the directories and they work fine now. Needless to say it looks like a fried piece of shit, but I didn't expect much better. The point is, EVERYTHING WORKS. And I have you to thank for it. Now all that's left is messing with the clutter to get it to where it actually looks decent, making some structures and getting used to adding trees, buildings and roads in Visitor, and work on being able to make my own clutter, satmaps and textures, but those objectives are a long ways away. I might start just with editing the clutter and working in Visitor.

But I'll leave that to tomorrow. Today was hard, it was brutal, but it was fun, and it was a fucking good day, and I didn't doubt for one second I wouldn't get it done, as long as I had people to back me up. I'm sorry if I was a bit too quick to post but I tend to get very excited about these things, hence why the pathing for the clutter was overlooked for so long. But I learned a lot, and I doubt that will be such a big problem again. Thank you so much, I will never forget your dedication. If you want, I'll send you some screenshots and show you what you helped create- when it actually looks decent, that is. You would deserve that much atleast.

Just to make sure you understand how much I appreciate your help, I'll say this:

my life has been riddled with unfinished projects. Whether it's skills, mods, songs, literary works, drawings, textures... I can just never seem to finish. But I really wanted this, and whether you saw it or not, you took to it, and helped my all the way through, and finally, it's a finished product. I'm backing it up and saving it. It's not perfect, not by any means, but it works, and it works well for what it is, and that's such an unbelievable thing for me to see something that I've carried on for so long, discontinued, picked back up again and worked so hard to achieve finally come to life at the standards I've wanted my first generation to be, and it feels great. It really does. Thank you. Truly.

Edited by person915

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×