Jump to content

Recommended Posts

  • Honorable Member

For those using the new costumes from the latest patches (since oct. 2024), there's now additional settings ("SourceSkinSpecular", "SourceSkin2Specular") to disable specular on certain skins. Previously, even if you reduced the specular strength in the proto, it would also affect the body strength. Below is the code to remove the specular effect from the source skin.

.png

Preview

Spoiler
/// 1. GameLib/RaceDataFile.cpp
// Search @ BOOL CRaceData::LoadRaceData
				std::string strSourceSkin;
				std::string strTargetSkin;

// Add below
				BOOL bSourceSkinSpecular = TRUE;

// Search @ BOOL CRaceData::LoadRaceData
				if (TextFileLoader.GetTokenString("sourceskin", &strSourceSkin) &&
					TextFileLoader.GetTokenString("targetskin", &strTargetSkin))
				{
					AppendShapeSkin(dwShapeIndex, 0, (strPathName + strSourceSkin).c_str(), (strPathName + strTargetSkin).c_str());
				}

// Replace with
				if (TextFileLoader.GetTokenString("sourceskin", &strSourceSkin) &&
					TextFileLoader.GetTokenString("targetskin", &strTargetSkin))
				{
					TextFileLoader.GetTokenBoolean("sourceskinspecular", &bSourceSkinSpecular);
					AppendShapeSkin(dwShapeIndex, 0, (strPathName + strSourceSkin).c_str(), (strPathName + strTargetSkin).c_str(), bSourceSkinSpecular);
				}

// 2. Search @ BOOL CRaceData::LoadRaceData
				if (TextFileLoader.GetTokenString("sourceskin2", &strSourceSkin) &&
					TextFileLoader.GetTokenString("targetskin2", &strTargetSkin))
				{
					AppendShapeSkin(dwShapeIndex, 0, (strPathName + strSourceSkin).c_str(), (strPathName + strTargetSkin).c_str());
				}

// Replace with
				if (TextFileLoader.GetTokenString("sourceskin2", &strSourceSkin) &&
					TextFileLoader.GetTokenString("targetskin2", &strTargetSkin))
				{
					TextFileLoader.GetTokenBoolean("sourceskin2specular", &bSourceSkinSpecular);
					AppendShapeSkin(dwShapeIndex, 0, (strPathName + strSourceSkin).c_str(), (strPathName + strTargetSkin).c_str(), bSourceSkinSpecular);
				}

/// 3. GameLib/RaceData.cpp
// Search
void CRaceData::AppendShapeSkin(UINT eShape, UINT ePart, const char* c_szSrcFileName, const char* c_szDstFileName)
{
	SSkin kSkin;
	kSkin.m_ePart = ePart;
	kSkin.m_stSrcFileName = c_szSrcFileName;
	kSkin.m_stDstFileName = c_szDstFileName;

	CFileNameHelper::ChangeDosPath(kSkin.m_stSrcFileName);
	m_kMap_dwShapeKey_kShape[eShape].m_kVct_kSkin.push_back(kSkin);
}

// Replace with
void CRaceData::AppendShapeSkin(UINT eShape, UINT ePart, const char* c_szSrcFileName, const char* c_szDstFileName, BOOL bSpecular)
{
	SSkin kSkin;
	kSkin.m_ePart = ePart;
	kSkin.m_stSrcFileName = c_szSrcFileName;
	kSkin.m_stDstFileName = c_szDstFileName;
	kSkin.m_bSpecular = bSpecular;

	CFileNameHelper::ChangeDosPath(kSkin.m_stSrcFileName);
	m_kMap_dwShapeKey_kShape[eShape].m_kVct_kSkin.push_back(kSkin);
}

/// 4. GameLib/RaceData.h
// Search
	void AppendShapeSkin(UINT eShape, UINT ePart, const char* c_szSrcFileName, const char* c_szDstFileName);

// Replace with
	void AppendShapeSkin(UINT eShape, UINT ePart, const char* c_szSrcFileName, const char* c_szDstFileName, BOOL bSpecular = TRUE);

// Search @ struct SSkin
		std::string m_stSrcFileName;
		std::string m_stDstFileName;

// Add below
		BOOL m_bSpecular;

// Search @ struct SSkin
			m_ePart = 0;

// Add below
			m_bSpecular = TRUE;

// Search @ struct SSkin
			m_ePart = c_rkSkin.m_ePart;
			m_stSrcFileName = c_rkSkin.m_stSrcFileName;
			m_stDstFileName = c_rkSkin.m_stDstFileName;

// Add below
			m_bSpecular = c_rkSkin.m_bSpecular;

/// 6. GameLib/ActorInstanceData.cpp
// Search @ void CActorInstance::SetShape
					kMaterialData.isSpecularEnable = TRUE;

// Replace with
					kMaterialData.isSpecularEnable = c_rkSkinItem.m_bSpecular;

 

 

Edited by Owsap
  • Metin2 Dev 4
  • Love 14
Link to comment
https://metin2.dev/topic/33421-toggle-specific-skin-specular/
Share on other sites

  • 3 weeks later...
  • Active Member

or you you can modify this

        ShapeIndex            41936
        Model                "assassin_halloween_2024.gr2"
        SourceSkin            "assassin_halloween_2024_1.dds"
        TargetSkin            "assassin_halloween_2024_1.dds"
        SourceSkin2            "assassin_face_devil_1.dds"
        TargetSkin2            "assassin_face_devil_1.dds"


with this

        ShapeIndex            41936
        Model                "assassin_halloween_2024.gr2"
        SourceSkin            "assassin_halloween_2024_1.dds"
        TargetSkin            "assassin_halloween_2024_1.dds"

Because there is no need to put the face in msm, the location of the face is already in gr2 from the costume, it reads it automatically without alpha channel (glow) even if the dds have alpha.

  • Good 1
  • Love 1

spacer.png

  • 7 months later...

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / 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.