Jump to content
×
×
  • Create New...

Sanii Shining System Without Python w/ Weapon Costumes


Recommended Posts

M2 Download Center

Hidden Content

    Give reaction to this post to see the hidden content.
( Internal )

Hello since i was looking for this system and it was "hard" to find it because Sanii's page is gone,

i had to put it together taking bits of code from here and there.

It is full with all the fixes and working with armor and weapon costumes.

giphy.gif

With this system you can assign an .mse file to a Vnum via 1 single .txt file

It is a nice system so everyone should be able to use it. 

Only thing left is to adapt it for Sash's/Wing's if someone want's to do that i can post it here.

Have fun.

Edited by zMyth
  • Metin2 Dev 25
  • Love 32
  • Love 8
  • Good 30
  • Scream 1
  • Think 1
  • Confused 2
  • Not Good 1
  • Angry 1
  • Troll 1
  • LoL 1
Link to comment
Posted (edited)
48 minutes ago, MrQuin said:

His original one had no problem, TF are you talking about xD

Read the post again i never said the original one had a problem it was just hard to find the system and the one i found was incomplete so i had do sanii's fixes and decided to post all together for ease of acess for everyone and i've heard of people trying to sell this so now it should not be a problem xd

Edited by zMyth
Link to comment
8 hours ago, zMyth said:

M2 Download Center

Hidden Content

    Give reaction to this post to see the hidden content.
( Internal )

Hello since i was looking for this system and it was "hard" to find it because Sanii's page is gone,

i had to put it together taking bits of code from here and there.

It is full with all the fixes and working with armor and weapon costumes.

Hidden Content

    Give reaction to this post to see the hidden content.

With this system you can assign an .mse file to a Vnum via 1 single .txt file

It is a nice system so everyone should be able to use it. 

Only thing left is to adapt it for Sash's/Wing's if someone want's to do that i can post it here.

Have fun.

  Reveal hidden contents

Dl - 

Hidden Content

    Give reaction to this post to see the hidden content.

VT - 

Hidden Content

    Give reaction to this post to see the hidden content.

 

I have the original system. And he had a very serious problem that was ... if you have to use the hide costume the effects would not hide. In this you have the correction of that?

  • Metin2 Dev 2
  • Love 1
  • Good 2
  • Vomit 1
Link to comment
  • Nitro Booster

How can I adapt it to the hands, jersey, chopper, and dagger?

It works without problems with Saifi

But the rest of the characters appear in a sapphire and not in the correct form.

Is there a solution for this?

 

Link to comment

i was looking for solution for original code

i have problem with dagger/fan weapons, when i go on mount it only shows one weapons, and second problem is when i wear animation weapon and unwear it shows weapon animation and original weapon.. someone?

Link to comment
On 4/25/2021 at 8:29 PM, Creo said:

i was looking for solution for original code

i have problem with dagger/fan weapons, when i go on mount it only shows one weapons, and second problem is when i wear animation weapon and unwear it shows weapon animation and original weapon.. someone?

With this that problem is not hapenning only if u did something wrong

Link to comment

the effects on the weapons are not seen 😕

6 minutes ago, zMyth said:

With this that problem is not hapenning only if u did something wrong

I have a problem the effects on the weapons are not seen and the effects on the armor yes

spacer.png

  • Metin2 Dev 1
Link to comment

mchHPOO.png

If your weapon ShiningEffect dont work just check bracket (red color on screenshot)

Edited by Artvr3
Link to comment
  • 2 weeks later...
On 5/4/2021 at 7:07 PM, Artvr3 said:

Hidden Content

    Give reaction to this post to see the hidden content.

If your weapon ShiningEffect dont work just check bracket (red color on screenshot)

 

On 4/26/2021 at 11:44 PM, zMyth said:

With this that problem is not hapenning only if u did something wrong

it looks like that

