Jump to content

Recommended Posts

  • Honorable Member

M2 Download Center

This is the hidden content, please
( Internal )

Hi guys.

 

First of all, I also know this system is public already, but I was boring, so I had to reverse something, so here it is:

This is the hidden content, please

If you have extra systems which might ignore the quivers, you must to extend them by yourself.
Just couple of them from the official: acce, costume bonus transfer, change look, skillbook combination, sealbind and so on.

Anything is wrong in the guide or missing something let me know, hit a comment below.

  • Metin2 Dev 223
  • Eyes 5
  • Dislove 4
  • Angry 8
  • Sad 1
  • Smile Tear 2
  • Confused 6
  • Scream 1
  • Lmao 2
  • Good 55
  • Love 9
  • Love 135
Link to comment
Share on other sites

  • Honorable Member

It seems fly effect does not update when you change arrow type, maybe you forgot something in UserInterface.

InstanceBase.cpp

#ifdef ENABLE_QUIVER_SYSTEM
bool CInstanceBase::SetArrow(DWORD eArrow)
{
	if (IsPoly())
		return false;
	if (__IsShapeAnimalWear())
		return false;

	if (eArrow)
	{
		CItemData * pItemData;
		if (!CItemManager::Instance().GetItemDataPointer(eArrow, &pItemData))
			return false;

		if (pItemData->GetType() == CItemData::ITEM_TYPE_WEAPON)
		{
			if (pItemData->GetSubType() == CItemData::WEAPON_ARROW)
			{
				m_GraphicThingInstance.SetQuiverEquipped(false);
				m_GraphicThingInstance.SetQuiverEffectID(0);
				return true;
			}

			if (pItemData->GetSubType() == CItemData::WEAPON_QUIVER)
			{
				m_GraphicThingInstance.SetQuiverEquipped(true);
				m_GraphicThingInstance.SetQuiverEffectID(pItemData->GetValue(0));
				return true;
			}
		}
	}

	m_GraphicThingInstance.SetQuiverEquipped(false);
	m_GraphicThingInstance.SetQuiverEffectID(0);
	return false;
}

void CInstanceBase::ChangeArrow(DWORD eArrow)
{
	SetArrow(eArrow);
}
#endif

InstanceBase.h

#ifdef ENABLE_QUIVER_SYSTEM
		bool					SetArrow(DWORD eArrow);
		void					ChangeArrow(DWORD eArrow);
#endif

NetworkActorManager.cpp

// Search:
		pkInstFind->ChangeWeapon(c_rkNetUpdateActorData.m_dwWeapon);

// Add below:
#ifdef ENABLE_QUIVER_SYSTEM
		pkInstFind->ChangeArrow(c_rkNetUpdateActorData.m_dwArrow);
#endif

 

Link to comment
Share on other sites

  • Forum Moderator
13 hours ago, xP3NG3Rx said:

Hi guys.

First of all, I also know this system is public already, but I was boring, so I had to reverse something, so here it is:

This is the hidden content, please

If you have extra systems which might ignore the quivers, you must to extend them by yourself.
Just couple of them from the official: acce, costume bonus transfer, change look, skillbook combination, sealbind and so on.

Anything is wrong in the guide or missing something let me know, hit a comment below.

Amazing ☺️ ??
Thank you!!

Best regards
Raylee

  • Metin2 Dev 3
  • Love 1
Link to comment
Share on other sites

  • Gold

This system allow to players have unlimited amount of arrows if they wearing arrow quiver and reducing distance damage of arrows and the quiver have a time limit? If I'm right and this system doing only these things, so I have an idea how it could be improved.

- There will be 2 quivers which you can upgrade up to +9

- If the quiver have higher + (the plus means how the quiver is upgraded like normal for example sword) you can place into the quiver more arrows and it will have a bonus return of arrows which will be raised by upgrading the quiver (so here must be some limitation of arrows you can place inside the quiver in some column in item_proto and new bonus return of arrows - I think it's already implemented in source and used for ninja archer skills but I'm not 100% sure)

