Jump to content
Sign in to follow this  
[aps]gnat

Dirty water infection

Recommended Posts

Hi guys,

Got a few terrains running in 1 mod folder, but one (or more! ) its causing all terrains to inherit dirty brown water.

Any suggestions on how to find / isolate (and maybe patch out) ?

I think one of these maybe

Malden 2010

Six Little Green Bag

Aiaktalik

Fayshkhabur

Ovaron

Huertgenwald

CLA Clafhgan

Tora Bora

ORing

Emita beta

Share this post


Link to post
Share on other sites

extract all configs and search for CfgMaterials definitions

for the record: correct way is to define a new custom water class with the personal TAG and assign it in your world

class CfgMaterials
{
class Water;
class MYTAG_Water: Water
{
	ambient[] = {0.0264,0.03,0.013,0.4};
	diffuse[] = {0.13,0.15,0.065,1};
	forcedDiffuse[] = {0.0264,0.03,0.013,0};
	specular[] = {1.5,1.5,1.5,0};
	emmisive[] = {0,0,0,0};

+

class cfgWorlds
{
class CAWorld;
class MYTAG_WorldName: CAWorld//or Utes/Takistan
{
	//replace with your custom class
	seaMaterial = "#MYTAG_water";
	shoreMaterial = "#MYTAG_shore";
	shoreFoamMaterial = "#MYTAG_shoreFoam";
	shoreWetMaterial = "#MYTAG_shoreWet";
	terrainMaterial = "#MYTAG_terrain";

Edited by .kju [PvPscene]

Share this post


Link to post
Share on other sites

OK, thanks

It seems to be Fayshkhabur (Faysh khabur) by =KCT=BlackMamba

Might do my own config to fix.

Share this post


Link to post
Share on other sites

Hmmmm....

I managed to implement different sea colours without problems on the CWR2 terrains... as usual, not exactly in accordance with PvPScene's no doubt strictly correct guidelines.... :)

Here's the "Adriatic Blue" def from CWR2 Malden in case it's of any help....

First thing is to make a "cfgMaterials.hpp "external file" to be included in the main config - just like cfgSurfaces, etc...

Paste this lot in there.....

class CfgMaterials {
class CWR2_Abel_Water {
	PixelShaderID = "Water";
	VertexShaderID = "Water";
	ambient[] = {0.020,0.107,0.127,0.4};
	diffuse[] = {0.022,0.107,0.127,1.0};
	forcedDiffuse[] = {0, 0, 0, 0};
	specular[] = {1, 1, 1, 0};
	specularPower = 4;
	emmisive[] = {0, 0, 0, 0};

	class Stage1 {
		texture = "ca\data\data\water_nofhq.paa";
		uvSource = "texWaterAnim";

		class uvTransform {
			aside[] = {0, 4, 0};
			up[] = {4, 0, 0};
			dir[] = {0, 0, 4};
			pos[] = {0.2, 0.5, 0};
		};
	};

	class Stage2 {
		texture = "CA\data\data\sea_foam_lco.paa";
		uvSource = "none";
	};

	class Stage3 {
		texture = "#(ai,16,64,1)waterirradiance(16)";
		uvSource = "none";
	};
};

class CWR2_Abel_Shore {
	PixelShaderID = "Shore";
	VertexShaderID = "Shore";
	ambient[] = {0.04, 0.03, 0, 0.5};
	diffuse[] = {0.05, 0.03, 0, 1.0};
	forcedDiffuse[] = {0, 0, 0, 0};
	specular[] = {1, 1, 1, 0};
	specularPower = 4;
	emmisive[] = {0, 0, 0, 0};

	class Stage1 {
		texture = "ca\data\data\water_nofhq.paa";
		uvSource = "texWaterAnim";

		class uvTransform {
			aside[] = {0, 4, 0};
			up[] = {4, 0, 0};
			dir[] = {0, 0, 4};
			pos[] = {0.2, 0.5, 0};
		};
	};

	class Stage2 {
		texture = "CA\data\data\sea_foam_lco.paa";
		uvSource = "none";
	};

	class Stage3 {
		texture = "#(ai,16,64,1)waterirradiance(16)";
		uvSource = "none";
	};
};

class CWR2_Abel_ShoreFoam {
	PixelShaderID = "ShoreFoam";
	VertexShaderID = "Shore";
	ambient[] = {0.05, 0.03, 0, 0.6};
	diffuse[] = {0.05, 0.03, 0, 1.0};
	forcedDiffuse[] = {0, 0, 0, 0};
	specular[] = {1, 1, 1, 0};
	specularPower = 4;
	emmisive[] = {0, 0, 0, 0};

	class Stage1 {
		texture = "ca\data\data\water_nofhq.paa";
		uvSource = "texWaterAnim";

		class uvTransform {
			aside[] = {0, 4, 0};
			up[] = {4, 0, 0};
			dir[] = {0, 0, 4};
			pos[] = {0.2, 0.5, 0};
		};
	};