Hidden Content

    Give reaction to this post to see the hidden content.

  • Metin2 Dev 5
  • Love 2
  • Love 3
  • Good 4
  • Lmao 1
  • Sad 1
  • Angry 2
Link to comment
    

@Creo
my previous message was for the user @eeevil123 bcs I have some problem with that bracket.

You should check the files  InstanceBase.h and just double check all.

#ifdef ENABLE_SHINING_SYSTEM
		//2-Dimensions for Left & Right sided effects
		DWORD					m_weaponShiningEffects[2][CItemData::ITEM_SHINING_MAX_COUNT];
		DWORD					m_armorShiningEffects[CItemData::ITEM_SHINING_MAX_COUNT];
#endif


Also core function is in instanceBase.cpp  you should focus on this file to find the problem

					//Check for double sided weapons or fan which is attached on both sides when mounted.
#ifdef ENABLE_WOLFMAN
					bool twoSidedWeapon = bSubType == CItemData::WEAPON_DAGGER || (IsMountingHorse() && bSubType == CItemData::WEAPON_FAN) || bSubType == CItemData::WEAPON_CLAW;
#else
					bool twoSidedWeapon = bSubType == CItemData::WEAPON_DAGGER || (IsMountingHorse() && bSubType == CItemData::WEAPON_FAN);
#endif
					if (twoSidedWeapon)
					{
						__AttachWeaponShiningEffect(i, shiningTable.szShinings[i], "PART_WEAPON_LEFT");
					}
					__AttachWeaponShiningEffect(i, shiningTable.szShinings[i], "PART_WEAPON");


I use the same system and works perfectly fine after a few changes because I had to adjust it to my files

Hidden Content

    Give reaction to this post to see the hidden content.

 

  • Metin2 Dev 4
  • Love 1
  • Love 4
  • Good 4
  • Think 1
  • Not Good 1
  • Troll 1
Link to comment
On 4/26/2021 at 10:44 PM, eeevil123 said:

the effects on the weapons are not seen 😕

I have a problem the effects on the weapons are not seen and the effects on the armor yes

Hidden Content

    Give reaction to this post to see the hidden content.

 

Same problem. The effect doesnt show and the sysser are empty. Maybe the configuration is wrong. If / When i discover what happen i will update the topic.

 

FIX: The system is incomplete and there are bugs made on purpose, here I leave the resolution:

 

 

Locale_inc.h

ADD:

#define ENABLE_SHINING_SYSTEM

 

PythonApplication.cpp

Find: if (!rkItemMgr.Loa******ngTable(szShiningTable))

and replace with:

if (!rkItemMgr.LoadShiningTable(szShiningTable))

 

And at InstanceBase.cpp

Add the bracket (red color on screenshot)

mchHPOO.png

 

Edited by danhakhavro
  • Not Good 1
Link to comment
  • 1 month later...

It worked flawlessly. Thank you.

Note: If the effects appear to be corrupt, it is because the .dds files are not in the correct directory. It has nothing to do with the system.

Link to comment

 

Would it be possible to adapt this system for use with an item? For example, create a new item with type 35+ and subtype 1 (armor) 2 (weapon)? I was thinking of not writing the item ID to the file, but the ID of the item that equips you with the effect with the subtype. For an example, take a look at Tamashii's effect system.

Link to comment
  • 3 weeks later...

 

Hi, the system isn't working  on COSTUME_WEAPON, only on armor, weapons, costumes, but on COSTUME_WEAPON there are no effects

Can someone help me ?

Link to comment

I found another bug, but I think last.. (deep tested)

InstanceBase.cpp

bool removeRefineEffect = true;

This doesn't work on armor.. Any solution? Trying solved this, but I failed in it.. I think problem is SetArmor..

Here if anyone want check it // + for others, everything here is fixed except this little thing.