- Arrows must be placed inside the quiver manually by moving arrows into a equipped or unequipped quiver (Optional thing: for players with VIP bonus - arrows picked up from the ground will be automatically placed inside a quiver)

- Remove time limitation because it's not needed with this improvement (I know it should be easily handled by item_proto columns)

(- Optional thing: make two types of arrow quivers - in basic quiver can be placed only wooden arrows and steel arrows  - in epic quiver can be placed only fire arrows and poison arrows)

Btw. Thanks for your time you spent for making systems better :) Keep it up!

I'll be always helpful! 👊 

Link to comment
Share on other sites

  • Honorable Member

I have almost the same idea :). I want to extend this system because right now it's boring and make no sense to use the normal arrows anymore, so I wrote already this reneval stuff on my TODO list, to make two types of quiver, the normal which allows you to shoot till the time expires, but I have already a new medium item, which allowes to expand the real_time with custom delays, but that is also impossible to make an item for 2 years long, the max is it's default limit value, in case of the highest quiver 30 days, you cannot step over on it. The second quiver is what you mentioned too, but it would check which arrow has been placed into it to make it stronger a bit. I also want to enable the multiple arrow usage by skills, which takes more arrows anyway, for example the horse skill for assassins, and the Arrow rain or how it calls. They are using more arrows, but the game removes only one.. In the new quiver you could put maximum 1000 arrows, or perhaps with more types it could be iimproved as well, and when the quiver is going to empty it will turns into literally empty, turns red on the equipment slot like the dragonstones when their time expires, and you must to refill it.

  • Love 3
Link to comment
Share on other sites

  • Premium

Right now it's like the official one and I think is perfect like that.

The item must have expired time, and you can make many different kind of quivers with different duration.

 

UPDATE:

Python:

            if app.ENABLE_QUIVER_SYSTEM:
                if itemSubType != item.WEAPON_QUIVER:
                    self.__AppendMetinSlotInfo(itemVnum, metinSlot)  # THIS TAKES 1 ARG IN MOST CLIENTS, IF YOU HAVE PROBLEM UPDATE THE FUNCTION OR REMOVE FIRST ARG.

 

C++ just:
 #ifdef ENABLE_QUIVER_SYSTEM
     if (pkArrow->GetSubType() == WEAPON_QUIVER)
         return;
 #endif

  int iCount = pkArrow->GetCount(); //Make It after the check

 

BUG:

The item is not giving normal attack and magic attack values to my char.  

(also the normal arrows!)

 

Btw everything's working very good.

Link to comment
Share on other sites

  • 1 month later...

               

On 2/24/2019 at 3:05 AM, xP3NG3Rx said:

Hi guys.

First of all, I also know this system is public already, but I was boring, so I had to reverse something, so here it is:

This is the hidden content, please

If you have extra systems which might ignore the quivers, you must to extend them by yourself.
Just couple of them from the official: acce, costume bonus transfer, change look, skillbook combination, sealbind and so on.

Anything is wrong in the guide or missing something let me know, hit a comment below.

 

instanceBase.cpp 

m_GraphicThingInstance.SetQuiverEquipped(false);
                m_GraphicThingInstance.SetQuiverEffectID(0);

 

These lines give error

 

++++ActorInstanceMotionEvent.cpp

if (m_eRace == CRaceData::RACE_ASSASSIN_W || m_eRace == CRaceData::RACE_ASSASSIN_M)

 

These lines give error

 

@P3NG3R

  • Metin2 Dev 1
Link to comment
Share on other sites

  • Honorable Member
On 2/26/2019 at 8:20 PM, WeedHex said:

Right now it's like the official one and I think is perfect like that.

The item must have expired time, and you can make many different kind of quivers with different duration.

 

UPDATE:

Python:

            if app.ENABLE_QUIVER_SYSTEM:
                if itemSubType != item.WEAPON_QUIVER:
                    self.__AppendMetinSlotInfo(itemVnum, metinSlot)  # THIS TAKES 1 ARG IN MOST CLIENTS, IF YOU HAVE PROBLEM UPDATE THE FUNCTION OR REMOVE FIRST ARG.

 

C++ just:
 #ifdef ENABLE_QUIVER_SYSTEM
     if (pkArrow->GetSubType() == WEAPON_QUIVER)
         return;
 #endif

  int iCount = pkArrow->GetCount(); //Make It after the check

 

BUG:

The item is not giving normal attack and magic attack values to my char.  

(also the normal arrows!)

 

Btw everything's working very good.

Oh yes, I made an extra modification for that, because of the quivers gave me some meaningless errors in syserr. The remain time is stored in the sockets so basically the game recognised as a stone into it so I've put this:

1ba21f603d.png

e1b650329a.png

And @anagonda1 which errors you got?

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

  • Premium
On 4/22/2019 at 10:19 PM, anagonda1 said:

 if (m_eRace == CRaceData::RACE_ASSASSIN_W || m_eRace == CRaceData::RACE_ASSASSIN_M)

@anagonda1 You need an enum for the races inside the CRaceData class.

 

@xP3NG3Rx

SYSERR: Apr 21 01:05:48.568996 :: CalcMeleeDamage: CalcMeleeDamage should not handle bows (name: ????)
The system is making also this syserr. Do you have a solution?

Link to comment
Share on other sites

  • Premium
10 minutes ago, xP3NG3Rx said:

This one is not happening to me. Put some debug message everywhere where the CalcMeleeDamage has been called and figure it out why it called with bow combined with quiver.

I'll try and show results, it happen seldom in my official server where play many people... You're right better to have more infos.

Btw, fix metinslot bug, I tried it and it's ok. I suggest to put directly codes and no screens and better to say "Wrap every function application with new arg xD"

 

Ps. Read about bug that I said.

Link to comment
Share on other sites

1 hour ago, WeedHex said:

@anagonda1 You need an enum for the races inside the CRaceData class.

 

@xP3NG3Rx

SYSERR: Apr 21 01:05:48.568996 :: CalcMeleeDamage: CalcMeleeDamage should not handle bows (name: ????)
The system is making also this syserr. Do you have a solution?

Can you throw me the CRaceData part?
Because I made additions to my fleet, but I get a mistake, can you help?

Can you download Client / Gamelib Files and drop me?

11 hours ago, xP3NG3Rx said:

Oh yes, I made an extra modification for that, because of the quivers gave me some meaningless errors in syserr. The remain time is stored in the sockets so basically the game recognised as a stone into it so I've put this:

1ba21f603d.png

e1b650329a.png

And @anagonda1 which errors you got?

Can you throw me the Client / Gamelib File?

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

  • Premium
Spoiler

RaceData.h

class CRaceData
{
    public:

.....

add:

        enum
        {
            RACE_WARRIOR_M,
            RACE_ASSASSIN_W,
            RACE_SURA_M,
            RACE_SHAMAN_W,
            RACE_WARRIOR_W,
            RACE_ASSASSIN_M,
            RACE_SURA_W,
            RACE_SHAMAN_M,
#ifdef ENABLE_WOLFMAN_CHARACTER
            RACE_WOLFMAN_M,
#endif
            RACE_MAX_NUM,
        };

......

@anagonda1  Maybe penger forgot to share it but it's logical >_<

Link to comment
Share on other sites

3 hours ago, WeedHex said:
  Hide contents

RaceData.h

class CRaceData
{
    public:

.....

add:

        enum
        {
            RACE_WARRIOR_M,
            RACE_ASSASSIN_W,
            RACE_SURA_M,
            RACE_SHAMAN_W,
            RACE_WARRIOR_W,
            RACE_ASSASSIN_M,
            RACE_SURA_W,
            RACE_SHAMAN_M,
#ifdef ENABLE_WOLFMAN_CHARACTER
            RACE_WOLFMAN_M,
#endif
            RACE_MAX_NUM,
        };

......

@anagonda1  Maybe penger forgot to share it but it's logical >_<

Thanks.

I will test

Link to comment
Share on other sites

23 hours ago, xP3NG3Rx said:

Oh yes, I made an extra modification for that, because of the quivers gave me some meaningless errors in syserr. The remain time is stored in the sockets so basically the game recognised as a stone into it so I've put this:

1ba21f603d.png

e1b650329a.png

And @anagonda1 which errors you got?

PyObject *itemGetSocketCountByVnum(...)

 

which cpp needs to be added?

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

  • Forum Moderator
8 hours ago, anagonda1 said:

PyObject *itemGetSocketCountByVnum(...)

which cpp needs to be added?

  • ../Srcs/Client/UserInterface/PythonItemModule.cpp
Spoiler

//1.1) Search for:
		{ "GetSocket",                 itemGetSocket,                           METH_VARARGS },
//1.1) Add after:
		{ "GetSocketCountByVnum",      itemGetSocketCountByVnum,                METH_VARARGS },

//1.2) Search for:
PyObject * itemGetSocket(PyObject * poSelf, PyObject * poArgs)
{
	[...]
}
//1.2) Add after:
PyObject * itemGetSocketCountByVnum(PyObject * poSelf, PyObject * poArgs)
{
	int iItemIndex;
	if (!PyTuple_GetInteger(poArgs, 0, &iItemIndex))
		return Py_BadArgument();

	CItemData * pItemData;
	if (!CItemManager::Instance().GetItemDataPointer(iItemIndex, &pItemData))
		return Py_BuildValue("i", 0);

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

 

 

  • Love 1
Link to comment
Share on other sites

  • 2 weeks later...
  • Premium

Bug fix:

Spoiler

 

    def __AppendMetinSlotInfo(self, itemVnum, metinSlot):
        if item.GetSocketCountByVnum(itemVnum) == 0 and item.GetItemSubType() == item.WEAPON_QUIVER:
            return

        if self.__AppendMetinSlotInfo_IsEmptySlotList(metinSlot):
            return

        for i in xrange(player.METIN_SOCKET_MAX_NUM):
            self.__AppendMetinSlotInfo_AppendMetinSocketData(i, metinSlot)

 

 

You was checking only for 'socketcount == 0', you'll get problems with some weapons. Changing like that I solved.

You told "The remain time is stored in the sockets game recognised as a stone into". So i think my change is ok.

Link to comment
Share on other sites

  • 2 weeks later...

There is another bug with weapon sockets, it doesn't add up the affects given by the metin stones.

Solution:
You have to skip item.cpp from zip and make changes in only this line:
#Find

if (m_pProto->bType == ITEM_WEAPON || m_pProto->bType == ITEM_ARMOR)

#Replace

if ((m_pProto->bType == ITEM_WEAPON || m_pProto->bType == ITEM_ARMOR) && m_pProto->bSubType != WEAPON_QUIVER)

It's look better and working :)

  • Love 1
Link to comment
Share on other sites

  • Premium

 

4 hours ago, intern said:

There is another bug with weapon sockets, it doesn't add up the affects given by the metin stones.

Solution:
You have to skip item.cpp from zip and make changes in only this line:
#Find


if (m_pProto->bType == ITEM_WEAPON || m_pProto->bType == ITEM_ARMOR)

#Replace


if ((m_pProto->bType == ITEM_WEAPON || m_pProto->bType == ITEM_ARMOR) && m_pProto->bSubType != WEAPON_QUIVER)

It's look better and working :)

Was one of the secret bugs from p3ng3r. He does it on purpose 99%

Link to comment
Share on other sites

Cytat

Anything is wrong in the guide or missing something let me know, hit a comment below.

If it's really true, I think is wrong way, because it's useless and easy to detect when something default what should working and after made changes of this tutorial it's not working.
If really someone want purposely do something like this, he should try harder without create bugs in default code. :)

Sorry xP3NG3Rx :P
 

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.