Jump to content
ir0n

model.cfg is not loading correctly

Recommended Posts

Hi guys,
 
so my 2 problems:
 
1. The model.cfg of my house is not loading correctly. The animations and the breaking glass does not work on startup, it only works when I shoot at the building once. This also means, that the animations dont work in buldozer
 
The model.cfg:

class CfgSkeletons
{
class Default
{
isDiscrete=1;
skeletonInherit = "";
skeletonBones[]={};
};
class ir0n_gardenhouse_skeleton: Default
{
skeletonInherit = "Default";
skeletonBones[]=
{
"Frontdoor","",
"Glass_1_hide", "Frontdoor",
"Glass_1_unhide", "Frontdoor",
"Glass_1", "Frontdoor",
"Glass_1_effects", "Frontdoor",
"Door_1_trigger", "Frontdoor",
"Glass_2_hide", "",
"Glass_2_unhide", "",
"Glass_3_hide", "",
"Glass_3_unhide", ""
};
};
};
class CfgModels
{
class Default;
class ir0n_gardenhouse: Default
{
skeletonName = "ir0n_gardenhouse_skeleton";
sections[]=
{
"Glass_1_hide",
"Glass_2_hide",
"Glass_3_hide"
};
sectionsInherit = "";
class Animations
{
class Door_1_rot
{
type="rotation";
source="Door_1_source";
selection="Frontdoor";
axis="Door_1_axis";
memory=1;
minValue=0;
maxValue=1;
angle0=0;
angle1="(rad 100)";
};
class Glass_1_hide
{
type="hide";
source="Glass_1_source";
selection="Glass_1_hide";
minValue=0;
maxValue=1;
hideValue=0.99998999;
};
class Glass_1_unhide: Glass_1_hide
{
selection="Glass_1_unhide";
hideValue=0;
unhideValue=0.99998999;
};
class Glass_2_hide: Glass_1_hide
{
source="Glass_2_source";
selection="Glass_2_hide";
};
class Glass_2_unhide: Glass_1_unhide
{
source="Glass_2_source";
selection="Glass_2_unhide";
};
class Glass_3_hide: Glass_1_hide
{
source="Glass_3_source";
selection="Glass_3_hide";
};
class Glass_3_unhide: Glass_1_unhide
{
source="Glass_3_source";
selection="Glass_3_unhide";
};
};
};
};

 

2. Problem:

 

My LOD 1.0 is my LOD 5.0, well it´s strange. Some Pictures: my first LOD(1): http://puu.sh/l3DbD/ce5d47ab89.png & my last LOD (4): http://puu.sh/l3DeO/3c0734cc62.png

Ingame it works perfectly if I do it this way, but thats not the final solution (InGame: http://images.akamai.steamusercontent.com/ugc/580196620067696582/0320E8E63860C7A9BCA352D42F11D4A7C985E788/

 

Now my questions is: What did I wrong, that my visual LODs are so f**** up :D

 

Thanks for your help guys ;)

 

ir0n

 

if you need my config:

class CfgPatches
{
class ir0n_hw_buildings
{
units[] = {"ir0n_hw_busstop","ir0n_gardenhouse"};
weapons[] = {};
requiredVersion = 0.1;
requiredAddons[] = {"A3_Structures_F"};
};
};


#include "basicdefines_A3.hpp"
#include "config_macros_glass.hpp"




class CfgVehicleClasses
{
class ir0n_hw_buildings
{
displayName = "Highway 7 Buildings";
};
};

