Jump to content

How To Update Granny - 2.4 To 2.9


Recommended Posts

  • Bronze

M2 Download Center

This is the hidden content, please
( Internal )

Dear community,

 

this is my first guide for you in which I will show you how you change the older Granny 2.4 version which is the client using to the newer Granny 2.9 version.

For this tutorial I'm using the mainline_released client source (all client sources are the same as I heard).

 

DO NOT FORGET TO CREATE BACKUPS!

 

1. Step:

Navigate to novalineSrcsToolsRAD Game Toolsgrannycommon and unzip the file granny_common_2_9_12_0_release.zip. You will receive some folders. Now you navigate into the folder include and copy the granny.h file to the include folder of your client (for me it's mainline_releasedSrcsExterninclude). Then you go into the libwin32 folder and copy all the *.lib and *.pdb files into your lib folder of your client.

 

2. Step:

Open your client source and navigate to the project EterGrnLib.

Open Mesh.cpp.

Search for this:

int * boneIndices = GrannyGetMeshBindingToBoneIndices(pgrnMeshBinding);

Replace with this:

int * boneIndices = (int*)GrannyGetMeshBindingToBoneIndices(pgrnMeshBinding);

Search for this:

return GrannyGetMeshBindingToBoneIndices(m_pgrnMeshBindingTemp);

Replace with this:

return (int*)GrannyGetMeshBindingToBoneIndices(m_pgrnMeshBindingTemp);

Search for this:

m_pgrnMeshDeformer = GrannyNewMeshDeformer(pgrnInputType, pgrnOutputType, GrannyDeformPositionNormal);

Replace with this:

m_pgrnMeshDeformer = GrannyNewMeshDeformer(pgrnInputType, pgrnOutputType, GrannyDeformPositionNormal, GrannyAllowUncopiedTail);

-----

Open ModelInstanceUpdate.cpp.

Search for this:

GrannyUpdateModelMatrix(m_pgrnModelInstance, fSecondsElapsed, (const float *) pMatrix, (float *) pMatrix);

Replace with this:

GrannyUpdateModelMatrix(m_pgrnModelInstance, fSecondsElapsed, (const float *) pMatrix, (float *) pMatrix, false);

-----

Open Material.cpp.

Search for this:

granny_variant twoSideResult = GrannyFindMatchingMember(pgrnMaterial->ExtendedData.Type, pgrnMaterial->ExtendedData.Object, "Two-sided");

if (NULL != twoSideResult.Type)
	GrannyConvertSingleObject(twoSideResult.Type, twoSideResult.Object, TwoSidedFieldType, &twoSided);

Replace with this:

granny_variant twoSideResult;

if (GrannyFindMatchingMember(pgrnMaterial->ExtendedData.Type, pgrnMaterial->ExtendedData.Object, "Two-sided", &twoSideResult)  
	&& NULL != twoSideResult.Type)
	GrannyConvertSingleObject(twoSideResult.Type, twoSideResult.Object, TwoSidedFieldType, &twoSided, NULL);

-----

Open ModelInstanceModel.cpp

Search for this:

return GrannyGetMeshBindingToBoneIndices(m_vct_pgrnMeshBinding[iMeshBinding]);

Replace with this:

return (int*)GrannyGetMeshBindingToBoneIndices(m_vct_pgrnMeshBinding[iMeshBinding]);

-----

Navigate to the UserInterface project.

Open UserInterface.cpp.

Search for this (it's at the end of the file):

static void GrannyError(granny_log_message_type Type,
						granny_log_message_origin Origin,
						char const *Error,
						void *UserData)
{
    TraceError("GRANNY: %s", Error);
}

Replace with this:

static void GrannyError(granny_log_message_type Type,
						granny_log_message_origin Origin,
						char const* File,
						granny_int32x Line,
						char const *Error,
						void *UserData)
{
    TraceError("GRANNY: %s", Error);
}

Now rebuild the whole project!

 

 

3. Step:

Go to the folder where we unziped the things of the first step and go to the lib folder. Copy the granny2.dll into your main client directory.

 

 

Now you're finished and you have Granny 2.9.

I hope this guide helped you!

 

 

Special Thanks to Cryfact!

 

Regards

  • Metin2 Dev 101
  • Dislove 3
  • Think 1
  • Confused 1
  • Scream 2
  • Good 43
  • Love 13
  • Love 123
Link to comment
Share on other sites

  • Bronze

You should do this because if you don't do you receive this error in syserr (doesn't matter InGame but doesn't look good):

0417 19:41:07613 :: GRANNY: File is file format revision 6 (current version is 7)
0417 19:41:07615 :: GRANNY: File has run-time type tag of 0x80000010, which doesn't match this version of Granny (0x80000037).  Automatic conversion will be attempted.

Regards

Link to comment
Share on other sites

You should do this because if you don't do you receive this error in syserr (doesn't matter InGame but doesn't look good):

0417 19:41:07613 :: GRANNY: File is file format revision 6 (current version is 7)
0417 19:41:07615 :: GRANNY: File has run-time type tag of 0x80000010, which doesn't match this version of Granny (0x80000037).  Automatic conversion will be attempted.

Regards

Thanks for information.

Link to comment
Share on other sites

  • 2 months later...
  • 3 months later...
  • Former Staff
1>.UserInterface.cpp(721) : error C2440: '=' : cannot convert from 'void (__cdecl *)(granny_log_message_type,granny_log_message_origin,granny_int32x,const char *,const char *,void *)' to 'granny_log_function (__cdecl *)'
1>        This conversion requires a reinterpret_cast, a C-style cast or function-style cast
Link to comment
Share on other sites

  • 4 weeks later...

Hi guys. I followed the step by step guide. but finding this error:

1>.ModelInstanceUpdate.cpp(50) : error C2660: 'GrannyUpdateModelMatrix' : function does not take 5 arguments
1>Mesh.cpp
1>.Mesh.cpp(139) : error C2065: 'GrannyAllowUncopiedTail' : undeclared identifier
1>Material.cpp
1>c:usersryudesktopclientetergrnlib../eterbase/Filename.h(236) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        C:Program Files (x86)Microsoft Visual Studio 9.0VCincludestring.h(74) : see declaration of 'strcpy'
1>.Material.cpp(209) : warning C4996: '_snprintf': This function or variable may be unsafe. Consider using _snprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        C:Program Files (x86)Microsoft Visual Studio 9.0VCincludestdio.h(358) : see declaration of '_snprintf'
1>.Material.cpp(230) : warning C4996: 'strnicmp': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strnicmp. See online help for details.
1>        C:Program Files (x86)Microsoft Visual Studio 9.0VCincludestring.h(217) : see declaration of 'strnicmp'
1>.Material.cpp(252) : error C2660: 'GrannyFindMatchingMember' : function does not take 4 arguments
1>.Material.cpp(254) : error C2660: 'GrannyConvertSingleObject' : function does not take 5 arguments
1>Generating Code...
Link to comment
Share on other sites

  • 4 weeks later...
1>.UserInterface.cpp(721) : error C2440: '=' : cannot convert from 'void (__cdecl *)(granny_log_message_type,granny_log_message_origin,granny_int32x,const char *,const char *,void *)' to 'granny_log_function (__cdecl *)'
1>        This conversion requires a reinterpret_cast, a C-style cast or function-style cast

You must rebuild all solution. (Microsoft Visual Studio -> Build -> Rebuild Solution.

:)

 

@topic

Thanks. XD

  • Love 2
Link to comment
Share on other sites

 

Hi guys. I followed the step by step guide. but finding this error:

1>.ModelInstanceUpdate.cpp(50) : error C2660: 'GrannyUpdateModelMatrix' : function does not take 5 arguments
1>Mesh.cpp
1>.Mesh.cpp(139) : error C2065: 'GrannyAllowUncopiedTail' : undeclared identifier
1>Material.cpp
1>c:usersryudesktopclientetergrnlib../eterbase/Filename.h(236) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        C:Program Files (x86)Microsoft Visual Studio 9.0VCincludestring.h(74) : see declaration of 'strcpy'
1>.Material.cpp(209) : warning C4996: '_snprintf': This function or variable may be unsafe. Consider using _snprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        C:Program Files (x86)Microsoft Visual Studio 9.0VCincludestdio.h(358) : see declaration of '_snprintf'
1>.Material.cpp(230) : warning C4996: 'strnicmp': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strnicmp. See online help for details.
1>        C:Program Files (x86)Microsoft Visual Studio 9.0VCincludestring.h(217) : see declaration of 'strnicmp'
1>.Material.cpp(252) : error C2660: 'GrannyFindMatchingMember' : function does not take 4 arguments
1>.Material.cpp(254) : error C2660: 'GrannyConvertSingleObject' : function does not take 5 arguments
1>Generating Code...

 

In etergrnlib/filename.h add

#pragma warning(disable:4996)
Link to comment
Share on other sites

  • 1 month later...

When I put a sword this error, anyone know how to fix?

 

 

GRANNY: Unable to find matching track_group for Model: "weapon_chogeup_01" in Animation: "D:zwork¹ÚÀç°ü3¿ù21ÀÏÀÌÈÄÀǼöÁ¤¾Ö´Ï¸ÞÀ̼ǹ«»ç ij¸¯ÅÍ ¼öÁ¤¾Ö´Ï¸ÞÀ̼Çonehand_swordwait.max"

 

Here a solution to hide all the useless error of Granny.

 

Open UserInterface.cpp from UserInterface, after have doing the tutorial search: void GrannyError(granny_log_message_type Type,

 

and comment the contents like it:

//static void GrannyError(granny_log_message_type Type,
// granny_log_message_origin Origin,
// char const*  File,
// granny_int32x Line,
// char const* Message,
// void * UserData)
//{
// TraceError("GRANNY: %s", Message);
//}

and a little down:

//  granny_log_callback Callback;
//   Callback.Function = GrannyError;
//   Callback.UserData = 0;
//   GrannySetLogCallback(&Callback);
return 1;

Regards, Vamos.

  • Angry 1
  • Love 5
 

 

Link to comment
Share on other sites

Solved

 

 

Ummm..

error LNK2019: unresolved external symbol __imp__GrannyFindMatchingMember@16 referenced in function "public: bool __thiscall CGrannyMaterial::CreateFromGrannyMaterialPointer(struct granny_material *)" (?CreateFromGrannyMaterialPointer@CGrannyMaterial@@QAE_NPAUgranny_material@@@Z)	D:mt2nowe pliki game!client_reboot_devvs_filesUserInterfaceEterGrnLib.lib(Material.obj)	UserInterface
error LNK2019: unresolved external symbol __imp__GrannyConvertSingleObject@20 referenced in function "public: bool __thiscall CGrannyMaterial::CreateFromGrannyMaterialPointer(struct granny_material *)" (?CreateFromGrannyMaterialPointer@CGrannyMaterial@@QAE_NPAUgranny_material@@@Z)	D:mt2nowe pliki game!client_reboot_devvs_filesUserInterfaceEterGrnLib.lib(Material.obj)	UserInterface
error LNK2019: unresolved external symbol __imp__GrannyUpdateModelMatrix@20 referenced in function "public: void __thiscall CGrannyModelInstance::UpdateTransform(struct D3DXMATRIX *,float)" (?UpdateTransform@CGrannyModelInstance@@QAEXPAUD3DXMATRIX@@M@Z)	D:mt2nowe pliki game!client_reboot_devvs_filesUserInterfaceEterGrnLib.lib(ModelInstanceUpdate.obj)	UserInterface
error LNK2019: unresolved external symbol __imp__GrannyNewMeshDeformer@16 referenced in function "public: bool __thiscall CGrannyMesh::CreateFromGrannyMeshPointer(struct granny_skeleton *,struct granny_mesh *,int,int,class CGrannyMaterialPalette &)" (?CreateFromGrannyMeshPointer@CGrannyMesh@@QAE_NPAUgranny_skeleton@@PAUgranny_mesh@@HHAAVCGrannyMaterialPalette@@@Z)	D:mt2nowe pliki game!client_reboot_devvs_filesUserInterfaceEterGrnLib.lib(Mesh.obj)	UserInterface
error LNK1120: 4 unresolved externals	D:mt2nowe pliki game!client_reboot_devbinaryMetin2Debug.exe	1	1	UserInterface
Link to comment
Share on other sites

  • 4 weeks later...
12>EterGrnLib.lib(Material.obj) : error LNK2001: unresolved external symbol __imp__GrannyFindMatchingMember@16
 
12>EterGrnLib.lib(Material.obj) : error LNK2001: unresolved external symbol __imp__GrannyConvertSingleObject@20
 
12>EterGrnLib.lib(ModelInstanceUpdate.obj) : error LNK2001: unresolved external symbol __imp__GrannyUpdateModelMatrix@20
 
12>EterGrnLib.lib(Mesh.obj) : error LNK2001: unresolved external symbol __imp__GrannyNewMeshDeformer@16
 
12>D:workspacebinaryTestRelease.exe : fatal error LNK1120: 4 unresolved externals
 
 
 
Please Help ? :)
Link to comment
Share on other sites

  • Premium

I follow this tutorial step by step and when i try to compile the binary I receive this error:  Error    1    error C2440: 'return' : cannot convert from 'const granny_int32x *' to 'int *'    D:source_binarysourceEterGrnLibModelInstanceModel.cpp    80    1    EterGrnLib

 

Can someone help me please?
 

Link to comment
Share on other sites

  • 1 month later...
  • Former Staff

Before doing all the changes I had this error.

0417 19:41:07615 :: GRANNY: File has run-time type tag of 0x80000010, which doesn't match this version of Granny (0x80000037).  Automatic conversion will be attempted.

After compiling I receive this errors.

0417 19:41:07613 :: GRANNY: File is file format revision 6 (current version is 7)

PLUS

0417 19:41:07615 :: GRANNY: File has run-time type tag of 0x80000010, which doesn't match this version of Granny (0x80000037).  Automatic conversion will be attempted.
Why's that?
Link to comment
Share on other sites

Before doing all the changes I had this error.

0417 19:41:07615 :: GRANNY: File has run-time type tag of 0x80000010, which doesn't match this version of Granny (0x80000037).  Automatic conversion will be attempted.
After compiling I receive this errors.

0417 19:41:07613 :: GRANNY: File is file format revision 6 (current version is 7)

PLUS

0417 19:41:07615 :: GRANNY: File has run-time type tag of 0x80000010, which doesn't match this version of Granny (0x80000037).  Automatic conversion will be attempted.
Why's that?

 

 

You need to convert the gr2 files to 2.9. Try using this converter

Link to comment
Share on other sites

Announcements



×
×
  • 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.