Jump to content

xP3NG3Rx

Honorable Member
  • Posts

    839
  • Joined

  • Days Won

    393
  • Feedback

    100%

Posts posted by xP3NG3Rx

  1. Hi everyone.

    I'd like to share a small guide for the official .mss file. It is a new Token in the sound script files which is controlling the volume, if the Token has been set of course.
    Couple of sound scripts are using this option:

    Spoiler

    956164a68a.png

    0.0.) Make a backup of your files.
    0.1.) Copying the codes from the board brings some invisible white characters with it, paste first into notepad++ and remove all the "?" characters.
    1.0.) Open MilesLib/Type.h.
    1.1.) Add the following variable to the two structured types by name: TSoundData and TSoundInstance.

    		float fSoundVolume;

    2.0.) Open MilesLib/Type.cpp.
    2.1.) In the function by name "NSound::LoadSoundInformationPiece" look for the following code:

    	int iCount;
    	if (!rkTextFileLoader.GetTokenInteger("sounddatacount", &iCount))
    	{
    		SetResultString((strResult + " File format error, SoundDataCount Unable to find.").c_str());
    		return false;
    	}

    2.2.) Paste the following below of it:

    	float fVolume = 0.0f;
    	if (rkTextFileLoader.GetTokenFloat("soundpositionenable", &fVolume))
    	{
    		SetResultString((strResult + " SoundPosition has checked.").c_str());
    	}
    	else
    	{
    		SetResultString((strResult + " SoundPosition has not checked.").c_str());
    	}

    2.3.) Bit scrolled down extend the for cycle like this:

    	for (DWORD i = 0; i < rSoundDataVector.size(); ++i)
    	{
    		//Some random stuff
    		//{}
    		rSoundDataVector[i].fSoundVolume = fVolume;
    	}

    2.4.) At the bottom of the file you will find this function: "NSound::DataToInstance", extend the for cycle with this line:

    		rSoundInstance.fSoundVolume = c_rSoundData.fSoundVolume;

    3.0.) Open the MilesLib/SoundManager.h.
    3.1.) Add a new argument to the definition of the "PlaySound2D" function:

    void PlaySound2D(const char * c_szFileName, float fVolume = 0.0f);

    4.0.) Open the MilesLib/SoundManager.cpp.
    4.1.) Replace the function "PlaySound2D" with this:

    void CSoundManager::PlaySound2D(const char * c_szFileName, float fVolume)
    {
    	if (0.0f == GetSoundVolume())
    		return;
    
    	ISoundInstance * pInstance;
    	if (!GetSoundInstance2D(c_szFileName, &pInstance))
    		return;
    
    	float fNewVolume = fVolume;
    	if (fVolume == 0.0f)
    		fNewVolume = GetSoundVolume();
    	pInstance->SetVolume(fNewVolume);
    	pInstance->Play(1);
    }

    4.2.) Replace this function "CSoundManager::UpdateSoundInstance" with this:
    <!> Attention: Of this function you will find two, be sure you will replace the correct one, check the arguments! I think the second one is not in used at all <!>

    void CSoundManager::UpdateSoundInstance(float fx, float fy, float fz, DWORD dwcurFrame, const NSound::TSoundInstanceVector * c_pSoundInstanceVector, BOOL bCheckFrequency)
    {
    	for (DWORD i = 0; i < c_pSoundInstanceVector->size(); ++i)
    	{
    		const NSound::TSoundInstance & c_rSoundInstance = c_pSoundInstanceVector->at(i);
    		if (c_rSoundInstance.dwFrame == dwcurFrame)
    		{
    			if (0.0f == c_rSoundInstance.fSoundVolume)
    			{
    				//Tracenf("PLAY SOUND %s", c_rSoundInstance.strSoundFileName.c_str());
    				PlayCharacterSound3D(fx, fy, fz, c_rSoundInstance.strSoundFileName.c_str(), bCheckFrequency);
    			}
    			else
    			{
    				PlaySound2D(c_rSoundInstance.strSoundFileName.c_str(), c_rSoundInstance.fSoundVolume);
    			}
    		}
    	}
    }

     

    Any problem occurs, post a comment below.

    • Love 14
  2. announcement_metin2_de_a61778d8ac8fb594236a78f1b01707d6.jpg

     

    Patch v19.3.9

    Contains:

    • New costumes with hairstyles
    • New weapon set
    • New armor set
    • New shining for the weapons and armors at level +15
    • Locales(de,en,hu), with new login and loading backgrounds
    • Map copys via 'ParentMapName'
    • A new pet
    • Redesigned monsters "Awakened"

    This is the hidden content, please

    This is the hidden content, please

    This is the hidden content, please

    This is the hidden content, please

    PS.: I  am not able to unpack the proto files, sorry.

    • Metin2 Dev 57
    • kekw 1
    • Sad 1
    • Cry 1
    • Think 1
    • Confused 1
    • Scream 1
    • Lmao 1
    • Good 12
    • Love 54
  3. Hello guys!

    After job, before sleep here is the latest patch, the v19.2.
    Have fun https://metin2.dev/uploads/custom-emoji/emoticons/default_wink.png

    • Ramadan costumes, hairstyles, pets
    • New minigame "samemonster" gui elements
    • 6th7th attribute gui elements

    This is the hidden content, please

    This is the hidden content, please

    This is the hidden content, please

    This is the hidden content, please

    This is the hidden content, please
    (All)

    • Metin2 Dev 38
    • Dislove 1
    • Sad 1
    • Smile Tear 1
    • Think 2
    • Confused 1
    • Good 6
    • Love 45
  4. 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?

    • Love 1
  5. Ahhh, yes. I'm blind. I've read WoM instead of WoW :lol:.
    But to be honest, that is not necessary at all.
    In metin2 you can see all the time how your character looks like, so why would we put it on the inventory as well?
    I would understand if the game would have that much opportunity like wow has, you could customize your outfit or something, but doesn't.

  6. 2 hours ago, Caramelito said:

    You can use this to create a cool inventory window xD same as WoW.

    What do you mean with this?

    Btw, here is my reversed class for the Monstercard render target, you can check it for your own ideas.

    This is the hidden content, please

    This one is still not compatible with this base, so you have to code it by yourself to make it work.
    Practice :D.

    • Metin2 Dev 33
    • Think 1
    • Confused 2
    • Good 7
    • Love 10
  7. 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
  8. 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 237
    • Eyes 6
    • Dislove 4
    • Angry 8
    • Sad 1
    • Smile Tear 2
    • Confused 6
    • Scream 1
    • Lmao 2
    • Good 55
    • muscle 1
    • Love 9
    • Love 147
×
×
  • 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.