class CfgVehicles
{
class House;
class House_F: House
{
class DestructionEffects;
};
class Ruins_F;

class ir0n_hw_busstop: House_F
{
scope = 2;
vehicleClass = "ir0n_hw_buildings";
displayName = "Busstop";
destrType = "DestructBuilding";
armor = 5000;
placement = "vertical";
model = "\highway_obj\buildigs\ir0n_busstop.p3d";
ladders[] = {};
class DestructionEffects: DestructionEffects
{
class Ruin
{
simulation = ruin;
type = "";
position = "";
intensity = 1;
interval = 1;
lifeTime = 1;
};
};

};
class ir0n_gardenhouse: House_F
{
scope = 2;
scopeCurator = 2;
displayName = "Gardenhouse";
model = \highway_obj\buildigs\ir0n_gardenhouse.p3d;
vehicleClass = ir0n_hw_buildings;
mapSize = 7;
cost = 4000;

class DestructionEffects: DestructionEffects
{
class Ruin
{
simulation = ruin;
type = "";
position = "";
intensity = 1;
interval = 1;
lifeTime = 1;
};
};
class HitPoints
{
DOOR_GLASS_HITPOINT(1,0.01,0.175)
NORMAL_GLASS_HITPOINT(2,0.01,0.175)
NORMAL_GLASS_HITPOINT(3,0.01,0.175)
};
class Damage
{
tex[] =
{

"A3\Structures_F\Data\Windows\window_set_CA.paa",
"A3\Structures_F\Data\Windows\destruct_half_window_set_CA.paa",

// Grey color
"#(argb,8,8,3)color(0.501961,0.501961,0.501961,1.0,co)",
"#(argb,8,8,3)color(0.294118,0.294118,0.294118,1.0,co)",

// Brown color
"#(argb,8,8,3)color(0.501961,0.25098,0,1.0,co)",
"#(argb,8,8,3)color(0.392157,0.196078,0,1.0,co)",

// Yellow color
"#(argb,8,8,3)color(1,1,0.501961,1.0,co)",
"#(argb,8,8,3)color(0.513725,0.513725,0.203922,1.0,co)",

// Light grey color
"#(argb,8,8,3)color(0.752941,0.752941,0.752941,1.0,co)",
"#(argb,8,8,3)color(0.478431,0.478431,0.478431,1.0,co)",

// Red color
"#(argb,8,8,3)color(1,0,0,1.0,co)",
"#(argb,8,8,3)color(0.701961,0,0,1.0,co)"
};
mat[] =
{
"A3\Structures_F\Data\Windows\window_set.rvmat",
"A3\Structures_F\Data\Windows\destruct_half_window_set.rvmat",
"A3\Structures_F\Data\Windows\destruct_full_window_set.rvmat"
};
};
class AnimationSources
{
class Door_1_source
{
source = user;
initPhase = 0;
animPeriod = 1;
sound = "GenericDoorsSound";
};
class Glass_1_source
{
source = Hit;
hitpoint = Glass_1_hitpoint;
raw = 1;
};
class Glass_2_source: Glass_1_source
{
hitpoint = Glass_2_hitpoint;
};
class Glass_3_source: Glass_1_source
{
hitpoint = Glass_3_hitpoint;
};
};

class UserActions
{
class OpenDoor_1
{
displayNameDefault = "";
displayName = "Open Door";
position = Door_1_trigger;
priority = 0.4;
radius = 1.5;
onlyForPlayer = true;
condition = ((this animationPhase 'Door_1_rot') < 0.5);
statement = ([this, 'Door_1_rot'] call BIS_fnc_DoorNoHandleOpen);
};
class CloseDoor_1: OpenDoor_1
{
displayName = "Close Door";
priority = 0.2;
condition = ((this animationPhase 'Door_1_rot') >= 0.5);
statement = ([this, 'Door_1_rot'] call BIS_fnc_DoorNoHandleClose);
};

};
numberOfDoors = 1;
};

};

Share this post


Link to post
Share on other sites

Try removing external inheritances from the model.cfg, so it'd be something like this:

class CfgSkeletons
{
	class ir0n_gardenhouse_skeleton
	{
		isDiscrete=1;
		skeletonInherit = "Default";
		skeletonBones[]=
		{
			"Frontdoor","",
			"Glass_1_hide", "Frontdoor",
			"Glass_1_unhide", "Frontdoor",
			"Glass_1", "Frontdoor",
			"Glass_1_effects", "Frontdoor",
			"Door_1_trigger", "Frontdoor",
			"Glass_2_hide", "",
			"Glass_2_unhide", "",
			"Glass_3_hide", "",
			"Glass_3_unhide", ""
		};
	};
};

class CfgModels
{
	class ir0n_gardenhouse
	{
		skeletonName = "ir0n_gardenhouse_skeleton";
		sections[]=
		{
			"Glass_1_hide",
			"Glass_2_hide",
			"Glass_3_hide"
		};
		sectionsInherit = "";

		class Animations
		{
			class Door_1_rot
			{
				type="rotation";
				source="Door_1_source";
				selection="Frontdoor";
				axis="Door_1_axis";
				memory=1;
				minValue=0;
				maxValue=1;
				angle0=0;
				angle1="(rad 100)";
			};
			class Glass_1_hide
			{
				type="hide";
				source="Glass_1_source";
				selection="Glass_1_hide";
				minValue=0;
				maxValue=1;
				hideValue=0.99998999;
			};
			class Glass_1_unhide: Glass_1_hide
			{
				selection="Glass_1_unhide";
				hideValue=0;
				unhideValue=0.99998999;
			};
			class Glass_2_hide: Glass_1_hide
			{
				source="Glass_2_source";
				selection="Glass_2_hide";
			};
			class Glass_2_unhide: Glass_1_unhide
			{
				source="Glass_2_source";
				selection="Glass_2_unhide";
			};
			class Glass_3_hide: Glass_1_hide
			{
				source="Glass_3_source";
				selection="Glass_3_hide";
			};
			class Glass_3_unhide: Glass_1_unhide
			{
				source="Glass_3_source";
				selection="Glass_3_unhide";
			};
		};
	};
};