	class Stage2 {
		texture = "CA\data\data\sea_foam_lco.paa";
		uvSource = "none";
	};

	class Stage3 {
		texture = "#(ai,16,64,1)waterirradiance(16)";
		uvSource = "none";
	};
};
};

Then - on the VERY FIRST LINE of your terrain config, add.....

#include "cfgMaterials.hpp"

Then - further down in the same config....

	       seaMaterial = "#CWR2_Abel_Water";
	shoreMaterial = "#CWR2_Abel_Shore";
	shoreFoamMaterial = "#CWR2_Abel_ShoreFoam";

Seems to work fine.....

B

Share this post


Link to post
Share on other sites

what causes problem

problem is when inheritance of custom terrain is wrong and then in own new terrain and inherits from the terrain that was loaded last and if it had brown water ,then yours has it.i saw many terrain inherit from wrong class and also have inherits like this ,so muddy water everywhere i believ

class CfgMaterials {

};

class CfgSurfaces {

class Default {};

class Water {};

};

Share this post


Link to post
Share on other sites

nah. loading order does not matter here - it only could if a world would be loaded before A2/OA configs.

it is just people changing default classes that affect all terrains. a big NO NO.

Share this post


Link to post
Share on other sites
nah. loading order does not matter here

it does in overall picture ,because some addon loading after the muddy water one , may correct the class water definition and thus, you may think its fixed in yours but inreality its not , you will never know what is breaking it ;).

Share this post


Link to post
Share on other sites

fair point.

however luckily it is not as bad. people dont copy the unmodified cfgMaterials in their worlds/terrains. :)

Share this post


Link to post
Share on other sites

From my comment above, I found water was being re-written in Fayshkhabur's config, but no others (in that particular mod folder)

class CfgMaterials {
class Water {
	ambient[] = {0.27, 0.2, 0.09, 0.1};
	diffuse[] = {0.27, 0.18, 0.09, 0.1};
	forcedDiffuse[] = {0.0264, 0.03, 0.013, 0};
	specular[] = {1.5, 1.5, 1.5, 0};
	emmisive[] = {0, 0, 0, 0};
...
...

Unfortunately I have about 10 Mod folders full of peoples terrains, and another folder for "common" objects ...... and I've noticed in some the water changed, but not as dramatic as above.

..... the dirty water does suit the 'stan terrains but.

Share this post


Link to post
Share on other sites
cfgMaterials in their worlds/terrains

well after first version of lingor many did , however big mistake was

mytag : defaultworld

i saw a few like this but i think there old ones, i think this infected then CaWorld . however so much addons and vary i guess its price to pay for enthusiasm and sometimes we must remember BIF not the hub of all knowledge so people dont always get message :).

Share this post


Link to post
Share on other sites

erm

this might be a bit off-topic but could someone point me in the right direction to understand this thing of classes and inheritance C++ stuff... we are working on clafghan final release but still I can't feel confident on the config.cpp side of life... and anytime I look at those lines of code they make me feel a bit scary :(

and as i can't grasp the basic structure or order of coding stuff, then i feel i'm always replicating the same mistakes over and over again... as you discuss above... It sounds like some dialect to me... ting tong nah tong ting

Share this post


Link to post
Share on other sites

Alternative: Post your config for review and study the changes afterwards. :)

Share this post


Link to post
Share on other sites

nah... that's ok ... I mean, some tutorial to fully understand what a config is, how it is built and why... then islands config might be explained line by line... but a complete full config... which, as I understand, is much more than the isolated lines that we usually copy&paste...

on the map front, the more helpful stuff i could find was CCTOIDE explanations -curiously they can't be found in these forums-, but even him, according to the time he made his analysis, didn't know many things nor could fully explain them...

so, I really feel some sort of envi when I read you talking about this stuff as a quite "easy to grasp" thing because that's very difficult for me... and the difficulty i found is because a lack of basics, some kind of "introduction to configs" or C++ & arma basics... so when you go into some BIS wiki you find there many things that are suppoused to be known... which is good somehow when the readers are programmers, engineers and coders... but we are mortal players looking for having some fun with our stuff...

well, probably many of you had a long time reading that kind of criptic spells and have even more years "ofping"... so I won't complain anymore ...

Share this post


Link to post
Share on other sites

a) ask questions - specific questions; there are many to share their insights here when asking

b) read the comments BI in the commented configs (subfolder of binarize)

c) get the all-in-one config and read the cfgWorlds/DefaultWorld section

Share this post


Link to post
Share on other sites
a) ask questions - specific questions; there are many to share their insights here when asking

b) read the comments BI in the commented configs (subfolder of binarize)

c) get the all-in-one config and read the cfgWorlds/DefaultWorld section

many thanks!

I did have no idea about your b) suggestion... it looks like a lot of stuff to learn about...

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  

×