Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Need help?

    Create a topic in the appropriate section
    Don't write everything in the chat!
  • Take a look at the marketplace

    There you can buy
    everything related to game servers
  • Don't want a ban?

    Please read our rules
    Don't disturb the order!
  • Sell or buy?

    Use services of the guarantor
    We will make your deal safe
  • 0
iSuss

Кто знает, как заменить модельке оружия материал?

Сделал ретекстур Colt 1911, создал материал, прописал в конфиге, однако он не принимается в игре, почему-то используется ванильный.

class CfgPatches {
	class IsussPack_Weapons_IsussColt1911 {
		units[] = {"IsussColt1911"};
		weapons[] = {};
		requiredVersion = 0.1;
		requiredAddons[] = {"DZ_Data", "DZ_Pistols", "DZ_Pistols_1911",};
	};
};
class Mode_Safe;	// External class reference
class Mode_SemiAuto;	// External class reference
class Mode_Burst;	// External class reference
class Mode_FullAuto;	// External class reference
class OpticsInfoPistol;	// External class reference

class cfgWeapons {
	class Pistol_Base;	// External class reference
	class OpticsInfoRifle;	// External class reference
	class Engraved1911;	// External class reference
	
	class IsussColt1911 : Engraved1911 {
		scope = 2;
		displayName = "Colt 1911";
		descriptionShort = "Хромированный Colt 1911";
		model = "\dz\weapons\pistols\1911\1911.p3d";
		attachments[] = {"pistolFlashlight", "pistolMuzzle"};
		itemSize[] = {3, 2};
		hiddenSelectionsTextures[] = {"IsussPack\Weapons\IsussColt1911\Data\2iSuss1911_co.paa"};
		hiddenSelectionsMaterials[] = {"IsussPack\Weapons\IsussColt1911\Data\iSuss1911.rvmat"};
		
		class DamageSystem {
			class GlobalHealth {
				class Health {
					hitpoints = 200;
					healthLevels[] = {{1.0, {"IsussPack\Weapons\IsussColt1911\Data\iSuss1911.rvmat"}}, {0.7, {"IsussPack\Weapons\IsussColt1911\Data\iSuss1911.rvmat"}}, {0.5, {"IsussPack\Weapons\IsussColt1911\Data\iSuss1911.rvmat"}}, {0.3, {"IsussPack\Weapons\IsussColt1911\Data\iSuss1911.rvmat"}}, {0.0, {"IsussPack\Weapons\IsussColt1911\Data\iSuss1911.rvmat"}}};
				};
			};
		};
	};
};

 

Share this post


Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0
24.11.2020 в 20:11, iSuss сказал:

Сделал ретекстур Colt 1911, создал материал, прописал в конфиге, однако он не принимается в игре, почему-то используется ванильный.

В вашем конфиге отсутствует строчка hiddenSelections[] = {"camoground"}; это во-первых а во-вторых правильный конфиг должен быть так:
 

class CfgPatches {
	class IsussColt1911 {
		units[] = {"IsussColt1911"};
		weapons[] = {};
		requiredVersion = 0.1;
		requiredAddons[] = {"DZ_Data", "DZ_Pistols"};
	};
};
class Mode_Safe;	// External class reference
class Mode_SemiAuto;	// External class reference
class Mode_Burst;	// External class reference
class Mode_FullAuto;	// External class reference
class OpticsInfoPistol;	// External class reference

class cfgWeapons {
	class Colt1911_Base;	// External class reference
	
	class IsussColt1911 : Colt1911_Base {
		scope = 2;
		displayName = "Colt 1911";
		descriptionShort = "Хромированный Colt 1911";
		model = "\dz\weapons\pistols\1911\1911.p3d";
		attachments[] = {"pistolFlashlight", "pistolMuzzle"};
		itemSize[] = {3, 2};
		hiddenSelections[] = {"camoground"};
		hiddenSelectionsTextures[] = {"IsussPack\Weapons\IsussColt1911\Data\2iSuss1911_co.paa"};
		hiddenSelectionsMaterials[] = {"IsussPack\Weapons\IsussColt1911\Data\iSuss1911.rvmat"};
		
		class DamageSystem {
			class GlobalHealth {
				class Health {
					hitpoints = 200;
					healthLevels[] = {{1.01, {"IsussPack\Weapons\IsussColt1911\Data\iSuss1911.rvmat"}}, {0.70, {"IsussPack\Weapons\IsussColt1911\Data\iSuss1911.rvmat"}}, {0.50, {"IsussPack\Weapons\IsussColt1911\Data\iSuss1911.rvmat"}}, {0.30, {"IsussPack\Weapons\IsussColt1911\Data\iSuss1911.rvmat"}}, {0.01, {"IsussPack\Weapons\IsussColt1911\Data\iSuss1911.rvmat"}}};
				};
			};
		};
	};
};


 

Edited by AKuznecov (see edit history)

Share this post


Link to post
Share on other sites



  • 0

Не помогло, к сожалению, материал по-прежнему ванильный

Share this post


Link to post
Share on other sites
  • 0
22 часа назад, iSuss сказал:

Не помогло, к сожалению, материал по-прежнему ванильный