Spoiler
void CInstanceBase::__GetShiningEffect(CItemData* pItem)
{
    bool removeRefineEffect = true;
 
    CItemData::TItemShiningTable shiningTable = pItem->GetItemShiningTable();
 
    if (pItem->GetType() == CItemData::ITEM_TYPE_WEAPON || (pItem->GetType() == CItemData::ITEM_TYPE_COSTUME && pItem->GetSubType() == CItemData::COSTUME_WEAPON))
    {
        BYTE bSubType = pItem->GetType() == CItemData::ITEM_TYPE_COSTUME && pItem->GetSubType() == CItemData::COSTUME_WEAPON ? pItem->GetValue(3) : pItem->GetSubType();
 
        __ClearWeaponShiningEffect();
 
        if (shiningTable.Any() && removeRefineEffect)
        {
            __ClearWeaponRefineEffect();
        }
 
        for (int i = 0; i < CItemData::ITEM_SHINING_MAX_COUNT; i++)
        {
            if (strcmp(shiningTable.szShinings[i], ""))
            {
                if (bSubType == CItemData::WEAPON_BOW)
                {
                    __AttachWeaponShiningEffect(i, shiningTable.szShinings[i], "PART_WEAPON_LEFT");
                }
                else
                {
                    bool twoSidedWeapon = bSubType == CItemData::WEAPON_DAGGER || (IsMountingHorse() && bSubType == CItemData::WEAPON_FAN);
 
                    if (twoSidedWeapon)
                    {
                        __AttachWeaponShiningEffect(i, shiningTable.szShinings[i], "PART_WEAPON_LEFT");
                    }
 
                    __AttachWeaponShiningEffect(i, shiningTable.szShinings[i], "PART_WEAPON");
                }
            }
        }
    }
 
    if ((pItem->GetType() == CItemData::ITEM_TYPE_ARMOR && pItem->GetSubType() == CItemData::ARMOR_BODY) || (pItem->GetType() == CItemData::ITEM_TYPE_COSTUME && pItem->GetSubType() == CItemData::COSTUME_BODY))
    {
        __ClearArmorShiningEffect();
 
        if (shiningTable.Any() && removeRefineEffect)
        {
            __ClearArmorRefineEffect();
        }
 
        for (int i = 0; i < CItemData::ITEM_SHINING_MAX_COUNT; i++)
        {
            if (strcmp(shiningTable.szShinings[i], ""))
            {
                __AttachArmorShiningEffect(i, shiningTable.szShinings[i]);
            }
        }
    }
}
 
void CInstanceBase::__AttachWeaponShiningEffect(int effectIndex, const char* effectFileName, const char* boneName)
{
    if (IsAffect(AFFECT_INVISIBILITY))
    {
        return;
    }
 
    if (effectIndex >= CItemData::ITEM_SHINING_MAX_COUNT)
    {
        return;
    }
 
    CEffectManager::Instance().RegisterEffect(effectFileName, false, false);
 
    if (!strcmp(boneName, "PART_WEAPON"))
    {
        const char* c_szRightBoneName;
 
        m_GraphicThingInstance.GetAttachingBoneName(CRaceData::PART_WEAPON, &c_szRightBoneName);
 
        if (strcmp(c_szRightBoneName, ""))
        {
            m_weaponShiningEffects[0][effectIndex] = m_GraphicThingInstance.AttachEffectByName(0, c_szRightBoneName, effectFileName);
        }
    }
    else if (!strcmp(boneName, "PART_WEAPON_LEFT"))
    {
        const char* c_szLeftBoneName;
 
        m_GraphicThingInstance.GetAttachingBoneName(CRaceData::PART_WEAPON_LEFT, &c_szLeftBoneName);
 
        if (strcmp(c_szLeftBoneName, ""))
        {
            m_weaponShiningEffects[1][effectIndex] = m_GraphicThingInstance.AttachEffectByName(0, c_szLeftBoneName, effectFileName);
        }
    }
    else
    {
        Tracef("Invalid partname for getting attaching bone name. %s - %s", effectFileName, boneName);
    }
}
 