As to your second error, I'm not sure quite what you mean given a couple of the links aren't working (for me at least), but if I understand you correctly what you're saying is that the LODs are displaying backwards (i.e. LOD1 is displaying when you're far away, and LOD5 is displaying when you're close? If so, thats a very strange error - LOD 1 should always display when you're closest to the building/object and the higher the LOD "resolution" (i.e. the higher the number), the further away the LOD should be displayed.

Share this post


Link to post
Share on other sites

Hey,

 

thanks for your answer.

 

To 1. : hmm still dont load correct, the strange thing is, that I used my model.cfg several times before and it always worked perfectly

 

To 2. : Yes, if I´m very close to the object, it displays the LOD4 and if I´m far away, it displays LOD1/LOD0

And sorry for the links, steam doesnt like me today :)

 

ir0n

Share this post


Link to post
Share on other sites

I am having the same problem with my weapon as well!

 

 

Here is my config:

class CfgSkeletons
{
	class DSS_DesertEagle_Base
	{
		pivotsModel="";
		isDiscrete = 0;
		skeletonInherit = "";
		skeletonBones[] =
		{
			"back_chamber",		"",
			"magazine",			"",
			"trigger",			""
		};
	};
};
class CfgModels
{
	class Default
	{
		sectionsInherit = "";
		sections[] = {};
		skeletonName = "";
	};
	class DSS_DesertEagle_Base: Default
	{
		sections[]=
		{
			"magazine",
			"back_chamber"
		};
		skeletonName = "DSS_DesertEagle_Base";
		class Animations
		{
		};
	};
	class DSS_DesertEagle: DSS_DesertEagle_Base
	{
		skeletonName = "DSS_DesertEagleSkels";
		class Animations
		{
			class magazine_reload_move_1
			{
				type = "translation";
				source = "reloadMagazine";
				selection = "magazine";
				axis = "magazine_axis";
				minValue = 0.145;
				maxValue = 0.2;
				offset0 = 0;
				offset1 = 0.40000001;
			};
		};
	};
};

I do not see it working properly in both bulldozer and in-game. BTW: "back_chamber" is the slider for my weapon, each time it fires it is supposed to slide back and forth.

 

 

Thanks,

 

 

 

Rawner135

Share this post


Link to post
Share on other sites

Ir0n: Your links work for me now and it appears that you've numbered your LODs incorrectly as far as I can tell. Just re-number them by right clicking and then clicking on Properties and changing the number in the box at the bottom of the pop-up.

 

Ranwer: The reasopn the slide isn't working is because you haven't defined the animation for it....the only animation you have defined is the magazine moving when you reload the weapon...

Share this post


Link to post
Share on other sites

Well I solved it, I dont know really why:

 

first I changed Arma 3 Tools to dev, then I changed the LOD order again, as you said. It still didnt worked. Then I look in the data folder and saw, that the _nohq wasnt displayed correct, so I did it again and BOOM it worked. It fixed that the model.cfg is not loading.

 

Tanks for you help Jackal :D

 

ir0n

Share this post


Link to post
Share on other sites

Ranwer: The reason the slide isn't working is because you haven't defined the animation for it....the only animation you have defined is the magazine moving when you reload the weapon...

 

That's the problem...the magazine does not move either..

Share this post


Link to post
Share on other sites

That's the problem...the magazine does not move either..

In your CfgSkeletons your skeleton is defined as 'DSS_DesertEagle_Base' but in the cfgModels entry you reference 'DSS_DesertEagleSkels'. Change one to match the other, or simply remove the skeletons reference from the model, as you reference the CORRECT one in the base-class, that is then overwritten by the incorrect one in the sub-class.

  • Like 2

Share this post


Link to post
Share on other sites

In your CfgSkeletons your skeleton is defined as 'DSS_DesertEagle_Base' but in the cfgModels entry you reference 'DSS_DesertEagleSkels'. Change one to match the other, or simply remove the skeletons reference from the model, as you reference the CORRECT one in the base-class, that is then overwritten by the incorrect one in the sub-class.

 

Oh S*** I didn't see that, thanks Jackal326. :partytime:

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

×