Нужно в файле rvmat пути прописать, где лежит сам материал

Edited by Johns (see edit history)

Share this post


Link to post
Share on other sites
  • 0
#define _ARMA_

ambient[] = {0.15,0.15,0.15,1};
diffuse[] = {0.5,0.5,0.5,1};
forcedDiffuse[] = {0,0,0,0};
emmisive[] = {0,0,0,1};
specular[] = {1.0,1.0,1.0,1};
specularPower = 350;
PixelShaderID = "Super";
VertexShaderID = "Super";
class Stage1
{
	texture = "IsussPack\Weapons\IsussColt1911\Data\iSuss1911_nohq.paa";
	uvSource = "tex";
	class uvTransform
	{
		aside[] = {1,0,0};
		up[] = {0,1,0};
		dir[] = {0,0,0};
		pos[] = {0,0,0};
	};
};
class Stage2
{
	texture = "#(argb,8,8,3)color(0.5,0.5,0.5,0.5,DT)";
	uvSource = "tex";
	class uvTransform
	{
		aside[] = {1,0,0};
		up[] = {0,1,0};
		dir[] = {0,0,0};
		pos[] = {0,0,0};
	};
};
class Stage3
{
	texture = "#(argb,8,8,3)color(0,0,0,0,MC)";
	uvSource = "tex";
	class uvTransform
	{
		aside[] = {1,0,0};
		up[] = {0,1,0};
		dir[] = {0,0,0};
		pos[] = {0,0,0};
	};
};
class Stage4
{
	texture = "dz\weapons\pistols\1911\data\1911_as.paa";
	uvSource = "tex";
	class uvTransform
	{
		aside[] = {1,0,0};
		up[] = {0,1,0};
		dir[] = {0,0,1};
		pos[] = {0,0,0};
	};
};
class Stage5
{
	texture = "IsussPack\Weapons\IsussColt1911\Data\iSuss1911_smdi.paa";
	uvSource = "tex";
	class uvTransform
	{
		aside[] = {1,0,0};
		up[] = {0,1,0};
		dir[] = {0,0,0};
		pos[] = {0,0,0};
	};
};
class Stage6
{
	texture = "#(ai,32,128,1)fresnel(1.2887,2.4191)";
	uvSource = "none";
	class uvTransform
	{
		aside[] = {1,0,0};
		up[] = {0,1,0};
		dir[] = {0,0,0};
		pos[] = {0,0,0};
	};
};
class Stage7
{
	texture = "IsussPack\Weapons\IsussColt1911\Data\env_iSuss1911_co.paa";
	uvSource = "none";
	class uvTransform
	{
		aside[] = {1,0,0};
		up[] = {0,1,0};
		dir[] = {0,0,0};
		pos[] = {0,0,0};
	};
};

Это rvmat

Share this post


Link to post
Share on other sites
  • 0

А как в нем прописать путь до материалов?

Share this post


Link to post
Share on other sites
  • 0

Пробуй брать класс не от базового. И проверь точно пути еще внутри rvmat

class CfgPatches
{
	class IsussColt1911
	{
		units[]={};
		weapons[]={};
		requiredVersion=0.1;
		requiredAddons[]=
		{
			"DZ_Data",
			"DZ_Pistols"
		};
	};
};
class Mode_Safe;
class Mode_SemiAuto;
class Mode_Burst;
class Mode_FullAuto;
class OpticsInfoPistol;
class cfgWeapons
{
	class Pistol_Base;
	class Engraved1911;
	
	class IsussColt1911: Engraved1911
	{
		scope=2;
		displayName="Colt 1911";
		descriptionShort="Хромированный Colt 1911";
		model="\dz\weapons\pistols\1911\1911.p3d";
		attachments[]=
		{
			"pistolFlashlight",
			"pistolMuzzle"
		};
		itemSize[]={3,2};
		hiddenSelectionsTextures[]=
		{
			"IsussPack\Weapons\IsussColt1911\Data\2iSuss1911_co.paa"
		};
		hiddenSelectionsMaterials[]=
		{
			"IsussPack\Weapons\IsussColt1911\Data\iSuss1911.rvmat"
		};
		class DamageSystem
		{
			class GlobalHealth
			{
				class Health
				{
					hitpoints=200;
					healthLevels[]=
					{
						
						{
							1.01,
							
							{
								"IsussPack\Weapons\IsussColt1911\Data\iSuss1911.rvmat"
							}
						},
						
						{
							0.69999999,
							
							{
								"IsussPack\Weapons\IsussColt1911\Data\iSuss1911.rvmat"
							}
						},
						
						{
							0.5,
							
							{
								"DZ\weapons\pistols\1911\data\1911_engraved_damage.rvmat"
							}
						},
						
						{
							0.30000001,
							
							{
								"DZ\weapons\pistols\1911\data\1911_engraved_damage.rvmat"
							}
						},
						
						{
							0.1,
							
							{
								"DZ\weapons\pistols\1911\data\1911_engraved_destruct.rvmat"
							}
						}
					};
				};
			};
		};
	};
};

 

Share this post


Link to post
Share on other sites

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

×
×
  • Create New...

Important Information

By using this site, you automaticly agree to our Guidelines and Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.