void CInstanceBase::__AttachArmorShiningEffect(int effectIndex, const char* effectFileName, const char* boneName)
{
    if (IsAffect(AFFECT_INVISIBILITY))
    {
        return;
    }
 
    if (effectIndex >= CItemData::ITEM_SHINING_MAX_COUNT)
    {
        return;
    }
 
    if (!strcmp(boneName, ""))
    {
        Tracef("Empty bone name for attaching armor shining. Effect Index: %i, EffectFileName: %s", effectIndex, effectFileName);
        return;
    }
 
    CEffectManager::Instance().RegisterEffect(effectFileName, false, false);
    m_armorShiningEffects[effectIndex] = m_GraphicThingInstance.AttachEffectByName(0, boneName, effectFileName);
}
 
void CInstanceBase::__ClearWeaponShiningEffect(bool detaching)
{
    if (detaching)
    {
        for (int i = 0; i < CItemData::ITEM_SHINING_MAX_COUNT; i++)
        {
            if (m_weaponShiningEffects[0][i])
            {
                __DetachEffect(m_weaponShiningEffects[0][i]);
            }
            if (m_weaponShiningEffects[1][i])
            {
                __DetachEffect(m_weaponShiningEffects[1][i]);
            }
        }
    }
 
    memset(&m_weaponShiningEffects, 0, sizeof(m_weaponShiningEffects));
}
 
void CInstanceBase::__ClearArmorShiningEffect(bool detaching)
{
    if (detaching)
    {
        for (int i = 0; i < CItemData::ITEM_SHINING_MAX_COUNT; i++)
        {
            if (m_armorShiningEffects[i])
            {
                __DetachEffect(m_armorShiningEffects[i]);
            }
        }
    }
 
    memset(&m_armorShiningEffects, 0, sizeof(m_armorShiningEffects));
}

 

Spoiler
bool CInstanceBase::SetWeapon(DWORD eWeapon)
{
    if (IsPoly())
        return false;
 
    if (__IsShapeAnimalWear())
        return false;
 
    if (__IsChangableWeapon(eWeapon) == false)
        eWeapon = 0;
 
    m_GraphicThingInstance.AttachWeapon(eWeapon);
    m_awPart[CRaceData::PART_WEAPON] = eWeapon;
 
    //Weapon Effect
    CItemData * pItemData;
    if (CItemManager::Instance().GetItemDataPointer(eWeapon, &pItemData))
    {
        if (pItemData->GetType() == CItemData::ITEM_TYPE_COSTUME)
        {
            __ClearWeaponRefineEffect();
            __ClearWeaponShiningEffect();
        }
 
        __GetRefinedEffect(pItemData);
        __GetShiningEffect(pItemData);
    }
    else
    {
        __ClearWeaponRefineEffect();
        __ClearWeaponShiningEffect();
    }
 
    return true;
}
 
void CInstanceBase::SetArmor(DWORD dwArmor)
{
    DWORD dwShape;
    if (__ArmorVnumToShape(dwArmor, &dwShape))
    {
        CItemData * pItemData;
        if (CItemManager::Instance().GetItemDataPointer(dwArmor, &pItemData))
        {
            float fSpecularPower=pItemData->GetSpecularPowerf();
            SetShape(dwShape, fSpecularPower);
            __GetRefinedEffect(pItemData);
            __GetShiningEffect(pItemData);
            return;
        }
        else
        {
            __ClearArmorRefineEffect();
            __ClearArmorShiningEffect();
        }
    }
 
    SetShape(dwArmor);
}

 

 

Edited by Cunoo
Link to comment
  • 4 weeks later...
On 7/12/2021 at 7:47 PM, qUakke said:

 

Hi, the system isn't working  on COSTUME_WEAPON, only on armor, weapons, costumes, but on COSTUME_WEAPON there are no effects

Can someone help me ?

You need to change the type etc of an item to the costume item.

Link to comment
  • 4 weeks later...

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


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.