Adding Custom Jewel Setting Effects

Newbie Spellweaver
Joined
Mar 26, 2014
Messages
11
Reaction score
2
This is a simple guide on how to add in custom jewel setting effects, EX: diamonds and etc. I will be creating a custom effect using speed as an example.

WndManager.cpp
search for: void CWndMgr::PutAddedOpt( CItemElem* pItemElem, CEditString* pEdit )

In that void you will see: int nAddedOptDST[9];
You will need to change it to "int nAddedOptDST[10];" or higher depending on how many you are adding.

Under that you will see:
nAddedOptDST[0] = DST_HP_MAX; nAddedOptDST[1] = DST_ATKPOWER;
nAddedOptDST[2] = DST_ADJDEF;
nAddedOptDST[3] = DST_MELEE_STEALHP;
nAddedOptDST[4] = DST_PVP_DMG;
nAddedOptDST[5] = DST_STR;
nAddedOptDST[6] = DST_STA;
nAddedOptDST[7] = DST_DEX;
nAddedOptDST[8] = DST_INT;
I will add in speed as nAddedOptDST[9] = DST_SPEED;

Lower you will see:
case 0: dwColorbuf = dwItemColor[g_Option.m_nToolTipText].dwAddedOpt1;
break;
case 1:
dwColorbuf = dwItemColor[g_Option.m_nToolTipText].dwAddedOpt2;
break;
case 2:
dwColorbuf = dwItemColor[g_Option.m_nToolTipText].dwAddedOpt3;
break;
case 3:
dwColorbuf = dwItemColor[g_Option.m_nToolTipText].dwAddedOpt4;
break;
case 4:
dwColorbuf = dwItemColor[g_Option.m_nToolTipText].dwAddedOpt5;
break;
case 5:
dwColorbuf = dwItemColor[g_Option.m_nToolTipText].dwAddedOpt6;
break;
case 6:
dwColorbuf = dwItemColor[g_Option.m_nToolTipText].dwAddedOpt7;
break;
case 7:
dwColorbuf = dwItemColor[g_Option.m_nToolTipText].dwAddedOpt8;
break;
case 8:
dwColorbuf = dwItemColor[g_Option.m_nToolTipText].dwAddedOpt9;
break;
Adding in my option I will add:
case 9:
dwColorbuf = dwItemColor[g_Option.m_nToolTipText].dwAddedOpt10;
break;

If your stat is a % stat you will go lower and find:
if(nAddedOpt == 3 || nAddedOpt == 4) str.Format( "\n%s+%d%%", FindDstString( nAddedOptDST[nAddedOpt] ), nAddedValue );

Add in:
​
if(nAddedOpt == 3 || nAddedOpt == 4 || nAddedOpt == 9)
str.Format( "\n%s+%d%%", FindDstString( nAddedOptDST[nAddedOpt] ), nAddedValue );


Search for:
dwItemColor[FIRST_TC].dwAddedOpt9 = D3DCOLOR_XRGB( 147, 112, 219 );
Add in your option:
dwItemColor[FIRST_TC].dwAddedOpt10 = D3DCOLOR_XRGB( 147, 112, 219 );


WndManager.h
Search for:
DWORD dwAddedOpt9; //¹«±âÃß°¡¿É¼Ç1
Add in DWORD dwAddedOpt10;

HwOption.cpp
Search for:
g_WndMng.dwItemColor[m_nToolTipText].dwAddedOpt9 = D3DCOLOR_ARGB( 255, nR, nG, nB );
add in yours under it:
g_WndMng.dwItemColor[m_nToolTipText].dwAddedOpt10 = D3DCOLOR_ARGB( 255, nR, nG, nB );

Ultimate_GemAbility.txt
At the bottom, add in your effect.
ABILITY DST_SPEED
{
II_GEN_MAT_TOPAZ II_GEN_MAT_TOPAZ09 3 5 8 10 15
II_GEN_MAT_RUBY II_GEN_MAT_RUBY09 5 10 15 20 30
II_GEN_MAT_SAPPHIRE II_GEN_MAT_SAPPHIRE09 8 15 23 30 45
II_GEN_MAT_EMERALD II_GEN_MAT_EMERALD09 10 20 30 40 60
II_GEN_MAT_DIAMOND II_GEN_MAT_DIAMOND09 13 25 38 50 75
}

That should be it.
 
Sorry mate but you forgot 2 files.. tooltip.cpp & WndField.cpp

Tooltip.cpp

