- Joined
- May 13, 2011
- Messages
- 1,497
- Reaction score
- 157
"GenMatSuitbox" II_ARM_VAG_SUIT01 MODELTYPE_MESH "mVag01Upper/fVag01Upper" 0 MD_NEAR 0 1.0f 0 1 ATEX_NONE 1
"GenMatSuitbox" II_ARM_STORMB_HELMET_SET_KAL MODELTYPE_MESH "mStormbSet01Cap/fStormbSet01Cap" 0 MD_NEAR 0 1.0f 0 1 ATEX_NONE 1
"GenMatSuitbox" II_ARM_STORMB_HELMET_SET_KAL MODELTYPE_MESH "mStormbSet01Cap" "fStormbSet01Cap" 0 MD_NEAR 0 1.0f 0 1 ATEX_NONE 1
TCHAR* pszPart2 = strchr( lpModelElem->m_szPart, '/' );
if( pszPart2 == NULL )
_tcscat( pszPartsName, lpModelElem->m_szPart );
else
{
TCHAR szPartName[ 128 ];
if( nSex == SEX_MALE )
{
_tcscpy( szPartName, lpModelElem->m_szPart );
szPartName[ (int)pszPart2 - (int)lpModelElem->m_szPart ] = 0;
_tcscat( pszPartsName, szPartName );
}
else
{
_tcscat( pszPartsName, pszPart2 + 1 );
}
}
"InfoPeng" MI_INFO_PENG MODELTYPE_ANIMATED_MESH "" 0 MD_MID 0 2.0f 0 1 ATEX_NONE 1
{
"idle1" MTI_IDLE1
"idle1" MTI_IDLE2
"sit" MTI_SIT
"SitStand" MTI_SITSTAND
"stand" MTI_STAND
"walk" MTI_WALK
"GetUp" MTI_GETUP
"stand" MTI_JUMP1
"stand" MTI_JUMP2
"stand" MTI_JUMP3
"stand" MTI_JUMP4
"walk" MTI_RUN
}
I dont think you want to abstract the animation mapping away as it really is there for a reason (see how it maps all jump animations to standing?).
void CModelMng::MakePartsName( TCHAR* pszPartsName, LPCTSTR lpszRootName, DWORD dwIndex, int nSex )
{
LPMODELELEM lpModelElem = GetModelElem( OT_ITEM, dwIndex );
_tcscpy( pszPartsName, lpszRootName );
[COLOR="#FF0000"]if(nSex == SEX_MALE)
{
_tcscat( pszPartsName, _T( "_m" ) );
}else if (nSex == SEX_FEMALE)
{
_tcscat( pszPartsName, _T( "_f" ) );
}else
{
_tcscat( pszPartsName, _T( "_" ) );
}[/COLOR]
if( nSex == SEX_SEXLESS || nSex == -1 )
_tcscat( pszPartsName, lpModelElem->m_szPart );
else
{
TCHAR* pszPart2 = strchr( lpModelElem->m_szPart, '/' );
if( pszPart2 == NULL )
_tcscat( pszPartsName, lpModelElem->m_szPart );
else
{
TCHAR szPartName[ 128 ];
if( nSex == SEX_MALE )
{
_tcscpy( szPartName, lpModelElem->m_szPart );
szPartName[ (int)pszPart2 - (int)lpModelElem->m_szPart ] = 0;
_tcscat( pszPartsName, szPartName );
}else
{
_tcscat( pszPartsName, pszPart2 + 1 );
}
}
}
_tcscat( pszPartsName, _T( ".o3d" ) );
}
"GenMatSuitbox" II_ARM_M_VAG_SUIT01 MODELTYPE_MESH "[COLOR="#FF0000"]Vag01Upper[/COLOR]" 0 MD_NEAR 0 1.0f 0 1 ATEX_NONE 1
"GenMatSuitbox" II_ARM_F_VAG_SUIT01 MODELTYPE_MESH "[COLOR="#FF0000"]Vag01Upper[/COLOR]" 0 MD_NEAR 0 1.0f 0 1 ATEX_NONE 1
"GenMatSuitbox" II_ARM_VAG_SUIT01 MODELTYPE_MESH "[COLOR="#FF0000"]Vag01Upper[/COLOR]" 0 MD_NEAR 0 1.0f 0 1 ATEX_NONE 1
_tcscat( pszPartsName, _T( "_" ) );
if(nSex == SEX_MALE)
{
_tcscat( pszPartsName, _T( "_m" ) );
}else if (nSex == SEX_FEMALE)
{
_tcscat( pszPartsName, _T( "_f" ) );
}else
{
_tcscat( pszPartsName, _T( "_" ) );
}
if( nSex == SEX_MALE )
{
_tcscpy( szPartName, lpModelElem->m_szPart );
if( nSex == SEX_MALE )
{
[COLOR="#FF0000"]_tcscat( pszPartsName, _T( "_m" ) );[/COLOR]
_tcscpy( szPartName, lpModelElem->m_szPart );
}else
{
[COLOR="#FF0000"]_tcscat( pszPartsName, _T( "_f" ) );[/COLOR]
_tcscat( pszPartsName, pszPart2 + 1 );
}
"GenMatSuitbox" [COLOR="#FF0000"]II_ARM_VAG_SUIT01[/COLOR] MODELTYPE_MESH [COLOR="#FF0000"]"Vag01Upper"[/COLOR] 0 MD_NEAR 0 1.0f 0 1 ATEX_NONE 1
ItemProp* pItemProp = pItemElem->GetProp();
CString strIcon = pItemProp->szIcon;
//pItemElem->GetTexture()->Render( p2DRender, CPoint( x, y ), nalpha ); //Get Texture of Items inside Inventory.
if (g_pPlayer->GetSex() == SEX_MALE)
{
m_pTexture = CWndBase::m_textureMng.AddTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_ITEM, strIcon), 0xffff00ff);
//pItemElem->GetTextureMale()->Render(p2DRender, CPoint(x, y), nalpha);
m_pTexture->Render(p2DRender, CPoint(x, y), nalpha);
}
else if(g_pPlayer->GetSex() == SEX_FEMALE)
{
strIcon.Replace("Itm_m", "Itm_f");
m_pTexture = CWndBase::m_textureMng.AddTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_ITEM, strIcon), 0xffff00ff);
//pItemElem->GetTextureFemale()->Render(p2DRender, CPoint(x, y), nalpha);
m_pTexture->Render(p2DRender, CPoint(x, y), nalpha);
}
else
{
pItemElem->GetTexture()->Render(p2DRender, CPoint(x, y), nalpha);
}
Thanks Xakzi that worked fine.
here is mine script for the icons inside the inventory to match Sex of the char.
Code:ItemProp* pItemProp = pItemElem->GetProp(); CString strIcon = pItemProp->szIcon; //pItemElem->GetTexture()->Render( p2DRender, CPoint( x, y ), nalpha ); //Get Texture of Items inside Inventory. if (g_pPlayer->GetSex() == SEX_MALE) { m_pTexture = CWndBase::m_textureMng.AddTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_ITEM, strIcon), 0xffff00ff); //pItemElem->GetTextureMale()->Render(p2DRender, CPoint(x, y), nalpha); m_pTexture->Render(p2DRender, CPoint(x, y), nalpha); } else if(g_pPlayer->GetSex() == SEX_FEMALE) { strIcon.Replace("Itm_m", "Itm_f"); m_pTexture = CWndBase::m_textureMng.AddTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_ITEM, strIcon), 0xffff00ff); //pItemElem->GetTextureFemale()->Render(p2DRender, CPoint(x, y), nalpha); m_pTexture->Render(p2DRender, CPoint(x, y), nalpha); } else { pItemElem->GetTexture()->Render(p2DRender, CPoint(x, y), nalpha); }
It will replace szIcon Itm_m to Itm_f. I will make an switch into it so it only works on the parts that have no sex set.
if( bRander == 0 )
{
ItemProp* pItemProp = pItemElem->GetProp();
CString strIcon = pItemProp->szIcon;
switch (pItemProp->dwItemKind3)
{
case IK3_HELMET:
case IK3_SUIT:
case IK3_GAUNTLET:
case IK3_BOOTS:
switch (g_pPlayer->GetSex())
{
case SEX_MALE:
m_pTexture = CWndBase::m_textureMng.AddTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_ITEM, strIcon), 0xffff00ff);
m_pTexture->Render(p2DRender, CPoint(x, y), nalpha);
break;
case SEX_FEMALE:
strIcon.Replace("Itm_m", "Itm_f");
m_pTexture = CWndBase::m_textureMng.AddTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_ITEM, strIcon), 0xffff00ff);
m_pTexture->Render(p2DRender, CPoint(x, y), nalpha);
break;
}
break;
default:
pItemElem->GetTexture()->Render(p2DRender, CPoint(x, y), nalpha);
break;
}
}
else
if( bRander == 1 ) // »ç¿ëÇÒ¼ö ¾ø´Â°Í
{
pItemElem->GetTexture()->Render2( p2DRender, CPoint( x, y ), D3DCOLOR_ARGB( nalpha, 255, 100, 100 ) );
}
Here is an better version of the icons of the inventory
Code:if( bRander == 0 ) { ItemProp* pItemProp = pItemElem->GetProp(); CString strIcon = pItemProp->szIcon; switch (pItemProp->dwItemKind3) { case IK3_HELMET: case IK3_SUIT: case IK3_GAUNTLET: case IK3_BOOTS: switch (g_pPlayer->GetSex()) { case SEX_MALE: m_pTexture = CWndBase::m_textureMng.AddTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_ITEM, strIcon), 0xffff00ff); m_pTexture->Render(p2DRender, CPoint(x, y), nalpha); break; case SEX_FEMALE: strIcon.Replace("Itm_m", "Itm_f"); m_pTexture = CWndBase::m_textureMng.AddTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_ITEM, strIcon), 0xffff00ff); m_pTexture->Render(p2DRender, CPoint(x, y), nalpha); break; } break; default: pItemElem->GetTexture()->Render(p2DRender, CPoint(x, y), nalpha); break; } } else if( bRander == 1 ) // »ç¿ëÇÒ¼ö ¾ø´Â°Í { pItemElem->GetTexture()->Render2( p2DRender, CPoint( x, y ), D3DCOLOR_ARGB( nalpha, 255, 100, 100 ) ); }
Ps what do you think of this
Remove all DropItems from PropMoverEx.inc
Input all the things you want to drop from mobs inside PropDropEvent?
If have mine set to this atm for testing
DropLegend(II_WEA_SWO_SUHO, 25000, 0, -1, 1, 175); //25000
DropNormal(II_GEN_FOO_INS_LOLLIPOP, 700000000, 0, -1, 1, 4); //70%
as you can see i have made an new entrance DropLegend now i can set the legendary drop rate true Eventfunc.lua
So all Mobs can drop an legendary item.
But bosses can drop at an higher rate. That will still be inside PropMoverEx.inc.
I know it has nothing to do with the above. But its an idea.
Atm i am working on Array for the Motions.
Cause all Mobs/Npc's are using almost the same motions so i will make an standard array that will hold the commonly used motions so i can remove them also from MdlDyna.inc thus further shrinking down the file.
yeah that is actually a great idea.. less complicated to edit drops
Great idea with the animation thought I would suggest you read Hesito's comment again, he has a point.