metin2united
xP3NG3Rx

[RLS] Quiver-System

29 posts in this topic

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:

Quiver System.7z

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.

  • Like 15
  • Thanks 5

Share this post


Link to post
Share on other sites

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

 

Share this post


Link to post
Share on other sites

The fly effect must appear only if you use the quiver item. With normal arrows the effect there isn't.

Thank you so much P3NG3R to share this useful system!

Share this post


Link to post
Share on other sites
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:

Quiver System.7z

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

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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.

  • Like 3

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

               

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:

Quiver System.7z

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

Share this post


Link to post
Share on other sites
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?

  • Thanks 1

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

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.

  • Like 1

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites
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 >_<

Share this post


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

Share this post


Link to post
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?

  • Sad 3

Share this post


Link to post
Share on other sites
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());
}

 

 

  • Thanks 1

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 :)

  • Like 1

Share this post


Link to post
Share on other sites

 

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%

Share this post


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

Share this post


Link to post
Share on other sites

In fact it does it on purpose for the people who install without testing or customizing the code.

  • Thanks 1

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

  • Recently Browsing   0 members

    No registered users viewing this page.