Code:
else if(m_nAddedJewel[i] >= II_GEN_MAT_DIAMOND10 && m_nAddedJewel[i] <= II_GEN_MAT_TOPAZ10)
					{
						dwColorbuf = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwAddedOpt10;
						DstText.Format( "%s", prj.GetText(TID_TOOLTIP_ALLSTAT) );
					}

WndField.cpp

Code:
else if(m_nJewelID[i] >= II_GEN_MAT_DIAMOND10 && m_nJewelID[i] <= II_GEN_MAT_TOPAZ10) //Áö´ÉÁõ°¡
				{
					dwColorbuf = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwAddedOpt10;
					DstText.Format( "%s", prj.GetText(TID_TOOLTIP_ALLSTAT) );
				}

Edit::

You also forgot one more thing..

Under

Code:
nAddedOptDST[0] = DST_HP_MAX;
	nAddedOptDST[1] = DST_ATKPOWER;
	nAddedOptDST[2] = DST_ADJDEF;
	nAddedOptDST[3] = DST_MELEE_STEALHP;
	nAddedOptDST[4] = DST_PVP_DMG;
	nAddedOptDST[5] = DST_STR;
	nAddedOptDST[6] = DST_STA;
	nAddedOptDST[7] = DST_DEX;
	nAddedOptDST[8] = DST_INT;

You can find

Code:
for(i=0; i<9; i++)
		{
			if( nAddedOptDST[i] == it->first )
			{
				nAddedOpt[nCount] = i;
				nAddedValue[nCount] = it->second;
				nCount++;
			}
		}

You also have to change the 9 to as many nAddedOptDST[*] there are :)

And the Topaz -> Diamon09 in Ultimate_Gem.txt has to be new ones... otherwise if that certain diamond is being used it will go either crashing or do nothing or get only the previous stat (which is INT)..
So many things that are missing, sorry but that is the harsh truth :/
 
Last edited:
Sorry mate but you forgot 2 files.. tooltip.cpp & WndField.cpp

Tooltip.cpp

Code:
else if(m_nAddedJewel[i] >= II_GEN_MAT_DIAMOND10 && m_nAddedJewel[i] <= II_GEN_MAT_TOPAZ10)
                    {
                        dwColorbuf = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwAddedOpt10;
                        DstText.Format( "%s", prj.GetText(TID_TOOLTIP_ALLSTAT) );
                    }

WndField.cpp

Code:
else if(m_nJewelID[i] >= II_GEN_MAT_DIAMOND10 && m_nJewelID[i] <= II_GEN_MAT_TOPAZ10) //Áö´ÉÁõ°¡
                {
                    dwColorbuf = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwAddedOpt10;
                    DstText.Format( "%s", prj.GetText(TID_TOOLTIP_ALLSTAT) );
                }

Edit::

You also forgot one more thing..

Under

Code:
nAddedOptDST[0] = DST_HP_MAX;
    nAddedOptDST[1] = DST_ATKPOWER;
    nAddedOptDST[2] = DST_ADJDEF;
    nAddedOptDST[3] = DST_MELEE_STEALHP;
    nAddedOptDST[4] = DST_PVP_DMG;
    nAddedOptDST[5] = DST_STR;
    nAddedOptDST[6] = DST_STA;
    nAddedOptDST[7] = DST_DEX;
    nAddedOptDST[8] = DST_INT;

You can find

Code:
for(i=0; i<9; i++)
        {
            if( nAddedOptDST[i] == it->first )
            {
                nAddedOpt[nCount] = i;
                nAddedValue[nCount] = it->second;
                nCount++;
            }
        }

You also have to change the 9 to as many nAddedOptDST
[*] there are :)

And the Topaz -> Diamon09 in Ultimate_Gem.txt has to be new ones... otherwise if that certain diamond is being used it will go either crashing or do nothing or get only the previous stat (which is INT)..
So many things that are missing, sorry but that is the harsh truth :/
All of the parts that say diamond01-09 are stat specific diamonds. Mine is for the random option jewel settings. I did forget the last part though with the i<9 to i<10.
 
thanks once again for both of u. i knew the 1st some had a lil short info cause of "diamond09" thingy now gonna recompile again.


EDIT:
Guys my Neuz Crashing when i put the cursor on the item with the new added stat. i wonder what seems to be missing.

EDIT:
Still no luck. tried many ways and doubled check every file. still crashing neuz.
 
Last edited:
thanks once again for both of u. i knew the 1st some had a lil short info cause of "diamond09" thingy now gonna recompile again.


EDIT:
Guys my Neuz Crashing when i put the cursor on the item with the new added stat. i wonder what seems to be missing.

EDIT:
Still no luck. tried many ways and doubled check every file. still crashing neuz.

is there any solution to prevent this happening?
 
Back