Jump to content
For maintenance and updates, the community will be offline on 31 December 2022 ×
  • 0

bug DumpProto


ahmet199

Question

7 answers to this question

Recommended Posts

  • 0
23 hours ago, DemOnJR said:

Use Excel, copy/paste and edit,
And be sure the dump_proto is the right one.

Annoyed GIF by 20th Century Fox Home Entertainment

yes im test Excel There is still the same error

yes dump_proto

upppppp

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • 0
  • Distinguished Member

As i remember dump_proto does not save the addon type to the clientside. I don't know why, but it's not needed in clientside anyways. You should not use the reverse dump_proto (unpacker) since you have your txt files. People use that only when they lost their txt file.

If you really want to add the addon type to the clientside too then you should modify your dump_proto.cpp

Search:

col++; //AddonType 

(Line 725 in the default dump_proto.cpp, but it's after the itemTable->bGainSocketPct = atoi(csvTable.AsStringByIndex(col++)); line)

Change it to:  

itemTable->bAddonType = atoi(csvTable.AsStringByIndex(col++));

Search: 

BYTE[TAB]bGainSocketPct; 

Add: 

BYTE[TAB]bAddonType;

[TAB] MEAN TABULATOR KEY!!! For some reason it's important there so make sure you paste it with tabulator.

Search: 

item_table->bGainSocketPct = tempTable->bGainSocketPct;

Add: 

item_table->bAddonType = tempTable->bAddonType;

You may have to do the same in you reverse dump_proto (unpacker) if it's not bundled together.

Edit: Use char instead of BYTE like Owsap said below.

Edited by TMP4
Link to comment
Share on other sites

  • 0
13 hours ago, TMP4 said:

As i remember dump_proto does not save the addon type to the clientside. I don't know why, but it's not needed in clientside anyways. You should not use the reverse dump_proto (unpacker) since you have your txt files. People use that only when they lost their txt file.

If you really want to add the addon type to the clientside too then you should modify your dump_proto.cpp

Search:

col++; //AddonType 

(Line 725 in the default dump_proto.cpp, but it's after the itemTable->bGainSocketPct = atoi(csvTable.AsStringByIndex(col++)); line)

Change it to:  

itemTable->bAddonType = atoi(csvTable.AsStringByIndex(col++));

Search: 

BYTE[TAB]bGainSocketPct; 

Add: 

BYTE[TAB]bAddonType;

[TAB] MEAN TABULATOR KEY!!! For some reason it's important there so make sure you paste it with tabulator.

Search: 

item_table->bGainSocketPct = tempTable->bGainSocketPct;

Add: 

item_table->bAddonType = tempTable->bAddonType;

You may have to do the same in you reverse dump_proto (unpacker) if it's not bundled together.

Thank you problem
It is not modified
When the
proto locale
Modification does not occur
Did you understand ?
This just happens
while adding
damage rate
Or boss skills
Do you understand what I mean
When I collect
The addition is not modified

Link to comment
Share on other sites

  • 0
  • Nitro Booster

As @TMP4said, Dump Proto does not dump some values to the protos as it isn't needed by the client.

Although your tutorial orientation is correct @TMP4, you have to consider that BYTE is unsigned and it will not dump the correct value of the AddonType since, usually, it holds the value -1 or 0.

So, @ ahmet199, I have made a complete tutorial on how you can add it correctly to your Dump Proto tool and call it from your client.

Dump Proto source.

Spoiler
/// 1. @ Srcs/Tools/Dump Proto/ItemCSVReader.h
// Add
#define DUMP_ITEM_ADDON_TYPE_VALUES

/// 2. @ Srcs/Tools/Dump Proto/dump_proto.cpp
// Search @ TClientItemTable
	BYTE bGainSocketPct;

// Add below
#if defined(DUMP_ITEM_ADDON_TYPE_VALUES)
	char cAddonType;
#endif

/// 3. @ Srcs/Tools/Dump Proto/dump_proto.cpp
// Search @ bool Set_Proto_Item_Table
	col++; // AddonType

// Replace with
#if defined(DUMP_ITEM_ADDON_TYPE_VALUES)
	itemTable->cAddonType = atoi(csvTable.AsStringByIndex(col++));
#else
	col++; // AddonType
#endif

/// 4. @ Srcs/Tools/Dump Proto/dump_proto.cpp
// Search @ bool BuildItemTable
			item_table->bGainSocketPct = tempTable->bGainSocketPct;

// Add below
#if defined(DUMP_ITEM_ADDON_TYPE_VALUES)
			item_table->cAddonType = tempTable->cAddonType;
#endif

 

Client source.

Spoiler
/// 1. @ Srcs/Client/GameLib/ItemData.h
// Search @ TItemTable
		BYTE bGainSocketPct;

// Add below
		char cAddonType;

/// 2. @ Srcs/Client/GameLib/ItemData.h
// Search
	int GetSocketCount() const;

// Add below
	char GetAddonType() const;

/// 3. Srcs/Client/GameLib/ItemData.cpp
// Search
DWORD CItemData::GetIconNumber() const

// Add above
char CItemData::GetAddonType() const
{
	return m_ItemTable.cAddonType;
}

 

Finally, here is how you can get that value from the item module.

Client source.

Spoiler
/// 1. @ Srcs/Client/UserInterface/PythonItemModule.cpp
// Search
PyObject* itemGetIconInstance(PyObject* poSelf, PyObject* poArgs)

// Add above
PyObject* itemGetAddonType(PyObject* poSelf, PyObject* poArgs)
{
	CItemData* pItemData = CItemManager::Instance().GetSelectedItemDataPointer();
	if (!pItemData)
		return Py_BuildException("no selected item data");

	return Py_BuildValue("i", pItemData->GetAddonType());
}

/// 2. @ Srcs/Client/UserInterface/PythonItemModule.cpp
// Search
		{ "GetIconInstance", itemGetIconInstance, METH_VARARGS },

// Add above
		{ "GetAddonType", itemGetAddonType, METH_VARARGS },

 

Root example.

Spoiler
''' 1. @ Client/Root/uiToolTip.py '''
# Search
	def __AppendLimitInformation(self):
		appendSpace = False

# Add below
		self.AppendTextLine("AddonType %d" % (item.GetAddonType()), self.CONDITION_COLOR)

 

 

Edited by Owsap
Link to comment
Share on other sites

  • 0
2 hours ago, Owsap said:

As @TMP4said, Dump Proto does not dump some values to the protos as it isn't needed by the client.

Although your tutorial orientation is correct @TMP4, you have to consider that BYTE is unsigned and it will not dump the correct value of the AddonType since, usually, it holds the value -1 or 0.

So, @ ahmet199, I have made a complete tutorial on how you can add it correctly to your Dump Proto tool and call it from your client.

Dump Proto source.

  Reveal hidden contents
/// 1. @ Srcs/Tools/Dump Proto/ItemCSVReader.h
// Add
#define DUMP_ITEM_ADDON_TYPE_VALUES

/// 2. @ Srcs/Tools/Dump Proto/dump_proto.cpp
// Search @ TClientItemTable
	BYTE bGainSocketPct;

// Add below
#if defined(DUMP_ITEM_ADDON_TYPE_VALUES)
	char cAddonType;
#endif

/// 3. @ Srcs/Tools/Dump Proto/dump_proto.cpp
// Search @ bool Set_Proto_Item_Table
	col++; // AddonType

// Replace with
#if defined(DUMP_ITEM_ADDON_TYPE_VALUES)
	itemTable->cAddonType = atoi(csvTable.AsStringByIndex(col++));
#else
	col++; // AddonType
#endif

/// 4. @ Srcs/Tools/Dump Proto/dump_proto.cpp
// Search @ bool BuildItemTable
			item_table->bGainSocketPct = tempTable->bGainSocketPct;

// Add below
#if defined(DUMP_ITEM_ADDON_TYPE_VALUES)
			item_table->cAddonType = tempTable->cAddonType;
#endif

 

Client source.

  Reveal hidden contents
/// 1. @ Srcs/Client/GameLib/ItemData.h
// Search @ TItemTable
		BYTE bGainSocketPct;

// Add below
		char cAddonType;

/// 2. @ Srcs/Client/GameLib/ItemData.h
// Search
	int GetSocketCount() const;

// Add below
	char GetAddonType() const;

/// 3. Srcs/Client/GameLib/ItemData.cpp
// Search
DWORD CItemData::GetIconNumber() const

// Add above
char CItemData::GetAddonType() const
{
	return m_ItemTable.cAddonType;
}

 

Finally, here is how you can get that value from the item module.

Client source.

  Reveal hidden contents
/// 1. @ Srcs/Client/UserInterface/PythonItemModule.cpp
// Search
PyObject* itemGetIconInstance(PyObject* poSelf, PyObject* poArgs)

// Add above
PyObject* itemGetAddonType(PyObject* poSelf, PyObject* poArgs)
{
	CItemData* pItemData = CItemManager::Instance().GetSelectedItemDataPointer();
	if (!pItemData)
		return Py_BuildException("no selected item data");

	return Py_BuildValue("i", pItemData->GetAddonType());
}

/// 2. @ Srcs/Client/UserInterface/PythonItemModule.cpp
// Search
		{ "GetIconInstance", itemGetIconInstance, METH_VARARGS },

// Add above
		{ "GetAddonType", itemGetAddonType, METH_VARARGS },

 

Root example.

  Reveal hidden contents
''' 1. @ Client/Root/uiToolTip.py '''
# Search
	def __AppendLimitInformation(self):
		appendSpace = False

# Add below
		self.AppendTextLine("AddonType %d" % (item.GetAddonType()), self.CONDITION_COLOR)

 

 

Thank you 
The problem is still there

 

Link to comment
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


  • Activity

    1. 1

      Costume shining/costume effect system

    2. 992

      [40250] Reference Serverfile + Client + Src [15 Available Languages]

    3. 3

      Biologist Manager (C++ & LUA)

    4. 3

      Visual studio 2022 compiling issue

    5. 63

      Metin2 | Mount System Renewal

    6. 58

      Metin2 2004 Beta Client

    7. 0

      🔥Paradise2 PVP SERVER GLOBAL!! EN-ES-PT 🕐📢Apertura 11 de diciembre 21 horas de España!

  • Recently Browsing

    • No registered users viewing this page.
!-->
×
×
  • 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.